Skip to content

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 structure

  • info.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:

  1. replace_info: passing a parameter table (hereafter pre-loaded Table) throughmodel_structure.parameter_table in replace_info.

  2. CSV File: Primary method for complete parameter configuration

  3. optimization.json: Additional parameter-specific settings for optimization

Specify the CSV file path in experiment.json under basics/config_files:

json
"params": "parameterfile.csv"

Paramter Table Structure

The parameter CSV file includes the following columns:

ColumnDescription
model_idUnique identifier for the model containing the parameter
nameParameter name within its approach
initialInitial parameter value used in the experiment (uses optimized values if provided, otherwise default values)
defaultDefault parameter value defined in the approach
optimizedOptimized parameter value from previous optimization
lowerLower bound constraint for parameter optimization
upperUpper bound constraint for parameter optimization
modelBase model name
model_approachSpecific approach name
approach_funcFunction used to instantiate the approach
name_fullFull parameter name in "model.parameter" format
distParameter distribution type (e.g., "normal")
p_distDistribution parameters as a Vector
is_mlFlag 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_table takes 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:

  1. Preserve the field names in the header row

  2. Do not add new columns

  3. Only modify the following fields:

  • :optimized values

  • :lower bounds

  • :upper bounds

  • :dist and :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:

  1. model_parameter_default for all optimized parameters

  2. Individual entries in model_parameters_to_optimize for specific parameters

To use CSV/Table input exclusively:

  • Set model_parameter_default to null

  • Set model_parameters_to_optimize as a vector of parameters

  • For dictionary format, set each parameter info to null

Example Parameter CSV/Table

csv
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:

  1. Bounds Checking: Ensures parameter values fall within specified ranges

  2. Unit Conversion: Handles unit conversions based on timescales

  3. Time Step Consistency: Converts parameters to units consistent with the current model run time step by comparing timescale_run with the experiment model time step

Verification

Always verify parameter values and units in:

  • info.models.parameter_table for full model parameters

  • info.optimization.parameter_table (for CSV/Table subset when optimization or cost calculation is enabled)