Skip to contents

Create parameter for UCODE configuration

Usage

ucConfParameter(
  paramname,
  startvalue = 1e+38,
  lowerValue = -1e+38,
  upperValue = 1e+38,
  lowerConstraint = 0,
  upperConstraint = 1,
  constrain = "yes",
  adjustable = "yes",
  maxChange = 2,
  perturbAmt = 0.5
)

Arguments

paramname

Parameter name (up to 12 characters; not case sensitive) - a character string that is used in a template file or in an equation of a derived parameter in the Derived_Parameters input block. Each parameter name needs to be unique and can not be the same as any parameter name defined in the Derived_Parameter input block. For possible parameter names see ucSetPlaceholder

startvalue

Starting parameter value. Default=A huge real number. The huge real number is obtained for the computer being used and commonly is about 1e38.

lowerValue

Smallest reasonable value for this parameter. Default= -(Huge real number). In absolute value, commonly about -1e38.

upperValue

Largest reasonable value for this parameter. Default= +(Huge real number). Commonly about +1e38.

lowerConstraint

Lower limit of considered parameter values. Default (HS): 0

upperConstraint

Upper limit of considered parameter values. Default (HS): 1

constrain

yes: constrain parameter values using LowerConstraint and UpperConstraint. Default (HS): yes.

adjustable

yes: change this value as needed depending on the purpose of the UCODE_2005 run defined in the UCODE_Control_Data input file. no: leave the value of this parameter unchanged. Default (HS): "yes".

maxChange

Maximum fractional parameter change allowed between parameter iterations. Default=2.0.

perturbAmt

Fractional amount of parameter value to perturb to calculate sensitivity. Commonly 0.01 to 0.10. Default (HS): 0.5. See discussion in Chapter 3.

Value

data.frame containing all argument values with column names equalling function argument names

Examples

  # Use rbind to create a data.frame containing parameter information as
  # required by ucConf:
  cpara <- rbind(
    ucConfParameter(paramname = "HKR", startvalue = 2e-5, 
                    lowerConstraint = 1e-5, upperConstraint = 1e-1,
                    maxChange = 1, perturbAmt = 0.5, 
                    constrain = "yes", adjustable = "yes"),
    ucConfParameter(paramname = "HKZ", startvalue = 2e-7, 
                    lowerConstraint = 1e-7, upperConstraint = 1e-3,
                    maxChange = 1, perturbAmt = 0.5,
                    constrain = "yes", adjustable = "yes"))  
  
  # set this parameter setting in default UCODE configuration
  ucConf(parameters = cpara)
#> $general
#> $general$gof.digits
#> [1] 5
#> 
#> $general$maxIter
#> [1] 100
#> 
#> 
#> $parameters
#>   paramname startvalue lowerValue upperValue lowerConstraint upperConstraint
#> 1       HKR      2e-05     -1e+38      1e+38           1e-05           0.100
#> 2       HKZ      2e-07     -1e+38      1e+38           1e-07           0.001
#>   constrain adjustable maxChange perturbAmt
#> 1       yes        yes         1        0.5
#> 2       yes        yes         1        0.5
#> 
#> $weights
#>      PW PD1 PD2 PS1 PS2
#> RMSE  1   1   1   1   1
#> NSE   1   1   1   1   1
#> mNSE  1   1   1   1   1
#>