mHM merge requestshttps://git.ufz.de/mhm/mhm/-/merge_requests2021-02-03T11:46:38+01:00https://git.ufz.de/mhm/mhm/-/merge_requests/61Release 5.11 back merge2021-02-03T11:46:38+01:00Sebastian MüllerRelease 5.11 back mergeThis merges changes during release back into develop.This merges changes during release back into develop.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/60Release 5.112021-02-03T11:43:18+01:00Sebastian MüllerRelease 5.11This is the finalization of release 5.11This is the finalization of release 5.115.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/59[Fix] Units and Constants cleanup2020-11-30T12:55:14+01:00Sebastian Müller[Fix] Units and Constants cleanupThis merge request fixes some unit doc mistakes (use TS to indicate timestep as time unit) and cleans up some constants across the different constant modules (`mo_constants`, `mo_common_constants`).
Closes: #101 #102This merge request fixes some unit doc mistakes (use TS to indicate timestep as time unit) and cleans up some constants across the different constant modules (`mo_constants`, `mo_common_constants`).
Closes: #101 #1025.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/58CMake fix2020-11-30T08:59:29+01:00Sebastian MüllerCMake fixMinor Cmake fixes:
- min. required cmake version: `3.12` (was `3.5`)
- [CMAKE_PROJECT_HOMEPAGE_URL](https://cmake.org/cmake/help/v3.12/variable/CMAKE_PROJECT_HOMEPAGE_URL.html?highlight=homepage) attribute was added there
- `add_comp...Minor Cmake fixes:
- min. required cmake version: `3.12` (was `3.5`)
- [CMAKE_PROJECT_HOMEPAGE_URL](https://cmake.org/cmake/help/v3.12/variable/CMAKE_PROJECT_HOMEPAGE_URL.html?highlight=homepage) attribute was added there
- `add_compile_definitions` was also added with there ([link](https://cmake.org/cmake/help/v3.19/command/add_compile_definitions.html))
- remove escaped qoutes from `add_compile_definitions` as an attempt to fix #160 (guess: cygwin could have problems with escaping characters)
Fixes #1605.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/57Check if directories exist2020-11-30T08:58:33+01:00Sebastian MüllerCheck if directories existThis merge request introduces a module for sanity checks for the input data: `mo_checks`.
First subroutine: `check_dir`
All input directories are checked for existence. A `"(found)"` is added in the printout.
If a file-prefix is added b...This merge request introduces a module for sanity checks for the input data: `mo_checks`.
First subroutine: `check_dir`
All input directories are checked for existence. A `"(found)"` is added in the printout.
If a file-prefix is added by the output-directory path, this is highlighted (as done with the check-cases).
Fixes #140
Fixes #955.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/55[cleanup] remove makefile/configs and related check files2020-10-09T11:27:02+02:00Sebastian Müller[cleanup] remove makefile/configs and related check filesThis MR removes the old makefile and legacy checking routinesThis MR removes the old makefile and legacy checking routines5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/54NC update: use 'missing_value' and 'units' and rename reading routines2020-10-08T20:17:36+02:00Sebastian MüllerNC update: use 'missing_value' and 'units' and rename reading routinesThe netcdf output is updated in order to consequently make use of the `missing_value` and `units` (`unit` before in some cases) attributes to be in line the [CF conventions](https://cfconventions.org/Data/cf-conventions/cf-conventions-1....The netcdf output is updated in order to consequently make use of the `missing_value` and `units` (`unit` before in some cases) attributes to be in line the [CF conventions](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html).
In addition the following reading routines are renamed, since they are not only used for forcings:
* `read_forcing_nc` -> `read_nc`
* `read_const_forcing_nc` -> `read_const_nc`
Fixes: #130, #71, #505.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/53mRM+mHM: standalone remove2020-10-08T12:03:47+02:00Sebastian MüllermRM+mHM: standalone removeThis MR removes the pre-processor directive `MRM2MHM`. So mHM and mRM are coupled by default.
In addition the standalone version of mRM is removed from the code-base.
For people in need, there is still the (unmaintained) repo for mRM: h...This MR removes the pre-processor directive `MRM2MHM`. So mHM and mRM are coupled by default.
In addition the standalone version of mRM is removed from the code-base.
For people in need, there is still the (unmaintained) repo for mRM: https://git.ufz.de/mhm/mrm
Fixes: #147, #1035.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/52[Fix] Adaptive routing with no gauge2020-10-07T18:25:45+02:00Sebastian Müller[Fix] Adaptive routing with no gaugeAllow run mHM and mRM without any observed gauge for `processCase(8) = 2 / 3`.
Fixes: #27
Finalizes: !29Allow run mHM and mRM without any observed gauge for `processCase(8) = 2 / 3`.
Fixes: #27
Finalizes: !295.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/51Versioning2020-10-05T13:50:06+02:00Sebastian MüllerVersioningThis MR introduces two addition files:
- `version.txt` holding the current version of mHM (now: `5.11.0-dev0`)
- `version_date.txt` holding the latest release date (now: `Jun 2019` of version 5.10)
Versioning is following [semantic ...This MR introduces two addition files:
- `version.txt` holding the current version of mHM (now: `5.11.0-dev0`)
- `version_date.txt` holding the latest release date (now: `Jun 2019` of version 5.10)
Versioning is following [semantic versions](http://semver.org). When a `-devX` is appended to the version, it is treated as a development version, and the version date will be set to the current date. otherwise, the date from the given file will be used.
This has the advantage, that users see the development version they are using in the mhm output.
In addition, these files are used in the documentation to state the version of mHM, that the documentation belongs to.
There were some old versions written at different places in the code-base. This should be cleaned up now.
Last but not least, the UFZ logos were updated to the latest versions.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/50Online Coverage Report2020-10-03T12:16:58+02:00Sebastian MüllerOnline Coverage ReportThis MR introduces automatic coverage calculation, which is added as a separate page to the auto-generated online documentation.
![coverage](/uploads/5be173f8f28889d2cf072a8775ba7537/coverage.png)
This uses `gcov` from `gcc7.3`. Co...This MR introduces automatic coverage calculation, which is added as a separate page to the auto-generated online documentation.
![coverage](/uploads/5be173f8f28889d2cf072a8775ba7537/coverage.png)
This uses `gcov` from `gcc7.3`. Coverage was added as a target in the CMakeLists.txt and in order to execute coverage calculation you have to do the following:
```bash
mkdir build && cd build
cmake -DCMAKE_WITH_COVERAGE:STRING=ON ..
make mhm_coverage_CI
```
As an addition, the `mhm` executable can now be called with a passed directory path, where `mhm` should be executed in.
This feature is likely to change in the future.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/48[EVE] add intel 2020 load scripts and CI workflow2020-10-05T13:48:26+02:00Sebastian Müller[EVE] add intel 2020 load scripts and CI workflowWith this MR, the new EasyBuild workflow for the Intel-compiler chain is added:
- Intel C Compiler v2020.1
- Intel Fortran Compiler v2020.1
- OpenMPI v4.0.3
- Intel MKL v2020.1
Both, normal and MPI workflow are added.With this MR, the new EasyBuild workflow for the Intel-compiler chain is added:
- Intel C Compiler v2020.1
- Intel Fortran Compiler v2020.1
- OpenMPI v4.0.3
- Intel MKL v2020.1
Both, normal and MPI workflow are added.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/47corrected unit attributes for lat lon variables2020-09-24T13:39:53+02:00Stephan Thobercorrected unit attributes for lat lon variables5.11Stephan ThoberStephan Thoberhttps://git.ufz.de/mhm/mhm/-/merge_requests/46The length in net_startup is only cut in case there are less then 2 lengths2020-09-15T16:02:08+02:00Maren KaluzaThe length in net_startup is only cut in case there are less then 2 lengthsWhen the network is setup for small river networks the mRM setup failed. The reason for that was that the cell distances were cut after the 60th percentile and set to a fix value. But for small setups the array has too few values. Now, w...When the network is setup for small river networks the mRM setup failed. The reason for that was that the cell distances were cut after the 60th percentile and set to a fix value. But for small setups the array has too few values. Now, when calling the percentile subroutine another if clause tests if there are enough values.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/45Bugfix setup routing resolution2020-09-15T14:03:04+02:00Sebastian MüllerBugfix setup routing resolutionFixing wrongly matched IDs from L1 to L11 when routing resolution (L11) is finer than L1 resolution.Fixing wrongly matched IDs from L1 to L11 when routing resolution (L11) is finer than L1 resolution.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/44Online Documentation with GitLab pages2020-09-17T15:34:14+02:00Sebastian MüllerOnline Documentation with GitLab pagesThis MR enables the online documentation of mHM based on the present Doxgen documentation:
- switch to select the documented branch (master/develop/v5.11/...) was added to the webpage to switch between versions of mHM.
- the documentat...This MR enables the online documentation of mHM based on the present Doxgen documentation:
- switch to select the documented branch (master/develop/v5.11/...) was added to the webpage to switch between versions of mHM.
- the documentation can later be accessed by: https://mhm.pages.ufz.de/mhm
- by default, the documentation will point to the `master` version (which is not present yet)
- test version can be accessed by: https://muellese.pages.ufz.de/mhm/doc_update (you can only switch to `develop` there, since `master` is not present)
- the `lib` folder was excluded in the documentation, since it will get its own one
- the documentation will be build automatically during CI runs in the `build` stage
- along with the online documentation, a pdf version will be build and provided as an artifact by the Gitlab-runner5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/43New SM process =>>> process(3)=42021-05-31T12:07:33+02:00Mehmet Cüneyd DemirelNew SM process =>>> process(3)=4This is my first merge request. Hope that I dont mess up the trunk/master. Cases are not tested. But I could compile and run it in my local.
The updates are mentioned here:
[https://git.ufz.de/mhm/mhm/-/issues/138](https://git.ufz.d...This is my first merge request. Hope that I dont mess up the trunk/master. Cases are not tested. But I could compile and run it in my local.
The updates are mentioned here:
[https://git.ufz.de/mhm/mhm/-/issues/138](https://git.ufz.de/mhm/mhm/-/issues/138)
## New Features
**New process descriptions for the soil evapotranspiration module**
1. Global field capacity dependency to root fraction coefficient based on Demirel et al 2018 (doi: 10.5194/hess-22-1299-2018) and Jarvis (doi: 10.1016/0022-1694(89)90050-4) evapotranspiration reduction (processCase(3)=3) - implemented by GEUS and ITU.
2. Global field capacity dependency to root fraction coefficient based on Demirel et al 2018 (doi: 10.5194/hess-22-1299-2018) and Feddes (doi: 10.1016/0022-1694(76)90017-2) evapotranspiration reduction (processCase(3)=4) - implemented by GEUS and ITU.
5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/42[FIX] messages about written mhm fluxes AND eve NAG workflow2020-08-31T16:23:16+02:00Sebastian Müller[FIX] messages about written mhm fluxes AND eve NAG workflowThere was a mismatch between the selected fluxes in `mhm_output.nml` and the displayed messages about the fluxes to be written.
See #81
In addition the module versions in the eve NAG loadscript were fixed in order to get a successfu...There was a mismatch between the selected fluxes in `mhm_output.nml` and the displayed messages about the fluxes to be written.
See #81
In addition the module versions in the eve NAG loadscript were fixed in order to get a successful CI run. See #142 5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/41Include mo_os to check files existence2020-10-06T17:37:03+02:00Nicola Nadine DöringInclude mo_os to check files existenceAdd mo_os to 'lib' and include path_join in mo_read_spatial_data and mo_read_timeseries for better error handling while file opening.Add mo_os to 'lib' and include path_join in mo_read_spatial_data and mo_read_timeseries for better error handling while file opening.5.11Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/37River temperature module2020-10-01T11:00:36+02:00Sebastian MüllerRiver temperature moduleThis MR introduces a first version of a **river temperature routing process** in an OOP fashioned way.
# Abstract
River temperature determines a wide variety of properties of water and is of great interest as model
output in the fie...This MR introduces a first version of a **river temperature routing process** in an OOP fashioned way.
# Abstract
River temperature determines a wide variety of properties of water and is of great interest as model
output in the field of hydrological modeling.
In this merge request, we propose a suitable implementation, to enable modeling river temperature in mHM [Samaniego et al., 2010, Kumar et al., 2013].
Based on a literature survey, we decided to use a physical based model build up on the work of [Wanders et al., 2019, Beek et al., 2012, Foreman et al., 2001], since its formulation best fits to the structure of mHM.
A reformulation of the governing equations was necessary, to reuse routines of the routing module mRM [Thober et al., 2019], so a numerical solution based on a Muskingum-Cunge discretization [Chow et al., 1988, Thober et al., 2019] could be formulated.
This implementation does not include ice layer at the moment and is not evaluated yet, so we mark it as **EXPERIMENTAL**.
## Governing equations
1. Surface water energy balance equation:
```math
\frac{\partial\left(h\cdot T_{w}\right)}{\partial t}+\frac{\partial\left(q\cdot T_{w}\right)}{\partial A} =\underbrace{\frac{Q^{*}-H-LE}{C_{v}}}_{=:T_{IO}}+\frac{\partial\left(q_{s}\cdot T_{s}\right)}{\partial A}
```
2. Net Radiation:
```math
Q^{*}=S_{I}\cdot\left(1-\alpha_{w}\right)+L_{I}-L_{O}
```
3. Boltzmann equation ([see](https://energyeducation.ca/encyclopedia/Stefan-Boltzmann_law)):
```math
L_{O}=\varepsilon\cdot\sigma\cdot\left(T_{w}\right)^{4}
```
4. Sensible heat flux formula:
```math
H=k_{H}\cdot\left(T_{w}-T_{a}\right)
```
5. Latent heat formula:
```math
LE=\lambda_{v}\cdot ET_{0}
```
6. Lateral flux sum:
```math
q_{s}=q_{dr}+q_{i}+q_{b}
```
7. Temperature runoff components:
- From [Wanders et al., 2019]: (in use)
```math
T_{s}=\frac{q_{dr}}{q_{s}}\cdot\max\left(T_{i},T_{a}-1.5\right)+\frac{q_{i}}{q_{s}}\cdot\max\left(T_{i},T_{a}\right)+\frac{q_{b}}{q_{s}}\cdot\max\left(T_{i}+5,\overline{T_{a}}\right)
```
- From [Beek et al., 2012]: (alternative)
```math
T_{s}=\frac{q_{dr}}{q_{s}}\cdot T_{a}+\frac{q_{i}}{q_{s}}\cdot T_{a}+\frac{q_{b}}{q_{s}}\cdot\overline{T_{a}}
```
## TODOs
- [x] add a test case
- [x] final clean up
- [x] documentation5.11Stephan ThoberStephan Thober