You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add static const char *param_var_names[PARAM_VAR_NAME_COUNT] and static const char *param_var_types[PARAM_VAR_NAME_COUNT]
Update static int Get_value_ptr to include all added parameters
Parameters to include
The following vars are included in params.dat (thanks @madMatchstick for the table!)
Variable
Datatype
Limits
Units
Role
Process
Description
subcat
char
256
info_string
character title of subcatment; often same as model title
szm
double
meters
parameter_fixed
rainfall-runoff
exponential scaling parameter for the decline of transmissivity with increase in storage deficit; units of depth
t0
double
ln(meters^2)
parameter_fixed
areal average of ln(a/tanB)
td
double
hours
parameter_adjustable
rainfall-runoff
unsaturated zone time delay per unit storage deficit
chv
double
meters/hour
parameter_fixed
overland flow
average channel flow velocity
rv
double
meters/hour
parameter_fixed
overland flow
internal overland flow routing velocity
srmax
double
meters
parameter_adjustable
rainfall-runoff
maximum root zone storage deficit
Q0
double
meters/hour
state
initial subsurface flow per unit area
sr0
double
meters
state
initial root zone storage deficit below field capacity
infex
int
Boolean
option
green-ampt
set to 1 to call subroutine to do infiltration excess calcs; not usually appropriate in catchments where Topmodel is applicable (shallow highly permeable soils); default to 0
xk0
double
meters/hour
parameter_adjustable
rainfall-runoff
surface soil hydraulic conductivity
hf
double
meters
parameter_adjustable
green-ampt
wetting front suction for G&A soln.
dth
double
parameter_adjustable
green-ampt
water content change across the wetting front; dimensionless
The text was updated successfully, but these errors were encountered:
This assumes that set_value works similarly to CFE's set_value in which it uses get_value_ptr to implement the function. If it doesn't, adjust accordingly, but make sure that get_var_type is properly implemented for parameters you wish to expose this way.
Current behavior
TOPMODEL reads in parameter values from
params.dat
. If you want to change parameter values, you need to edit that file.Expected behavior
A recent pull request in the ngen repo gives Nextgen the ability to change parameter values. This means we can use the model engine to override parameter values from
params.dat
. To do this, we'll need to editbmi_topmodel.c
to include calibratable parameters. We should follow the updatedbmi_cfe.c
file as a template: https://github.com/NOAA-OWP/cfe/blob/master/src/bmi_cfe.cSteps to perform
#define PARAM_VAR_NAME_COUNT
static const char *param_var_names[PARAM_VAR_NAME_COUNT]
andstatic const char *param_var_types[PARAM_VAR_NAME_COUNT]
static int Get_value_ptr
to include all added parametersParameters to include
The following vars are included in
params.dat
(thanks @madMatchstick for the table!)1
to call subroutine to do infiltration excess calcs; not usually appropriate in catchments where Topmodel is applicable (shallow highly permeable soils); default to0
The text was updated successfully, but these errors were encountered: