HBV-EC Raven calibration

Ask questions or report problems
Ameer
Posts: 19
Joined: Mon Nov 04, 2019 10:28 am

Re: HBV-EC Raven calibration

Postby Ameer » Fri Feb 14, 2020 1:58 pm

julemai wrote:Hi Ameer,

could you please have a look in all your sub-folders ("inputs", "ost", "scripts") that there is really no folder "processor_0" existing?!

Thanks,
Julie

Thanks Julie,
Double checked everything and all looks clean. Here is something strange- we have server that is accessible to multiple user. my colleagues copied the project and run it via his account on the system- it runs like charm. However, when i run it using my account(after changing path and a few other adjustments), it gives me error. I compiled the source code multiple time to check if the executable may be causing the issue, however, didn't succeeded.
Ameer

rchlumsk
Posts: 156
Joined: Fri Sep 16, 2016 3:18 pm

Re: HBV-EC Raven calibration

Postby rchlumsk » Tue Feb 18, 2020 12:55 pm

Hi Ameer

This sounds like it may be an issue relative to your server, either in compilation or how the user accounts interact with the folders. This may be outside the scope of what we can help with in the Raven forum. If you do find a solution, please let us know!

Cheers,
Rob
Robert Chlumsky
rchlumsk@uwaterloo.ca

Ameer
Posts: 19
Joined: Mon Nov 04, 2019 10:28 am

Re: HBV-EC Raven calibration

Postby Ameer » Mon Aug 17, 2020 2:16 pm

Hi All,
I am using the parallel processing version of Ostrich to calibrate HBV_EC model. The ostrich runs fine and create a bunch of new directories for each processors, however, i do not see any change to the diagnostic file that has the objective function. I run 100,100,10000,50000 including changing objective function but no effect on the diagnostic file in the best directory. here is some screen shot of ostin.txt, ost-raven.bat, and save_best.bat along with file structure screen shot. I would appreciate any insight here.

From OstIn.txt

Code: Select all

ProgramType    ParallelDDS
ObjectiveFunction  GCOP
ModelExecutable     OST-RAVEN.bat
PreserveBestModel   save_best.bat


Code: Select all

NS      ./model/out/Boundary_Diagnostics.csv;   OST_NULL   1   4   ','


From OST-Raven.bat

Code: Select all

@echo off
copy .\Boundary.rvp model\Boundary.rvp
copy .\Boundary.rvh model\Boundary.rvh
copy .\Boundary.rvc model\Boundary.rvc
cd model
REM run the raven executable, which creates the diagnostics file
.\Raven.exe Boundary -o out\
cd..


From save_best.bat

Code: Select all

@echo off
@TITLE SAVE BEST SOLUTION
echo saving input files for the best solution found...
IF NOT EXIST best mkdir best
REM copy model\function_out.txt best\function_out.txt
copy model\out\Boundary_Diagnostics.csv best\Boundary_Diagnostics.csv
copy model\Boundary.rvp best\Boundary.rvp
copy model\Boundary.rvh best\Boundary.rvh
copy model\Boundary.rvc best\Boundary.rvc
copy model\out\Boundary_Hydrographs.csv best\Boundary_Hydrographs.csv

FileStructure.PNG
You do not have the required permissions to view the files attached to this post.

rchlumsk
Posts: 156
Joined: Fri Sep 16, 2016 3:18 pm

Re: HBV-EC Raven calibration

Postby rchlumsk » Wed Sep 02, 2020 12:21 pm

Hi Ameer

As mentioned via email, two bugs I found with the setup are as follows:
- the time to peak and time of concentration are independent, so Raven threw an error in some runs as the tc should be >= tp
- in the rvh file, the basin reference in the HRU section should be an integer value, not a double (1 not 1.00)

Other parameters may be able to changed to tied parameters in order to reduce the number of parameters in the setup. I was able to see the objective function changing so my best guess is that one or both of the issues above caused a static diagnostic value.

Best,
Rob
Robert Chlumsky
rchlumsk@uwaterloo.ca

Ameer
Posts: 19
Joined: Mon Nov 04, 2019 10:28 am

Re: HBV-EC Raven calibration

Postby Ameer » Thu Dec 17, 2020 10:55 am

Shall we be replacing the content of the model.rvc with the solution.rvc when validating the model against an independent period? In my model .rvi file I first defined period for calibration and then use the same .rvi file with changing time to validation period. I think if we do not transfer the solution.rvc content, which has state variables, we are only using the calibrated parameters but not the stabilized states obtained through model calibration.
Any thoughts?
Ameer

rchlumsk
Posts: 156
Joined: Fri Sep 16, 2016 3:18 pm

Re: HBV-EC Raven calibration

Postby rchlumsk » Fri Jan 29, 2021 9:46 am

Hi Ameer

Apologies for the late reply on this, got lost due to the timing of this post.

This depends on how you want to setup the calibration/validation periods and if they are connected. If you want to generate calib/valid metrics separately and not use a warm up period in validation, then yes, the solution.rvc should be used to start the validation model (assuming that calibration period is first).

If the periods are treated independently and you want to evaluate a validation period with your model for any given validation period, then using the exact solution.rvc or a more generic initial condition is less critical, but either way you should have a warm up period.

Two other ways you can overcome this is:
- using observation weights to determine for which days metrics are calcualted, or more easily
- in newer versions of Raven, the :EvaluationPeriod argument in the rvi file allows you to define these periods within the same model run, so you can evaluate calibration and validation metrics in one run of Raven. For example:

Code: Select all

:EvaluationPeriod CALIBRATION 2003-10-01 2005-09-30
:EvaluationPeriod VALIDATION 2005-10-01 2007-09-30
:EvaluationPeriod ANOTHER_PERIOD 2004-11-01 2006-03-30


Will allow you calculate separate metrics for different periods within the same model run, avoiding the need for using the solution.rvc file. In this case you should still provide a reasonable starting condition+warm up period before the first evaluation period. The resulting Diagnostics.csv file will have the usual reported metrics, as well as another row of metrics for each defined period.

Cheers,
Rob
Robert Chlumsky
rchlumsk@uwaterloo.ca


Return to “Help & Support”