ewatercycle.models.marrmot module
eWaterCycle wrapper around Marrmot BMI.
- class ewatercycle.models.marrmot.Solver(name: str = 'createOdeApprox_IE', resnorm_tolerance: float = 0.1, resnorm_maxiter: float = 6.0)
Bases:
object
Container for properties of the solver.
For current implementations see here.
- class ewatercycle.models.marrmot.MarrmotM01(version: str, forcing: MarrmotForcing)
Bases:
AbstractModel
[MarrmotForcing
]eWaterCycle implementation of Marrmot Collie River 1 (traditional bucket) model.
It sets MarrmotM01 parameter with an initial value that is the mean value of the range specfied in model parameter range file.
- Parameters
version – pick a version for which an ewatercycle grpc4bmi docker image is available. forcing: a MarrmotForcing object. If forcing file contains parameter and other settings, those are used and can be changed in
setup()
.
Example
See examples/marrmotM01.ipynb in ewatercycle repository
- model_name = 'm_01_collie1_1p_1s'
Name of model in Matlab code.
- available_versions: ClassVar[Tuple[str, ...]] = ('2020.11',)
Versions for which ewatercycle grpc4bmi docker images are available.
- setup(maximum_soil_moisture_storage: Optional[float] = None, initial_soil_moisture_storage: Optional[float] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, solver: Optional[Solver] = None, cfg_dir: Optional[str] = None, delay: int = 0) 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
maximum_soil_moisture_storage –
in mm. Range is specfied in model parameter range file.
initial_soil_moisture_storage – in mm.
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.
solver – Solver settings
cfg_dir – a run directory given by user or created for user.
delay – Number of seconds to wait before communicating with model. Increase the delay when model takes a while to start.
- Returns
Path to config file and path to config directory
- forcing: Optional[ForcingT]
- bmi: Bmi
Basic Modeling Interface object
- class ewatercycle.models.marrmot.MarrmotM14(version: str, forcing: MarrmotForcing)
Bases:
AbstractModel
[MarrmotForcing
]eWaterCycle implementation of Marrmot Top Model hydrological model.
It sets MarrmotM14 parameter with an initial value that is the mean value of the range specfied in model parameter range file.
- Parameters
version – pick a version for which an ewatercycle grpc4bmi docker image is available.
forcing – a MarrmotForcing object. If forcing file contains parameter and other settings, those are used and can be changed in
setup()
.
Example
See examples/marrmotM14.ipynb in ewatercycle repository
- model_name = 'm_14_topmodel_7p_2s'
Name of model in Matlab code.
- available_versions: ClassVar[Tuple[str, ...]] = ('2020.11',)
Versions for which ewatercycle grpc4bmi docker images are available.
- setup(maximum_soil_moisture_storage: Optional[float] = None, threshold_flow_generation_evap_change: Optional[float] = None, leakage_saturated_zone_flow_coefficient: Optional[float] = None, zero_deficit_base_flow_speed: Optional[float] = None, baseflow_coefficient: Optional[float] = None, gamma_distribution_chi_parameter: Optional[float] = None, gamma_distribution_phi_parameter: Optional[float] = None, initial_upper_zone_storage: Optional[float] = None, initial_saturated_zone_storage: Optional[float] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, solver: Optional[Solver] = None, cfg_dir: Optional[str] = None, delay: int = 0) 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
maximum_soil_moisture_storage –
in mm. Range is specfied in model parameter range file. threshold_flow_generation_evap_change.
leakage_saturated_zone_flow_coefficient – in mm/d.
zero_deficit_base_flow_speed – in mm/d.
baseflow_coefficient – in mm-1.
gamma_distribution_chi_parameter. –
gamma_distribution_phi_parameter. –
initial_upper_zone_storage – in mm.
initial_saturated_zone_storage – in mm.
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. solver: Solver settings
cfg_dir – a run directory given by user or created for user.
delay – Number of seconds to wait before communicating with model. Increase the delay when model takes a while to start.
- Returns
Path to config file and path to config directory
- forcing: Optional[ForcingT]
- bmi: Bmi
Basic Modeling Interface object