User API
Execution
Main module.
- class ravenpy.ravenpy.Emulator(config: Config, workdir: str | PathLike | None = None, modelname: str | None = None, overwrite: bool = False)[source]
-
- property modelname: str
File name stem of configuration files.
- property output: OutputReader
Return simulation output object.
- property output_path: Path | None
Path to model outputs.
- resume(timestamp: bool = True) Config[source]
Return new model configuration using state variables from the end of the run.
- Parameters:
timestamp (bool) – If False, ignore time stamp information in the solution. If True, the solution will set StartDate to the solution’s timestamp.
- run(overwrite: bool = False) OutputReader[source]
Run the model.
This will write RV files if not already done.
- Parameters:
overwrite (bool) – If True, overwrite existing files.
- property workdir: Path
Path to RV files and output subdirectory.
- class ravenpy.ravenpy.EnsembleReader(*, run_name: str | None = None, paths: list[str | PathLike] | None = None, runs: list[OutputReader] | None = None, dim: str = 'member')[source]
- property files
- property hydrograph
- property storage
- class ravenpy.ravenpy.OutputReader(run_name: str | None = None, path: str | Path | None = None)[source]
- property diagnostics: dict | None
Return model diagnostics.
- property files: dict
Return paths to output files.
- property hydrograph: Dataset
Return the hydrograph.
- property messages: str | None
- property path: Path
Path to output directory.
- property solution: dict | None
Return solution file content.
- property storage: Dataset
Return the storage variables.
- exception ravenpy.ravenpy.RavenError[source]
RavenError exception class.
An error that is meant to be raised whenever a message of type “ERROR” is found in the Raven_errors.txt file resulting from a Raven (i.e. the C program) run.
- exception ravenpy.ravenpy.RavenWarning[source]
RavenWarning warning class.
A warning corresponding to a message of type “WARNING” in the Raven_errors.txt file resulting from a Raven (i.e. the C program) run.
- ravenpy.ravenpy.run(modelname: str, configdir: str | Path, outputdir: str | Path | None = None, overwrite: bool = True, verbose: bool = False) Path[source]
Run Raven given the path to an existing model configuration.
- Parameters:
modelname (str) – Configuration files stem, i.e. the file name without extension.
configdir (Path or str) – Path to configuration files directory.
outputdir (Path or str, optional) – Path to model simulation output. If None, will write to configdir/output.
overwrite (bool) – If True, overwrite existing files.
verbose (bool) – If True, always display Raven warnings. If False, warnings will only be printed if an error occurs.
- Returns:
The path to the model outputs.
- Return type:
Path
Configuration
- pydantic model ravenpy.config.commands.AssimilateStreamflow[source]
Subbasin ID to assimilate streamflow for.
Show JSON schema
{ "title": "AssimilateStreamflow", "description": "Subbasin ID to assimilate streamflow for.", "type": "object", "properties": { "sb_id": { "title": "Sb Id", "type": "string" } }, "additionalProperties": false, "required": [ "sb_id" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
coerce_numbers_to_str: bool = True
- Fields:
- field sb_id: str [Required]
- pydantic model ravenpy.config.commands.AssimilatedState[source]
Show JSON schema
{ "title": "AssimilatedState", "type": "object", "properties": { "state": { "anyOf": [ { "enum": [ "ATMOSPHERE", "ATMOS_PRECIP", "CANOPY", "CANOPY_SNOW", "CANOPY_TEMP", "COLD_CONTENT", "CONSTITUENT", "CONSTITUENT_SINK", "CONSTITUENT_SRC", "CONSTITUENT_SW", "CONVOLUTION", "CONV_STOR", "CROP_HEAT_UNITS", "CUM_INFIL", "CUM_SNOWMELT", "DEPRESSION", "GLACIER", "GLACIER_CC", "GLACIER_ICE", "GROUNDWATER", "LAKE_STORAGE", "MULTIPLE", "PERMAFROST_DEPTH", "PONDED_WATER", "ROOT", "SNOW", "SNOW_AGE", "SNOW_ALBEDO", "SNOW_COVER", "SNOW_DEPTH", "SNOW_LIQ", "SNOW_TEMP", "SOIL", "SOIL[0]", "SOIL[1]", "SOIL[2]", "SOIL_TEMP", "SURFACE_WATER", "SURFACE_WATER_TEMP", "TOTAL_SWE", "TRUNK", "WETLAND" ], "type": "string" }, { "const": "STREAMFLOW", "type": "string" } ], "title": "State" }, "group": { "title": "Group", "type": "string" } }, "additionalProperties": false, "required": [ "state", "group" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field group: str [Required]
- field state: Literal['ATMOSPHERE', 'ATMOS_PRECIP', 'CANOPY', 'CANOPY_SNOW', 'CANOPY_TEMP', 'COLD_CONTENT', 'CONSTITUENT', 'CONSTITUENT_SINK', 'CONSTITUENT_SRC', 'CONSTITUENT_SW', 'CONVOLUTION', 'CONV_STOR', 'CROP_HEAT_UNITS', 'CUM_INFIL', 'CUM_SNOWMELT', 'DEPRESSION', 'GLACIER', 'GLACIER_CC', 'GLACIER_ICE', 'GROUNDWATER', 'LAKE_STORAGE', 'MULTIPLE', 'PERMAFROST_DEPTH', 'PONDED_WATER', 'ROOT', 'SNOW', 'SNOW_AGE', 'SNOW_ALBEDO', 'SNOW_COVER', 'SNOW_DEPTH', 'SNOW_LIQ', 'SNOW_TEMP', 'SOIL', 'SOIL[0]', 'SOIL[1]', 'SOIL[2]', 'SOIL_TEMP', 'SURFACE_WATER', 'SURFACE_WATER_TEMP', 'TOTAL_SWE', 'TRUNK', 'WETLAND', 'STREAMFLOW'] [Required]
- pydantic model ravenpy.config.commands.BasinIndex[source]
Initial conditions for a flow segment.
Show JSON schema
{ "title": "BasinIndex", "description": "Initial conditions for a flow segment.", "type": "object", "properties": { "sb_id": { "default": 1, "title": "Sb Id", "type": "integer" }, "name": { "default": "watershed", "title": "Name", "type": "string" }, "ChannelStorage": { "default": 0.0, "title": "Channelstorage", "type": "number" }, "RivuletStorage": { "default": 0.0, "title": "Rivuletstorage", "type": "number" }, "Qout": { "default": [ 1.0, 0.0, 0.0 ], "items": { "type": "number" }, "title": "Qout", "type": "array" }, "Qlat": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qlat" }, "Qin": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qin" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
coerce_numbers_to_str: bool = True
- Fields:
- field channel_storage: float = 0.0 (alias 'ChannelStorage')
- field name: str = 'watershed'
- field qin: Sequence[float] | None = None (alias 'Qin')
- field qlat: Sequence[float] | None = None (alias 'Qlat')
- field qout: Sequence[float] = (1.0, 0.0, 0.0) (alias 'Qout')
- field rivulet_storage: float = 0.0 (alias 'RivuletStorage')
- field sb_id: int = 1
- pydantic model ravenpy.config.commands.BasinStateVariables[source]
Show JSON schema
{ "title": "BasinStateVariables", "type": "array", "$defs": { "BasinIndex": { "additionalProperties": false, "description": "Initial conditions for a flow segment.", "properties": { "sb_id": { "default": 1, "title": "Sb Id", "type": "integer" }, "name": { "default": "watershed", "title": "Name", "type": "string" }, "ChannelStorage": { "default": 0.0, "title": "Channelstorage", "type": "number" }, "RivuletStorage": { "default": 0.0, "title": "Rivuletstorage", "type": "number" }, "Qout": { "default": [ 1.0, 0.0, 0.0 ], "items": { "type": "number" }, "title": "Qout", "type": "array" }, "Qlat": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qlat" }, "Qin": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qin" } }, "title": "BasinIndex", "type": "object" } }, "items": { "$ref": "#/$defs/BasinIndex" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[BasinIndex] [Required]
- pydantic model ravenpy.config.commands.ChannelProfile[source]
ChannelProfile command (RVP).
Show JSON schema
{ "title": "ChannelProfile", "description": "ChannelProfile command (RVP).", "type": "object", "properties": { "name": { "default": "chn_XXX", "title": "Name", "type": "string" }, "Bedslope": { "default": 0, "title": "Bedslope", "type": "number" }, "SurveyPoints": { "$ref": "#/$defs/SurveyPoints" }, "RoughnessZones": { "$ref": "#/$defs/RoughnessZones" } }, "$defs": { "RoughnessZone": { "default": [], "description": "RoughnessZone record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "RoughnessZone", "type": "array" }, "RoughnessZones": { "default": [ [] ], "description": "RoughnessZones record.\n\n[x_zone, mannings_n] x number of roughness zones.", "items": { "$ref": "#/$defs/RoughnessZone" }, "title": "RoughnessZones", "type": "array" }, "SurveyPoint": { "default": [], "description": "SurveyPoint record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "SurveyPoint", "type": "array" }, "SurveyPoints": { "default": [ [] ], "description": "SurveyPoints\n\n[x, bed_elevation] x number of survey points.", "items": { "$ref": "#/$defs/SurveyPoint" }, "title": "SurveyPoints", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field bed_slope: float = 0 (alias 'Bedslope')
- field name: str = 'chn_XXX'
- field roughness_zones: RoughnessZones = RoughnessZones(root=(RoughnessZone(root=()),)) (alias 'RoughnessZones')
- field survey_points: SurveyPoints = SurveyPoints(root=(SurveyPoint(root=()),)) (alias 'SurveyPoints')
- pydantic model RoughnessZones[source]
RoughnessZones record.
[x_zone, mannings_n] x number of roughness zones.
Show JSON schema
{ "title": "RoughnessZones", "description": "RoughnessZones record.\n\n[x_zone, mannings_n] x number of roughness zones.", "type": "array", "$defs": { "RoughnessZone": { "default": [], "description": "RoughnessZone record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "RoughnessZone", "type": "array" } }, "default": [ [] ], "items": { "$ref": "#/$defs/RoughnessZone" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (collections.abc.Sequence[ravenpy.config.commands.ChannelProfile.RoughnessZones.RoughnessZone])
- field root: Sequence[RoughnessZone] = (RoughnessZone(root=()),)
- pydantic model RoughnessZone[source]
RoughnessZone record.
Show JSON schema
{ "title": "RoughnessZone", "description": "RoughnessZone record.", "type": "array", "default": [], "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ] }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (tuple[float, float])
- field root: tuple[float, float] = ()
- pydantic model SurveyPoints[source]
SurveyPoints
[x, bed_elevation] x number of survey points.
Show JSON schema
{ "title": "SurveyPoints", "description": "SurveyPoints\n\n[x, bed_elevation] x number of survey points.", "type": "array", "$defs": { "SurveyPoint": { "default": [], "description": "SurveyPoint record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "SurveyPoint", "type": "array" } }, "default": [ [] ], "items": { "$ref": "#/$defs/SurveyPoint" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (collections.abc.Sequence[ravenpy.config.commands.ChannelProfile.SurveyPoints.SurveyPoint])
- field root: Sequence[SurveyPoint] = (SurveyPoint(root=()),)
- pydantic model SurveyPoint[source]
SurveyPoint record.
Show JSON schema
{ "title": "SurveyPoint", "description": "SurveyPoint record.", "type": "array", "default": [], "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ] }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (tuple[float, float])
- field root: tuple[float, float] = ()
- pydantic model ravenpy.config.commands.CustomOutput[source]
Create custom output file to track a single variable, parameter, or forcing function over time at a number of basins, HRUs, or across watershed.
:CustomOutput DAILY AVERAGE AET BY_HRU
Show JSON schema
{ "title": "CustomOutput", "description": "Create custom output file to track a single variable, parameter, or forcing function over time at a number of basins, HRUs, or across watershed.\n\n:CustomOutput DAILY AVERAGE AET BY_HRU", "type": "object", "properties": { "time_per": { "enum": [ "DAILY", "MONTHLY", "YEARLY", "WATER_YEARLY", "CONTINUOUS" ], "title": "Time Per", "type": "string" }, "stat": { "enum": [ "AVERAGE", "MAXIMUM", "MINIMUM", "RANGE", "MEDIAN", "QUARTILES" ], "title": "Stat", "type": "string" }, "variable": { "title": "Variable", "type": "string" }, "space_agg": { "enum": [ "BY_BASIN", "BY_HRU", "BY_HRU_GROUP", "BY_SB_GROUP", "ENTIRE_WATERSHED" ], "title": "Space Agg", "type": "string" }, "filename": { "default": "", "title": "Filename", "type": "string" } }, "additionalProperties": false, "required": [ "time_per", "stat", "variable", "space_agg" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field filename: str = ''
Output file name.
Defaults to something approximately like: <run name>_<variable>_<time_per>_<stat>_<space_agg>.nc.
- field space_agg: Literal['BY_BASIN', 'BY_HRU', 'BY_HRU_GROUP', 'BY_SB_GROUP', 'ENTIRE_WATERSHED'] [Required]
Spatial evaluation domain.
- field stat: Literal['AVERAGE', 'MAXIMUM', 'MINIMUM', 'RANGE', 'MEDIAN', 'QUARTILES'] [Required]
Statistic reported for each time interval.
- field time_per: Literal['DAILY', 'MONTHLY', 'YEARLY', 'WATER_YEARLY', 'CONTINUOUS'] [Required]
Time period.
- field variable: str [Required]
Variable or parameter name.
Consult the Raven documentation for the list of allowed names.
- pydantic model ravenpy.config.commands.Data[source]
Show JSON schema
{ "title": "Data", "type": "object", "properties": { "data_type": { "default": "", "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" } }, "$defs": { "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "ReadFromNetCDF": { "additionalProperties": false, "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "ReadFromNetCDF", "type": "object" } }, "additionalProperties": false, "required": [ "ReadFromNetCDF" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field data_type: Literal['AIR_DENS', 'AIR_PRES', 'CLOUD_COVER', 'DAY_ANGLE', 'DAY_LENGTH', 'ET_RADIA', 'LW_INCOMING', 'LW_RADIA_NET', 'OW_PET', 'PET', 'PET_MONTH_AVE', 'POTENTIAL_MELT', 'PRECIP', 'PRECIP_5DAY', 'PRECIP_DAILY_AVE', 'RAINFALL', 'RECHARGE', 'REL_HUMIDITY', 'SHORTWAVE', 'SNOWFALL', 'SNOW_FRAC', 'SUBDAILY_CORR', 'SW_RADIA', 'SW_RADIA_NET', 'TEMP_AVE', 'TEMP_AVE_UNC', 'TEMP_DAILY_AVE', 'TEMP_DAILY_MAX', 'TEMP_DAILY_MIN', 'TEMP_MAX', 'TEMP_MAX_UNC', 'TEMP_MIN', 'TEMP_MIN_UNC', 'TEMP_MONTH_AVE', 'TEMP_MONTH_MAX', 'TEMP_MONTH_MIN', 'WIND_VEL'] = ''
- field read_from_netcdf: ReadFromNetCDF [Required] (alias 'ReadFromNetCDF')
- field units: str = ''
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.EnsembleMode[source]
Show JSON schema
{ "title": "EnsembleMode", "type": "object", "properties": { "mode": { "const": "ENSEMBLE_ENKF", "default": "ENSEMBLE_ENKF", "title": "Mode", "type": "string" }, "n": { "description": "Number of members", "title": "N", "type": "integer" } }, "additionalProperties": false, "required": [ "n" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field mode: Literal['ENSEMBLE_ENKF'] = 'ENSEMBLE_ENKF'
- field n: int [Required]
Number of members
- pydantic model ravenpy.config.commands.EvaluationPeriod[source]
:EvaluationPeriod [period_name] [start yyyy-mm-dd] [end yyyy-mm-dd]
Show JSON schema
{ "title": "EvaluationPeriod", "description": ":EvaluationPeriod [period_name] [start yyyy-mm-dd] [end yyyy-mm-dd]", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "start": { "format": "date", "title": "Start", "type": "string" }, "end": { "format": "date", "title": "End", "type": "string" } }, "additionalProperties": false, "required": [ "name", "start", "end" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field end: date [Required]
- field name: str [Required]
- field start: date [Required]
- pydantic model ravenpy.config.commands.ForcingPerturbation[source]
Show JSON schema
{ "title": "ForcingPerturbation", "type": "object", "properties": { "forcing": { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Forcing", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" }, "hru_grp": { "default": "", "title": "Hru Grp", "type": "string" } }, "additionalProperties": false, "required": [ "forcing", "dist", "p1", "p2", "adj" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field adj: Literal['ADDITIVE', 'MULTIPLICATIVE'] [Required]
- field dist: Literal['DIST_UNIFORM', 'DIST_NORMAL', 'DIST_GAMMA'] [Required]
- field forcing: Literal['AIR_DENS', 'AIR_PRES', 'CLOUD_COVER', 'DAY_ANGLE', 'DAY_LENGTH', 'ET_RADIA', 'LW_INCOMING', 'LW_RADIA_NET', 'OW_PET', 'PET', 'PET_MONTH_AVE', 'POTENTIAL_MELT', 'PRECIP', 'PRECIP_5DAY', 'PRECIP_DAILY_AVE', 'RAINFALL', 'RECHARGE', 'REL_HUMIDITY', 'SHORTWAVE', 'SNOWFALL', 'SNOW_FRAC', 'SUBDAILY_CORR', 'SW_RADIA', 'SW_RADIA_NET', 'TEMP_AVE', 'TEMP_AVE_UNC', 'TEMP_DAILY_AVE', 'TEMP_DAILY_MAX', 'TEMP_DAILY_MIN', 'TEMP_MAX', 'TEMP_MAX_UNC', 'TEMP_MIN', 'TEMP_MIN_UNC', 'TEMP_MONTH_AVE', 'TEMP_MONTH_MAX', 'TEMP_MONTH_MIN', 'WIND_VEL'] [Required]
- field hru_grp: str = ''
- field p1: float [Required]
- field p2: float [Required]
- pydantic model ravenpy.config.commands.Gauge[source]
Show JSON schema
{ "title": "Gauge", "type": "object", "properties": { "name": { "default": "default", "title": "Name", "type": "string" }, "Latitude": { "title": "Latitude", "type": "number" }, "Longitude": { "title": "Longitude", "type": "number" }, "Elevation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Elevation" }, "RainCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Rain correction", "title": "Raincorrection" }, "SnowCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Snow correction", "title": "Snowcorrection" }, "MonthlyAveEvaporation": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyaveevaporation" }, "MonthlyAveTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyavetemperature" }, "MonthlyMinTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymintemperature" }, "MonthlyMaxTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymaxtemperature" }, "Data": { "anyOf": [ { "items": { "$ref": "#/$defs/Data" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Data" } }, "$defs": { "Data": { "additionalProperties": false, "properties": { "data_type": { "default": "", "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" } }, "required": [ "ReadFromNetCDF" ], "title": "Data", "type": "object" }, "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "ReadFromNetCDF": { "additionalProperties": false, "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "ReadFromNetCDF", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "Latitude", "Longitude" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field elevation: float | None = None (alias 'Elevation')
- field latitude: float [Required] (alias 'Latitude')
- field longitude: float [Required] (alias 'Longitude')
- field monthly_ave_evaporation: Sequence | None = None (alias 'MonthlyAveEvaporation')
- Validated by:
- field monthly_ave_temperature: Sequence | None = None (alias 'MonthlyAveTemperature')
- Validated by:
- field monthly_max_temperature: Sequence | None = None (alias 'MonthlyMaxTemperature')
- field monthly_min_temperature: Sequence | None = None (alias 'MonthlyMinTemperature')
- field name: str = 'default'
- field rain_correction: Variable | ExpressionNode | float | None = None (alias 'RainCorrection')
Rain correction
- field snow_correction: Variable | ExpressionNode | float | None = None (alias 'SnowCorrection')
Snow correction
- validator confirm_monthly » monthly_ave_temperature, monthly_ave_evaporation[source]
- classmethod from_nc(fn: str | Path | Sequence[Path], data_type: Sequence[str] | None = None, station_idx: int = 1, alt_names: dict[str, str] | None = None, mon_ave: bool = False, data_kwds: dict[str, Any] | None = None, engine: str = 'h5netcdf', **kwds) Gauge[source]
Return Gauge instance with configuration options inferred from the netCDF itself.
- Parameters:
fn (str or Path or Sequence[Path]) – NetCDF file path or paths.
data_type (Sequence[str], optional) – Raven data types to extract from netCDF files, e.g. ‘PRECIP’, ‘AVE_TEMP’. The algorithm tries to find all forcings in each file until one is found, then it stops searching for it in the following files.
station_idx (int) – Index along station dimension. Starts at 1. Should be the same for all netCDF files.
alt_names (dict) – Alternative variable names keyed by data type. Use this if variables do not correspond to CF standard defaults.
mon_ave (bool) – If True, compute the monthly average.
data_kwds (dict[options.Forcings, dict[str, str]]) – Additional :Data parameters keyed by forcing type and station id. Overrides inferred parameters. Use keyword “ALL” to pass parameters to all variables.
engine ({"h5netcdf", "netcdf4", "pydap"}) – The engine used to open the dataset. Default is ‘h5netcdf’.
**kwds (dict) – Additional arguments for Gauge.
- Returns:
Gauge instance.
- Return type:
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- property ds: Dataset
Return xarray Dataset with forcing variables keyed by Raven forcing names.
- pydantic model ravenpy.config.commands.GridWeights[source]
GridWeights command.
Notes
command can be embedded in both a GriddedForcing or a StationForcing.
The default is to have a single cell that covers an entire single HRU, with a weight of 1.
Show JSON schema
{ "title": "GridWeights", "description": "GridWeights command.\n\nNotes\n-----\ncommand can be embedded in both a `GriddedForcing` or a `StationForcing`.\n\nThe default is to have a single cell that covers an entire single HRU, with a\nweight of 1.", "type": "object", "properties": { "NumberHRUs": { "default": 1, "title": "Numberhrus", "type": "integer" }, "NumberGridCells": { "default": 1, "title": "Numbergridcells", "type": "integer" }, "data": { "default": [ [ 1, 0, 1.0 ] ], "items": { "$ref": "#/$defs/GWRecord" }, "title": "Data", "type": "array" } }, "$defs": { "GWRecord": { "default": [ 1, 0, 1.0 ], "description": "GridWeights record.", "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ], "title": "GWRecord", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field number_grid_cells: int = 1 (alias 'NumberGridCells')
- field number_hrus: int = 1 (alias 'NumberHRUs')
- pydantic model GWRecord[source]
GridWeights record.
Show JSON schema
{ "title": "GWRecord", "description": "GridWeights record.", "type": "array", "default": [ 1, 0, 1.0 ], "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ] }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (tuple[int, int, float])
- field root: tuple[int, int, float] = (1, 0, 1.0)
- pydantic model ravenpy.config.commands.GriddedForcing[source]
GriddedForcing command (RVT).
Show JSON schema
{ "title": "GriddedForcing", "description": "GriddedForcing command (RVT).", "type": "object", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "$defs": { "GWRecord": { "default": [ 1, 0, 1.0 ], "description": "GridWeights record.", "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ], "title": "GWRecord", "type": "array" }, "GridWeights": { "additionalProperties": false, "description": "GridWeights command.\n\nNotes\n-----\ncommand can be embedded in both a `GriddedForcing` or a `StationForcing`.\n\nThe default is to have a single cell that covers an entire single HRU, with a\nweight of 1.", "properties": { "NumberHRUs": { "default": 1, "title": "Numberhrus", "type": "integer" }, "NumberGridCells": { "default": 1, "title": "Numbergridcells", "type": "integer" }, "data": { "default": [ [ 1, 0, 1.0 ] ], "items": { "$ref": "#/$defs/GWRecord" }, "title": "Data", "type": "array" } }, "title": "GridWeights", "type": "object" }, "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "RedirectToFile": { "description": "RedirectToFile command (RVT).\n\nNotes\n-----\nFor the moment, this command can only be used in the context of a `GriddedForcingCommand`\nor a `StationForcingCommand`, as a `grid_weights` field replacement when inlining is not\ndesired.", "format": "file-path", "title": "RedirectToFile", "type": "string" } }, "additionalProperties": false, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field deaccumulate: bool | None = None (alias 'Deaccumulate')
- field dim_names_nc: Sequence[str] [Required] (alias 'DimNamesNC')
- Validated by:
- field elevation_var_name_nc: str | None = None (alias 'ElevationVarNameNC')
- field file_name_nc: HttpUrl | Path [Required] (alias 'FileNameNC')
NetCDF file name.
- field forcing_type: Literal['AIR_DENS', 'AIR_PRES', 'CLOUD_COVER', 'DAY_ANGLE', 'DAY_LENGTH', 'ET_RADIA', 'LW_INCOMING', 'LW_RADIA_NET', 'OW_PET', 'PET', 'PET_MONTH_AVE', 'POTENTIAL_MELT', 'PRECIP', 'PRECIP_5DAY', 'PRECIP_DAILY_AVE', 'RAINFALL', 'RECHARGE', 'REL_HUMIDITY', 'SHORTWAVE', 'SNOWFALL', 'SNOW_FRAC', 'SUBDAILY_CORR', 'SW_RADIA', 'SW_RADIA_NET', 'TEMP_AVE', 'TEMP_AVE_UNC', 'TEMP_DAILY_AVE', 'TEMP_DAILY_MAX', 'TEMP_DAILY_MIN', 'TEMP_MAX', 'TEMP_MAX_UNC', 'TEMP_MIN', 'TEMP_MIN_UNC', 'TEMP_MONTH_AVE', 'TEMP_MONTH_MAX', 'TEMP_MONTH_MIN', 'WIND_VEL'] | None = None (alias 'ForcingType')
- field grid_weights: GridWeights | RedirectToFile = GridWeights(number_hrus=1, number_grid_cells=1, data=(GWRecord(root=(1, 0, 1.0)),)) (alias 'GridWeights')
- field latitude_var_name_nc: str | None = None (alias 'LatitudeVarNameNC')
- field linear_transform: LinearTransform | None = None (alias 'LinearTransform')
- field longitude_var_name_nc: str | None = None (alias 'LongitudeVarNameNC')
- field name: str = ''
- field station_idx: int | None = None
- field time_shift: float | None = None (alias 'TimeShift')
Time stamp shift in days.
- field var_name_nc: str [Required] (alias 'VarNameNC')
NetCDF variable name.
- validator check_dims » dim_names_nc[source]
- pydantic model ravenpy.config.commands.HRU[source]
Record to populate :HRUs command internal table (RVH).
Show JSON schema
{ "title": "HRU", "description": "Record to populate :HRUs command internal table (RVH).", "type": "object", "properties": { "hru_id": { "default": 1, "exclusiveMinimum": 0, "title": "Hru Id", "type": "integer" }, "area": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0, "title": "Area" }, "elevation": { "default": 0, "title": "Elevation", "type": "number" }, "latitude": { "default": 0, "title": "Latitude", "type": "number" }, "longitude": { "default": 0, "title": "Longitude", "type": "number" }, "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "land_use_class": { "default": "[NONE]", "title": "Land Use Class", "type": "string" }, "veg_class": { "default": "[NONE]", "title": "Veg Class", "type": "string" }, "soil_profile": { "default": "[NONE]", "title": "Soil Profile", "type": "string" }, "aquifer_profile": { "default": "[NONE]", "title": "Aquifer Profile", "type": "string" }, "terrain_class": { "default": "[NONE]", "title": "Terrain Class", "type": "string" }, "slope": { "default": 0.0, "minimum": 0, "title": "Slope", "type": "number" }, "aspect": { "default": 0.0, "maximum": 360, "minimum": 0, "title": "Aspect", "type": "number" }, "hru_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Hru Type" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field aquifer_profile: str = '[NONE]'
- field area: Variable | ExpressionNode | float | None = 0
- field aspect: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=360)])] = 0.0
- Constraints:
ge = 0
le = 360
- field elevation: float = 0
- field hru_id: Annotated[int, Gt(gt=0)] = 1
- Constraints:
gt = 0
- field hru_type: str | None = None
- field land_use_class: str = '[NONE]'
- field latitude: float = 0
- field longitude: float = 0
- field slope: Annotated[float, Ge(ge=0)] = 0.0
- Constraints:
ge = 0
- field soil_profile: str = '[NONE]'
- field subbasin_id: Annotated[int, Gt(gt=0)] = 1
- Constraints:
gt = 0
- field terrain_class: str = '[NONE]'
- field veg_class: str = '[NONE]'
- pydantic model ravenpy.config.commands.HRUGroup[source]
Show JSON schema
{ "title": "HRUGroup", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "groups": { "$ref": "#/$defs/_Rec" } }, "$defs": { "_Rec": { "items": { "type": "string" }, "title": "_Rec", "type": "array" } }, "additionalProperties": false, "required": [ "name", "groups" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field groups: _Rec [Required]
- field name: str [Required]
- pydantic model ravenpy.config.commands.HRUState[source]
Show JSON schema
{ "title": "HRUState", "type": "object", "properties": { "hru_id": { "default": 1, "title": "Hru Id", "type": "integer" }, "data": { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Data", "type": "object" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field data: dict[str, Variable | ExpressionNode | float | None] [Optional]
- field hru_id: int = 1
- pydantic model ravenpy.config.commands.HRUStateVariableTable[source]
Table of HRU state variables.
If the HRUState include different attributes, the states will be modified to include all attributes.
Show JSON schema
{ "title": "HRUStateVariableTable", "description": "Table of HRU state variables.\n\nIf the HRUState include different attributes, the states will be modified to include all attributes.", "type": "array", "$defs": { "HRUState": { "additionalProperties": false, "properties": { "hru_id": { "default": 1, "title": "Hru Id", "type": "integer" }, "data": { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Data", "type": "object" } }, "title": "HRUState", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "items": { "$ref": "#/$defs/HRUState" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
set_attributes»all fields
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.HRUs[source]
HRUs command (RVH).
Show JSON schema
{ "title": "HRUs", "description": "HRUs command (RVH).", "type": "array", "$defs": { "HRU": { "additionalProperties": false, "description": "Record to populate :HRUs command internal table (RVH).", "properties": { "hru_id": { "default": 1, "exclusiveMinimum": 0, "title": "Hru Id", "type": "integer" }, "area": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0, "title": "Area" }, "elevation": { "default": 0, "title": "Elevation", "type": "number" }, "latitude": { "default": 0, "title": "Latitude", "type": "number" }, "longitude": { "default": 0, "title": "Longitude", "type": "number" }, "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "land_use_class": { "default": "[NONE]", "title": "Land Use Class", "type": "string" }, "veg_class": { "default": "[NONE]", "title": "Veg Class", "type": "string" }, "soil_profile": { "default": "[NONE]", "title": "Soil Profile", "type": "string" }, "aquifer_profile": { "default": "[NONE]", "title": "Aquifer Profile", "type": "string" }, "terrain_class": { "default": "[NONE]", "title": "Terrain Class", "type": "string" }, "slope": { "default": 0.0, "minimum": 0, "title": "Slope", "type": "number" }, "aspect": { "default": 0.0, "maximum": 360, "minimum": 0, "title": "Aspect", "type": "number" }, "hru_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Hru Type" } }, "title": "HRU", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "items": { "$ref": "#/$defs/HRU" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- validator ignore_unrecognized_hrus » root[source]
Ignore HRUs with unrecognized hru_type.
HRUs are ignored only if all allowed HRU classes define hru_type, and if the values passed include it.
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- ravenpy.config.commands.LOGGER = <Logger RavenPy (WARNING)>
Raven commands
The syntax of those commands match as closely as possible the Raven documentation.
- ravenpy.config.commands.LU
alias of
LandUseClass
- pydantic model ravenpy.config.commands.LandUseClass[source]
Show JSON schema
{ "title": "LandUseClass", "type": "object", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "impermeable_frac": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Impermeable Frac" }, "forest_coverage": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Forest Coverage" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field forest_coverage: Variable | ExpressionNode | float | None = 0.0
- field impermeable_frac: Variable | ExpressionNode | float | None = 0.0
- field name: str = ''
- pydantic model ravenpy.config.commands.LandUseClasses[source]
Show JSON schema
{ "title": "LandUseClasses", "type": "array", "$defs": { "LandUseClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "impermeable_frac": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Impermeable Frac" }, "forest_coverage": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Forest Coverage" } }, "title": "LandUseClass", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "items": { "$ref": "#/$defs/LandUseClass" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[LandUseClass] [Required]
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.LandUseParameterList[source]
Show JSON schema
{ "title": "LandUseParameterList", "type": "object", "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ABST_PERCENT", "AET_COEFF", "BF_LOSS_FRACTION", "B_EXP", "CC_DECAY_COEFF", "DD_AGGRADATION", "DD_MELT_TEMP", "DD_REFREEZE_TEMP", "DEP_K", "DEP_MAX", "DEP_MAX_FLOW", "DEP_N", "DEP_SEEP_K", "DEP_THRESHOLD", "FOREST_COVERAGE", "FOREST_PET_CORR", "FOREST_SPARSENESS", "GAMMA_SCALE", "GAMMA_SCALE2", "GAMMA_SHAPE", "GAMMA_SHAPE2", "GLAC_STORAGE_COEFF", "GR4J_X4", "HBV_GLACIER_AG", "HBV_GLACIER_KMIN", "HBV_MELT_ASP_CORR", "HBV_MELT_FOR_CORR", "HBV_MELT_GLACIER_CORR", "HMETS_RUNOFF_COEFF", "IMPERMEABLE_FRAC", "LAKE_PET_CORR", "LAKE_REL_COEFF", "MAX_DEP_AREA_FRAC", "MAX_MELT_FACTOR", "MAX_SAT_AREA_FRAC", "MELT_FACTOR", "MIN_MELT_FACTOR", "OW_PET_CORR", "PARTITION_COEFF", "PDMROF_B", "PONDED_EXP", "REFREEZE_EXP", "REFREEZE_FACTOR", "ROUGHNESS", "SCS_CN", "SCS_IA_FRACTION", "SNOW_PATCH_LIMIT", "STREAM_FRACTION", "UBC_ICEPT_FACTOR" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "$defs": { "ParameterList": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "values": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "string" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "title": "ParameterList", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "pl" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field parameters: Sequence[Literal['ABST_PERCENT', 'AET_COEFF', 'BF_LOSS_FRACTION', 'B_EXP', 'CC_DECAY_COEFF', 'DD_AGGRADATION', 'DD_MELT_TEMP', 'DD_REFREEZE_TEMP', 'DEP_K', 'DEP_MAX', 'DEP_MAX_FLOW', 'DEP_N', 'DEP_SEEP_K', 'DEP_THRESHOLD', 'FOREST_COVERAGE', 'FOREST_PET_CORR', 'FOREST_SPARSENESS', 'GAMMA_SCALE', 'GAMMA_SCALE2', 'GAMMA_SHAPE', 'GAMMA_SHAPE2', 'GLAC_STORAGE_COEFF', 'GR4J_X4', 'HBV_GLACIER_AG', 'HBV_GLACIER_KMIN', 'HBV_MELT_ASP_CORR', 'HBV_MELT_FOR_CORR', 'HBV_MELT_GLACIER_CORR', 'HMETS_RUNOFF_COEFF', 'IMPERMEABLE_FRAC', 'LAKE_PET_CORR', 'LAKE_REL_COEFF', 'MAX_DEP_AREA_FRAC', 'MAX_MELT_FACTOR', 'MAX_SAT_AREA_FRAC', 'MELT_FACTOR', 'MIN_MELT_FACTOR', 'OW_PET_CORR', 'PARTITION_COEFF', 'PDMROF_B', 'PONDED_EXP', 'REFREEZE_EXP', 'REFREEZE_FACTOR', 'ROUGHNESS', 'SCS_CN', 'SCS_IA_FRACTION', 'SNOW_PATCH_LIMIT', 'STREAM_FRACTION', 'UBC_ICEPT_FACTOR']] | None = None (alias 'Parameters')
- Validated by:
num_values_equal_num_namesset_default_units
- field pl: Sequence[ParameterList] [Required]
- Validated by:
num_values_equal_num_namesset_default_units
- field units: Sequence[str] | None = None (alias 'Units')
- Validated by:
num_values_equal_num_namesset_default_units
- pydantic model ravenpy.config.commands.LinearTransform[source]
:LinearTransform 1.0 -273.15
Show JSON schema
{ "title": "LinearTransform", "description": ":LinearTransform 1.0 -273.15", "type": "object", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field offset: float = 0
- field scale: float = 1
- pydantic model ravenpy.config.commands.ObservationData[source]
Show JSON schema
{ "title": "ObservationData", "type": "object", "properties": { "data_type": { "const": "HYDROGRAPH", "default": "HYDROGRAPH", "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" }, "uid": { "default": "1", "title": "Uid", "type": "string" } }, "$defs": { "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "ReadFromNetCDF": { "additionalProperties": false, "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "ReadFromNetCDF", "type": "object" } }, "additionalProperties": false, "required": [ "ReadFromNetCDF" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
coerce_numbers_to_str: bool = True
- Fields:
- field data_type: Literal['HYDROGRAPH'] = 'HYDROGRAPH'
- field read_from_netcdf: ReadFromNetCDF [Required] (alias 'ReadFromNetCDF')
- field uid: str = '1'
- field units: str = ''
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.ObservationErrorModel[source]
Show JSON schema
{ "title": "ObservationErrorModel", "type": "object", "properties": { "state": { "const": "STREAMFLOW", "title": "State", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" } }, "additionalProperties": false, "required": [ "state", "dist", "p1", "p2", "adj" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field adj: Literal['ADDITIVE', 'MULTIPLICATIVE'] [Required]
- field dist: Literal['DIST_UNIFORM', 'DIST_NORMAL', 'DIST_GAMMA'] [Required]
- field p1: float [Required]
- field p2: float [Required]
- field state: Literal['STREAMFLOW'] [Required]
- pydantic model ravenpy.config.commands.Process[source]
Process type embedded in HydrologicProcesses command.
See processes.py for list of processes.
Show JSON schema
{ "title": "Process", "description": "Process type embedded in HydrologicProcesses command.\n\nSee processes.py for list of processes.", "type": "object", "properties": { "algo": { "default": "RAVEN_DEFAULT", "title": "Algo", "type": "string" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source" }, "to": { "default": [], "items": { "type": "string" }, "title": "To", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field algo: str = 'RAVEN_DEFAULT'
- field source: str | None = None
- Validated by:
- field to: Sequence[str] = ()
- Validated by:
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.RainSnowTransition[source]
Specify the range of temperatures over which there will be a rain/snow mix when partitioning total precipitation into rain/snow components.
:RainSnowTransition [temp] [delta]
# equivalent to (the preferred option) :GlobalParameter RAINSNOW_TEMP [rainsnow_temp] :GlobalParameter RAINSNOW_DELTA [rainsnow_delta]
Show JSON schema
{ "title": "RainSnowTransition", "description": "Specify the range of temperatures over which there will be a rain/snow mix when partitioning total precipitation into rain/snow components.\n\n:RainSnowTransition [temp] [delta]\n\n# equivalent to (the preferred option)\n:GlobalParameter RAINSNOW_TEMP [rainsnow_temp]\n:GlobalParameter RAINSNOW_DELTA [rainsnow_delta]", "type": "object", "properties": { "temp": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Temp" }, "delta": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Delta" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "temp", "delta" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field delta: Variable | ExpressionNode | float | None [Required]
Range [C].
- field temp: Variable | ExpressionNode | float | None [Required]
Midpoint of the temperature range [C].
- pydantic model ravenpy.config.commands.ReadFromNetCDF[source]
Show JSON schema
{ "title": "ReadFromNetCDF", "type": "object", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "$defs": { "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" } }, "additionalProperties": false, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field deaccumulate: bool | None = None (alias 'Deaccumulate')
- field dim_names_nc: Sequence[str] [Required] (alias 'DimNamesNC')
- Validated by:
- field elevation_var_name_nc: str | None = None (alias 'ElevationVarNameNC')
- field file_name_nc: HttpUrl | Path [Required] (alias 'FileNameNC')
NetCDF file name.
- field latitude_var_name_nc: str | None = None (alias 'LatitudeVarNameNC')
- field linear_transform: LinearTransform | None = None (alias 'LinearTransform')
- field longitude_var_name_nc: str | None = None (alias 'LongitudeVarNameNC')
- field station_idx: int = 1 (alias 'StationIdx')
NetCDF index along station dimension. Starts at 1.
- field time_shift: float | None = None (alias 'TimeShift')
Time stamp shift in days.
- field var_name_nc: str [Required] (alias 'VarNameNC')
NetCDF variable name.
- classmethod from_nc(fn, data_type, station_idx=None, alt_names=(), engine='h5netcdf', **kwds)[source]
Instantiate class from netCDF dataset.
- validator reorder_time » dim_names_nc[source]
Return dimensions as x, y, t.
This is a fail safe because if input files are CF-compliant, dimensions should already have been ordered by nc_specs.
- property da: DataArray
Return DataArray from configuration.
- pydantic model ravenpy.config.commands.RedirectToFile[source]
RedirectToFile command (RVT).
Notes
For the moment, this command can only be used in the context of a GriddedForcingCommand or a StationForcingCommand, as a grid_weights field replacement when inlining is not desired.
Show JSON schema
{ "title": "RedirectToFile", "description": "RedirectToFile command (RVT).\n\nNotes\n-----\nFor the moment, this command can only be used in the context of a `GriddedForcingCommand`\nor a `StationForcingCommand`, as a `grid_weights` field replacement when inlining is not\ndesired.", "type": "string", "format": "file-path" }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Annotated[Path, PathType(path_type=file)] [Required]
- Constraints:
path_type = file
- pydantic model ravenpy.config.commands.Reservoir[source]
Reservoir command (RVH).
Show JSON schema
{ "title": "Reservoir", "description": "Reservoir command (RVH).", "type": "object", "properties": { "name": { "default": "Lake_XXX", "title": "Name", "type": "string" }, "SubBasinID": { "default": 0, "title": "Subbasinid", "type": "integer" }, "HRUID": { "default": 0, "title": "Hruid", "type": "integer" }, "Type": { "default": "RESROUTE_STANDARD", "title": "Type", "type": "string" }, "WeirCoefficient": { "default": 0, "title": "Weircoefficient", "type": "number" }, "CrestWidth": { "default": 0, "title": "Crestwidth", "type": "number" }, "MaxDepth": { "default": 0, "description": "Max depth (m)", "title": "Maxdepth", "type": "number" }, "LakeArea": { "default": 0, "description": "Lake area (m2)", "title": "Lakearea", "type": "number" }, "AbsoluteCrestHeight": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Absolute crest height (m)", "title": "Absolutecrestheight" }, "MaxCapacity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Maximum capacity in m3", "title": "Maxcapacity" }, "SeepageParameters": { "anyOf": [ { "$ref": "#/$defs/SeepageParameters" }, { "type": "null" } ], "default": null }, "StageRelations": { "anyOf": [ { "$ref": "#/$defs/StageRelations" }, { "type": "null" } ], "default": null } }, "$defs": { "SeepageParameters": { "additionalProperties": false, "description": ":SeepageParameters [K_seep] [href]", "properties": { "k_seep": { "title": "K Seep", "type": "number" }, "h_ref": { "title": "H Ref", "type": "number" } }, "required": [ "k_seep", "h_ref" ], "title": "SeepageParameters", "type": "object" }, "StageRelation": { "anyOf": [ { "maxItems": 4, "minItems": 4, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "maxItems": 5, "minItems": 5, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" } ], "default": null, "description": "Stage relation record.\n\nh, q, v, a, [u]", "title": "StageRelation" }, "StageRelations": { "default": null, "description": "Stage relations for the reservoir.", "items": { "$ref": "#/$defs/StageRelation" }, "title": "StageRelations", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field absolute_crest_height: float | None = None (alias 'AbsoluteCrestHeight')
Absolute crest height (m)
- field crest_width: float = 0 (alias 'CrestWidth')
- field hru_id: int = 0 (alias 'HRUID')
- field lake_area: float = 0 (alias 'LakeArea')
Lake area (m2)
- field max_capacity: float | None = None (alias 'MaxCapacity')
Maximum capacity in m3
- field max_depth: float = 0 (alias 'MaxDepth')
Max depth (m)
- field name: str = 'Lake_XXX'
- field seepage_parameters: SeepageParameters | None = None (alias 'SeepageParameters')
- field stage_relations: StageRelations | None = None (alias 'StageRelations')
- field subbasin_id: int = 0 (alias 'SubBasinID')
- field type: str = 'RESROUTE_STANDARD' (alias 'Type')
- field weir_coefficient: float = 0 (alias 'WeirCoefficient')
- pydantic model OutflowControlStructure[source]
Outflow control structure for the reservoir.
Show JSON schema
{ "title": "OutflowControlStructure", "description": "Outflow control structure for the reservoir.", "type": "object", "properties": { "TargetSubBasin": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Targetsubbasin" }, "DownstreamReferenceElevation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Downstreamreferenceelevation" }, "StageDischargeTable": { "anyOf": [ { "items": { "$ref": "#/$defs/StageDischargeTable" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Stagedischargetable" }, "BasicWeir": { "$ref": "#/$defs/BasicWeir", "default": null }, "OperatingRegime": { "$ref": "#/$defs/OperatingRegime", "default": null } }, "$defs": { "BasicWeir": { "additionalProperties": false, "description": "Basic weir for the outflow control structure.\n\n:BasicWeir [curve_name3] [elev] [crestwidth] [coeff]", "properties": { "curve_name": { "title": "Curve Name", "type": "string" }, "elev": { "title": "Elev", "type": "number" }, "crest_width": { "title": "Crest Width", "type": "number" }, "coeff": { "title": "Coeff", "type": "number" } }, "required": [ "curve_name", "elev", "crest_width", "coeff" ], "title": "BasicWeir", "type": "object" }, "OperatingRegime": { "additionalProperties": false, "description": "Operating regime for the outflow control structure.\n\n:OperatingRegime [curve_name] [elev] [coeff]", "properties": { "name": { "title": "Name", "type": "string" }, "UseCurve": { "default": null, "title": "Usecurve", "type": "string" }, "Condition": { "default": null, "title": "Condition", "type": "string" }, "Constraint": { "default": null, "title": "Constraint", "type": "string" } }, "required": [ "name" ], "title": "OperatingRegime", "type": "object" }, "StageDischargeRecord": { "default": null, "description": "Stage discharge record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "StageDischargeRecord", "type": "array" }, "StageDischargeTable": { "default": null, "description": "Stage discharge table for the outflow control structure.\n\nExample::\n\n :StageDischargeTable C1 #one gate open\n N\n [h,Q]xN\n :EndStageDischargeTable", "items": { "$ref": "#/$defs/StageDischargeRecord" }, "title": "StageDischargeTable", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
basic_weir (ravenpy.config.commands.Reservoir.OutflowControlStructure.BasicWeir)downstream_reference_elevation (float | None)operating_regime (ravenpy.config.commands.Reservoir.OutflowControlStructure.OperatingRegime)stage_discharge_table (collections.abc.Sequence[ravenpy.config.commands.Reservoir.OutflowControlStructure.StageDischargeTable] | None)target_subbasin_id (int | None)
- field downstream_reference_elevation: float | None = None (alias 'DownstreamReferenceElevation')
- field operating_regime: OperatingRegime = None (alias 'OperatingRegime')
- field stage_discharge_table: Sequence[StageDischargeTable] | None = None (alias 'StageDischargeTable')
- field target_subbasin_id: int | None = None (alias 'TargetSubBasin')
- pydantic model BasicWeir[source]
Basic weir for the outflow control structure.
:BasicWeir [curve_name3] [elev] [crestwidth] [coeff]
Show JSON schema
{ "title": "BasicWeir", "description": "Basic weir for the outflow control structure.\n\n:BasicWeir [curve_name3] [elev] [crestwidth] [coeff]", "type": "object", "properties": { "curve_name": { "title": "Curve Name", "type": "string" }, "elev": { "title": "Elev", "type": "number" }, "crest_width": { "title": "Crest Width", "type": "number" }, "coeff": { "title": "Coeff", "type": "number" } }, "additionalProperties": false, "required": [ "curve_name", "elev", "crest_width", "coeff" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
coeff (float)crest_width (float)curve_name (str)elev (float)
- field coeff: float [Required]
- field crest_width: float [Required]
- field curve_name: str [Required]
- field elev: float [Required]
- pydantic model OperatingRegime[source]
Operating regime for the outflow control structure.
:OperatingRegime [curve_name] [elev] [coeff]
Show JSON schema
{ "title": "OperatingRegime", "description": "Operating regime for the outflow control structure.\n\n:OperatingRegime [curve_name] [elev] [coeff]", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "UseCurve": { "default": null, "title": "Usecurve", "type": "string" }, "Condition": { "default": null, "title": "Condition", "type": "string" }, "Constraint": { "default": null, "title": "Constraint", "type": "string" } }, "additionalProperties": false, "required": [ "name" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
condition (str)constraint (str)name (str)use_curve (str)
- field condition: str = None (alias 'Condition')
- field constraint: str = None (alias 'Constraint')
- field name: str [Required]
- field use_curve: str = None (alias 'UseCurve')
- pydantic model StageDischargeTable[source]
Stage discharge table for the outflow control structure.
Example:
:StageDischargeTable C1 #one gate open N [h,Q]xN :EndStageDischargeTable
Show JSON schema
{ "title": "StageDischargeTable", "description": "Stage discharge table for the outflow control structure.\n\nExample::\n\n :StageDischargeTable C1 #one gate open\n N\n [h,Q]xN\n :EndStageDischargeTable", "type": "array", "$defs": { "StageDischargeRecord": { "default": null, "description": "Stage discharge record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "StageDischargeRecord", "type": "array" } }, "default": null, "items": { "$ref": "#/$defs/StageDischargeRecord" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (collections.abc.Sequence[ravenpy.config.commands.Reservoir.OutflowControlStructure.StageDischargeTable.StageDischargeRecord])
- Validators:
_set_n»all fields
- field root: Sequence[StageDischargeRecord] = None
- Validated by:
_set_n
- pydantic model StageDischargeRecord[source]
Stage discharge record.
Show JSON schema
{ "title": "StageDischargeRecord", "description": "Stage discharge record.", "type": "array", "default": null, "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ] }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (tuple[float, float])
- field root: tuple[float, float] = None
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model SeepageParameters[source]
:SeepageParameters [K_seep] [href]
Show JSON schema
{ "title": "SeepageParameters", "description": ":SeepageParameters [K_seep] [href]", "type": "object", "properties": { "k_seep": { "title": "K Seep", "type": "number" }, "h_ref": { "title": "H Ref", "type": "number" } }, "additionalProperties": false, "required": [ "k_seep", "h_ref" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
h_ref (float)k_seep (float)
- field h_ref: float [Required]
- field k_seep: float [Required]
- pydantic model StageRelations[source]
Stage relations for the reservoir.
Show JSON schema
{ "title": "StageRelations", "description": "Stage relations for the reservoir.", "type": "array", "$defs": { "StageRelation": { "anyOf": [ { "maxItems": 4, "minItems": 4, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "maxItems": 5, "minItems": 5, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" } ], "default": null, "description": "Stage relation record.\n\nh, q, v, a, [u]", "title": "StageRelation" } }, "default": null, "items": { "$ref": "#/$defs/StageRelation" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (collections.abc.Sequence[ravenpy.config.commands.Reservoir.StageRelations.StageRelation])
- field root: Sequence[StageRelation] = None
- pydantic model StageRelation[source]
Stage relation record.
h, q, v, a, [u]
Show JSON schema
{ "title": "StageRelation", "description": "Stage relation record.\n\nh, q, v, a, [u]", "anyOf": [ { "maxItems": 4, "minItems": 4, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "maxItems": 5, "minItems": 5, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" } ], "default": null }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
root (tuple[float, float, float, float] | tuple[float, float, float, float, float])
- field root: tuple[float, float, float, float] | tuple[float, float, float, float, float] = None
- pydantic model ravenpy.config.commands.SBGroupPropertyMultiplier[source]
:SBGroupPropertyMultiplier [group_name] [parameter_name] [mult]
Show JSON schema
{ "title": "SBGroupPropertyMultiplier", "description": ":SBGroupPropertyMultiplier [group_name] [parameter_name] [mult]", "type": "object", "properties": { "group_name": { "title": "Group Name", "type": "string" }, "parameter_name": { "title": "Parameter Name", "type": "string" }, "mult": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Mult" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "group_name", "parameter_name", "mult" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field group_name: str [Required]
- field mult: Variable | ExpressionNode | float | None [Required]
- field parameter_name: str [Required]
- ravenpy.config.commands.SP
alias of
SoilProfile
- pydantic model ravenpy.config.commands.SeasonalRelativeHeight[source]
Show JSON schema
{ "title": "SeasonalRelativeHeight", "type": "array", "$defs": { "_MonthlyRecord": { "additionalProperties": false, "properties": { "name": { "default": "[DEFAULT]", "title": "Name", "type": "string" }, "values": { "default": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "items": { "type": "number" }, "title": "Values", "type": "array" } }, "title": "_MonthlyRecord", "type": "object" } }, "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[_MonthlyRecord] = (_MonthlyRecord(name='[DEFAULT]', values=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]),)
- pydantic model ravenpy.config.commands.SeasonalRelativeLAI[source]
Show JSON schema
{ "title": "SeasonalRelativeLAI", "type": "array", "$defs": { "_MonthlyRecord": { "additionalProperties": false, "properties": { "name": { "default": "[DEFAULT]", "title": "Name", "type": "string" }, "values": { "default": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "items": { "type": "number" }, "title": "Values", "type": "array" } }, "title": "_MonthlyRecord", "type": "object" } }, "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[_MonthlyRecord] = (_MonthlyRecord(name='[DEFAULT]', values=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]),)
- pydantic model ravenpy.config.commands.SoilClasses[source]
SoilClasses command.
Example:
:SoilClasses :Attributes, %SAND, %CLAY, %SILT, %ORGANIC :Units, none, none, none, none SAND, 1, 0, 0, 0 LOAM, 0.5, 0.1, 0.4, 0.4 :EndSoilClasses
Show JSON schema
{ "title": "SoilClasses", "description": "SoilClasses command.\n\nExample::\n\n :SoilClasses\n :Attributes, %SAND, %CLAY, %SILT, %ORGANIC\n :Units, none, none, none, none\n SAND, 1, 0, 0, 0\n LOAM, 0.5, 0.1, 0.4, 0.4\n :EndSoilClasses", "type": "array", "$defs": { "SoilClass": { "additionalProperties": false, "description": "SoilClass.", "properties": { "name": { "title": "Name", "type": "string" }, "mineral": { "anyOf": [ { "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Mineral" }, "organic": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Organic" } }, "required": [ "name" ], "title": "SoilClass", "type": "object" } }, "default": [], "items": { "$ref": "#/$defs/SoilClass" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- pydantic model SoilClass[source]
SoilClass.
Show JSON schema
{ "title": "SoilClass", "description": "SoilClass.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "mineral": { "anyOf": [ { "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Mineral" }, "organic": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Organic" } }, "additionalProperties": false, "required": [ "name" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
mineral (tuple[float, float, float] | None)name (str)organic (float | None)
- Validators:
validate_mineral»mineralvalidate_mineral_pct»mineralvalidate_organic_pct»organic
- field mineral: tuple[float, float, float] | None = None
- Validated by:
- field name: str [Required]
- field organic: float | None = None
- Validated by:
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.SoilModel[source]
:SoilModel SOIL_MULTILAYER 6
Show JSON schema
{ "title": "SoilModel", "description": ":SoilModel SOIL_MULTILAYER 6", "type": "integer" }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: int [Required]
- pydantic model ravenpy.config.commands.SoilParameterList[source]
Show JSON schema
{ "title": "SoilParameterList", "type": "object", "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "AIR_ENTRY_PRESSURE", "ALBEDO_DRY", "ALBEDO_WET", "BASEFLOW_COEFF", "BASEFLOW_COEFF2", "BASEFLOW_N", "BASEFLOW_THRESH", "BF_LOSS_FRACTION", "BULK_DENSITY", "B_EXP", "CLAPP N,CLAPP M", "CLAPP_B", "CLAY_CON", "EVAP_RES_FC", "FIELD_CAPACITY", "GR4J_X2", "GR4J_X3", "HBV_BETA", "HEAT_CAPACITY", "HYDRAUL_COND", "INTERFLOW_COEF", "MAX_BASEFLOW_RATE", "MAX_CAP_RISE_RATE", "MAX_INTERFLOW_RATE", "MAX_PERC_RATE", "ORG_CON", "PERC_COEFF", "PERC_N", "PET_CORRECTION", "POROSITY", "SAC_PERC_ALPHA", "SAC_PERC_EXPON", "SAC_PERC_PFREE", "SAND_CON", "SAT_RES", "SAT_WILT", "SHUTTLEWORTH_B", "SILT_CON", "STONE_FRAC", "STORAGE_THRESHOLD", "THERMAL_COND", "UBC_EVAL_SOIL_DEF", "UBC_INFIL_SOIL_DEF", "UNAVAIL_FRAC", "VIC ALPHA", "VIC_EVAP_GAMMA", "VIC_ZMAX", "VIZ_ZMIN", "WETTING_FRONT_PSI", "WILTING_PRESSURE" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "$defs": { "ParameterList": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "values": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "string" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "title": "ParameterList", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "pl" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field parameters: Sequence[Literal['AIR_ENTRY_PRESSURE', 'ALBEDO_DRY', 'ALBEDO_WET', 'BASEFLOW_COEFF', 'BASEFLOW_COEFF2', 'BASEFLOW_N', 'BASEFLOW_THRESH', 'BF_LOSS_FRACTION', 'BULK_DENSITY', 'B_EXP', 'CLAPP N,CLAPP M', 'CLAPP_B', 'CLAY_CON', 'EVAP_RES_FC', 'FIELD_CAPACITY', 'GR4J_X2', 'GR4J_X3', 'HBV_BETA', 'HEAT_CAPACITY', 'HYDRAUL_COND', 'INTERFLOW_COEF', 'MAX_BASEFLOW_RATE', 'MAX_CAP_RISE_RATE', 'MAX_INTERFLOW_RATE', 'MAX_PERC_RATE', 'ORG_CON', 'PERC_COEFF', 'PERC_N', 'PET_CORRECTION', 'POROSITY', 'SAC_PERC_ALPHA', 'SAC_PERC_EXPON', 'SAC_PERC_PFREE', 'SAND_CON', 'SAT_RES', 'SAT_WILT', 'SHUTTLEWORTH_B', 'SILT_CON', 'STONE_FRAC', 'STORAGE_THRESHOLD', 'THERMAL_COND', 'UBC_EVAL_SOIL_DEF', 'UBC_INFIL_SOIL_DEF', 'UNAVAIL_FRAC', 'VIC ALPHA', 'VIC_EVAP_GAMMA', 'VIC_ZMAX', 'VIZ_ZMIN', 'WETTING_FRONT_PSI', 'WILTING_PRESSURE']] | None = None (alias 'Parameters')
- Validated by:
num_values_equal_num_namesset_default_units
- field pl: Sequence[ParameterList] [Required]
- Validated by:
num_values_equal_num_namesset_default_units
- field units: Sequence[str] | None = None (alias 'Units')
- Validated by:
num_values_equal_num_namesset_default_units
- pydantic model ravenpy.config.commands.SoilProfile[source]
Show JSON schema
{ "title": "SoilProfile", "type": "object", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "soil_classes": { "default": [], "items": { "type": "string" }, "title": "Soil Classes", "type": "array" }, "thicknesses": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Thicknesses", "type": "array" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field name: str = ''
- field soil_classes: Sequence[str] = ()
- field thicknesses: Sequence[Variable | ExpressionNode | float | None] = ()
- pydantic model ravenpy.config.commands.SoilProfiles[source]
SoilProfiles command.
Example:
:SoilProfiles # name, #horizons, hor1, th1, hor2, th2 LAKE, 0 GLACIER, 0 LOAM_SEQ, 2, LOAM, 0.5, SAND, 1.5 ALL_SAND, 2, SAND, 0.5, SAND, 1.5 :EndSoilProfiles
Show JSON schema
{ "title": "SoilProfiles", "description": "SoilProfiles command.\n\nExample::\n\n :SoilProfiles\n # name, #horizons, hor1, th1, hor2, th2\n LAKE, 0\n GLACIER, 0\n LOAM_SEQ, 2, LOAM, 0.5, SAND, 1.5\n ALL_SAND, 2, SAND, 0.5, SAND, 1.5\n :EndSoilProfiles", "type": "array", "$defs": { "SoilProfile": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "soil_classes": { "default": [], "items": { "type": "string" }, "title": "Soil Classes", "type": "array" }, "thicknesses": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Thicknesses", "type": "array" } }, "title": "SoilProfile", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "items": { "$ref": "#/$defs/SoilProfile" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[SoilProfile] [Required]
- pydantic model ravenpy.config.commands.StationForcing[source]
StationForcing command (RVT).
Show JSON schema
{ "title": "StationForcing", "description": "StationForcing command (RVT).", "type": "object", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "$defs": { "GWRecord": { "default": [ 1, 0, 1.0 ], "description": "GridWeights record.", "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ], "title": "GWRecord", "type": "array" }, "GridWeights": { "additionalProperties": false, "description": "GridWeights command.\n\nNotes\n-----\ncommand can be embedded in both a `GriddedForcing` or a `StationForcing`.\n\nThe default is to have a single cell that covers an entire single HRU, with a\nweight of 1.", "properties": { "NumberHRUs": { "default": 1, "title": "Numberhrus", "type": "integer" }, "NumberGridCells": { "default": 1, "title": "Numbergridcells", "type": "integer" }, "data": { "default": [ [ 1, 0, 1.0 ] ], "items": { "$ref": "#/$defs/GWRecord" }, "title": "Data", "type": "array" } }, "title": "GridWeights", "type": "object" }, "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "RedirectToFile": { "description": "RedirectToFile command (RVT).\n\nNotes\n-----\nFor the moment, this command can only be used in the context of a `GriddedForcingCommand`\nor a `StationForcingCommand`, as a `grid_weights` field replacement when inlining is not\ndesired.", "format": "file-path", "title": "RedirectToFile", "type": "string" } }, "additionalProperties": false, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
check_dims»dim_names_nc
- pydantic model ravenpy.config.commands.SubBasin[source]
Record to populate RVH :SubBasins command internal table.
Show JSON schema
{ "title": "SubBasin", "description": "Record to populate RVH :SubBasins command internal table.", "type": "object", "properties": { "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "name": { "default": "sub_001", "title": "Name", "type": "string" }, "downstream_id": { "default": -1, "title": "Downstream Id", "type": "integer" }, "profile": { "default": "NONE", "title": "Profile", "type": "string" }, "reach_length": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": 0, "title": "Reach Length" }, "gauged": { "default": true, "title": "Gauged", "type": "boolean" }, "gauge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Gauge Id" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
coerce_numbers_to_str: bool = True
- Fields:
- Validators:
- field downstream_id: int = -1
- field gauge_id: str | None = ''
- field gauged: bool = True
- field name: str = 'sub_001'
- field profile: str = 'NONE'
- field reach_length: float | str = 0
- Validated by:
- field subbasin_id: Annotated[int, Gt(gt=0)] = 1
- Constraints:
gt = 0
- validator check_reach_length » reach_length[source]
- pydantic model ravenpy.config.commands.SubBasinGroup[source]
SubBasinGroup command (RVH).
Show JSON schema
{ "title": "SubBasinGroup", "description": "SubBasinGroup command (RVH).", "type": "object", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "sb_ids": { "default": [], "items": { "type": "integer" }, "title": "Sb Ids", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field name: str = ''
- field sb_ids: Sequence[int] = ()
- pydantic model ravenpy.config.commands.SubBasinProperties[source]
Show JSON schema
{ "title": "SubBasinProperties", "type": "object", "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "CELERITY", "DIFFUSIVITY", "GAMMA_SCALE", "GAMMA_SHAPE", "MANNINGS_N", "NUM_RESERVOIRS", "Q_REFERENCE", "RAIN_CORR", "RES_CONSTANT", "SLOPE", "SNOW_CORR", "TIME_CONC", "TIME_LAG", "TIME_TO_PEAK" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "records": { "anyOf": [ { "items": { "$ref": "#/$defs/SubBasinProperty" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Records" } }, "$defs": { "SubBasinProperty": { "additionalProperties": false, "properties": { "sb_id": { "title": "Sb Id", "type": "string" }, "values": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "required": [ "sb_id", "values" ], "title": "SubBasinProperty", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field parameters: Sequence[Literal['CELERITY', 'DIFFUSIVITY', 'GAMMA_SCALE', 'GAMMA_SHAPE', 'MANNINGS_N', 'NUM_RESERVOIRS', 'Q_REFERENCE', 'RAIN_CORR', 'RES_CONSTANT', 'SLOPE', 'SNOW_CORR', 'TIME_CONC', 'TIME_LAG', 'TIME_TO_PEAK']] | None = None (alias 'Parameters')
- field records: Sequence[SubBasinProperty] | None = None
- pydantic model ravenpy.config.commands.SubBasinProperty[source]
Show JSON schema
{ "title": "SubBasinProperty", "type": "object", "properties": { "sb_id": { "title": "Sb Id", "type": "string" }, "values": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "sb_id", "values" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
coerce_numbers_to_str: bool = True
- Fields:
- field sb_id: str [Required]
- field values: Sequence[Variable | ExpressionNode | float | None] [Required]
- pydantic model ravenpy.config.commands.SubBasins[source]
SubBasins command (RVH)
Example:
:SubBasins :Attributes, NAME, DOWNSTREAM_ID, PROFILE, REACH_LENGTH, GAUGED :Units, none, none, none, km, none 1, Downstream, -1, DEFAULT, 3.0, 1 2, Upstream, 1, DEFAULT, 3.0, 0 :EndSubBasins
Show JSON schema
{ "title": "SubBasins", "description": "SubBasins command (RVH)\n\nExample::\n\n :SubBasins\n :Attributes, NAME, DOWNSTREAM_ID, PROFILE, REACH_LENGTH, GAUGED\n :Units, none, none, none, km, none\n 1, Downstream, -1, DEFAULT, 3.0, 1\n 2, Upstream, 1, DEFAULT, 3.0, 0\n :EndSubBasins", "type": "array", "$defs": { "SubBasin": { "additionalProperties": false, "description": "Record to populate RVH :SubBasins command internal table.", "properties": { "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "name": { "default": "sub_001", "title": "Name", "type": "string" }, "downstream_id": { "default": -1, "title": "Downstream Id", "type": "integer" }, "profile": { "default": "NONE", "title": "Profile", "type": "string" }, "reach_length": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": 0, "title": "Reach Length" }, "gauged": { "default": true, "title": "Gauged", "type": "boolean" }, "gauge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Gauge Id" } }, "title": "SubBasin", "type": "object" } }, "items": { "$ref": "#/$defs/SubBasin" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- ravenpy.config.commands.TC
alias of
TerrainClass
- pydantic model ravenpy.config.commands.TerrainClass[source]
Show JSON schema
{ "title": "TerrainClass", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "hillslope_length": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Hillslope Length" }, "drainage_density": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Drainage Density" }, "topmodel_lambda": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "title": "Topmodel Lambda" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "name", "hillslope_length", "drainage_density" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field drainage_density: Variable | ExpressionNode | float | None [Required]
- field hillslope_length: Variable | ExpressionNode | float | None [Required]
- field name: str [Required]
- field topmodel_lambda: Variable | ExpressionNode | float | None = None
- pydantic model ravenpy.config.commands.TerrainClasses[source]
Show JSON schema
{ "title": "TerrainClasses", "type": "array", "$defs": { "TerrainClass": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "hillslope_length": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Hillslope Length" }, "drainage_density": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Drainage Density" }, "topmodel_lambda": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "title": "Topmodel Lambda" } }, "required": [ "name", "hillslope_length", "drainage_density" ], "title": "TerrainClass", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "items": { "$ref": "#/$defs/TerrainClass" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[TerrainClass] [Required]
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- ravenpy.config.commands.VC
alias of
VegetationClass
- pydantic model ravenpy.config.commands.VegetationClass[source]
Show JSON schema
{ "title": "VegetationClass", "type": "object", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "max_ht": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Ht" }, "max_lai": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Lai" }, "max_leaf_cond": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Leaf Cond" } }, "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field max_ht: Variable | ExpressionNode | float | None = 0.0
- field max_lai: Variable | ExpressionNode | float | None = 0.0
- field max_leaf_cond: Variable | ExpressionNode | float | None = 0.0
- field name: str = ''
- pydantic model ravenpy.config.commands.VegetationClasses[source]
Show JSON schema
{ "title": "VegetationClasses", "type": "array", "$defs": { "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" }, "VegetationClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "max_ht": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Ht" }, "max_lai": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Lai" }, "max_leaf_cond": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Leaf Cond" } }, "title": "VegetationClass", "type": "object" } }, "items": { "$ref": "#/$defs/VegetationClass" } }
- Config:
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field root: Sequence[VegetationClass] [Required]
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- pydantic model ravenpy.config.commands.VegetationParameterList[source]
Show JSON schema
{ "title": "VegetationParameterList", "type": "object", "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ALBEDO", "ALBEDO_WET", "CAP_LAI_RATIO", "CHU_MATURITY", "DRIP_PROPORTION", "MAX_CAPACITY", "MAX_HEIGHT", "MAX_INTERCEPT_RATE", "MAX_LAI", "MAX_LEAF_COND", "MAX_ROOT_LENGTH", "MAX_SNOW_CAPACITY", "MIN_RESISTIVITY", "PET_VEG_CORR", "PSI_CRITICAL", "RAIN_ICEPT_FACT", "RAIN_ICEPT_PCT", "RELATIVE_HT", "RELATIVE_LAI", "ROOTRADIUS", "ROOT_EXTINCT", "SAI_HT_RATIO", "SNOCAP_LAI_RATIO", "SNOW_ICEPT_FACT", "SNOW_ICEPT_PCT", "STEMFLOW_FRAC", "SVF_EXTINCTION", "TFRAIN", "TFSNOW", "TRUNK_FRACTION", "VEG_DENS", "VEG_DIAM", "VEG_MBETA", "XYLEM_FRAC" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "$defs": { "ParameterList": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "values": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "string" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "title": "ParameterList", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false, "required": [ "pl" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- Validators:
- field parameters: Sequence[Literal['ALBEDO', 'ALBEDO_WET', 'CAP_LAI_RATIO', 'CHU_MATURITY', 'DRIP_PROPORTION', 'MAX_CAPACITY', 'MAX_HEIGHT', 'MAX_INTERCEPT_RATE', 'MAX_LAI', 'MAX_LEAF_COND', 'MAX_ROOT_LENGTH', 'MAX_SNOW_CAPACITY', 'MIN_RESISTIVITY', 'PET_VEG_CORR', 'PSI_CRITICAL', 'RAIN_ICEPT_FACT', 'RAIN_ICEPT_PCT', 'RELATIVE_HT', 'RELATIVE_LAI', 'ROOTRADIUS', 'ROOT_EXTINCT', 'SAI_HT_RATIO', 'SNOCAP_LAI_RATIO', 'SNOW_ICEPT_FACT', 'SNOW_ICEPT_PCT', 'STEMFLOW_FRAC', 'SVF_EXTINCTION', 'TFRAIN', 'TFSNOW', 'TRUNK_FRACTION', 'VEG_DENS', 'VEG_DIAM', 'VEG_MBETA', 'XYLEM_FRAC']] | None = None (alias 'Parameters')
- Validated by:
num_values_equal_num_namesset_default_units
- field pl: Sequence[ParameterList] [Required]
- Validated by:
num_values_equal_num_namesset_default_units
- field units: Sequence[str] | None = None (alias 'Units')
- Validated by:
num_values_equal_num_namesset_default_units
- pydantic model ravenpy.config.rvs.Config[source]
Show JSON schema
{ "title": "Config", "type": "object", "properties": { "EnKFMode": { "anyOf": [ { "$ref": "#/$defs/EnKFMode" }, { "type": "null" } ] }, "WindowSize": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Windowsize" }, "SolutionRunName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Solutionrunname" }, "ExtraRVTFilename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrarvtfilename" }, "OutputDirectoryFormat": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "title": "Outputdirectoryformat" }, "ForecastRVTFilename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Forecastrvtfilename" }, "TruncateHindcasts": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Truncatehindcasts" }, "ForcingPerturbation": { "anyOf": [ { "items": { "$ref": "#/$defs/ForcingPerturbation" }, "type": "array" }, { "type": "null" } ], "title": "Forcingperturbation" }, "AssimilatedState": { "anyOf": [ { "items": { "$ref": "#/$defs/AssimilatedState" }, "type": "array" }, { "type": "null" } ], "title": "Assimilatedstate" }, "AssimilateStreamflow": { "anyOf": [ { "items": { "$ref": "#/$defs/AssimilateStreamflow" }, "type": "array" }, { "type": "null" } ], "title": "Assimilatestreamflow" }, "ObservationErrorModel": { "anyOf": [ { "items": { "$ref": "#/$defs/ObservationErrorModel" }, "type": "array" }, { "type": "null" } ], "title": "Observationerrormodel" }, "params": { "default": null, "title": "Params" }, "SoilClasses": { "anyOf": [ { "$ref": "#/$defs/SoilClasses" }, { "type": "null" } ] }, "SoilProfiles": { "anyOf": [ { "$ref": "#/$defs/SoilProfiles" }, { "type": "null" } ] }, "VegetationClasses": { "anyOf": [ { "$ref": "#/$defs/VegetationClasses" }, { "type": "null" } ] }, "LandUseClasses": { "anyOf": [ { "$ref": "#/$defs/LandUseClasses" }, { "type": "null" } ] }, "TerrainClasses": { "anyOf": [ { "$ref": "#/$defs/TerrainClasses" }, { "type": "null" } ] }, "SoilParameterList": { "anyOf": [ { "$ref": "#/$defs/SoilParameterList" }, { "type": "null" } ] }, "LandUseParameterList": { "anyOf": [ { "$ref": "#/$defs/LandUseParameterList" }, { "type": "null" } ] }, "VegetationParameterList": { "anyOf": [ { "$ref": "#/$defs/VegetationParameterList" }, { "type": "null" } ] }, "ChannelProfile": { "anyOf": [ { "items": { "$ref": "#/$defs/ChannelProfile" }, "type": "array" }, { "type": "null" } ], "title": "Channelprofile" }, "GlobalParameter": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Globalparameter" }, "RainSnowTransition": { "anyOf": [ { "$ref": "#/$defs/RainSnowTransition" }, { "type": "null" } ] }, "SeasonalRelativeLAI": { "anyOf": [ { "$ref": "#/$defs/SeasonalRelativeLAI" }, { "type": "null" } ] }, "SeasonalRelativeHeight": { "anyOf": [ { "$ref": "#/$defs/SeasonalRelativeHeight" }, { "type": "null" } ] }, "Gauge": { "anyOf": [ { "items": { "$ref": "#/$defs/Gauge" }, "type": "array" }, { "type": "null" } ], "title": "Gauge" }, "StationForcing": { "anyOf": [ { "items": { "$ref": "#/$defs/StationForcing" }, "type": "array" }, { "type": "null" } ], "title": "Stationforcing" }, "GriddedForcing": { "anyOf": [ { "items": { "$ref": "#/$defs/GriddedForcing" }, "type": "array" }, { "type": "null" } ], "title": "Griddedforcing" }, "ObservationData": { "anyOf": [ { "items": { "$ref": "#/$defs/ObservationData" }, "type": "array" }, { "type": "null" } ], "title": "Observationdata" }, "SubBasins": { "anyOf": [ { "$ref": "#/$defs/SubBasins" }, { "type": "null" } ] }, "SubBasinGroup": { "anyOf": [ { "items": { "$ref": "#/$defs/SubBasinGroup" }, "type": "array" }, { "type": "null" } ], "title": "Subbasingroup" }, "SubBasinProperties": { "anyOf": [ { "$ref": "#/$defs/SubBasinProperties" }, { "type": "null" } ] }, "SBGroupPropertyMultiplier": { "anyOf": [ { "items": { "$ref": "#/$defs/SBGroupPropertyMultiplier" }, "type": "array" }, { "type": "null" } ], "title": "Sbgrouppropertymultiplier" }, "GaugedSubBasinGroup": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gaugedsubbasingroup" }, "HRUs": { "anyOf": [ { "$ref": "#/$defs/HRUs" }, { "type": "null" } ] }, "HRUGroup": { "anyOf": [ { "items": { "$ref": "#/$defs/HRUGroup" }, "type": "array" }, { "type": "null" } ], "title": "Hrugroup" }, "Reservoirs": { "anyOf": [ { "items": { "$ref": "#/$defs/Reservoir" }, "type": "array" }, { "type": "null" } ], "title": "Reservoirs" }, "HRUStateVariableTable": { "anyOf": [ { "$ref": "#/$defs/HRUStateVariableTable" }, { "type": "null" } ] }, "BasinStateVariables": { "anyOf": [ { "$ref": "#/$defs/BasinStateVariables" }, { "type": "null" } ] }, "UniformInitialConditions": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "title": "Uniforminitialconditions" }, "SilentMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Silentmode" }, "NoisyMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noisymode" }, "RunName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Runname" }, "Calendar": { "anyOf": [ { "$ref": "#/$defs/Calendar" }, { "type": "null" } ] }, "StartDate": { "anyOf": [ { "type": "string" }, { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Startdate" }, "AssimilationStartTime": { "anyOf": [ { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Assimilationstarttime" }, "EndDate": { "anyOf": [ { "type": "string" }, { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Enddate" }, "Duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration" }, "TimeStep": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "title": "Timestep" }, "Interpolation": { "anyOf": [ { "$ref": "#/$defs/Interpolation" }, { "type": "null" } ] }, "Routing": { "anyOf": [ { "$ref": "#/$defs/Routing" }, { "type": "null" } ] }, "CatchmentRoute": { "anyOf": [ { "$ref": "#/$defs/CatchmentRoute" }, { "type": "null" } ] }, "Evaporation": { "anyOf": [ { "$ref": "#/$defs/Evaporation" }, { "type": "null" } ] }, "OW_Evaporation": { "anyOf": [ { "$ref": "#/$defs/Evaporation" }, { "type": "null" } ] }, "SWRadiationMethod": { "anyOf": [ { "$ref": "#/$defs/SWRadiationMethod" }, { "type": "null" } ] }, "SWCloudCorrect": { "anyOf": [ { "$ref": "#/$defs/SWCloudCorrect" }, { "type": "null" } ] }, "SWCanopyCorrect": { "anyOf": [ { "$ref": "#/$defs/SWCanopyCorrect" }, { "type": "null" } ] }, "LWRadiationMethod": { "anyOf": [ { "$ref": "#/$defs/LWRadiationMethod" }, { "type": "null" } ] }, "WindspeedMethod": { "anyOf": [ { "$ref": "#/$defs/WindspeedMethod" }, { "type": "null" } ] }, "RainSnowFraction": { "anyOf": [ { "$ref": "#/$defs/RainSnowFraction" }, { "type": "null" } ] }, "PotentialMeltMethod": { "anyOf": [ { "$ref": "#/$defs/PotentialMeltMethod" }, { "type": "null" } ] }, "OroTempCorrect": { "anyOf": [ { "$ref": "#/$defs/OroTempCorrect" }, { "type": "null" } ] }, "OroPrecipCorrect": { "anyOf": [ { "$ref": "#/$defs/OroPrecipCorrect" }, { "type": "null" } ] }, "OroPETCorrect": { "anyOf": [ { "$ref": "#/$defs/OroPETCorrect" }, { "type": "null" } ] }, "CloudCoverMethod": { "anyOf": [ { "$ref": "#/$defs/CloudCoverMethod" }, { "type": "null" } ] }, "PrecipIceptFract": { "anyOf": [ { "$ref": "#/$defs/PrecipIceptFract" }, { "type": "null" } ] }, "SubdailyMethod": { "anyOf": [ { "$ref": "#/$defs/SubdailyMethod" }, { "type": "null" } ] }, "MonthlyInterpolationMethod": { "anyOf": [ { "$ref": "#/$defs/MonthlyInterpolationMethod" }, { "type": "null" } ] }, "SoilModel": { "anyOf": [ { "$ref": "#/$defs/SoilModel" }, { "type": "null" } ] }, "TemperatureCorrection": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Gridded or gauged temperature bias correction.", "title": "Temperaturecorrection" }, "LakeStorage": { "anyOf": [ { "enum": [ "ATMOSPHERE", "ATMOS_PRECIP", "CANOPY", "CANOPY_SNOW", "CANOPY_TEMP", "COLD_CONTENT", "CONSTITUENT", "CONSTITUENT_SINK", "CONSTITUENT_SRC", "CONSTITUENT_SW", "CONVOLUTION", "CONV_STOR", "CROP_HEAT_UNITS", "CUM_INFIL", "CUM_SNOWMELT", "DEPRESSION", "GLACIER", "GLACIER_CC", "GLACIER_ICE", "GROUNDWATER", "LAKE_STORAGE", "MULTIPLE", "PERMAFROST_DEPTH", "PONDED_WATER", "ROOT", "SNOW", "SNOW_AGE", "SNOW_ALBEDO", "SNOW_COVER", "SNOW_DEPTH", "SNOW_LIQ", "SNOW_TEMP", "SOIL", "SOIL[0]", "SOIL[1]", "SOIL[2]", "SOIL_TEMP", "SURFACE_WATER", "SURFACE_WATER_TEMP", "TOTAL_SWE", "TRUNK", "WETLAND" ], "type": "string" }, { "type": "null" } ], "title": "Lakestorage" }, "RelativeHumidityMethod": { "anyOf": [ { "$ref": "#/$defs/RelativeHumidityMethod" }, { "type": "null" } ] }, "DefineHRUGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Definehrugroups" }, "HydrologicProcesses": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/Process" }, { "$ref": "#/$defs/Conditional" }, { "$ref": "#/$defs/ProcessGroup" } ] }, "type": "array" }, { "type": "null" } ], "title": "Hydrologicprocesses" }, "EvaluationMetrics": { "anyOf": [ { "items": { "$ref": "#/$defs/EvaluationMetrics" }, "type": "array" }, { "type": "null" } ], "title": "Evaluationmetrics" }, "EvaluationPeriod": { "anyOf": [ { "items": { "$ref": "#/$defs/EvaluationPeriod" }, "type": "array" }, { "type": "null" } ], "title": "Evaluationperiod" }, "EnsembleMode": { "anyOf": [ { "$ref": "#/$defs/EnsembleMode" }, { "type": "null" } ] }, "WriteNetcdfFormat": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Writenetcdfformat" }, "NetCDFAttribute": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Netcdfattribute" }, "CustomOutput": { "anyOf": [ { "items": { "$ref": "#/$defs/CustomOutput" }, "type": "array" }, { "type": "null" } ], "title": "Customoutput" }, "DirectEvaporation": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Rainfall is automatically reduced through evapotranspiration up to the limit of the calculated PET.", "title": "Directevaporation" }, "DeltaresFEWSMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Deltaresfewsmode" }, "DebugMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Debugmode" }, "DontWriteWatershedStorage": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Do not write watershed storage variables to disk.", "title": "Dontwritewatershedstorage" }, "PavicsMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Pavicsmode" }, "SuppressOutput": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write minimal output to disk when enabled.", "title": "Suppressoutput" }, "WriteForcingFunctions": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write watershed averaged forcing functions (e.g. rainfall, radiation, PET, etc).", "title": "Writeforcingfunctions" }, "WriteSubbasinFile": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Writesubbasinfile" }, "WriteLocalFlows": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write local contribution to hydrograph in hydrograph.csv", "title": "Writelocalflows" } }, "$defs": { "AssimilateStreamflow": { "additionalProperties": false, "description": "Subbasin ID to assimilate streamflow for.", "properties": { "sb_id": { "title": "Sb Id", "type": "string" } }, "required": [ "sb_id" ], "title": "AssimilateStreamflow", "type": "object" }, "AssimilatedState": { "additionalProperties": false, "properties": { "state": { "anyOf": [ { "enum": [ "ATMOSPHERE", "ATMOS_PRECIP", "CANOPY", "CANOPY_SNOW", "CANOPY_TEMP", "COLD_CONTENT", "CONSTITUENT", "CONSTITUENT_SINK", "CONSTITUENT_SRC", "CONSTITUENT_SW", "CONVOLUTION", "CONV_STOR", "CROP_HEAT_UNITS", "CUM_INFIL", "CUM_SNOWMELT", "DEPRESSION", "GLACIER", "GLACIER_CC", "GLACIER_ICE", "GROUNDWATER", "LAKE_STORAGE", "MULTIPLE", "PERMAFROST_DEPTH", "PONDED_WATER", "ROOT", "SNOW", "SNOW_AGE", "SNOW_ALBEDO", "SNOW_COVER", "SNOW_DEPTH", "SNOW_LIQ", "SNOW_TEMP", "SOIL", "SOIL[0]", "SOIL[1]", "SOIL[2]", "SOIL_TEMP", "SURFACE_WATER", "SURFACE_WATER_TEMP", "TOTAL_SWE", "TRUNK", "WETLAND" ], "type": "string" }, { "const": "STREAMFLOW", "type": "string" } ], "title": "State" }, "group": { "title": "Group", "type": "string" } }, "required": [ "state", "group" ], "title": "AssimilatedState", "type": "object" }, "BasinIndex": { "additionalProperties": false, "description": "Initial conditions for a flow segment.", "properties": { "sb_id": { "default": 1, "title": "Sb Id", "type": "integer" }, "name": { "default": "watershed", "title": "Name", "type": "string" }, "ChannelStorage": { "default": 0.0, "title": "Channelstorage", "type": "number" }, "RivuletStorage": { "default": 0.0, "title": "Rivuletstorage", "type": "number" }, "Qout": { "default": [ 1.0, 0.0, 0.0 ], "items": { "type": "number" }, "title": "Qout", "type": "array" }, "Qlat": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qlat" }, "Qin": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qin" } }, "title": "BasinIndex", "type": "object" }, "BasinStateVariables": { "items": { "$ref": "#/$defs/BasinIndex" }, "title": "BasinStateVariables", "type": "array" }, "Calendar": { "enum": [ "ALL_LEAP", "GREGORIAN", "JULIAN", "NOLEAP", "PROLEPTIC_GREGORIAN", "STANDARD", "365_DAY", "366_DAY" ], "title": "Calendar", "type": "string" }, "CatchmentRoute": { "description": ":CatchmentRoute", "enum": [ "ROUTE_DELAYED_FIRST_ORDER", "ROUTE_DUMP", "ROUTE_EXPONENTIAL", "EXPONENTIAL_UH", "ROUTE_GAMMA_CONVOLUTION", "ROUTE_RESERVOIR_SERIES", "ROUTE_TRI_CONVOLUTION", "TRIANGULAR_UH", "TRI_CONVOLUTION" ], "title": "CatchmentRoute", "type": "string" }, "ChannelProfile": { "additionalProperties": false, "description": "ChannelProfile command (RVP).", "properties": { "name": { "default": "chn_XXX", "title": "Name", "type": "string" }, "Bedslope": { "default": 0, "title": "Bedslope", "type": "number" }, "SurveyPoints": { "$ref": "#/$defs/SurveyPoints" }, "RoughnessZones": { "$ref": "#/$defs/RoughnessZones" } }, "title": "ChannelProfile", "type": "object" }, "CloudCoverMethod": { "enum": [ "CLOUDCOV_NONE", "CLOUDCOV_DATA", "CLOUDCOV_UBC" ], "title": "CloudCoverMethod", "type": "string" }, "Conditional": { "additionalProperties": false, "description": "Conditional statement.", "properties": { "kind": { "enum": [ "HRU_TYPE", "LAND_CLASS", "HRU_GROUP" ], "title": "Kind", "type": "string" }, "op": { "enum": [ "IS", "IS_NOT" ], "title": "Op", "type": "string" }, "value": { "title": "Value", "type": "string" } }, "required": [ "kind", "op", "value" ], "title": "Conditional", "type": "object" }, "CustomOutput": { "additionalProperties": false, "description": "Create custom output file to track a single variable, parameter, or forcing function over time at a number of basins, HRUs, or across watershed.\n\n:CustomOutput DAILY AVERAGE AET BY_HRU", "properties": { "time_per": { "enum": [ "DAILY", "MONTHLY", "YEARLY", "WATER_YEARLY", "CONTINUOUS" ], "title": "Time Per", "type": "string" }, "stat": { "enum": [ "AVERAGE", "MAXIMUM", "MINIMUM", "RANGE", "MEDIAN", "QUARTILES" ], "title": "Stat", "type": "string" }, "variable": { "title": "Variable", "type": "string" }, "space_agg": { "enum": [ "BY_BASIN", "BY_HRU", "BY_HRU_GROUP", "BY_SB_GROUP", "ENTIRE_WATERSHED" ], "title": "Space Agg", "type": "string" }, "filename": { "default": "", "title": "Filename", "type": "string" } }, "required": [ "time_per", "stat", "variable", "space_agg" ], "title": "CustomOutput", "type": "object" }, "Data": { "additionalProperties": false, "properties": { "data_type": { "default": "", "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" } }, "required": [ "ReadFromNetCDF" ], "title": "Data", "type": "object" }, "EnKFMode": { "enum": [ "ENKF_CLOSED_LOOP", "ENKF_FORECAST", "ENKF_OPEN_FORECAST", "ENKF_OPEN_LOOP", "ENKF_SPINUP" ], "title": "EnKFMode", "type": "string" }, "EnsembleMode": { "additionalProperties": false, "properties": { "mode": { "const": "ENSEMBLE_ENKF", "default": "ENSEMBLE_ENKF", "title": "Mode", "type": "string" }, "n": { "description": "Number of members", "title": "N", "type": "integer" } }, "required": [ "n" ], "title": "EnsembleMode", "type": "object" }, "EvaluationMetrics": { "enum": [ "ABSERR", "ABSERR_RUN", "ABSMAX", "DIAG_SPEARMAN", "FUZZY_NASH", "KGE_PRIME", "KLING_GUPTA", "LOG_NASH", "NASH_SUTCLIFFE", "NSC", "PCT_BIAS", "PDIFF", "RCOEFF", "RMSE", "TMVOL" ], "title": "EvaluationMetrics", "type": "string" }, "EvaluationPeriod": { "additionalProperties": false, "description": ":EvaluationPeriod [period_name] [start yyyy-mm-dd] [end yyyy-mm-dd]", "properties": { "name": { "title": "Name", "type": "string" }, "start": { "format": "date", "title": "Start", "type": "string" }, "end": { "format": "date", "title": "End", "type": "string" } }, "required": [ "name", "start", "end" ], "title": "EvaluationPeriod", "type": "object" }, "Evaporation": { "enum": [ "PET_CONSTANT", "PET_DATA", "PET_FROMMONTHLY", "PET_HAMON_1961", "PET_HARGREAVES", "PET_HARGREAVES_1985", "PET_MAKKINK_1957", "PET_MOHYSE", "PET_MONTHLY_FACTOR", "PET_OUDIN", "PET_PENMAN_COMBINATION", "PET_PENMAN_MONTEITH", "PET_PRIESTLEY_TAYLOR", "PET_TURC_1961", "PET_VAPDEFICIT" ], "title": "Evaporation", "type": "string" }, "ForcingPerturbation": { "additionalProperties": false, "properties": { "forcing": { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Forcing", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" }, "hru_grp": { "default": "", "title": "Hru Grp", "type": "string" } }, "required": [ "forcing", "dist", "p1", "p2", "adj" ], "title": "ForcingPerturbation", "type": "object" }, "GWRecord": { "default": [ 1, 0, 1.0 ], "description": "GridWeights record.", "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ], "title": "GWRecord", "type": "array" }, "Gauge": { "additionalProperties": false, "properties": { "name": { "default": "default", "title": "Name", "type": "string" }, "Latitude": { "title": "Latitude", "type": "number" }, "Longitude": { "title": "Longitude", "type": "number" }, "Elevation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Elevation" }, "RainCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Rain correction", "title": "Raincorrection" }, "SnowCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Snow correction", "title": "Snowcorrection" }, "MonthlyAveEvaporation": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyaveevaporation" }, "MonthlyAveTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyavetemperature" }, "MonthlyMinTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymintemperature" }, "MonthlyMaxTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymaxtemperature" }, "Data": { "anyOf": [ { "items": { "$ref": "#/$defs/Data" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Data" } }, "required": [ "Latitude", "Longitude" ], "title": "Gauge", "type": "object" }, "GridWeights": { "additionalProperties": false, "description": "GridWeights command.\n\nNotes\n-----\ncommand can be embedded in both a `GriddedForcing` or a `StationForcing`.\n\nThe default is to have a single cell that covers an entire single HRU, with a\nweight of 1.", "properties": { "NumberHRUs": { "default": 1, "title": "Numberhrus", "type": "integer" }, "NumberGridCells": { "default": 1, "title": "Numbergridcells", "type": "integer" }, "data": { "default": [ [ 1, 0, 1.0 ] ], "items": { "$ref": "#/$defs/GWRecord" }, "title": "Data", "type": "array" } }, "title": "GridWeights", "type": "object" }, "GriddedForcing": { "additionalProperties": false, "description": "GriddedForcing command (RVT).", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "GriddedForcing", "type": "object" }, "HRU": { "additionalProperties": false, "description": "Record to populate :HRUs command internal table (RVH).", "properties": { "hru_id": { "default": 1, "exclusiveMinimum": 0, "title": "Hru Id", "type": "integer" }, "area": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0, "title": "Area" }, "elevation": { "default": 0, "title": "Elevation", "type": "number" }, "latitude": { "default": 0, "title": "Latitude", "type": "number" }, "longitude": { "default": 0, "title": "Longitude", "type": "number" }, "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "land_use_class": { "default": "[NONE]", "title": "Land Use Class", "type": "string" }, "veg_class": { "default": "[NONE]", "title": "Veg Class", "type": "string" }, "soil_profile": { "default": "[NONE]", "title": "Soil Profile", "type": "string" }, "aquifer_profile": { "default": "[NONE]", "title": "Aquifer Profile", "type": "string" }, "terrain_class": { "default": "[NONE]", "title": "Terrain Class", "type": "string" }, "slope": { "default": 0.0, "minimum": 0, "title": "Slope", "type": "number" }, "aspect": { "default": 0.0, "maximum": 360, "minimum": 0, "title": "Aspect", "type": "number" }, "hru_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Hru Type" } }, "title": "HRU", "type": "object" }, "HRUGroup": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "groups": { "$ref": "#/$defs/_Rec" } }, "required": [ "name", "groups" ], "title": "HRUGroup", "type": "object" }, "HRUState": { "additionalProperties": false, "properties": { "hru_id": { "default": 1, "title": "Hru Id", "type": "integer" }, "data": { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Data", "type": "object" } }, "title": "HRUState", "type": "object" }, "HRUStateVariableTable": { "description": "Table of HRU state variables.\n\nIf the HRUState include different attributes, the states will be modified to include all attributes.", "items": { "$ref": "#/$defs/HRUState" }, "title": "HRUStateVariableTable", "type": "array" }, "HRUs": { "description": "HRUs command (RVH).", "items": { "$ref": "#/$defs/HRU" }, "title": "HRUs", "type": "array" }, "Interpolation": { "enum": [ "INTERP_AVERAGE_ALL", "INTERP_FROM_FILE", "INTERP_INVERSE_DISTANCE", "INTERP_NEAREST_NEIGHBOR" ], "title": "Interpolation", "type": "string" }, "LWRadiationMethod": { "enum": [ "LW_RAD_DATA", "LW_RAD_DEFAULT", "LW_RAD_UBC" ], "title": "LWRadiationMethod", "type": "string" }, "LandUseClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "impermeable_frac": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Impermeable Frac" }, "forest_coverage": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Forest Coverage" } }, "title": "LandUseClass", "type": "object" }, "LandUseClasses": { "items": { "$ref": "#/$defs/LandUseClass" }, "title": "LandUseClasses", "type": "array" }, "LandUseParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ABST_PERCENT", "AET_COEFF", "BF_LOSS_FRACTION", "B_EXP", "CC_DECAY_COEFF", "DD_AGGRADATION", "DD_MELT_TEMP", "DD_REFREEZE_TEMP", "DEP_K", "DEP_MAX", "DEP_MAX_FLOW", "DEP_N", "DEP_SEEP_K", "DEP_THRESHOLD", "FOREST_COVERAGE", "FOREST_PET_CORR", "FOREST_SPARSENESS", "GAMMA_SCALE", "GAMMA_SCALE2", "GAMMA_SHAPE", "GAMMA_SHAPE2", "GLAC_STORAGE_COEFF", "GR4J_X4", "HBV_GLACIER_AG", "HBV_GLACIER_KMIN", "HBV_MELT_ASP_CORR", "HBV_MELT_FOR_CORR", "HBV_MELT_GLACIER_CORR", "HMETS_RUNOFF_COEFF", "IMPERMEABLE_FRAC", "LAKE_PET_CORR", "LAKE_REL_COEFF", "MAX_DEP_AREA_FRAC", "MAX_MELT_FACTOR", "MAX_SAT_AREA_FRAC", "MELT_FACTOR", "MIN_MELT_FACTOR", "OW_PET_CORR", "PARTITION_COEFF", "PDMROF_B", "PONDED_EXP", "REFREEZE_EXP", "REFREEZE_FACTOR", "ROUGHNESS", "SCS_CN", "SCS_IA_FRACTION", "SNOW_PATCH_LIMIT", "STREAM_FRACTION", "UBC_ICEPT_FACTOR" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "LandUseParameterList", "type": "object" }, "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "MonthlyInterpolationMethod": { "enum": [ "MONTHINT_LINEAR_21", "MONTHINT_LINEAR_FOM", "MONTHINT_LINEAR_MID", "MONTHINT_UNIFORM" ], "title": "MonthlyInterpolationMethod", "type": "string" }, "ObservationData": { "additionalProperties": false, "properties": { "data_type": { "const": "HYDROGRAPH", "default": "HYDROGRAPH", "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" }, "uid": { "default": "1", "title": "Uid", "type": "string" } }, "required": [ "ReadFromNetCDF" ], "title": "ObservationData", "type": "object" }, "ObservationErrorModel": { "additionalProperties": false, "properties": { "state": { "const": "STREAMFLOW", "title": "State", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" } }, "required": [ "state", "dist", "p1", "p2", "adj" ], "title": "ObservationErrorModel", "type": "object" }, "OroPETCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE" ], "title": "OroPETCorrect", "type": "string" }, "OroPrecipCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE", "OROCORR_UBC" ], "title": "OroPrecipCorrect", "type": "string" }, "OroTempCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE", "OROCORR_UBC", "OROCORR_UBC_2" ], "title": "OroTempCorrect", "type": "string" }, "ParameterList": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "values": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "string" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "title": "ParameterList", "type": "object" }, "PotentialMeltMethod": { "description": ":PotentialMelt algorithms", "enum": [ "POTMELT_DATA", "POTMELT_DEGREE_DAY", "POTMELT_EB", "POTMELT_HBV", "POTMELT_HMETS", "POTMELT_NONE", "POTMELT_RESTRICTED", "POTMELT_UBC", "POTMELT_USACE" ], "title": "PotentialMeltMethod", "type": "string" }, "PrecipIceptFract": { "enum": [ "PRECIP_ICEPT_USER", "PRECIP_ICEPT_EXPLAI", "PRECIP_ICEPT_HEDSTROM", "PRECIP_ICEPT_LAI", "PRECIP_ICEPT_NONE" ], "title": "PrecipIceptFract", "type": "string" }, "Process": { "additionalProperties": false, "description": "Process type embedded in HydrologicProcesses command.\n\nSee processes.py for list of processes.", "properties": { "algo": { "default": "RAVEN_DEFAULT", "title": "Algo", "type": "string" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source" }, "to": { "default": [], "items": { "type": "string" }, "title": "To", "type": "array" } }, "title": "Process", "type": "object" }, "ProcessGroup": { "additionalProperties": false, "properties": { "p": { "items": { "$ref": "#/$defs/Process" }, "title": "P", "type": "array" }, "params": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Params", "type": "array" } }, "required": [ "p", "params" ], "title": "ProcessGroup", "type": "object" }, "RainSnowFraction": { "enum": [ "RAINSNOW_DATA", "RAINSNOW_DINGMAN", "RAINSNOW_HARDER", "RAINSNOW_HBV", "RAINSNOW_HSPF", "RAINSNOW_SNTHERM89", "RAINSNOW_UBC", "RAINSNOW_WANG" ], "title": "RainSnowFraction", "type": "string" }, "RainSnowTransition": { "additionalProperties": false, "description": "Specify the range of temperatures over which there will be a rain/snow mix when partitioning total precipitation into rain/snow components.\n\n:RainSnowTransition [temp] [delta]\n\n# equivalent to (the preferred option)\n:GlobalParameter RAINSNOW_TEMP [rainsnow_temp]\n:GlobalParameter RAINSNOW_DELTA [rainsnow_delta]", "properties": { "temp": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Temp" }, "delta": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Delta" } }, "required": [ "temp", "delta" ], "title": "RainSnowTransition", "type": "object" }, "ReadFromNetCDF": { "additionalProperties": false, "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "ReadFromNetCDF", "type": "object" }, "RedirectToFile": { "description": "RedirectToFile command (RVT).\n\nNotes\n-----\nFor the moment, this command can only be used in the context of a `GriddedForcingCommand`\nor a `StationForcingCommand`, as a `grid_weights` field replacement when inlining is not\ndesired.", "format": "file-path", "title": "RedirectToFile", "type": "string" }, "RelativeHumidityMethod": { "enum": [ "RELHUM_CONSTANT", "RELHUM_CORR", "RELHUM_DATA", "RELHUM_MINDEWPT", "WINDVEL_CORR" ], "title": "RelativeHumidityMethod", "type": "string" }, "Reservoir": { "additionalProperties": false, "description": "Reservoir command (RVH).", "properties": { "name": { "default": "Lake_XXX", "title": "Name", "type": "string" }, "SubBasinID": { "default": 0, "title": "Subbasinid", "type": "integer" }, "HRUID": { "default": 0, "title": "Hruid", "type": "integer" }, "Type": { "default": "RESROUTE_STANDARD", "title": "Type", "type": "string" }, "WeirCoefficient": { "default": 0, "title": "Weircoefficient", "type": "number" }, "CrestWidth": { "default": 0, "title": "Crestwidth", "type": "number" }, "MaxDepth": { "default": 0, "description": "Max depth (m)", "title": "Maxdepth", "type": "number" }, "LakeArea": { "default": 0, "description": "Lake area (m2)", "title": "Lakearea", "type": "number" }, "AbsoluteCrestHeight": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Absolute crest height (m)", "title": "Absolutecrestheight" }, "MaxCapacity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Maximum capacity in m3", "title": "Maxcapacity" }, "SeepageParameters": { "anyOf": [ { "$ref": "#/$defs/SeepageParameters" }, { "type": "null" } ], "default": null }, "StageRelations": { "anyOf": [ { "$ref": "#/$defs/StageRelations" }, { "type": "null" } ], "default": null } }, "title": "Reservoir", "type": "object" }, "RoughnessZone": { "default": [], "description": "RoughnessZone record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "RoughnessZone", "type": "array" }, "RoughnessZones": { "default": [ [] ], "description": "RoughnessZones record.\n\n[x_zone, mannings_n] x number of roughness zones.", "items": { "$ref": "#/$defs/RoughnessZone" }, "title": "RoughnessZones", "type": "array" }, "Routing": { "enum": [ "ROUTE_DIFFUSIVE_WAVE", "ROUTE_HYDROLOGIC", "MUSKINGUM", "ROUTE_NONE", "ROUTE_PLUG_FLOW", "ROUTE_STORAGE_COEFF" ], "title": "Routing", "type": "string" }, "SBGroupPropertyMultiplier": { "additionalProperties": false, "description": ":SBGroupPropertyMultiplier [group_name] [parameter_name] [mult]", "properties": { "group_name": { "title": "Group Name", "type": "string" }, "parameter_name": { "title": "Parameter Name", "type": "string" }, "mult": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Mult" } }, "required": [ "group_name", "parameter_name", "mult" ], "title": "SBGroupPropertyMultiplier", "type": "object" }, "SWCanopyCorrect": { "enum": [ "SW_CANOPY_CORR_NONE", "SW_CANOPY_CORR_DYNAMIC", "SW_CANOPY_CORR_STATIC", "SW_CANOPY_CORR_UBC" ], "title": "SWCanopyCorrect", "type": "string" }, "SWCloudCorrect": { "enum": [ "SW_CLOUD_CORR_NONE", "SW_CLOUD_CORR_ANNANDALE", "SW_CLOUD_CORR_DINGMAN", "SW_CLOUD_CORR_UBCWM" ], "title": "SWCloudCorrect", "type": "string" }, "SWRadiationMethod": { "enum": [ "SW_RAD_DATA", "SW_RAD_DEFAULT", "SW_RAD_UBCWM" ], "title": "SWRadiationMethod", "type": "string" }, "SeasonalRelativeHeight": { "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" }, "title": "SeasonalRelativeHeight", "type": "array" }, "SeasonalRelativeLAI": { "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" }, "title": "SeasonalRelativeLAI", "type": "array" }, "SeepageParameters": { "additionalProperties": false, "description": ":SeepageParameters [K_seep] [href]", "properties": { "k_seep": { "title": "K Seep", "type": "number" }, "h_ref": { "title": "H Ref", "type": "number" } }, "required": [ "k_seep", "h_ref" ], "title": "SeepageParameters", "type": "object" }, "SoilClass": { "additionalProperties": false, "description": "SoilClass.", "properties": { "name": { "title": "Name", "type": "string" }, "mineral": { "anyOf": [ { "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Mineral" }, "organic": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Organic" } }, "required": [ "name" ], "title": "SoilClass", "type": "object" }, "SoilClasses": { "default": [], "description": "SoilClasses command.\n\nExample::\n\n :SoilClasses\n :Attributes, %SAND, %CLAY, %SILT, %ORGANIC\n :Units, none, none, none, none\n SAND, 1, 0, 0, 0\n LOAM, 0.5, 0.1, 0.4, 0.4\n :EndSoilClasses", "items": { "$ref": "#/$defs/SoilClass" }, "title": "SoilClasses", "type": "array" }, "SoilModel": { "description": ":SoilModel SOIL_MULTILAYER 6", "title": "SoilModel", "type": "integer" }, "SoilParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "AIR_ENTRY_PRESSURE", "ALBEDO_DRY", "ALBEDO_WET", "BASEFLOW_COEFF", "BASEFLOW_COEFF2", "BASEFLOW_N", "BASEFLOW_THRESH", "BF_LOSS_FRACTION", "BULK_DENSITY", "B_EXP", "CLAPP N,CLAPP M", "CLAPP_B", "CLAY_CON", "EVAP_RES_FC", "FIELD_CAPACITY", "GR4J_X2", "GR4J_X3", "HBV_BETA", "HEAT_CAPACITY", "HYDRAUL_COND", "INTERFLOW_COEF", "MAX_BASEFLOW_RATE", "MAX_CAP_RISE_RATE", "MAX_INTERFLOW_RATE", "MAX_PERC_RATE", "ORG_CON", "PERC_COEFF", "PERC_N", "PET_CORRECTION", "POROSITY", "SAC_PERC_ALPHA", "SAC_PERC_EXPON", "SAC_PERC_PFREE", "SAND_CON", "SAT_RES", "SAT_WILT", "SHUTTLEWORTH_B", "SILT_CON", "STONE_FRAC", "STORAGE_THRESHOLD", "THERMAL_COND", "UBC_EVAL_SOIL_DEF", "UBC_INFIL_SOIL_DEF", "UNAVAIL_FRAC", "VIC ALPHA", "VIC_EVAP_GAMMA", "VIC_ZMAX", "VIZ_ZMIN", "WETTING_FRONT_PSI", "WILTING_PRESSURE" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "SoilParameterList", "type": "object" }, "SoilProfile": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "soil_classes": { "default": [], "items": { "type": "string" }, "title": "Soil Classes", "type": "array" }, "thicknesses": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Thicknesses", "type": "array" } }, "title": "SoilProfile", "type": "object" }, "SoilProfiles": { "description": "SoilProfiles command.\n\nExample::\n\n :SoilProfiles\n # name, #horizons, hor1, th1, hor2, th2\n LAKE, 0\n GLACIER, 0\n LOAM_SEQ, 2, LOAM, 0.5, SAND, 1.5\n ALL_SAND, 2, SAND, 0.5, SAND, 1.5\n :EndSoilProfiles", "items": { "$ref": "#/$defs/SoilProfile" }, "title": "SoilProfiles", "type": "array" }, "StageRelation": { "anyOf": [ { "maxItems": 4, "minItems": 4, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "maxItems": 5, "minItems": 5, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" } ], "default": null, "description": "Stage relation record.\n\nh, q, v, a, [u]", "title": "StageRelation" }, "StageRelations": { "default": null, "description": "Stage relations for the reservoir.", "items": { "$ref": "#/$defs/StageRelation" }, "title": "StageRelations", "type": "array" }, "StationForcing": { "additionalProperties": false, "description": "StationForcing command (RVT).", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "StationForcing", "type": "object" }, "SubBasin": { "additionalProperties": false, "description": "Record to populate RVH :SubBasins command internal table.", "properties": { "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "name": { "default": "sub_001", "title": "Name", "type": "string" }, "downstream_id": { "default": -1, "title": "Downstream Id", "type": "integer" }, "profile": { "default": "NONE", "title": "Profile", "type": "string" }, "reach_length": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": 0, "title": "Reach Length" }, "gauged": { "default": true, "title": "Gauged", "type": "boolean" }, "gauge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Gauge Id" } }, "title": "SubBasin", "type": "object" }, "SubBasinGroup": { "additionalProperties": false, "description": "SubBasinGroup command (RVH).", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "sb_ids": { "default": [], "items": { "type": "integer" }, "title": "Sb Ids", "type": "array" } }, "title": "SubBasinGroup", "type": "object" }, "SubBasinProperties": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "CELERITY", "DIFFUSIVITY", "GAMMA_SCALE", "GAMMA_SHAPE", "MANNINGS_N", "NUM_RESERVOIRS", "Q_REFERENCE", "RAIN_CORR", "RES_CONSTANT", "SLOPE", "SNOW_CORR", "TIME_CONC", "TIME_LAG", "TIME_TO_PEAK" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "records": { "anyOf": [ { "items": { "$ref": "#/$defs/SubBasinProperty" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Records" } }, "title": "SubBasinProperties", "type": "object" }, "SubBasinProperty": { "additionalProperties": false, "properties": { "sb_id": { "title": "Sb Id", "type": "string" }, "values": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "required": [ "sb_id", "values" ], "title": "SubBasinProperty", "type": "object" }, "SubBasins": { "description": "SubBasins command (RVH)\n\nExample::\n\n :SubBasins\n :Attributes, NAME, DOWNSTREAM_ID, PROFILE, REACH_LENGTH, GAUGED\n :Units, none, none, none, km, none\n 1, Downstream, -1, DEFAULT, 3.0, 1\n 2, Upstream, 1, DEFAULT, 3.0, 0\n :EndSubBasins", "items": { "$ref": "#/$defs/SubBasin" }, "title": "SubBasins", "type": "array" }, "SubdailyMethod": { "enum": [ "SUBDAILY_NONE", "SUBDAILY_SIMPLE", "SUBDAILY_UBC" ], "title": "SubdailyMethod", "type": "string" }, "SurveyPoint": { "default": [], "description": "SurveyPoint record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "SurveyPoint", "type": "array" }, "SurveyPoints": { "default": [ [] ], "description": "SurveyPoints\n\n[x, bed_elevation] x number of survey points.", "items": { "$ref": "#/$defs/SurveyPoint" }, "title": "SurveyPoints", "type": "array" }, "TerrainClass": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "hillslope_length": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Hillslope Length" }, "drainage_density": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Drainage Density" }, "topmodel_lambda": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "title": "Topmodel Lambda" } }, "required": [ "name", "hillslope_length", "drainage_density" ], "title": "TerrainClass", "type": "object" }, "TerrainClasses": { "items": { "$ref": "#/$defs/TerrainClass" }, "title": "TerrainClasses", "type": "array" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" }, "VegetationClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "max_ht": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Ht" }, "max_lai": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Lai" }, "max_leaf_cond": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Leaf Cond" } }, "title": "VegetationClass", "type": "object" }, "VegetationClasses": { "items": { "$ref": "#/$defs/VegetationClass" }, "title": "VegetationClasses", "type": "array" }, "VegetationParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ALBEDO", "ALBEDO_WET", "CAP_LAI_RATIO", "CHU_MATURITY", "DRIP_PROPORTION", "MAX_CAPACITY", "MAX_HEIGHT", "MAX_INTERCEPT_RATE", "MAX_LAI", "MAX_LEAF_COND", "MAX_ROOT_LENGTH", "MAX_SNOW_CAPACITY", "MIN_RESISTIVITY", "PET_VEG_CORR", "PSI_CRITICAL", "RAIN_ICEPT_FACT", "RAIN_ICEPT_PCT", "RELATIVE_HT", "RELATIVE_LAI", "ROOTRADIUS", "ROOT_EXTINCT", "SAI_HT_RATIO", "SNOCAP_LAI_RATIO", "SNOW_ICEPT_FACT", "SNOW_ICEPT_PCT", "STEMFLOW_FRAC", "SVF_EXTINCTION", "TFRAIN", "TFSNOW", "TRUNK_FRACTION", "VEG_DENS", "VEG_DIAM", "VEG_MBETA", "XYLEM_FRAC" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "VegetationParameterList", "type": "object" }, "WindspeedMethod": { "enum": [ "WINDVEL_CONSTANT", "WINDVEL_DATA", "WINDVEL_UBC" ], "title": "WindspeedMethod", "type": "string" }, "_MonthlyRecord": { "additionalProperties": false, "properties": { "name": { "default": "[DEFAULT]", "title": "Name", "type": "string" }, "values": { "default": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "items": { "type": "number" }, "title": "Values", "type": "array" } }, "title": "_MonthlyRecord", "type": "object" }, "_Rec": { "items": { "type": "string" }, "title": "_Rec", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
- Validators:
_cast_to_dataclass»params_update_defaults»global_parameter_update_defaults»netcdf_attribute
- set_params(params: dict | Sequence) Config[source]
Return a new instance of Config with params frozen to their numerical values.
- set_solution(fn: Path, timestamp: bool = True) Config[source]
Return a new instance of Config with hru, basin states and start date set from an existing solution.
- Parameters:
fn (Path) – Path to solution file.
timestamp (bool) – If False, ignore time stamp information in the solution. If True, the solution will set StartDate to the solution’s timestamp.
- Returns:
Config with internal state set from the solution file.
- Return type:
- write_rv(workdir: str | Path, modelname: str | None = None, overwrite: bool = False, header: bool = True)[source]
Write configuration files to disk.
- Parameters:
workdir (str, Path) – A directory where rv files will be written to disk.
modelname (str) – File name stem for rv files. If not given, defaults to RunName if set, otherwise raven.
overwrite (bool) – If True, overwrite existing configuration files.
header (bool) – If True, write a header at the top of each RV file.
- zip(workdir: str | Path, modelname: str | None = None, overwrite: bool = False)[source]
Write configuration to zip file.
- Parameters:
workdir (Path, str) – Path to zip archive storing RV files.
modelname (str, optional) – File name stem for rv files. If not given, defaults to RunName if set, otherwise raven.
overwrite (bool) – If True, overwrite existing configuration zip file.
- property is_symbolic
Return True if configuration contains symbolic expressions.
- property rvc
- property rve
- property rvh
- property rvi
- property rvp
- property rvt
- pydantic model ravenpy.config.rvs.RVC[source]
Show JSON schema
{ "title": "RVC", "type": "object", "properties": { "HRUStateVariableTable": { "anyOf": [ { "$ref": "#/$defs/HRUStateVariableTable" }, { "type": "null" } ] }, "BasinStateVariables": { "anyOf": [ { "$ref": "#/$defs/BasinStateVariables" }, { "type": "null" } ] }, "UniformInitialConditions": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "title": "Uniforminitialconditions" } }, "$defs": { "BasinIndex": { "additionalProperties": false, "description": "Initial conditions for a flow segment.", "properties": { "sb_id": { "default": 1, "title": "Sb Id", "type": "integer" }, "name": { "default": "watershed", "title": "Name", "type": "string" }, "ChannelStorage": { "default": 0.0, "title": "Channelstorage", "type": "number" }, "RivuletStorage": { "default": 0.0, "title": "Rivuletstorage", "type": "number" }, "Qout": { "default": [ 1.0, 0.0, 0.0 ], "items": { "type": "number" }, "title": "Qout", "type": "array" }, "Qlat": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qlat" }, "Qin": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Qin" } }, "title": "BasinIndex", "type": "object" }, "BasinStateVariables": { "items": { "$ref": "#/$defs/BasinIndex" }, "title": "BasinStateVariables", "type": "array" }, "HRUState": { "additionalProperties": false, "properties": { "hru_id": { "default": 1, "title": "Hru Id", "type": "integer" }, "data": { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Data", "type": "object" } }, "title": "HRUState", "type": "object" }, "HRUStateVariableTable": { "description": "Table of HRU state variables.\n\nIf the HRUState include different attributes, the states will be modified to include all attributes.", "items": { "$ref": "#/$defs/HRUState" }, "title": "HRUStateVariableTable", "type": "array" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
- field basin_state_variables: BasinStateVariables | None [Optional] (alias 'BasinStateVariables')
- field hru_state_variable_table: HRUStateVariableTable | None [Optional] (alias 'HRUStateVariableTable')
- field uniform_initial_conditions: dict[str, Variable | ExpressionNode | float | None] | None [Optional] (alias 'UniformInitialConditions')
- pydantic model ravenpy.config.rvs.RVE[source]
Show JSON schema
{ "title": "RVE", "type": "object", "properties": { "EnKFMode": { "anyOf": [ { "$ref": "#/$defs/EnKFMode" }, { "type": "null" } ] }, "WindowSize": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Windowsize" }, "SolutionRunName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Solutionrunname" }, "ExtraRVTFilename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrarvtfilename" }, "OutputDirectoryFormat": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "title": "Outputdirectoryformat" }, "ForecastRVTFilename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Forecastrvtfilename" }, "TruncateHindcasts": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Truncatehindcasts" }, "ForcingPerturbation": { "anyOf": [ { "items": { "$ref": "#/$defs/ForcingPerturbation" }, "type": "array" }, { "type": "null" } ], "title": "Forcingperturbation" }, "AssimilatedState": { "anyOf": [ { "items": { "$ref": "#/$defs/AssimilatedState" }, "type": "array" }, { "type": "null" } ], "title": "Assimilatedstate" }, "AssimilateStreamflow": { "anyOf": [ { "items": { "$ref": "#/$defs/AssimilateStreamflow" }, "type": "array" }, { "type": "null" } ], "title": "Assimilatestreamflow" }, "ObservationErrorModel": { "anyOf": [ { "items": { "$ref": "#/$defs/ObservationErrorModel" }, "type": "array" }, { "type": "null" } ], "title": "Observationerrormodel" } }, "$defs": { "AssimilateStreamflow": { "additionalProperties": false, "description": "Subbasin ID to assimilate streamflow for.", "properties": { "sb_id": { "title": "Sb Id", "type": "string" } }, "required": [ "sb_id" ], "title": "AssimilateStreamflow", "type": "object" }, "AssimilatedState": { "additionalProperties": false, "properties": { "state": { "anyOf": [ { "enum": [ "ATMOSPHERE", "ATMOS_PRECIP", "CANOPY", "CANOPY_SNOW", "CANOPY_TEMP", "COLD_CONTENT", "CONSTITUENT", "CONSTITUENT_SINK", "CONSTITUENT_SRC", "CONSTITUENT_SW", "CONVOLUTION", "CONV_STOR", "CROP_HEAT_UNITS", "CUM_INFIL", "CUM_SNOWMELT", "DEPRESSION", "GLACIER", "GLACIER_CC", "GLACIER_ICE", "GROUNDWATER", "LAKE_STORAGE", "MULTIPLE", "PERMAFROST_DEPTH", "PONDED_WATER", "ROOT", "SNOW", "SNOW_AGE", "SNOW_ALBEDO", "SNOW_COVER", "SNOW_DEPTH", "SNOW_LIQ", "SNOW_TEMP", "SOIL", "SOIL[0]", "SOIL[1]", "SOIL[2]", "SOIL_TEMP", "SURFACE_WATER", "SURFACE_WATER_TEMP", "TOTAL_SWE", "TRUNK", "WETLAND" ], "type": "string" }, { "const": "STREAMFLOW", "type": "string" } ], "title": "State" }, "group": { "title": "Group", "type": "string" } }, "required": [ "state", "group" ], "title": "AssimilatedState", "type": "object" }, "EnKFMode": { "enum": [ "ENKF_CLOSED_LOOP", "ENKF_FORECAST", "ENKF_OPEN_FORECAST", "ENKF_OPEN_LOOP", "ENKF_SPINUP" ], "title": "EnKFMode", "type": "string" }, "ForcingPerturbation": { "additionalProperties": false, "properties": { "forcing": { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Forcing", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" }, "hru_grp": { "default": "", "title": "Hru Grp", "type": "string" } }, "required": [ "forcing", "dist", "p1", "p2", "adj" ], "title": "ForcingPerturbation", "type": "object" }, "ObservationErrorModel": { "additionalProperties": false, "properties": { "state": { "const": "STREAMFLOW", "title": "State", "type": "string" }, "dist": { "enum": [ "DIST_UNIFORM", "DIST_NORMAL", "DIST_GAMMA" ], "title": "Dist", "type": "string" }, "p1": { "title": "P1", "type": "number" }, "p2": { "title": "P2", "type": "number" }, "adj": { "enum": [ "ADDITIVE", "MULTIPLICATIVE" ], "title": "Adj", "type": "string" } }, "required": [ "state", "dist", "p1", "p2", "adj" ], "title": "ObservationErrorModel", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
- field assimilate_streamflow: Sequence[AssimilateStreamflow] | None [Optional] (alias 'AssimilateStreamflow')
- field assimilated_state: Sequence[AssimilatedState] | None [Optional] (alias 'AssimilatedState')
- field enkf_mode: EnKFMode | None [Optional] (alias 'EnKFMode')
- field extra_rvt_filename: str | None [Optional] (alias 'ExtraRVTFilename')
- field forcing_perturbation: Sequence[ForcingPerturbation] | None [Optional] (alias 'ForcingPerturbation')
- field forecast_rvt_filename: str | None [Optional] (alias 'ForecastRVTFilename')
- field observation_error_model: Sequence[ObservationErrorModel] | None [Optional] (alias 'ObservationErrorModel')
- field output_directory_format: str | Path | None [Optional] (alias 'OutputDirectoryFormat')
- field solution_run_name: str | None [Optional] (alias 'SolutionRunName')
- field truncate_hindcasts: bool | None [Optional] (alias 'TruncateHindcasts')
- field window_size: int | None [Optional] (alias 'WindowSize')
- pydantic model ravenpy.config.rvs.RVH[source]
Show JSON schema
{ "title": "RVH", "type": "object", "properties": { "SubBasins": { "anyOf": [ { "$ref": "#/$defs/SubBasins" }, { "type": "null" } ] }, "SubBasinGroup": { "anyOf": [ { "items": { "$ref": "#/$defs/SubBasinGroup" }, "type": "array" }, { "type": "null" } ], "title": "Subbasingroup" }, "SubBasinProperties": { "anyOf": [ { "$ref": "#/$defs/SubBasinProperties" }, { "type": "null" } ] }, "SBGroupPropertyMultiplier": { "anyOf": [ { "items": { "$ref": "#/$defs/SBGroupPropertyMultiplier" }, "type": "array" }, { "type": "null" } ], "title": "Sbgrouppropertymultiplier" }, "GaugedSubBasinGroup": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gaugedsubbasingroup" }, "HRUs": { "anyOf": [ { "$ref": "#/$defs/HRUs" }, { "type": "null" } ] }, "HRUGroup": { "anyOf": [ { "items": { "$ref": "#/$defs/HRUGroup" }, "type": "array" }, { "type": "null" } ], "title": "Hrugroup" }, "Reservoirs": { "anyOf": [ { "items": { "$ref": "#/$defs/Reservoir" }, "type": "array" }, { "type": "null" } ], "title": "Reservoirs" } }, "$defs": { "HRU": { "additionalProperties": false, "description": "Record to populate :HRUs command internal table (RVH).", "properties": { "hru_id": { "default": 1, "exclusiveMinimum": 0, "title": "Hru Id", "type": "integer" }, "area": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0, "title": "Area" }, "elevation": { "default": 0, "title": "Elevation", "type": "number" }, "latitude": { "default": 0, "title": "Latitude", "type": "number" }, "longitude": { "default": 0, "title": "Longitude", "type": "number" }, "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "land_use_class": { "default": "[NONE]", "title": "Land Use Class", "type": "string" }, "veg_class": { "default": "[NONE]", "title": "Veg Class", "type": "string" }, "soil_profile": { "default": "[NONE]", "title": "Soil Profile", "type": "string" }, "aquifer_profile": { "default": "[NONE]", "title": "Aquifer Profile", "type": "string" }, "terrain_class": { "default": "[NONE]", "title": "Terrain Class", "type": "string" }, "slope": { "default": 0.0, "minimum": 0, "title": "Slope", "type": "number" }, "aspect": { "default": 0.0, "maximum": 360, "minimum": 0, "title": "Aspect", "type": "number" }, "hru_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Hru Type" } }, "title": "HRU", "type": "object" }, "HRUGroup": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "groups": { "$ref": "#/$defs/_Rec" } }, "required": [ "name", "groups" ], "title": "HRUGroup", "type": "object" }, "HRUs": { "description": "HRUs command (RVH).", "items": { "$ref": "#/$defs/HRU" }, "title": "HRUs", "type": "array" }, "Reservoir": { "additionalProperties": false, "description": "Reservoir command (RVH).", "properties": { "name": { "default": "Lake_XXX", "title": "Name", "type": "string" }, "SubBasinID": { "default": 0, "title": "Subbasinid", "type": "integer" }, "HRUID": { "default": 0, "title": "Hruid", "type": "integer" }, "Type": { "default": "RESROUTE_STANDARD", "title": "Type", "type": "string" }, "WeirCoefficient": { "default": 0, "title": "Weircoefficient", "type": "number" }, "CrestWidth": { "default": 0, "title": "Crestwidth", "type": "number" }, "MaxDepth": { "default": 0, "description": "Max depth (m)", "title": "Maxdepth", "type": "number" }, "LakeArea": { "default": 0, "description": "Lake area (m2)", "title": "Lakearea", "type": "number" }, "AbsoluteCrestHeight": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Absolute crest height (m)", "title": "Absolutecrestheight" }, "MaxCapacity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Maximum capacity in m3", "title": "Maxcapacity" }, "SeepageParameters": { "anyOf": [ { "$ref": "#/$defs/SeepageParameters" }, { "type": "null" } ], "default": null }, "StageRelations": { "anyOf": [ { "$ref": "#/$defs/StageRelations" }, { "type": "null" } ], "default": null } }, "title": "Reservoir", "type": "object" }, "SBGroupPropertyMultiplier": { "additionalProperties": false, "description": ":SBGroupPropertyMultiplier [group_name] [parameter_name] [mult]", "properties": { "group_name": { "title": "Group Name", "type": "string" }, "parameter_name": { "title": "Parameter Name", "type": "string" }, "mult": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Mult" } }, "required": [ "group_name", "parameter_name", "mult" ], "title": "SBGroupPropertyMultiplier", "type": "object" }, "SeepageParameters": { "additionalProperties": false, "description": ":SeepageParameters [K_seep] [href]", "properties": { "k_seep": { "title": "K Seep", "type": "number" }, "h_ref": { "title": "H Ref", "type": "number" } }, "required": [ "k_seep", "h_ref" ], "title": "SeepageParameters", "type": "object" }, "StageRelation": { "anyOf": [ { "maxItems": 4, "minItems": 4, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "maxItems": 5, "minItems": 5, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" } ], "default": null, "description": "Stage relation record.\n\nh, q, v, a, [u]", "title": "StageRelation" }, "StageRelations": { "default": null, "description": "Stage relations for the reservoir.", "items": { "$ref": "#/$defs/StageRelation" }, "title": "StageRelations", "type": "array" }, "SubBasin": { "additionalProperties": false, "description": "Record to populate RVH :SubBasins command internal table.", "properties": { "subbasin_id": { "default": 1, "exclusiveMinimum": 0, "title": "Subbasin Id", "type": "integer" }, "name": { "default": "sub_001", "title": "Name", "type": "string" }, "downstream_id": { "default": -1, "title": "Downstream Id", "type": "integer" }, "profile": { "default": "NONE", "title": "Profile", "type": "string" }, "reach_length": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": 0, "title": "Reach Length" }, "gauged": { "default": true, "title": "Gauged", "type": "boolean" }, "gauge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Gauge Id" } }, "title": "SubBasin", "type": "object" }, "SubBasinGroup": { "additionalProperties": false, "description": "SubBasinGroup command (RVH).", "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "sb_ids": { "default": [], "items": { "type": "integer" }, "title": "Sb Ids", "type": "array" } }, "title": "SubBasinGroup", "type": "object" }, "SubBasinProperties": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "CELERITY", "DIFFUSIVITY", "GAMMA_SCALE", "GAMMA_SHAPE", "MANNINGS_N", "NUM_RESERVOIRS", "Q_REFERENCE", "RAIN_CORR", "RES_CONSTANT", "SLOPE", "SNOW_CORR", "TIME_CONC", "TIME_LAG", "TIME_TO_PEAK" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "records": { "anyOf": [ { "items": { "$ref": "#/$defs/SubBasinProperty" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Records" } }, "title": "SubBasinProperties", "type": "object" }, "SubBasinProperty": { "additionalProperties": false, "properties": { "sb_id": { "title": "Sb Id", "type": "string" }, "values": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "required": [ "sb_id", "values" ], "title": "SubBasinProperty", "type": "object" }, "SubBasins": { "description": "SubBasins command (RVH)\n\nExample::\n\n :SubBasins\n :Attributes, NAME, DOWNSTREAM_ID, PROFILE, REACH_LENGTH, GAUGED\n :Units, none, none, none, km, none\n 1, Downstream, -1, DEFAULT, 3.0, 1\n 2, Upstream, 1, DEFAULT, 3.0, 0\n :EndSubBasins", "items": { "$ref": "#/$defs/SubBasin" }, "title": "SubBasins", "type": "array" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" }, "_Rec": { "items": { "type": "string" }, "title": "_Rec", "type": "array" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
hru_group (collections.abc.Sequence[ravenpy.config.commands.HRUGroup] | None)reservoirs (collections.abc.Sequence[ravenpy.config.commands.Reservoir] | None)sub_basin_group (collections.abc.Sequence[ravenpy.config.commands.SubBasinGroup] | None)sub_basin_properties (ravenpy.config.commands.SubBasinProperties | None)
- field gauged_sub_basin_group: str | None [Optional] (alias 'GaugedSubBasinGroup')
- field sb_group_property_multiplier: Sequence[SBGroupPropertyMultiplier] | None [Optional] (alias 'SBGroupPropertyMultiplier')
- field sub_basin_group: Sequence[SubBasinGroup] | None [Optional] (alias 'SubBasinGroup')
- field sub_basin_properties: SubBasinProperties | None [Optional] (alias 'SubBasinProperties')
- pydantic model ravenpy.config.rvs.RVI[source]
Show JSON schema
{ "title": "RVI", "type": "object", "properties": { "SilentMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Silentmode" }, "NoisyMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noisymode" }, "RunName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Runname" }, "Calendar": { "anyOf": [ { "$ref": "#/$defs/Calendar" }, { "type": "null" } ] }, "StartDate": { "anyOf": [ { "type": "string" }, { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Startdate" }, "AssimilationStartTime": { "anyOf": [ { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Assimilationstarttime" }, "EndDate": { "anyOf": [ { "type": "string" }, { "format": "date", "type": "string" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Enddate" }, "Duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration" }, "TimeStep": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "title": "Timestep" }, "Interpolation": { "anyOf": [ { "$ref": "#/$defs/Interpolation" }, { "type": "null" } ] }, "Routing": { "anyOf": [ { "$ref": "#/$defs/Routing" }, { "type": "null" } ] }, "CatchmentRoute": { "anyOf": [ { "$ref": "#/$defs/CatchmentRoute" }, { "type": "null" } ] }, "Evaporation": { "anyOf": [ { "$ref": "#/$defs/Evaporation" }, { "type": "null" } ] }, "OW_Evaporation": { "anyOf": [ { "$ref": "#/$defs/Evaporation" }, { "type": "null" } ] }, "SWRadiationMethod": { "anyOf": [ { "$ref": "#/$defs/SWRadiationMethod" }, { "type": "null" } ] }, "SWCloudCorrect": { "anyOf": [ { "$ref": "#/$defs/SWCloudCorrect" }, { "type": "null" } ] }, "SWCanopyCorrect": { "anyOf": [ { "$ref": "#/$defs/SWCanopyCorrect" }, { "type": "null" } ] }, "LWRadiationMethod": { "anyOf": [ { "$ref": "#/$defs/LWRadiationMethod" }, { "type": "null" } ] }, "WindspeedMethod": { "anyOf": [ { "$ref": "#/$defs/WindspeedMethod" }, { "type": "null" } ] }, "RainSnowFraction": { "anyOf": [ { "$ref": "#/$defs/RainSnowFraction" }, { "type": "null" } ] }, "PotentialMeltMethod": { "anyOf": [ { "$ref": "#/$defs/PotentialMeltMethod" }, { "type": "null" } ] }, "OroTempCorrect": { "anyOf": [ { "$ref": "#/$defs/OroTempCorrect" }, { "type": "null" } ] }, "OroPrecipCorrect": { "anyOf": [ { "$ref": "#/$defs/OroPrecipCorrect" }, { "type": "null" } ] }, "OroPETCorrect": { "anyOf": [ { "$ref": "#/$defs/OroPETCorrect" }, { "type": "null" } ] }, "CloudCoverMethod": { "anyOf": [ { "$ref": "#/$defs/CloudCoverMethod" }, { "type": "null" } ] }, "PrecipIceptFract": { "anyOf": [ { "$ref": "#/$defs/PrecipIceptFract" }, { "type": "null" } ] }, "SubdailyMethod": { "anyOf": [ { "$ref": "#/$defs/SubdailyMethod" }, { "type": "null" } ] }, "MonthlyInterpolationMethod": { "anyOf": [ { "$ref": "#/$defs/MonthlyInterpolationMethod" }, { "type": "null" } ] }, "SoilModel": { "anyOf": [ { "$ref": "#/$defs/SoilModel" }, { "type": "null" } ] }, "TemperatureCorrection": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Gridded or gauged temperature bias correction.", "title": "Temperaturecorrection" }, "LakeStorage": { "anyOf": [ { "enum": [ "ATMOSPHERE", "ATMOS_PRECIP", "CANOPY", "CANOPY_SNOW", "CANOPY_TEMP", "COLD_CONTENT", "CONSTITUENT", "CONSTITUENT_SINK", "CONSTITUENT_SRC", "CONSTITUENT_SW", "CONVOLUTION", "CONV_STOR", "CROP_HEAT_UNITS", "CUM_INFIL", "CUM_SNOWMELT", "DEPRESSION", "GLACIER", "GLACIER_CC", "GLACIER_ICE", "GROUNDWATER", "LAKE_STORAGE", "MULTIPLE", "PERMAFROST_DEPTH", "PONDED_WATER", "ROOT", "SNOW", "SNOW_AGE", "SNOW_ALBEDO", "SNOW_COVER", "SNOW_DEPTH", "SNOW_LIQ", "SNOW_TEMP", "SOIL", "SOIL[0]", "SOIL[1]", "SOIL[2]", "SOIL_TEMP", "SURFACE_WATER", "SURFACE_WATER_TEMP", "TOTAL_SWE", "TRUNK", "WETLAND" ], "type": "string" }, { "type": "null" } ], "title": "Lakestorage" }, "RelativeHumidityMethod": { "anyOf": [ { "$ref": "#/$defs/RelativeHumidityMethod" }, { "type": "null" } ] }, "DefineHRUGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Definehrugroups" }, "HydrologicProcesses": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/Process" }, { "$ref": "#/$defs/Conditional" }, { "$ref": "#/$defs/ProcessGroup" } ] }, "type": "array" }, { "type": "null" } ], "title": "Hydrologicprocesses" }, "EvaluationMetrics": { "anyOf": [ { "items": { "$ref": "#/$defs/EvaluationMetrics" }, "type": "array" }, { "type": "null" } ], "title": "Evaluationmetrics" }, "EvaluationPeriod": { "anyOf": [ { "items": { "$ref": "#/$defs/EvaluationPeriod" }, "type": "array" }, { "type": "null" } ], "title": "Evaluationperiod" }, "EnsembleMode": { "anyOf": [ { "$ref": "#/$defs/EnsembleMode" }, { "type": "null" } ] }, "WriteNetcdfFormat": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Writenetcdfformat" }, "NetCDFAttribute": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Netcdfattribute" }, "CustomOutput": { "anyOf": [ { "items": { "$ref": "#/$defs/CustomOutput" }, "type": "array" }, { "type": "null" } ], "title": "Customoutput" }, "DirectEvaporation": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Rainfall is automatically reduced through evapotranspiration up to the limit of the calculated PET.", "title": "Directevaporation" }, "DeltaresFEWSMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Deltaresfewsmode" }, "DebugMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Debugmode" }, "DontWriteWatershedStorage": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Do not write watershed storage variables to disk.", "title": "Dontwritewatershedstorage" }, "PavicsMode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Pavicsmode" }, "SuppressOutput": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write minimal output to disk when enabled.", "title": "Suppressoutput" }, "WriteForcingFunctions": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write watershed averaged forcing functions (e.g. rainfall, radiation, PET, etc).", "title": "Writeforcingfunctions" }, "WriteSubbasinFile": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Writesubbasinfile" }, "WriteLocalFlows": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Write local contribution to hydrograph in hydrograph.csv", "title": "Writelocalflows" } }, "$defs": { "Calendar": { "enum": [ "ALL_LEAP", "GREGORIAN", "JULIAN", "NOLEAP", "PROLEPTIC_GREGORIAN", "STANDARD", "365_DAY", "366_DAY" ], "title": "Calendar", "type": "string" }, "CatchmentRoute": { "description": ":CatchmentRoute", "enum": [ "ROUTE_DELAYED_FIRST_ORDER", "ROUTE_DUMP", "ROUTE_EXPONENTIAL", "EXPONENTIAL_UH", "ROUTE_GAMMA_CONVOLUTION", "ROUTE_RESERVOIR_SERIES", "ROUTE_TRI_CONVOLUTION", "TRIANGULAR_UH", "TRI_CONVOLUTION" ], "title": "CatchmentRoute", "type": "string" }, "CloudCoverMethod": { "enum": [ "CLOUDCOV_NONE", "CLOUDCOV_DATA", "CLOUDCOV_UBC" ], "title": "CloudCoverMethod", "type": "string" }, "Conditional": { "additionalProperties": false, "description": "Conditional statement.", "properties": { "kind": { "enum": [ "HRU_TYPE", "LAND_CLASS", "HRU_GROUP" ], "title": "Kind", "type": "string" }, "op": { "enum": [ "IS", "IS_NOT" ], "title": "Op", "type": "string" }, "value": { "title": "Value", "type": "string" } }, "required": [ "kind", "op", "value" ], "title": "Conditional", "type": "object" }, "CustomOutput": { "additionalProperties": false, "description": "Create custom output file to track a single variable, parameter, or forcing function over time at a number of basins, HRUs, or across watershed.\n\n:CustomOutput DAILY AVERAGE AET BY_HRU", "properties": { "time_per": { "enum": [ "DAILY", "MONTHLY", "YEARLY", "WATER_YEARLY", "CONTINUOUS" ], "title": "Time Per", "type": "string" }, "stat": { "enum": [ "AVERAGE", "MAXIMUM", "MINIMUM", "RANGE", "MEDIAN", "QUARTILES" ], "title": "Stat", "type": "string" }, "variable": { "title": "Variable", "type": "string" }, "space_agg": { "enum": [ "BY_BASIN", "BY_HRU", "BY_HRU_GROUP", "BY_SB_GROUP", "ENTIRE_WATERSHED" ], "title": "Space Agg", "type": "string" }, "filename": { "default": "", "title": "Filename", "type": "string" } }, "required": [ "time_per", "stat", "variable", "space_agg" ], "title": "CustomOutput", "type": "object" }, "EnsembleMode": { "additionalProperties": false, "properties": { "mode": { "const": "ENSEMBLE_ENKF", "default": "ENSEMBLE_ENKF", "title": "Mode", "type": "string" }, "n": { "description": "Number of members", "title": "N", "type": "integer" } }, "required": [ "n" ], "title": "EnsembleMode", "type": "object" }, "EvaluationMetrics": { "enum": [ "ABSERR", "ABSERR_RUN", "ABSMAX", "DIAG_SPEARMAN", "FUZZY_NASH", "KGE_PRIME", "KLING_GUPTA", "LOG_NASH", "NASH_SUTCLIFFE", "NSC", "PCT_BIAS", "PDIFF", "RCOEFF", "RMSE", "TMVOL" ], "title": "EvaluationMetrics", "type": "string" }, "EvaluationPeriod": { "additionalProperties": false, "description": ":EvaluationPeriod [period_name] [start yyyy-mm-dd] [end yyyy-mm-dd]", "properties": { "name": { "title": "Name", "type": "string" }, "start": { "format": "date", "title": "Start", "type": "string" }, "end": { "format": "date", "title": "End", "type": "string" } }, "required": [ "name", "start", "end" ], "title": "EvaluationPeriod", "type": "object" }, "Evaporation": { "enum": [ "PET_CONSTANT", "PET_DATA", "PET_FROMMONTHLY", "PET_HAMON_1961", "PET_HARGREAVES", "PET_HARGREAVES_1985", "PET_MAKKINK_1957", "PET_MOHYSE", "PET_MONTHLY_FACTOR", "PET_OUDIN", "PET_PENMAN_COMBINATION", "PET_PENMAN_MONTEITH", "PET_PRIESTLEY_TAYLOR", "PET_TURC_1961", "PET_VAPDEFICIT" ], "title": "Evaporation", "type": "string" }, "Interpolation": { "enum": [ "INTERP_AVERAGE_ALL", "INTERP_FROM_FILE", "INTERP_INVERSE_DISTANCE", "INTERP_NEAREST_NEIGHBOR" ], "title": "Interpolation", "type": "string" }, "LWRadiationMethod": { "enum": [ "LW_RAD_DATA", "LW_RAD_DEFAULT", "LW_RAD_UBC" ], "title": "LWRadiationMethod", "type": "string" }, "MonthlyInterpolationMethod": { "enum": [ "MONTHINT_LINEAR_21", "MONTHINT_LINEAR_FOM", "MONTHINT_LINEAR_MID", "MONTHINT_UNIFORM" ], "title": "MonthlyInterpolationMethod", "type": "string" }, "OroPETCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE" ], "title": "OroPETCorrect", "type": "string" }, "OroPrecipCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE", "OROCORR_UBC" ], "title": "OroPrecipCorrect", "type": "string" }, "OroTempCorrect": { "enum": [ "OROCORR_HBV", "OROCORR_NONE", "OROCORR_SIMPLELAPSE", "OROCORR_UBC", "OROCORR_UBC_2" ], "title": "OroTempCorrect", "type": "string" }, "PotentialMeltMethod": { "description": ":PotentialMelt algorithms", "enum": [ "POTMELT_DATA", "POTMELT_DEGREE_DAY", "POTMELT_EB", "POTMELT_HBV", "POTMELT_HMETS", "POTMELT_NONE", "POTMELT_RESTRICTED", "POTMELT_UBC", "POTMELT_USACE" ], "title": "PotentialMeltMethod", "type": "string" }, "PrecipIceptFract": { "enum": [ "PRECIP_ICEPT_USER", "PRECIP_ICEPT_EXPLAI", "PRECIP_ICEPT_HEDSTROM", "PRECIP_ICEPT_LAI", "PRECIP_ICEPT_NONE" ], "title": "PrecipIceptFract", "type": "string" }, "Process": { "additionalProperties": false, "description": "Process type embedded in HydrologicProcesses command.\n\nSee processes.py for list of processes.", "properties": { "algo": { "default": "RAVEN_DEFAULT", "title": "Algo", "type": "string" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source" }, "to": { "default": [], "items": { "type": "string" }, "title": "To", "type": "array" } }, "title": "Process", "type": "object" }, "ProcessGroup": { "additionalProperties": false, "properties": { "p": { "items": { "$ref": "#/$defs/Process" }, "title": "P", "type": "array" }, "params": { "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Params", "type": "array" } }, "required": [ "p", "params" ], "title": "ProcessGroup", "type": "object" }, "RainSnowFraction": { "enum": [ "RAINSNOW_DATA", "RAINSNOW_DINGMAN", "RAINSNOW_HARDER", "RAINSNOW_HBV", "RAINSNOW_HSPF", "RAINSNOW_SNTHERM89", "RAINSNOW_UBC", "RAINSNOW_WANG" ], "title": "RainSnowFraction", "type": "string" }, "RelativeHumidityMethod": { "enum": [ "RELHUM_CONSTANT", "RELHUM_CORR", "RELHUM_DATA", "RELHUM_MINDEWPT", "WINDVEL_CORR" ], "title": "RelativeHumidityMethod", "type": "string" }, "Routing": { "enum": [ "ROUTE_DIFFUSIVE_WAVE", "ROUTE_HYDROLOGIC", "MUSKINGUM", "ROUTE_NONE", "ROUTE_PLUG_FLOW", "ROUTE_STORAGE_COEFF" ], "title": "Routing", "type": "string" }, "SWCanopyCorrect": { "enum": [ "SW_CANOPY_CORR_NONE", "SW_CANOPY_CORR_DYNAMIC", "SW_CANOPY_CORR_STATIC", "SW_CANOPY_CORR_UBC" ], "title": "SWCanopyCorrect", "type": "string" }, "SWCloudCorrect": { "enum": [ "SW_CLOUD_CORR_NONE", "SW_CLOUD_CORR_ANNANDALE", "SW_CLOUD_CORR_DINGMAN", "SW_CLOUD_CORR_UBCWM" ], "title": "SWCloudCorrect", "type": "string" }, "SWRadiationMethod": { "enum": [ "SW_RAD_DATA", "SW_RAD_DEFAULT", "SW_RAD_UBCWM" ], "title": "SWRadiationMethod", "type": "string" }, "SoilModel": { "description": ":SoilModel SOIL_MULTILAYER 6", "title": "SoilModel", "type": "integer" }, "SubdailyMethod": { "enum": [ "SUBDAILY_NONE", "SUBDAILY_SIMPLE", "SUBDAILY_UBC" ], "title": "SubdailyMethod", "type": "string" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" }, "WindspeedMethod": { "enum": [ "WINDVEL_CONSTANT", "WINDVEL_DATA", "WINDVEL_UBC" ], "title": "WindspeedMethod", "type": "string" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
assimilation_start_time (datetime.date | datetime.datetime | cftime._cftime.datetime | None)catchment_route (ravenpy.config.options.CatchmentRoute | None)cloud_cover_method (ravenpy.config.options.CloudCoverMethod | None)custom_output (collections.abc.Sequence[ravenpy.config.commands.CustomOutput] | None)end_date (str | datetime.date | datetime.datetime | cftime._cftime.datetime | None)evaluation_metrics (collections.abc.Sequence[ravenpy.config.options.EvaluationMetrics] | None)evaluation_period (collections.abc.Sequence[ravenpy.config.commands.EvaluationPeriod] | None)lw_radiation_method (ravenpy.config.options.LWRadiationMethod | None)monthly_interpolation_method (ravenpy.config.options.MonthlyInterpolationMethod | None)oro_pet_correct (ravenpy.config.options.OroPETCorrect | None)oro_precip_correct (ravenpy.config.options.OroPrecipCorrect | None)oro_temp_correct (ravenpy.config.options.OroTempCorrect | None)potential_melt_method (ravenpy.config.options.PotentialMeltMethod | None)precip_icept_frac (ravenpy.config.options.PrecipIceptFract | None)rain_snow_fraction (ravenpy.config.options.RainSnowFraction | None)relative_humidity_method (ravenpy.config.options.RelativeHumidityMethod | None)start_date (str | datetime.date | datetime.datetime | cftime._cftime.datetime | None)subdaily_method (ravenpy.config.options.SubdailyMethod | None)sw_canopy_correct (ravenpy.config.options.SWCanopyCorrect | None)sw_cloud_correct (ravenpy.config.options.SWCloudCorrect | None)sw_radiation_method (ravenpy.config.options.SWRadiationMethod | None)windspeed_method (ravenpy.config.options.WindspeedMethod | None)
- Validators:
- field assimilation_start_time: date | datetime | datetime | None [Optional] (alias 'AssimilationStartTime')
- Validated by:
- field calendar: Calendar | None [Optional] (alias 'Calendar')
- field catchment_route: CatchmentRoute | None [Optional] (alias 'CatchmentRoute')
- field cloud_cover_method: CloudCoverMethod | None [Optional] (alias 'CloudCoverMethod')
- field custom_output: Sequence[CustomOutput] | None [Optional] (alias 'CustomOutput')
- field debug_mode: bool | None [Optional] (alias 'DebugMode')
- field define_hru_groups: Sequence[str] | None [Optional] (alias 'DefineHRUGroups')
- field deltares_fews_mode: bool | None [Optional] (alias 'DeltaresFEWSMode')
- field direct_evaporation: bool | None [Optional] (alias 'DirectEvaporation')
Rainfall is automatically reduced through evapotranspiration up to the limit of the calculated PET.
- field dont_write_watershed_storage: bool | None [Optional] (alias 'DontWriteWatershedStorage')
Do not write watershed storage variables to disk.
- field duration: float | None [Optional] (alias 'Duration')
- field end_date: str | date | datetime | datetime | None [Optional] (alias 'EndDate')
- Validated by:
- field ensemble_mode: EnsembleMode | None [Optional] (alias 'EnsembleMode')
- field evaluation_metrics: Sequence[EvaluationMetrics] | None [Optional] (alias 'EvaluationMetrics')
- field evaluation_period: Sequence[EvaluationPeriod] | None [Optional] (alias 'EvaluationPeriod')
- field evaporation: Evaporation | None [Optional] (alias 'Evaporation')
- field hydrologic_processes: Sequence[Process | Conditional | ProcessGroup] | None [Optional] (alias 'HydrologicProcesses')
- field interpolation: Interpolation | None [Optional] (alias 'Interpolation')
- field lake_storage: Literal['ATMOSPHERE', 'ATMOS_PRECIP', 'CANOPY', 'CANOPY_SNOW', 'CANOPY_TEMP', 'COLD_CONTENT', 'CONSTITUENT', 'CONSTITUENT_SINK', 'CONSTITUENT_SRC', 'CONSTITUENT_SW', 'CONVOLUTION', 'CONV_STOR', 'CROP_HEAT_UNITS', 'CUM_INFIL', 'CUM_SNOWMELT', 'DEPRESSION', 'GLACIER', 'GLACIER_CC', 'GLACIER_ICE', 'GROUNDWATER', 'LAKE_STORAGE', 'MULTIPLE', 'PERMAFROST_DEPTH', 'PONDED_WATER', 'ROOT', 'SNOW', 'SNOW_AGE', 'SNOW_ALBEDO', 'SNOW_COVER', 'SNOW_DEPTH', 'SNOW_LIQ', 'SNOW_TEMP', 'SOIL', 'SOIL[0]', 'SOIL[1]', 'SOIL[2]', 'SOIL_TEMP', 'SURFACE_WATER', 'SURFACE_WATER_TEMP', 'TOTAL_SWE', 'TRUNK', 'WETLAND'] | None [Optional] (alias 'LakeStorage')
- field lw_radiation_method: LWRadiationMethod | None [Optional] (alias 'LWRadiationMethod')
- field monthly_interpolation_method: MonthlyInterpolationMethod | None [Optional] (alias 'MonthlyInterpolationMethod')
- field netcdf_attribute: dict[str, str] | None = {} (alias 'NetCDFAttribute')
- field noisy_mode: bool | None [Optional] (alias 'NoisyMode')
- field oro_pet_correct: OroPETCorrect | None [Optional] (alias 'OroPETCorrect')
- field oro_precip_correct: OroPrecipCorrect | None [Optional] (alias 'OroPrecipCorrect')
- field oro_temp_correct: OroTempCorrect | None [Optional] (alias 'OroTempCorrect')
- field ow_evaporation: Evaporation | None [Optional] (alias 'OW_Evaporation')
- field pavics_mode: bool | None [Optional] (alias 'PavicsMode')
- field potential_melt_method: PotentialMeltMethod | None [Optional] (alias 'PotentialMeltMethod')
- field precip_icept_frac: PrecipIceptFract | None [Optional] (alias 'PrecipIceptFract')
- field rain_snow_fraction: RainSnowFraction | None [Optional] (alias 'RainSnowFraction')
- field relative_humidity_method: RelativeHumidityMethod | None [Optional] (alias 'RelativeHumidityMethod')
- field routing: Routing | None [Optional] (alias 'Routing')
- field run_name: str | None [Optional] (alias 'RunName')
- field silent_mode: bool | None [Optional] (alias 'SilentMode')
- field start_date: str | date | datetime | datetime | None [Optional] (alias 'StartDate')
- Validated by:
- field subdaily_method: SubdailyMethod | None [Optional] (alias 'SubdailyMethod')
- field suppress_output: bool | None [Optional] (alias 'SuppressOutput')
Write minimal output to disk when enabled.
- field sw_canopy_correct: SWCanopyCorrect | None [Optional] (alias 'SWCanopyCorrect')
- field sw_cloud_correct: SWCloudCorrect | None [Optional] (alias 'SWCloudCorrect')
- field sw_radiation_method: SWRadiationMethod | None [Optional] (alias 'SWRadiationMethod')
- field temperature_correction: bool | None [Optional] (alias 'TemperatureCorrection')
Gridded or gauged temperature bias correction.
- field time_step: float | str | None [Optional] (alias 'TimeStep')
- field windspeed_method: WindspeedMethod | None [Optional] (alias 'WindspeedMethod')
- field write_forcing_functions: bool | None [Optional] (alias 'WriteForcingFunctions')
Write watershed averaged forcing functions (e.g. rainfall, radiation, PET, etc).
- field write_local_flows: bool | None [Optional] (alias 'WriteLocalFlows')
Write local contribution to hydrograph in hydrograph.csv
- field write_netcdf_format: bool | None [Optional] (alias 'WriteNetcdfFormat')
- field write_subbasin_file: bool | None [Optional] (alias 'WriteSubbasinFile')
- validator dates2cf » start_date, assimilation_start_time, end_date[source]
Convert dates to cftime dates.
- validator init_soil_model » soil_model[source]
- pydantic model ravenpy.config.rvs.RVP[source]
Show JSON schema
{ "title": "RVP", "type": "object", "properties": { "params": { "default": null, "title": "Params" }, "SoilClasses": { "anyOf": [ { "$ref": "#/$defs/SoilClasses" }, { "type": "null" } ] }, "SoilProfiles": { "anyOf": [ { "$ref": "#/$defs/SoilProfiles" }, { "type": "null" } ] }, "VegetationClasses": { "anyOf": [ { "$ref": "#/$defs/VegetationClasses" }, { "type": "null" } ] }, "LandUseClasses": { "anyOf": [ { "$ref": "#/$defs/LandUseClasses" }, { "type": "null" } ] }, "TerrainClasses": { "anyOf": [ { "$ref": "#/$defs/TerrainClasses" }, { "type": "null" } ] }, "SoilParameterList": { "anyOf": [ { "$ref": "#/$defs/SoilParameterList" }, { "type": "null" } ] }, "LandUseParameterList": { "anyOf": [ { "$ref": "#/$defs/LandUseParameterList" }, { "type": "null" } ] }, "VegetationParameterList": { "anyOf": [ { "$ref": "#/$defs/VegetationParameterList" }, { "type": "null" } ] }, "ChannelProfile": { "anyOf": [ { "items": { "$ref": "#/$defs/ChannelProfile" }, "type": "array" }, { "type": "null" } ], "title": "Channelprofile" }, "GlobalParameter": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Globalparameter" }, "RainSnowTransition": { "anyOf": [ { "$ref": "#/$defs/RainSnowTransition" }, { "type": "null" } ] }, "SeasonalRelativeLAI": { "anyOf": [ { "$ref": "#/$defs/SeasonalRelativeLAI" }, { "type": "null" } ] }, "SeasonalRelativeHeight": { "anyOf": [ { "$ref": "#/$defs/SeasonalRelativeHeight" }, { "type": "null" } ] } }, "$defs": { "ChannelProfile": { "additionalProperties": false, "description": "ChannelProfile command (RVP).", "properties": { "name": { "default": "chn_XXX", "title": "Name", "type": "string" }, "Bedslope": { "default": 0, "title": "Bedslope", "type": "number" }, "SurveyPoints": { "$ref": "#/$defs/SurveyPoints" }, "RoughnessZones": { "$ref": "#/$defs/RoughnessZones" } }, "title": "ChannelProfile", "type": "object" }, "LandUseClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "impermeable_frac": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Impermeable Frac" }, "forest_coverage": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Forest Coverage" } }, "title": "LandUseClass", "type": "object" }, "LandUseClasses": { "items": { "$ref": "#/$defs/LandUseClass" }, "title": "LandUseClasses", "type": "array" }, "LandUseParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ABST_PERCENT", "AET_COEFF", "BF_LOSS_FRACTION", "B_EXP", "CC_DECAY_COEFF", "DD_AGGRADATION", "DD_MELT_TEMP", "DD_REFREEZE_TEMP", "DEP_K", "DEP_MAX", "DEP_MAX_FLOW", "DEP_N", "DEP_SEEP_K", "DEP_THRESHOLD", "FOREST_COVERAGE", "FOREST_PET_CORR", "FOREST_SPARSENESS", "GAMMA_SCALE", "GAMMA_SCALE2", "GAMMA_SHAPE", "GAMMA_SHAPE2", "GLAC_STORAGE_COEFF", "GR4J_X4", "HBV_GLACIER_AG", "HBV_GLACIER_KMIN", "HBV_MELT_ASP_CORR", "HBV_MELT_FOR_CORR", "HBV_MELT_GLACIER_CORR", "HMETS_RUNOFF_COEFF", "IMPERMEABLE_FRAC", "LAKE_PET_CORR", "LAKE_REL_COEFF", "MAX_DEP_AREA_FRAC", "MAX_MELT_FACTOR", "MAX_SAT_AREA_FRAC", "MELT_FACTOR", "MIN_MELT_FACTOR", "OW_PET_CORR", "PARTITION_COEFF", "PDMROF_B", "PONDED_EXP", "REFREEZE_EXP", "REFREEZE_FACTOR", "ROUGHNESS", "SCS_CN", "SCS_IA_FRACTION", "SNOW_PATCH_LIMIT", "STREAM_FRACTION", "UBC_ICEPT_FACTOR" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "LandUseParameterList", "type": "object" }, "ParameterList": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "values": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "string" }, { "type": "null" } ] }, "title": "Values", "type": "array" } }, "title": "ParameterList", "type": "object" }, "RainSnowTransition": { "additionalProperties": false, "description": "Specify the range of temperatures over which there will be a rain/snow mix when partitioning total precipitation into rain/snow components.\n\n:RainSnowTransition [temp] [delta]\n\n# equivalent to (the preferred option)\n:GlobalParameter RAINSNOW_TEMP [rainsnow_temp]\n:GlobalParameter RAINSNOW_DELTA [rainsnow_delta]", "properties": { "temp": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Temp" }, "delta": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Delta" } }, "required": [ "temp", "delta" ], "title": "RainSnowTransition", "type": "object" }, "RoughnessZone": { "default": [], "description": "RoughnessZone record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "RoughnessZone", "type": "array" }, "RoughnessZones": { "default": [ [] ], "description": "RoughnessZones record.\n\n[x_zone, mannings_n] x number of roughness zones.", "items": { "$ref": "#/$defs/RoughnessZone" }, "title": "RoughnessZones", "type": "array" }, "SeasonalRelativeHeight": { "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" }, "title": "SeasonalRelativeHeight", "type": "array" }, "SeasonalRelativeLAI": { "default": [ { "name": "[DEFAULT]", "values": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] } ], "items": { "$ref": "#/$defs/_MonthlyRecord" }, "title": "SeasonalRelativeLAI", "type": "array" }, "SoilClass": { "additionalProperties": false, "description": "SoilClass.", "properties": { "name": { "title": "Name", "type": "string" }, "mineral": { "anyOf": [ { "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "number" }, { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Mineral" }, "organic": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Organic" } }, "required": [ "name" ], "title": "SoilClass", "type": "object" }, "SoilClasses": { "default": [], "description": "SoilClasses command.\n\nExample::\n\n :SoilClasses\n :Attributes, %SAND, %CLAY, %SILT, %ORGANIC\n :Units, none, none, none, none\n SAND, 1, 0, 0, 0\n LOAM, 0.5, 0.1, 0.4, 0.4\n :EndSoilClasses", "items": { "$ref": "#/$defs/SoilClass" }, "title": "SoilClasses", "type": "array" }, "SoilParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "AIR_ENTRY_PRESSURE", "ALBEDO_DRY", "ALBEDO_WET", "BASEFLOW_COEFF", "BASEFLOW_COEFF2", "BASEFLOW_N", "BASEFLOW_THRESH", "BF_LOSS_FRACTION", "BULK_DENSITY", "B_EXP", "CLAPP N,CLAPP M", "CLAPP_B", "CLAY_CON", "EVAP_RES_FC", "FIELD_CAPACITY", "GR4J_X2", "GR4J_X3", "HBV_BETA", "HEAT_CAPACITY", "HYDRAUL_COND", "INTERFLOW_COEF", "MAX_BASEFLOW_RATE", "MAX_CAP_RISE_RATE", "MAX_INTERFLOW_RATE", "MAX_PERC_RATE", "ORG_CON", "PERC_COEFF", "PERC_N", "PET_CORRECTION", "POROSITY", "SAC_PERC_ALPHA", "SAC_PERC_EXPON", "SAC_PERC_PFREE", "SAND_CON", "SAT_RES", "SAT_WILT", "SHUTTLEWORTH_B", "SILT_CON", "STONE_FRAC", "STORAGE_THRESHOLD", "THERMAL_COND", "UBC_EVAL_SOIL_DEF", "UBC_INFIL_SOIL_DEF", "UNAVAIL_FRAC", "VIC ALPHA", "VIC_EVAP_GAMMA", "VIC_ZMAX", "VIZ_ZMIN", "WETTING_FRONT_PSI", "WILTING_PRESSURE" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "SoilParameterList", "type": "object" }, "SoilProfile": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "soil_classes": { "default": [], "items": { "type": "string" }, "title": "Soil Classes", "type": "array" }, "thicknesses": { "default": [], "items": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ] }, "title": "Thicknesses", "type": "array" } }, "title": "SoilProfile", "type": "object" }, "SoilProfiles": { "description": "SoilProfiles command.\n\nExample::\n\n :SoilProfiles\n # name, #horizons, hor1, th1, hor2, th2\n LAKE, 0\n GLACIER, 0\n LOAM_SEQ, 2, LOAM, 0.5, SAND, 1.5\n ALL_SAND, 2, SAND, 0.5, SAND, 1.5\n :EndSoilProfiles", "items": { "$ref": "#/$defs/SoilProfile" }, "title": "SoilProfiles", "type": "array" }, "SurveyPoint": { "default": [], "description": "SurveyPoint record.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "SurveyPoint", "type": "array" }, "SurveyPoints": { "default": [ [] ], "description": "SurveyPoints\n\n[x, bed_elevation] x number of survey points.", "items": { "$ref": "#/$defs/SurveyPoint" }, "title": "SurveyPoints", "type": "array" }, "TerrainClass": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "hillslope_length": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Hillslope Length" }, "drainage_density": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "title": "Drainage Density" }, "topmodel_lambda": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "title": "Topmodel Lambda" } }, "required": [ "name", "hillslope_length", "drainage_density" ], "title": "TerrainClass", "type": "object" }, "TerrainClasses": { "items": { "$ref": "#/$defs/TerrainClass" }, "title": "TerrainClasses", "type": "array" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" }, "VegetationClass": { "additionalProperties": false, "properties": { "name": { "default": "", "title": "Name", "type": "string" }, "max_ht": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Ht" }, "max_lai": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Lai" }, "max_leaf_cond": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "title": "Max Leaf Cond" } }, "title": "VegetationClass", "type": "object" }, "VegetationClasses": { "items": { "$ref": "#/$defs/VegetationClass" }, "title": "VegetationClasses", "type": "array" }, "VegetationParameterList": { "additionalProperties": false, "properties": { "Parameters": { "anyOf": [ { "items": { "enum": [ "ALBEDO", "ALBEDO_WET", "CAP_LAI_RATIO", "CHU_MATURITY", "DRIP_PROPORTION", "MAX_CAPACITY", "MAX_HEIGHT", "MAX_INTERCEPT_RATE", "MAX_LAI", "MAX_LEAF_COND", "MAX_ROOT_LENGTH", "MAX_SNOW_CAPACITY", "MIN_RESISTIVITY", "PET_VEG_CORR", "PSI_CRITICAL", "RAIN_ICEPT_FACT", "RAIN_ICEPT_PCT", "RELATIVE_HT", "RELATIVE_LAI", "ROOTRADIUS", "ROOT_EXTINCT", "SAI_HT_RATIO", "SNOCAP_LAI_RATIO", "SNOW_ICEPT_FACT", "SNOW_ICEPT_PCT", "STEMFLOW_FRAC", "SVF_EXTINCTION", "TFRAIN", "TFSNOW", "TRUNK_FRACTION", "VEG_DENS", "VEG_DIAM", "VEG_MBETA", "XYLEM_FRAC" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Parameters" }, "Units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "pl": { "items": { "$ref": "#/$defs/ParameterList" }, "title": "Pl", "type": "array" } }, "required": [ "pl" ], "title": "VegetationParameterList", "type": "object" }, "_MonthlyRecord": { "additionalProperties": false, "properties": { "name": { "default": "[DEFAULT]", "title": "Name", "type": "string" }, "values": { "default": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "items": { "type": "number" }, "title": "Values", "type": "array" } }, "title": "_MonthlyRecord", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
channel_profile (collections.abc.Sequence[ravenpy.config.commands.ChannelProfile] | None)land_use_classes (ravenpy.config.commands.LandUseClasses | None)land_use_parameter_list (ravenpy.config.commands.LandUseParameterList | None)rain_snow_transition (ravenpy.config.commands.RainSnowTransition | None)seasonal_relative_height (ravenpy.config.commands.SeasonalRelativeHeight | None)seasonal_relative_lai (ravenpy.config.commands.SeasonalRelativeLAI | None)soil_parameter_list (ravenpy.config.commands.SoilParameterList | None)terrain_classes (ravenpy.config.commands.TerrainClasses | None)vegetation_classes (ravenpy.config.commands.VegetationClasses | None)vegetation_parameter_list (ravenpy.config.commands.VegetationParameterList | None)
- field channel_profile: Sequence[ChannelProfile] | None [Optional] (alias 'ChannelProfile')
- field global_parameter: dict[str, Variable | ExpressionNode | float | None] | None = {} (alias 'GlobalParameter')
- field land_use_classes: LandUseClasses | None [Optional] (alias 'LandUseClasses')
- field land_use_parameter_list: LandUseParameterList | None [Optional] (alias 'LandUseParameterList')
- field params: Any = None
- field rain_snow_transition: RainSnowTransition | None [Optional] (alias 'RainSnowTransition')
- field seasonal_relative_height: SeasonalRelativeHeight | None [Optional] (alias 'SeasonalRelativeHeight')
- field seasonal_relative_lai: SeasonalRelativeLAI | None [Optional] (alias 'SeasonalRelativeLAI')
- field soil_classes: SoilClasses | None [Optional] (alias 'SoilClasses')
- field soil_parameter_list: SoilParameterList | None [Optional] (alias 'SoilParameterList')
- field soil_profiles: SoilProfiles | None [Optional] (alias 'SoilProfiles')
- field terrain_classes: TerrainClasses | None [Optional] (alias 'TerrainClasses')
- field vegetation_classes: VegetationClasses | None [Optional] (alias 'VegetationClasses')
- field vegetation_parameter_list: VegetationParameterList | None [Optional] (alias 'VegetationParameterList')
- pydantic model ravenpy.config.rvs.RVT[source]
Show JSON schema
{ "title": "RVT", "type": "object", "properties": { "Gauge": { "anyOf": [ { "items": { "$ref": "#/$defs/Gauge" }, "type": "array" }, { "type": "null" } ], "title": "Gauge" }, "StationForcing": { "anyOf": [ { "items": { "$ref": "#/$defs/StationForcing" }, "type": "array" }, { "type": "null" } ], "title": "Stationforcing" }, "GriddedForcing": { "anyOf": [ { "items": { "$ref": "#/$defs/GriddedForcing" }, "type": "array" }, { "type": "null" } ], "title": "Griddedforcing" }, "ObservationData": { "anyOf": [ { "items": { "$ref": "#/$defs/ObservationData" }, "type": "array" }, { "type": "null" } ], "title": "Observationdata" } }, "$defs": { "Data": { "additionalProperties": false, "properties": { "data_type": { "default": "", "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" } }, "required": [ "ReadFromNetCDF" ], "title": "Data", "type": "object" }, "GWRecord": { "default": [ 1, 0, 1.0 ], "description": "GridWeights record.", "maxItems": 3, "minItems": 3, "prefixItems": [ { "type": "integer" }, { "type": "integer" }, { "type": "number" } ], "title": "GWRecord", "type": "array" }, "Gauge": { "additionalProperties": false, "properties": { "name": { "default": "default", "title": "Name", "type": "string" }, "Latitude": { "title": "Latitude", "type": "number" }, "Longitude": { "title": "Longitude", "type": "number" }, "Elevation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Elevation" }, "RainCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Rain correction", "title": "Raincorrection" }, "SnowCorrection": { "anyOf": [ { "$ref": "#/$defs/Variable" }, { "type": "number" }, { "type": "null" } ], "default": null, "description": "Snow correction", "title": "Snowcorrection" }, "MonthlyAveEvaporation": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyaveevaporation" }, "MonthlyAveTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlyavetemperature" }, "MonthlyMinTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymintemperature" }, "MonthlyMaxTemperature": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "default": null, "title": "Monthlymaxtemperature" }, "Data": { "anyOf": [ { "items": { "$ref": "#/$defs/Data" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Data" } }, "required": [ "Latitude", "Longitude" ], "title": "Gauge", "type": "object" }, "GridWeights": { "additionalProperties": false, "description": "GridWeights command.\n\nNotes\n-----\ncommand can be embedded in both a `GriddedForcing` or a `StationForcing`.\n\nThe default is to have a single cell that covers an entire single HRU, with a\nweight of 1.", "properties": { "NumberHRUs": { "default": 1, "title": "Numberhrus", "type": "integer" }, "NumberGridCells": { "default": 1, "title": "Numbergridcells", "type": "integer" }, "data": { "default": [ [ 1, 0, 1.0 ] ], "items": { "$ref": "#/$defs/GWRecord" }, "title": "Data", "type": "array" } }, "title": "GridWeights", "type": "object" }, "GriddedForcing": { "additionalProperties": false, "description": "GriddedForcing command (RVT).", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "GriddedForcing", "type": "object" }, "LinearTransform": { "additionalProperties": false, "description": ":LinearTransform 1.0 -273.15", "properties": { "scale": { "default": 1, "title": "Scale", "type": "number" }, "offset": { "default": 0, "title": "Offset", "type": "number" } }, "title": "LinearTransform", "type": "object" }, "ObservationData": { "additionalProperties": false, "properties": { "data_type": { "const": "HYDROGRAPH", "default": "HYDROGRAPH", "title": "Data Type", "type": "string" }, "units": { "default": "", "title": "Units", "type": "string" }, "ReadFromNetCDF": { "$ref": "#/$defs/ReadFromNetCDF" }, "uid": { "default": "1", "title": "Uid", "type": "string" } }, "required": [ "ReadFromNetCDF" ], "title": "ObservationData", "type": "object" }, "ReadFromNetCDF": { "additionalProperties": false, "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "StationIdx": { "default": 1, "description": "NetCDF index along station dimension. Starts at 1.", "title": "Stationidx", "type": "integer" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "ReadFromNetCDF", "type": "object" }, "RedirectToFile": { "description": "RedirectToFile command (RVT).\n\nNotes\n-----\nFor the moment, this command can only be used in the context of a `GriddedForcingCommand`\nor a `StationForcingCommand`, as a `grid_weights` field replacement when inlining is not\ndesired.", "format": "file-path", "title": "RedirectToFile", "type": "string" }, "StationForcing": { "additionalProperties": false, "description": "StationForcing command (RVT).", "properties": { "FileNameNC": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "format": "path", "type": "string" } ], "description": "NetCDF file name.", "title": "Filenamenc" }, "VarNameNC": { "description": "NetCDF variable name.", "title": "Varnamenc", "type": "string" }, "DimNamesNC": { "items": { "type": "string" }, "title": "Dimnamesnc", "type": "array" }, "station_idx": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Station Idx" }, "TimeShift": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Time stamp shift in days.", "title": "Timeshift" }, "LinearTransform": { "anyOf": [ { "$ref": "#/$defs/LinearTransform" }, { "type": "null" } ], "default": null }, "Deaccumulate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deaccumulate" }, "LatitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Latitudevarnamenc" }, "LongitudeVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Longitudevarnamenc" }, "ElevationVarNameNC": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Elevationvarnamenc" }, "name": { "default": "", "title": "Name", "type": "string" }, "ForcingType": { "anyOf": [ { "enum": [ "AIR_DENS", "AIR_PRES", "CLOUD_COVER", "DAY_ANGLE", "DAY_LENGTH", "ET_RADIA", "LW_INCOMING", "LW_RADIA_NET", "OW_PET", "PET", "PET_MONTH_AVE", "POTENTIAL_MELT", "PRECIP", "PRECIP_5DAY", "PRECIP_DAILY_AVE", "RAINFALL", "RECHARGE", "REL_HUMIDITY", "SHORTWAVE", "SNOWFALL", "SNOW_FRAC", "SUBDAILY_CORR", "SW_RADIA", "SW_RADIA_NET", "TEMP_AVE", "TEMP_AVE_UNC", "TEMP_DAILY_AVE", "TEMP_DAILY_MAX", "TEMP_DAILY_MIN", "TEMP_MAX", "TEMP_MAX_UNC", "TEMP_MIN", "TEMP_MIN_UNC", "TEMP_MONTH_AVE", "TEMP_MONTH_MAX", "TEMP_MONTH_MIN", "WIND_VEL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Forcingtype" }, "GridWeights": { "anyOf": [ { "$ref": "#/$defs/GridWeights" }, { "$ref": "#/$defs/RedirectToFile" } ], "default": { "NumberHRUs": 1, "NumberGridCells": 1, "data": [ [ 1, 0, 1.0 ] ] }, "title": "Gridweights" } }, "required": [ "FileNameNC", "VarNameNC", "DimNamesNC" ], "title": "StationForcing", "type": "object" }, "Variable": { "description": ".. autoattribute:: name", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Variable", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
validate_by_alias: bool = True
validate_by_name: bool = True
validate_default: bool = True
validate_assignment: bool = True
- Fields:
gauge (collections.abc.Sequence[ravenpy.config.commands.Gauge] | None)gridded_forcing (collections.abc.Sequence[ravenpy.config.commands.GriddedForcing] | None)observation_data (collections.abc.Sequence[ravenpy.config.commands.ObservationData] | None)station_forcing (collections.abc.Sequence[ravenpy.config.commands.StationForcing] | None)
- field gridded_forcing: Sequence[GriddedForcing] | None [Optional] (alias 'GriddedForcing')
- field observation_data: Sequence[ObservationData] | None [Optional] (alias 'ObservationData')
- field station_forcing: Sequence[StationForcing] | None [Optional] (alias 'StationForcing')
Emulators
Extractors
- class ravenpy.extractors.routing_product.BasinMakerExtractor(df, hru_aspect_convention='GRASS', routing_product_version='2.1')[source]
Encapsulate the logic of converting the Routing Product into the required data structures to generate the RVH file format.
- Parameters:
df (GeoDataFrame) – Sub-basin information.
hru_aspect_convention ({"GRASS", "ArcGIS"}) – How sub-basin aspect is defined.
routing_product_version ({"2.1", "1.0"}) – Version of the BasinMaker data.
- HRU_ASPECT_CONVENTION = 'GRASS'
- MANNING_DEFAULT = 0.035
- MAX_RIVER_SLOPE = 1e-05
- ROUTING_PRODUCT_VERSION = '2.1'
- USE_LAKE_AS_GAUGE = False
- USE_LAND_AS_GAUGE = False
- USE_MANNING_COEFF = False
- WEIR_COEFFICIENT = 0.6
- extract(hru_from_sb: bool = False) dict[source]
Extract data from the Routing Product shapefile and return dictionaries that can be parsed into Raven Commands.
- Parameters:
hru_from_sb (bool) – If True, draw HRU information from subbasin information. This is likely to yield crude results.
- Returns:
- “sub_basins”
Sequence of dictionaries with SubBasin attributes.
- ”sub_basin_group”
Sequence of dictionaries with SubBasinGroup attributes.
- ”reservoirs”
Sequence of dictionaries with Reservoir attributes.
- ”channel_profile”
Sequence of dictionaries with ChannelProfile attributes.
- ”hrus”
Sequence of dictionaries with HRU attributes.
- Return type:
dict
- class ravenpy.extractors.routing_product.GridWeightExtractor(input_file_path, routing_file_path, dim_names=('lon_dim', 'lat_dim'), var_names=('longitude', 'latitude'), routing_id_field='SubId', netcdf_input_field='NetCDF_col', gauge_ids=None, sub_ids=None, area_error_threshold=0.05)[source]
Class to extract grid weights.
Notes
To use this on HRU GeoJONS created from the Canadian River and Lake Hydrofabric database, set routing_id_field to __INDEX__.
The original version of this algorithm can be found at: https://github.com/julemai/GridWeightsGenerator
- AREA_ERROR_THRESHOLD = 0.05
- CRS_CAEA = 3573
- CRS_LLDEG = 4326
- DIM_NAMES = ('lon_dim', 'lat_dim')
- NETCDF_INPUT_FIELD = 'NetCDF_col'
- ROUTING_ID_FIELD = 'SubId'
- VAR_NAMES = ('longitude', 'latitude')
- ravenpy.extractors.routing_product.open_shapefile(path: str | PathLike)[source]
Return GeoDataFrame from shapefile path.
- ravenpy.extractors.routing_product.upstream_from_coords(lon: float, lat: float, df: DataFrame | geopandas.GeoDataFrame) DataFrame | geopandas.GeoDataFrame[source]
Return the sub-basins located upstream from outlet.
- Parameters:
lon (float) – Longitude of outlet.
lat (float) – Latitude of outlet.
df (pandas.DataFrame or geopandas.GeoDataFrame) – Routing product.
- Returns:
Sub-basins located upstream from outlet.
- Return type:
pandas.DataFrame or geopandas.GeoDataFrame
- ravenpy.extractors.routing_product.upstream_from_id(fid: str | int | float, df: DataFrame | geopandas.GeoDataFrame) DataFrame | geopandas.GeoDataFrame[source]
Return upstream sub-basins by evaluating the downstream networks.
- Parameters:
fid (str or int or float) – feature ID of the downstream feature of interest.
df (pandas.DataFrame or geopandas.GeoDataFrame) – A GeoDataframe comprising the watershed attributes.
- Returns:
Basins ids including fid and its upstream contributors.
- Return type:
pandas.DataFrame or geopandas.GeoDataFrame
- ravenpy.extractors.forecasts.get_CASPAR_dataset(climate_model: str, date: datetime, thredds: str = 'https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/', directory: str = 'dodsC/birdhouse/disk2/caspar/daily/', engine: str = 'netcdf4') tuple[Dataset, list[DatetimeIndex | Series | Timestamp | Any]][source]
Return CASPAR dataset.
- Parameters:
climate_model (str) – Type of climate model, for now only “GEPS” is supported.
date (dt.datetime) – The date of the forecast.
thredds (str) – The thredds server url. Default: “https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/”.
directory (str) – The directory on the thredds server where the data is stored. Default: “dodsC/birdhouse/disk2/caspar/daily/”.
engine (str) – The xarray engine to use to open the dataset. Default: “netcdf4”.
- Returns:
The forecast dataset.
- Return type:
xr.Dataset
- ravenpy.extractors.forecasts.get_ECCC_dataset(climate_model: str, thredds: str = 'https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/', directory: str = 'dodsC/datasets/forecasts/eccc_geps/', engine: str = 'netcdf4') tuple[Dataset, list[DatetimeIndex | Series | Timestamp | Any]][source]
Return latest GEPS forecast dataset.
- Parameters:
climate_model (str) – Type of climate model, for now only “GEPS” is supported.
thredds (str) – The thredds server url. Default: “https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/”.
directory (str) – The directory on the thredds server where the data is stored. Default: “dodsC/datasets/forecasts/eccc_geps/”.
engine (str) – The xarray engine to use to open the dataset. Default: “netcdf4”.
- Returns:
The forecast dataset.
- Return type:
xr.Dataset
- ravenpy.extractors.forecasts.get_hindcast_day(region_coll: fiona.Collection, date, climate_model='GEPS')[source]
Generate a forecast dataset that can be used to run raven.
Data comes from the CASPAR archive and must be aggregated such that each file contains forecast data for a single day, but for all forecast timesteps and all members.
The code takes the region shapefile, the forecast date required, and the climate_model to use, here GEPS by default, but eventually could be GEPS, GDPS, REPS or RDPS.
- ravenpy.extractors.forecasts.get_recent_ECCC_forecast(region_coll: fiona.Collection, climate_model: str = 'GEPS') Dataset[source]
Generate a forecast dataset that can be used to run raven.
Data comes from the ECCC datamart and collected daily. It is aggregated such that each file contains forecast data for a single day, but for all forecast timesteps and all members.
The code takes the region shapefile and the climate_model to use, here GEPS by default, but eventually could be GEPS, GDPS, REPS or RDPS.
- Parameters:
region_coll (fiona.Collection) – The region vectors.
climate_model (str) – Type of climate model, for now only “GEPS” is supported.
- Returns:
The forecast dataset.
- Return type:
xr.Dataset
- ravenpy.extractors.forecasts.get_subsetted_forecast(region_coll: fiona.Collection, ds: Dataset, times: datetime | DataArray, is_caspar: bool) Dataset[source]
Get Subsetted Forecast.
This function takes a dataset, a region and the time sampling array and returns the subsetted values for the given region and times.
- Parameters:
region_coll (fiona.Collection) – The region vectors.
ds (xr.Dataset) – The dataset containing the raw, worldwide forecast data.
times (dt.datetime or xr.DataArray) – The array of times required to do the forecast.
is_caspar (bool) – True if the data comes from Caspar, false otherwise. Used to define lat/lon on rotated grid.
- Returns:
The forecast dataset.
- Return type:
xr.Dataset
Utilities
Geospatial
Tools for reading and writing geospatial data formats.
- ravenpy.utilities.io.address_append(address: str | Path) str[source]
Format a URL/URI to be more easily read with libraries such as “rasterstats”.
- Parameters:
address (Union[str, Path]) – URL/URI to a potential zip or tar file.
- Returns:
URL/URI prefixed for archive type.
- Return type:
str
- ravenpy.utilities.io.archive_sniffer(archives: str | Path | list[str | Path], working_dir: str | Path | None = None, extensions: Sequence[str] | None = None) list[str | Path][source]
Return a list of locally unarchived files that match the desired extensions.
- Parameters:
archives (str or Path or list of str or Path) – Archive location or list of archive locations.
working_dir (str or Path, optional) – String or Path to a working location.
extensions (Sequence of str, optional) – List of accepted extensions.
- Returns:
A list of files with matching accepted extensions.
- Return type:
list of str or Path
- ravenpy.utilities.io.crs_sniffer(*args: str | Path | Sequence[str | Path]) list[str | int] | str | int[source]
Return the list of CRS found in files.
- Parameters:
*args (str or Path or sequence of str or Path) – Path(s) to the file(s) to examine.
- Returns:
Returns either a list of CRSes or a single CRS definition, depending on the number of instances found.
- Return type:
str or list of str
- ravenpy.utilities.io.generic_extract_archive(resources: str | Path | list[bytes | str | Path], output_dir: str | Path | None = None) list[str][source]
Extract archives (tar/zip) to a working directory.
- Parameters:
resources (str or Path or list of bytes or str or Path) – List of archive files (if netCDF files are in list, they are passed and returned as well in the return).
output_dir (str or Path, optional) – String or Path to a working location (default: temporary folder).
- Returns:
A list of original or of extracted files.
- Return type:
list of str
- ravenpy.utilities.io.get_bbox(vector: str | Path, all_features: bool = True) tuple[float, float, float, float][source]
Return bounding box of all features or the first feature in file.
- Parameters:
vector (str or Path) – A path to file storing vector features.
all_features (bool) – Return the bounding box for all features. Default: True.
- Returns:
Geographic coordinates of the bounding box (lon0, lat0, lon1, lat1).
- Return type:
float, float, float, float
- ravenpy.utilities.io.is_within_directory(directory: str | PathLike, target: str | PathLike) bool[source]
- ravenpy.utilities.io.raster_datatype_sniffer(file: str | Path) str[source]
Return the type of the raster stored in the file.
- Parameters:
file (str or Path) – Path to file.
- Returns:
A rasterio datatype of array values.
- Return type:
str
- ravenpy.utilities.io.safe_extract(tar: TarFile, path: str = '.', members=None, *, numeric_owner=False) None[source]
Tools for performing geospatial translations and transformations.
- ravenpy.utilities.geo.determine_upstream_ids(fid: str | int | float, df: DataFrame | geopandas.GeoDataFrame, *, basin_field: str, downstream_field: str, basin_family: str | None = None) DataFrame | geopandas.GeoDataFrame[source]
Return a list of upstream features by evaluating the downstream networks.
- Parameters:
fid (str or int or float) – The feature ID of the downstream feature of interest.
df (pd.DataFrame) – A Dataframe comprising the watershed attributes.
basin_field (str) – The field used to determine the id of the basin according to hydro project.
downstream_field (str) – The field identifying the downstream sub-basin for the hydro project.
basin_family (str, optional) – Regional watershed code (For HydroBASINS dataset).
- Returns:
Basins ids including fid and its upstream contributors.
- Return type:
pd.DataFrame
- ravenpy.utilities.geo.find_geometry_from_coord(lon: float, lat: float, df: geopandas.GeoDataFrame) geopandas.GeoDataFrame[source]
Return the geometry containing the given coordinates.
- lonfloat
Longitude.
- latfloat
Latitude.
- dfGeoDataFrame
Data.
- Returns:
Record whose geometry contains the point.
- Return type:
GeoDataFrame
- ravenpy.utilities.geo.generic_raster_clip(raster: str | Path, output: str | Path, geometry: shapely.geometry.Polygon | shapely.geometry.MultiPolygon | list[shapely.geometry.Polygon | shapely.geometry.MultiPolygon], touches: bool = False, fill_with_nodata: bool = True, padded: bool = True, raster_compression: str = 'lzw') None[source]
Crop a raster file to a given geometry.
- Parameters:
raster (Union[str, Path]) – Path to input raster.
output (Union[str, Path]) – Path to output raster.
geometry (Union[Polygon, MultiPolygon, List[Union[Polygon, MultiPolygon]]) – Geometry defining the region to crop.
touches (bool) – Whether to include cells that intersect the geometry or not. Default: True.
fill_with_nodata (bool) – Whether to keep pixel values for regions outside of shape or set as nodata or not. Default: True.
padded (bool) – Whether to add a half-pixel buffer to shape before masking or not. Default: True.
raster_compression (str) – Level of data compression. Default: ‘lzw’.
- Return type:
None
- ravenpy.utilities.geo.generic_raster_warp(raster: str | Path, output: str | Path, target_crs: str | dict | pyproj.CRS, raster_compression: str = 'lzw') None[source]
Reproject a raster file.
- Parameters:
raster (Union[str, Path]) – Path to input raster.
output (Union[str, Path]) – Path to output raster.
target_crs (str or dict) – Target projection identifier.
raster_compression (str) – Level of data compression. Default: ‘lzw’.
- Return type:
None
- ravenpy.utilities.geo.generic_vector_reproject(vector: str | Path, projected: str | Path, source_crs: str | pyproj.CRS = 4326, target_crs: str | pyproj.CRS = None) None[source]
Reproject all features and layers within a vector file and return a GeoJSON.
- Parameters:
vector (Union[str, Path]) – Path to a file containing a valid vector layer.
projected (Union[str, Path]) – Path to a file to be written.
source_crs (Union[str, pyproj.crs.CRS]) – CRS for the source geometry. Default: 4326.
target_crs (Union[str, pyproj.crs.CRS]) – CRS for the target geometry.
- Return type:
None
- ravenpy.utilities.geo.geom_transform(geom: shapely.geometry.GeometryCollection | shapely.geometry.shape, source_crs: str | int | pyproj.CRS = 4326, target_crs: str | int | pyproj.CRS = None) shapely.geometry.GeometryCollection[source]
Change the projection of a geometry.
Assuming a geometry’s coordinates are in a source_crs, compute the new coordinates under the target_crs.
- Parameters:
geom (Union[GeometryCollection, shape]) – Source geometry.
source_crs (Union[str, int, CRS]) – Projection identifier (proj4) for the source geometry, e.g. ‘+proj=longlat +datum=WGS84 +no_defs’.
target_crs (Union[str, int, CRS]) – Projection identifier (proj4) for the target geometry.
- Returns:
Reprojected geometry.
- Return type:
GeometryCollection
GeoServer interaction operations.
Working assumptions for this module: * Point coordinates are passed as shapely.geometry.Point instances. * BBox coordinates are passed as (lon1, lat1, lon2, lat2). * Shapes (polygons) are passed as shapely.geometry.shape parsable objects. * All functions that require a CRS have a CRS argument with a default set to WGS84. * GEOSERVER_URL points to the GeoServer instance hosting all files. * For legacy reasons, we also accept the GEO_URL environment variable.
TODO: Refactor to remove functions that are just 2-lines of code. For example, many function’s logic essentially consists in creating the layer name. We could have a function that returns the layer name, and then other functions expect the layer name.
- ravenpy.utilities.geoserver.filter_hydro_routing_attributes_wfs(attribute: str, value: str | float | int, level: int = 12, lakes: str = '1km', geoserver: str = 'https://pavics.ouranos.ca//geoserver/') str[source]
Return a URL that formats and returns a remote GetFeatures request from hydro routing dataset.
For geographic rasters, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
attribute (list) – Attributes/fields to be queried.
value (str or int or float) – The requested value for the attribute.
level (int) – Level of granularity requested for the lakes vector (range(7,13)). Default: 12.
lakes ({"1km", "all"}) – Query the version of dataset with lakes under 1km in width removed (“1km”) or return all lakes (“all”).
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
URL to the GeoJSON-encoded WFS response.
- Return type:
str
- ravenpy.utilities.geoserver.filter_hydrobasins_attributes_wfs(attribute: str, value: str | float | int, domain: str, geoserver: str = 'https://pavics.ouranos.ca//geoserver/') str[source]
Return a URL that formats and returns a remote GetFeatures request from the USGS HydroBASINS dataset.
For geographic raster grids, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
attribute (str) – Attribute/field to be queried.
value (str or float or int) – Value for attribute queried.
domain ({"na", "ar"}) – The domain of the HydroBASINS data.
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
URL to the GeoJSON-encoded WFS response.
- Return type:
str
- ravenpy.utilities.geoserver.get_hydro_routing_attributes_wfs(attribute: Sequence[str], level: int = 12, lakes: str = '1km', geoserver: str = 'https://pavics.ouranos.ca//geoserver/') str[source]
Return a URL that formats and returns a remote GetFeatures request from hydro routing dataset.
For geographic rasters, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
attribute (list) – Attributes/fields to be queried.
level (int) – Level of granularity requested for the lakes vector (range(7,13)). Default: 12.
lakes ({"1km", "all"}) – Query the version of dataset with lakes under 1km in width removed (“1km”) or return all lakes (“all”).
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
URL to the GeoJSON-encoded WFS response.
- Return type:
str
- ravenpy.utilities.geoserver.get_hydro_routing_location_wfs(coordinates: tuple[int | float | str, str | float | int], lakes: str, level: int = 12, geoserver: str = 'https://pavics.ouranos.ca//geoserver/') dict[source]
Return features from the hydro routing data set using bounding box coordinates.
For geographic rasters, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
coordinates (Tuple[str or float or int, str or float or int]) – Geographic coordinates of the bounding box (left, down, right, up).
lakes ({"1km", "all"}) – Query the version of dataset with lakes under 1km in width removed (“1km”) or return all lakes (“all”).
level (int) – Level of granularity requested for the lakes vector (range(7,13)). Default: 12.
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
A GeoJSON-derived dictionary of vector features (FeatureCollection).
- Return type:
dict
- ravenpy.utilities.geoserver.get_hydrobasins_location_wfs(coordinates: tuple[str | float | int, str | float | int], domain: str, geoserver: str = 'https://pavics.ouranos.ca//geoserver/') dict[str, str | int | float][source]
Return features from the USGS HydroBASINS data set using bounding box coordinates.
For geographic raster grids, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
coordinates (Tuple[str or float or int, str or float or int]) – Geographic coordinates of the bounding box (left, down, right, up).
domain ({"na", "ar"}) – The domain of the HydroBASINS data.
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
A GeoJSON-encoded vector feature.
- Return type:
dict
- ravenpy.utilities.geoserver.get_raster_wcs(coordinates: Iterable | Sequence[float | str], geographic: bool = True, *, layer: str, geoserver: str = 'https://pavics.ouranos.ca//geoserver/') bytes[source]
Return a subset of a raster image from the local GeoServer via WCS 2.0.1 protocol.
For geographic raster grids, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Northing) boundaries.
- Parameters:
coordinates (Sequence of int or float or str) – Geographic coordinates of the bounding box (left, down, right, up).
geographic (bool) – If True, uses “Long” and “Lat” in WCS call. Otherwise, uses “E” and “N”.
layer (str) – Layer name of raster exposed on GeoServer instance, e.g. ‘public:CEC_NALCMS_LandUse_2010’.
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
A GeoTIFF array.
- Return type:
bytes
- ravenpy.utilities.geoserver.hydro_routing_upstream(fid: str | float | int, level: int = 12, lakes: str = '1km', geoserver: str = 'https://pavics.ouranos.ca//geoserver/') geopandas.GeoDataFrame[source]
Return a list of hydro routing features located upstream.
- Parameters:
fid (str or float or int) – Basin feature ID code of the downstream feature.
level (int) – Level of granularity requested for the lakes vector (range(7,13)). Default: 12.
lakes ({"1km", "all"}) – Query the version of dataset with lakes under 1km in width removed (“1km”) or return all lakes (“all”).
geoserver (str) – The address of the geoserver housing the layer to be queried. Default: https://pavics.ouranos.ca/geoserver/.
- Returns:
Basins ids including fid and its upstream contributors.
- Return type:
gpd.GeoDataFrame
- ravenpy.utilities.geoserver.hydrobasins_aggregate(gdf: DataFrame) DataFrame[source]
Aggregate multiple HydroBASINS watersheds into a single geometry.
- Parameters:
gdf (pd.DataFrame) – Watershed attributes indexed by HYBAS_ID.
- Return type:
pd.DataFrame
- ravenpy.utilities.geoserver.hydrobasins_upstream(feature: dict, domain: str) DataFrame[source]
Return a list of HydroBASINS features located upstream.
- Parameters:
feature (dict) – Basin feature attributes, including the fields [“HYBAS_ID”, “NEXT_DOWN”, “MAIN_BAS”].
domain ({"na", "ar"}) – Domain of the feature, North America or Arctic.
- Returns:
Basins ids including fid and its upstream contributors.
- Return type:
pd.Series
- ravenpy.utilities.geoserver.select_hybas_domain(bbox: tuple[int | float, int | float, int | float, int | float] | None = None, point: tuple[int | float, int | float] | None = None) str[source]
Provided a given coordinate or boundary box, return the domain name of the geographic region the coordinate is located within.
- Parameters:
bbox (Optional[Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int]]]) – Geographic coordinates of the bounding box (left, down, right, up).
point (Optional[Tuple[Union[float, int], Union[float, int]]]) – Geographic coordinates of an intersecting point (lon, lat).
- Returns:
The domain that the coordinate falls within. Possible results: “na”, “ar”.
- Return type:
str
Graphics
Library to perform graphs for the streamflow time series analysis.
- The following graphs can be plotted:
hydrograph
mean_annual_hydrograph
spaghetti_annual_hydrograph
- ravenpy.utilities.graphs.forecast(file: str | Path, fcst_var: str = 'q_sim') Figure[source]
Create a graphic of the hydrograph for each forecast member.
- Parameters:
file (str or Path) – Raven output file containing simulated streamflows.
fcst_var (str) – Name of the streamflow variable.
- Return type:
matplotlib.pyplot.Figure
- ravenpy.utilities.graphs.hindcast(file: str | Path, fcst_var: str, qobs: str | Path, qobs_var: str) Figure[source]
Create a graphic of the hydrograph for each hindcast member.
- Parameters:
file (str or Path) – Raven output file containing simulated streamflows.
fcst_var (str) – Name of the streamflow variable.
qobs (str or Path) – Streamflow observation file, with times matching the hindcast.
qobs_var (str) – Name of the streamflow observation variable.
- Return type:
matplotlib.pyplot.Figure
- ravenpy.utilities.graphs.hydrograph(file_list: Sequence[str | Path])[source]
Create a graphic of the hydrograph for each model simulation.
- Parameters:
file_list (Sequence of str or Path) – Raven output files containing simulated streamflows.
- ravenpy.utilities.graphs.mean_annual_hydrograph(file_list: Sequence[str | Path])[source]
Create a graphic of the mean hydrological cycle for each model simulation.
- Parameters:
file_list (Sequence of str or Path) – Raven output files containing simulated streamflows.
- ravenpy.utilities.graphs.spaghetti_annual_hydrograph(file: str | Path)[source]
Create a spaghetti plot of the mean hydrological cycle for one model simulations.
The mean simulation is also displayed.
- Parameters:
file (str or Path) – Raven output files containing simulated streamflows of one model.
- ravenpy.utilities.graphs.ts_fit_graph(ts: DataArray, params: DataArray) Figure[source]
Create graphic showing a histogram of the data and the distribution fitted to it.
The graphic contains one panel per watershed.
- Parameters:
ts (xr.DataArray) – Stream flow time series with dimensions (time, nbasins).
params (xr.DataArray) – Fitted distribution parameters returned by xclim.land.fit indicator.
- Returns:
Figure showing a histogram and the parameterized pdf.
- Return type:
matplotlib.pyplot.Figure
- ravenpy.utilities.graphs.ts_graphs(file, trend: bool = True, alpha: float = 0.05)[source]
Create a figure with the statistics so one can see a trend in the data.
Graphs for time series statistics.
- Parameters:
file (str or Path) – xarray-compatible file containing streamflow statistics for one run.
trend (bool) – If True, the slope will be plotted.
alpha (float) – Significance level for the Mann-Kendall test.
Regionalization
Tools for hydrological regionalization.
- ravenpy.utilities.regionalization.IDW(qsims: DataArray, dist: Series) DataArray[source]
Inverse distance weighting.
- Parameters:
qsims (xr.DataArray) – Ensemble of hydrogram stacked along the members dimension.
dist (pd.Series) – Distance from catchment which generated each hydrogram to target catchment.
- Returns:
Inverse distance weighted average of ensemble.
- Return type:
xr.DataArray
- ravenpy.utilities.regionalization.distance(gauged: DataFrame, ungauged: Series) Series[source]
Return geographic distance [km] between ungauged and database of gauged catchments.
- Parameters:
gauged (pd.DataFrame) – Table containing columns for longitude and latitude of catchment’s centroid.
ungauged (pd.Series) – Coordinates of the ungauged catchment.
- Return type:
pd.Series
- ravenpy.utilities.regionalization.multiple_linear_regression(source: DataFrame, params: DataFrame, target: DataFrame) tuple[list[Any], list[Callable[[], Any]]][source]
Multiple Linear Regression for model parameters over catchment properties.
Uses known catchment properties and model parameters to estimate model parameter over an ungauged catchment using its properties.
- Parameters:
source (pd.DataFrame) – Properties of gauged catchments.
params (pd.DataFrame) – Model parameters of gauged catchments.
target (pd.DataFrame) – Properties of the ungauged catchment.
- Returns:
A named tuple of the estimated model parameters and the R2 of the linear regression.
- Return type:
list of Any, list of Callable or Any
- ravenpy.utilities.regionalization.read_gauged_params(model) tuple[Series, DataFrame][source]
Return table of NASH-Sutcliffe Efficiency values and model parameters for North American catchments.
- Returns:
pd.Series – Nash-Sutcliffe Efficiency keyed by catchment ID.
pd.DataFrame – Model parameters keyed by catchment ID.
- ravenpy.utilities.regionalization.read_gauged_properties(properties) DataFrame[source]
Return table of gauged catchments properties over North America.
- Returns:
Catchment properties keyed by catchment ID.
- Return type:
pd.DataFrame
- ravenpy.utilities.regionalization.regionalization_params(method: str, gauged_params: DataFrame, gauged_properties: DataFrame, ungauged_properties: DataFrame, filtered_params: DataFrame, filtered_prop: DataFrame) list[list[float]] | list[ndarray][source]
Return the model parameters to use for the regionalization.
- Parameters:
method ({'MLR', 'SP', 'PS', 'SP_IDW', 'PS_IDW', 'SP_IDW_RA', 'PS_IDW_RA'}) – Name of the regionalization method to use.
gauged_params (pd.DataFrame) – A DataFrame of parameters for donor catchments (size = number of donors).
gauged_properties (pd.DataFrame) – A DataFrame of properties of the donor catchments (size = number of donors).
ungauged_properties (pd.DataFrame) – A DataFrame of properties of the ungauged catchment (size = 1).
filtered_params (pd.DataFrame) – A DataFrame of parameters of all filtered catchments (size = all catchments with NSE > min_NSE).
filtered_prop (pd.DataFrame) – A DataFrame of properties of all filtered catchments (size = all catchments with NSE > min_NSE).
- Returns:
A list of model parameters to be used for the regionalization.
- Return type:
list
- ravenpy.utilities.regionalization.regionalize(config: Config, method: str, nash: Series, params: DataFrame | None = None, props: DataFrame | None = None, target_props: Series | dict | None = None, size: int = 5, min_NSE: float = 0.6, workdir: str | Path | None = None, overwrite: bool = False) tuple[DataArray, Dataset][source]
Perform regionalization for catchment whose outlet is defined by coordinates.
- Parameters:
config (ravenpy.config.rvs.Config) – Symbolic emulator configuration. Only GR4JCN, HMETS and Mohyse are supported.
method ({'MLR', 'SP', 'PS', 'SP_IDW', 'PS_IDW', 'SP_IDW_RA', 'PS_IDW_RA'}) – Name of the regionalization method to use.
nash (pd.Series) – NSE values for the parameters of gauged catchments.
params (pd.DataFrame) – Model parameters of gauged catchments. Needed for all but MRL method.
props (pd.DataFrame) – Properties of gauged catchments to be analyzed for the regionalization. Needed for MLR and RA methods.
target_props (pd.Series or dict) – Properties of ungauged catchment. Needed for MLR and RA methods.
size (int) – Number of catchments to use in the regionalization.
min_NSE (float) – Minimum calibration NSE value required to be considered as a donor.
workdir (Union[str, Path]) – Work directory. If None, a temporary directory will be created.
overwrite (bool) – If True, existing files will be overwritten.
- Returns:
qsim (DataArray (time, )) – Multi-donor averaged predicted streamflow.
ensemble (Dataset) – A Dataset containing the ensemble of simulations and parameters used:
q_sim : DataArray (realization, time) Ensemble of members based on number of donors.
parameter : DataArray (realization, param) Parameters used to run the model.
- ravenpy.utilities.regionalization.similarity(gauged: DataFrame, ungauged: DataFrame, kind: str = 'ptp') Series[source]
Return similarity measure between gauged and ungauged catchments.
- Parameters:
gauged (pd.DataFrame) – Gauged catchment properties.
ungauged (pd.DataFrame) – Ungauged catchment properties.
kind ({'ptp', 'std', 'iqr'}) – Normalization method: peak to peak (maximum - minimum), standard deviation, inter-quartile range.
- Return type:
pd.Series