Page 1 of 1

user-defined parameters

Posted: Wed Sep 23, 2020 4:01 pm
by mason
Hello all, first-time post for me

I'm wondering whether there is some way to create a user-defined parameter value to the Parameter File that can be place-holder elsewhere in the file, in the same way a constant variable can be declared before compiling computer code. For instance, I have a model broken-up into a number of HRUs, each with 3 soil layers. Should I wish to change the bottom-most layer of every HRU to have the same decay coefficient, I'd like to do that once in the file, not everywhere it's needed. See attached of what I'm thinking:

s.PNG

Re: user-defined parameters

Posted: Wed Oct 07, 2020 12:26 pm
by rchlumsk
Hi Mason

Nice to see you on the Raven forum, my apologies for the delay in answering this question.

There is not a way to define a user parameter to my knowledge. However, if you define the default value for that parameter, you can use the _DEFAULT flag to use the default value (user defined) rather than specifying the same value repeatedly. Example below.

Code: Select all

:LandUseClasses   
   :Attributes         IMPERMEABLE_FRAC   FOREST_COVERAGE      
   :Units              frac               frac   
   [DEFAULT]         1.000000E-01         9.000000E-01
   Dense_deciduous       _DEFAULT            _DEFAULT               
   Mixed_deciduous   2.0E-02            _DEFAULT
   Mixed_coniferous    _DEFAULT            _DEFAULT
    Water               0               0
    LAKE                0               0
:EndLandUseClasses


There is an _AUTO flag that can be used to calculate some parameters, where support for autogeneration exists. This is discussed more in Section A.2.3 of the Raven manual.

It's not quite the same thing, but hope that helps with specifying parameter values efficiently. I will forward that suggestion of user parameters though, that could be a useful feature.

Thanks,
Rob

Re: user-defined parameters

Posted: Wed Oct 07, 2020 12:48 pm
by jrcraig
Hi Mason,

This is a great idea - this is not possible now, but I will add this to the Raven wish list. In the meantime, hopefully the _DEFAULT flag will be sufficient for most needs.

Regards,
James Craig