[export] ExportConfig#

TOML section: [export]

Pydantic model: ExportConfig defined in hydromodpy.simulation.planning.export_config.

Source on GitHub

Automated export configuration loaded from the top-level [export] section.

Show fields:

Fields#

netcdf

bool default = False user source

Export to NetCDF-4/UGRID.

csv_timeseries

bool default = False user source

Export time series to CSV at the end of the run. Off by default: the canonical time series lives in tables.parquet; CSV is an on-demand export.

vtu

bool default = False dev source

Export to VTU (ParaView).

geotiff

bool default = False dev source

Export to GeoTIFF.

shapefile

bool default = False dev source

Export to Shapefile.

package

bool default = False user source

Also write a portable ‘<run>.hmp’ archive (config, provenance, fields, timeseries, RO-Crate) after the run finalizes. The one-line switch for ‘this run must be shareable forever’.

output_dir

str | None default = None dev source

Output directory for exports. Defaults to project results folder.

variables in TOML: [export.variables]

ExportVariablesConfig factory user source

Which variables to include in exports.

Fields of ExportVariablesConfig
head

bool default = True user source

Export head field.

concentration

bool default = False user source

Export concentration field.

derived

bool default = True user source

Export derived variables (watertable_depth, seepage_mask, etc.).

times

Union[int, list[int], str] default = “last” user source

Timestep selector for field/raster exports: ‘first’, ‘last’, ‘all’, a timestep index, or a list of indices. Time-series CSV always covers all steps. A vtu, a geotiff and a shapefile hold ONE timestep per file, so a selector naming several collapses to the last for them and the run says so; only the NetCDF export carries the whole selection.

One of: "first" "last" "all"

resolution

float | None default = None dev source

GeoTIFF pixel size in CRS units for toggle exports. Auto-derived from the grid when omitted.

artifacts in TOML: [[export.artifacts]]

list[ExportSpec] factory dev source

Explicit export artifacts: full control over variable, format, timestep and destination, beyond the format toggles above.

Fields of ExportSpec
var

str | list[str] required user source

Variable name, list of names, or ‘*’ (all timeseries, csv only).

dest

Path required user source

Output file path. Its extension can imply ‘fmt’.

fmt

ExportFormat | None default = None user source

Output format. Inferred from the ‘dest’ extension when omitted.

time

Union[int, list[int], str, NoneType] default = None user source

Timestep selector: index, list of indices, ‘first’, ‘last’, ‘all’, or None (per-format default: all timesteps for netcdf, last for rasters).

One of: "first" "last" "all"

layer

int | None default = None dev source

Layer index for 3D fields.

resolution

float | None default = None dev source

GeoTIFF pixel size in CRS units. Auto-derived from the grid when omitted.

crs

str | None default = None dev source

Output CRS (e.g. ‘EPSG:2154’). Auto-filled from the simulation when omitted.

nodata

float default = -9999.0 dev source

Nodata fill value for raster formats.

Starter TOML snippet#

Click to expand a copy-pasteable [export] TOML skeleton

Copy this block into your project.toml and uncomment the lines you want to set. Sub-tables ([parent.subfield]) appear in the order Pydantic expects them.

[export]
# netcdf = false
# csv_timeseries = false
# package = false
# times = "last"

[export.variables]
# head = true
# concentration = false
# derived = true

Entity-relationship diagram#

ER diagram for ExportConfig

Click to zoom and pan. Press Esc or click outside to close.