Driver¶
The GotmDriver class is the primary entry point for
running pyGOTM simulations. It loads a GOTM-compatible YAML configuration,
constructs the runtime containers, runs the compiled timestep loop, and
returns the output as an xarray.Dataset.
Single-column driver facade for the translated pyGOTM stack.
- class pygotm.driver.GotmDriver(config)[source]¶
Bases:
objectRun the current single-column pyGOTM stack and emit xarray output.
- Parameters:
config (ConfigLike)
- run(*, max_steps=None, output_path=None, output=True, progress=None)[source]¶
Execute a single-column run and return the resulting dataset.
- static write_dataset(dataset, path)[source]¶
Write dataset to a NetCDF file.
Floating-point data variables are written as
float32to match the single-precision convention used by the Fortran GOTM NetCDF output. Storing both files at the same precision is required for the validation Frechet metric: a difference of float64(1e-10) vs float32(1e-10) on a floor value would otherwise straddle the minimum-clip boundary and produce spurious shape disagreements in the normalized comparison.