pycequeau.simulations.parameters.hydrology module

class pycequeau.simulations.parameters.hydrology.EvapotranspirationModel(value)[source]

Bases: IntEnum

Evapotranspiration model ids aligned with Simulation.h.

CEQUEAU = 1
KPENMAN = 2
MCGUINNESS = 4
MORTON = 6
PENMONT = 5
PRIESTLEYTAYLOR = 3
class pycequeau.simulations.parameters.hydrology.EvapotranspirationParameters(basin_structure)[source]

Bases: BasinParameterBase

Evapotranspiration parameter structure for supported models.

The selected model controls which keys are exported in the evapo block.

apply_option_defaults(option: dict | None) None[source]

Propagate option-dependent values into the evapotranspiration blocks.

set_parameters(values: ndarray) None[source]

Populate the evapotranspiration section for all supported CEQUEAU models.

The exported structure contains one parameter block per supported model. The active evapotranspiration model is controlled separately through the simulation option block.

to_dict() dict[source]

Return the CEQUEAU-compatible representation of the section.

class pycequeau.simulations.parameters.hydrology.HydrologicalParameters(basin_structure)[source]

Bases: BasinParameterBase

Container for the hydrological part of the CEQUEAU parameter structure.

This section groups the option, soil, initial-state, transfer, snowmelt, and evapotranspiration blocks that are required by the hydrological model.

property evapo: dict | None
property fonte: dict | None
classmethod from_values(basin_structure, flow_parameters: ndarray, initial_conditions: ndarray, transfer_parameters: ndarray, simulation_options: ndarray, snow_parameters: ndarray, evapotranspiration_parameters: ndarray, meteo_file_name: str) HydrologicalParameters[source]

Build the hydrological parameter group from the raw CEQUEAU input vectors.

This constructor hides the ordering dependencies of the setter-based API by computing the insolation day and propagating dependent values internally before returning the fully initialized section.

set_evapotranspiration(values: ndarray) None[source]

Populate the evapotranspiration structure.

set_initial_soil_conditions(values: ndarray) None[source]

Populate the initial storage conditions in solInitial.

set_option(values: ndarray, jonei: int | None) None[source]

Populate the simulation option block.

The jonei and joeva entries are computed from the basin meteorological forcing through day_max_insolation().

set_snowmelt(values: ndarray) None[source]

Populate the hydrological snowmelt structure.

set_soil(values: ndarray) None[source]

Populate the sol block.

The exported xla value is derived from the watershed centroid because CEQUEAU stores latitude as an integer code rather than decimal degrees.

set_transfer(values: ndarray) None[source]

Populate the transfer block and derive the basin travel time.

zn is exported as the average of the empirical time-of-concentration equations returned by compute_tc().

to_dict() dict[source]

Return the CEQUEAU-compatible representation of the section.

class pycequeau.simulations.parameters.hydrology.SnowmeltModel(value)[source]

Bases: IntEnum

Snowmelt model ids aligned with the CEQUEAU source code.

CEMA_NEIGE = 2
CEQUEAU = 1
UEB = 3
class pycequeau.simulations.parameters.hydrology.SnowmeltParameters(basin_structure)[source]

Bases: BasinParameterBase

Snowmelt parameter structure for the supported hydrological models.

The CEQUEAU parameter file stores several snowmelt model blocks in the fonte section. This class keeps the snow-specific defaults and model-dependent parameters in one place.

apply_option_defaults(option: dict | None, sol_initial: dict | None) None[source]

Inject option- and state-dependent values into the CEQUEAU snow block.

set_parameters(values: ndarray) None[source]

Populate the snowmelt parameter dictionaries.

Parameters:
  • values

    Ordered parameter vector used to populate the snowmelt structures. The first seven values correspond to the degree-day CEQUEAU model:

    strne_s, tfc_s, tfd_s, tsc_s, tsd_s, ttd, tts_s.

  • CEQUEAU (The exported structure contains the)

  • UEB

  • blocks (and CemaNeige)

  • options. (regardless of the active model selected in the simulation)

to_dict() dict[source]

Return the CEQUEAU-compatible representation of the section.