ewatercycle.models.hype module
- class ewatercycle.models.hype.Hype(version: str, parameter_set: ParameterSet, forcing: Optional[HypeForcing] = None)
Bases:
AbstractModel
[HypeForcing
]eWaterCycle implementation of Hype hydrological model.
Model documentation at http://www.smhi.net/hype/wiki/doku.php .
- Parameters
version – pick a version from
available_versions
parameter_set – instance of
ParameterSet
.forcing – ewatercycle forcing container; see
ewatercycle.forcing
.
- available_versions: ClassVar[Tuple[str, ...]] = ('feb2021',)
Versions of model that are available in this class
- setup(start_time: Optional[str] = None, end_time: Optional[str] = None, crit_time: Optional[str] = None, cfg_dir: Optional[str] = None) Tuple[str, str]
Configure model run.
Creates config file and config directory based on the forcing variables and time range.
Start bmi container and store as
bmi
- Parameters
start_time – Start time of model in UTC and ISO format string e.g. ‘YYYY-MM-DDTHH:MM:SSZ’. If not given then forcing start time is used.
end_time – End time of model in UTC and ISO format string e.g. ‘YYYY-MM-DDTHH:MM:SSZ’. If not given then forcing end time is used.
crit_time – Start date for the output of results and calculations of criteria. e.g. ‘YYYY-MM-DDTHH:MM:SSZ’. If not given then start_time is used.
cfg_dir – a run directory given by user or created for user.
- Returns
Path to config file and path to config directory
- get_value_as_xarray(name: str) xarray.DataArray
Get value as xarray
- Parameters
name – Name of value to retrieve.
- Returns
Xarray with values for each sub catchment
- forcing: Optional[ForcingT]
- bmi: Bmi
Basic Modeling Interface object