hydromt_wflow.workflows.prepare_cold_states#

hydromt_wflow.workflows.prepare_cold_states(ds_like: Dataset, config: dict, timestamp: str = None, mask_name_land: str = 'subcatchment', mask_name_river: str = 'river_mask') Tuple[Dataset, Dict[str, str]][source]#

Prepare cold states for Wflow.

Compute cold states variables:

  • soil_saturated_depth: saturated store [mm]

  • snow_leq_depth: snow storage [mm]

  • soil_temp: top soil temperature [°C]

  • soil_unsaturated_depth: amount of water in the unsaturated store, per layer [mm]

  • snow_water_depth: liquid water content in the snow pack [mm]

  • vegetation_water_depth: canopy storage [mm]

  • river_instantaneous_q: river discharge [m3/s]

  • river_instantaneous_h: river water level [m]

  • subsurface_q: subsurface flow [m3/d]

  • land_instantaneous_h: land water level [m]

  • land_instantaneous_q or land_instantaneous_qx**+**land_instantaneous_qy: overland flow for kinwave [m3/s] or overland flow in x/y directions for local-inertial [m3/s]

If lakes, also adds:

  • lake_instantaneous_water_level: lake water level [m]

If reservoirs, also adds:

  • reservoir_instantaneous_volume: reservoir volume [m3]

If glaciers, also adds:

  • glacier_leq_depth: water within the glacier [mm]

If paddy, also adds:

  • demand_paddy_h: water on the paddy fields [mm]

Parameters:
  • ds_like (xr.Dataset) –

    Dataset containing the staticmaps grid and variables to prepare some of the states.

    • Required variables: mask_name_land, mask_name_river

    • Other required variables (exact name will be read from the wflow config):

      soil_brooks_corey_c, soilthickness, theta_s, theta_r, ksat_vertical, f, slope, subsurface_ksat_horizontal_ratio

    • Optional variables (exact name from the wflow config): reservoir.locs,

      glacierstore, reservoir.maxvolume, reservoir.targetfullfrac, lake.waterlevel

  • config (dict) – Wflow configuration dictionary.

  • timestamp (str, optional) – Timestamp of the cold states. By default uses the starttime from the config.

  • mask_name_land (str, optional) – Name of the land mask variable in the ds_like dataset. By default subcatchment.

  • mask_name_river (str, optional) – Name of the river mask variable in the ds_like dataset. By default river_mask.

Returns:

  • xr.Dataset – Dataset containing the cold states.

  • dict – Config dictionary with the cold states variable names.