Parameter Configuration
SINDBAD enables flexible parameter management, allowing you to run models with custom parameter values instead of the default values defined in each model. This functionality supports:
Forward model runs
Parameter optimization experiments
Custom parameter values from literature or previous optimizations
Parameter Tables
SINDBAD stores parameter information in two key locations:
info.models.parameter_table: Contains all model parameters defined in the model structureinfo.optimization.parameter_table: Contains parameters selected for optimization (available only when optimization/cost calculation is enabled)
Parameter Input Methods
You can configure parameters using two complementary methods:
replace_info: passing a parameter table (hereafter
pre-loaded Table) throughmodel_structure.parameter_tableinreplace_info.CSV File: Primary method for complete parameter configuration
optimization.json: Additional parameter-specific settings for optimization
Specify the CSV file path in experiment.json under basics/config_files:
"params": "parameterfile.csv"Paramter Table Structure
The parameter CSV file includes the following columns:
| Column | Description |
|---|---|
model_id | Unique identifier for the model containing the parameter |
name | Parameter name within its approach |
initial | Initial parameter value used in the experiment (uses optimized values if provided, otherwise default values) |
default | Default parameter value defined in the approach |
optimized | Optimized parameter value from previous optimization |
lower | Lower bound constraint for parameter optimization |
upper | Upper bound constraint for parameter optimization |
model | Base model name |
model_approach | Specific approach name |
approach_func | Function used to instantiate the approach |
name_full | Full parameter name in "model.parameter" format |
dist | Parameter distribution type (e.g., "normal") |
p_dist | Distribution parameters as a Vector |
is_ml | Flag indicating if the parameter uses machine learning |
Parameter Overwriting Logic
SINDBAD uses parameters defined in approach .jl files by default. You can override these values using the following methods:
Parameter Table Overwriting:
The parameter table to overwrite the defaults can be provided either as a path to the CSV file or directly as a pre-loaded Table when CSV is loaded manually to modify the table on the go).
Parameter Precedence
Input parameter table takes precedence over default values
Pre-loaded parameter table passed as
model_structure.parameter_tabletakes precedence over the CSV file path.
CSV File/Pre-loaded Table Overwriting
When providing a CSV/Table, SINDBAD updates the default parameter table with the input parameter table, modifying:
Initial values
Lower and upper bounds
All columns except
(:model_id, :approach_func)
CSV/Table Format
The CSV/Table format is generated by SINDBAD during optimization output. Use this format as a template for any parameter modifications.
CSV/Table Modification Guidelines
When editing the parameter file:
Preserve the field names in the header row
Do not add new columns
Only modify the following fields:
:optimizedvalues:lowerbounds:upperbounds:distand:p_dist(for parameter distributions)
JSON Configuration
The optimization.json file provides additional parameter configuration options, taking precedence over CSV/Table input for:
:dist:p_dist:is_ml
Configure parameters in the JSON file using either:
model_parameter_defaultfor all optimized parametersIndividual entries in
model_parameters_to_optimizefor specific parameters
To use CSV/Table input exclusively:
Set
model_parameter_defaulttonullSet
model_parameters_to_optimizeas a vector of parametersFor dictionary format, set each parameter info to
null
Example Parameter CSV/Table
model_id,name,actual,default,optimized,lower,upper,timescale_run,units,timescale_ori,units_ori,model,model_approach,approach_func,name_full,is_ml,dist,p_dist
9,constant_frac_max_root_depth,0.2553059,0.5,0.78262913,0.001,0.8,,,,,rootMaximumDepth,rootMaximumDepth_fracSoilD,rootMaximumDepth_fracSoilD,rootMaximumDepth.constant_frac_max_root_depth,false,normal,"Float32[0.0, 1.0]"
10,k_efficiency_cVegRoot,0.0010001105,0.02,0.001155915,0.001,0.3,,m2/kgC (inverse of carbon storage),,m2/kgC (inverse of carbon storage),rootWaterEfficiency,rootWaterEfficiency_expCvegRoot,rootWaterEfficiency_expCvegRoot,rootWaterEfficiency.k_efficiency_cVegRoot,false,normal,"Float32[0.0, 1.0]"Parameter Validation
SINDBAD performs comprehensive parameter validation:
Bounds Checking: Ensures parameter values fall within specified ranges
Unit Conversion: Handles unit conversions based on timescales
Time Step Consistency: Converts parameters to units consistent with the current model run time step by comparing
timescale_runwith the experiment model time step
Verification
Always verify parameter values and units in:
info.models.parameter_tablefor full model parametersinfo.optimization.parameter_table(for CSV/Table subset when optimization or cost calculation is enabled)