Source code for the global hydrological model HydroPy
Creators
- 1. Max Planck Institute for Meteorology
- 2. Helmholtz-Zentrum Geesthacht, Institute of Coastal Systems - Analysis and Modeling
Description
Synopsis
HydroPy is a global hydrological model combining hydrological land surface processes and river routing. It is based on the older Max Planck Institut for Meteorologys Hydrology Model (MPI-HM), however it is fully revised and written in Python. This model is actively developed and will get regular updates. Currently, its development is founded by the Helmholtz-Zentrum Geesthacht and the DAAD project The Ocean's Alkalinity.
Motivation
While the older Fortran version of the MPI-HM is a very fast model, its development is hampered by an inflexible structure and a large overhead whenever new processes are implemented. Additionally, it only outputs service format data and time consuming post-processing is needed to produce netCDF files. The python version uses much more high-level routines and is strongly object-orienting enabling a much faster and easier development. HydroPy is the official successor of the MPI-HM.
Installation
HydroPy requires a python 3.x environment with numpy, netCDF4, xarray and termcolor packages installed. The most convinient way would be to setup an Anaconda installation and create a new environment dedicated to the hydropy model, e.g.
conda create -n hydropy numpy xarray netCDF4 termcolor
and switch to this environment using
conda activate hydropy
Run HydroPy
HydroPy is called from command line using the main function ./hydro.py. Required options are the paths to a netCDF file containing meteorological forcing data and a json-style setup file containing the path of the land surface conditions file, and optionally further path information and model parameters:
./hydro.py -f forcing.nc -s setup.json
The forcing files has to provide the variables TSurf [K], Precip [kg m-2 s-1], and PET [kg m-2 s-1] at a temporal resolution of 1 day and a spatial resolution similar to the land surface conditions file.
A full list of all available options with either the default or user defined values (if set in the setup.json file or via command line) can be printed with
./hydro.py -p [-s setup.json] [-c '{"option": value, ...}']
Using this command also creates a file called hydropy_options.json, in which all options are stored. This can be used as a template to create a user-specific setup file and also provides an overview about all available settings.
The setup file must follow json-style syntax, e.g.:
{
"para": "hydropy_landsurface_parameter_v1.0.0.nc",
"opt1" : val1,
"opt2" : val2
}
Only those options need to be set that are different from the defaults. If options are provided via command line using the -c parameter, syntax has to follow json-style as well. Command line options precide options defined in the setup file.
Further options can be displayed with
hydro.py --help
Documentation and References
A documentation paper preprint is published in GMD. A public version of the HydroPy Model and an example land surface parameter dataset at 0.5 degree can be found on Zenodo.
Contributors
- Tobias Stacke (tobias.stacke@mpimet.mpg.de)
- Stefan Hagemann (stefan.hagemann@hereon.de)
License
HydroPy
Copyright (C) 2021 Helmholtz-Zentrum Hereon Copyright (C) 2020 Helmholtz-Zentrum Geesthacht
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Files
changelog.md
Files
(200.8 kB)
Name | Size | Download all |
---|---|---|
md5:c42bb7e340ccb7b070b9ecc283d9cf5e
|
25.8 kB | Download |
md5:68c59b8b2b75e7727a1376bddca4684e
|
1.1 kB | Preview Download |
md5:86821fc686a1d9cb81e5a43e3c87dd47
|
21.3 kB | Download |
md5:f3ae7b295dad956f3fb530a549adf246
|
27.0 kB | Download |
md5:ce36c1725bf2b845165f28a7101e0c04
|
29.1 kB | Download |
md5:bf478e2a478da5531b14948bc5955b6d
|
4.9 kB | Download |
md5:873639f000107ca152124ab89bd0b49c
|
35.1 kB | Download |
md5:f082c9442d7dfa7295964e534ce3d664
|
28.9 kB | Download |
md5:76bbfdd742eeb7f1e5a48e0ce37e8027
|
4.1 kB | Preview Download |
md5:78e869936d3bd730bc71380dbc194f3e
|
5.6 kB | Download |
md5:3997714a585638204baf397b2898e917
|
9.9 kB | Download |
md5:4206af4cc4a3da7b462254497c2249f8
|
7.9 kB | Download |