API Referencerun_model()

run_model()

The main entry point for forward radiative transfer simulations.

from biosnicar import run_model

Signature

run_model(input_file="default", **overrides) -> Outputs

Parameters

ParameterTypeDefaultDescription
input_filestr"default"Path to YAML config file. "default" uses bundled inputs.yaml.
solzenint50Solar zenith angle (1–89 degrees)
directint1Sky condition: 1 = clear, 0 = overcast
incomingint0Irradiance profile index (0–6)
rdsint or list500Grain/bubble effective radius (µm)
rhoint or list400Bulk ice density (kg/m³)
dzlist[float][0.02, 0.146]Layer thicknesses (m)
lwcfloat or list0.0Liquid water content
layer_typeint or list00 = granular, 1 = solid ice + Fresnel
shpint or list0Grain shape (0–4)
grain_arfloat or list1.0Grain aspect ratio
hex_sidefloat or list50Hexagonal prism side length (µm)
hex_lengthfloat or list100Hexagonal prism length (µm)
black_carbonfloat or list0Black carbon concentration (ppb)
snow_algaefloat or list0Snow algae concentration (cells/mL)
glacier_algaefloat or list0Glacier algae concentration (cells/mL)
dustfloat or list0Mineral dust concentration (ppb)

Override behaviour

  • Scalar ice parameters are broadcast to all layers
  • Scalar impurity concentrations are applied to the first layer only
  • List overrides that change the layer count trigger automatic resizing of all per-layer attributes

Returns

An Outputs object.

Examples

# Default configuration
outputs = run_model()
 
# Override parameters
outputs = run_model(solzen=50, rds=1000, black_carbon=500)
 
# Multi-layer
outputs = run_model(
    dz=[0.02, 0.05, 0.05, 0.05, 0.83],
    rds=[800, 900, 1000, 1100, 1200],
    glacier_algae=[40000, 10000, 0, 0, 0],
)
 
# Chain to satellite bands
s2 = run_model(solzen=50, rds=1000).to_platform("sentinel2")
 
# Custom input file
outputs = run_model(input_file="path/to/config.yaml")