user-defined parameters

mason
Posts: 3
Joined: Wed Sep 23, 2020 3:37 pm

user-defined parameters

Postby mason » Wed Sep 23, 2020 4:01 pm

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
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: user-defined parameters

Postby rchlumsk » Wed Oct 07, 2020 12:26 pm

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
Robert Chlumsky
rchlumsk@uwaterloo.ca

jrcraig
Posts: 57
Joined: Tue Jul 05, 2016 1:08 pm

Re: user-defined parameters

Postby jrcraig » Wed Oct 07, 2020 12:48 pm

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


Return to “Modelling Approaches and Tips”