mHM merge requestshttps://git.ufz.de/mhm/mhm/-/merge_requests2022-02-08T14:30:02+01:00https://git.ufz.de/mhm/mhm/-/merge_requests/102Post-proc R scripts update2022-02-08T14:30:02+01:00Pallav Kumar Shresthapallav-kumar.shrestha@ufz.dePost-proc R scripts updateImproved animate1 (bugs, compatibilities)
Added hydrograph plot script (User can now get a clean hydrograph with NSE, KGE, PBIAS based on discharge.nc)Improved animate1 (bugs, compatibilities)
Added hydrograph plot script (User can now get a clean hydrograph with NSE, KGE, PBIAS based on discharge.nc)v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/92Develop - bring neutron module to latest develop branch2022-02-08T14:30:11+01:00Rohini KumarDevelop - bring neutron module to latest develop branch- update neutron count module
- update MPR neutron count
- update mhm_paramter.nml file
- remove global parameters passing from mhm call (mhm_eval.f90, mhm.f90)
- update other related f90 files- update neutron count module
- update MPR neutron count
- update mhm_paramter.nml file
- remove global parameters passing from mhm call (mhm_eval.f90, mhm.f90)
- update other related f90 filesv5.12Rohini KumarRohini Kumarhttps://git.ufz.de/mhm/mhm/-/merge_requests/89Replaced all "message/stop" and "stop message" calls in code by "error_messag...2022-02-08T14:30:51+01:00Robert SchweppeReplaced all "message/stop" and "stop message" calls in code by "error_message(message)"- I failed to include those commits in the most recent merge request !84, so I am opening another one- I failed to include those commits in the most recent merge request !84, so I am opening another one6.xSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/91Add CLI and Interface module2022-02-08T18:11:49+01:00Sebastian MüllerAdd CLI and Interface module- new command line interface to pass used pathes to mhm (`mo_mhm_cli`):
```
Usage: mhm [options] <cwd>
Options:
<cwd>
Description: The desired working directory (optional).
--help / -h
Description: Print t...- new command line interface to pass used pathes to mhm (`mo_mhm_cli`):
```
Usage: mhm [options] <cwd>
Options:
<cwd>
Description: The desired working directory (optional).
--help / -h
Description: Print this help message.
--version / -v
Description: Print the version of the program.
--nml / -n <path>
Description: The mHM configuration namelist.
Default: mhm.nml
--parameter / -p <path>
Description: The mHM parameter namelist.
Default: mhm_parameter.nml
--mhm_output / -o <path>
Description: The mHM output namelist.
Default: mhm_outputs.nml
--mrm_output / -r <path>
Description: The mRM output namelist.
Default: mrm_outputs.nml
```
- new module for interfaces to control mHM as a library (`mo_mhm_interface`):
- `mhm_interface_init`: init routine to setup mHM with given namlist paths
- `mhm_interface_run`: run mhm with current setup
- `mhm_interface_run_optimization`: run parameter optimization with current setup
- `mhm_interface_finalize`: finalize mhm (writing restart files of mhm and mrm)
- new module for messages during execution (`mo_mhm_messages`):
- `startup_message`
- `domain_dir_check_message`
- `finish_message`
- new init and finalize routine for MPI in `mo_common_MPI_tools`:
- `mpi_tools_init`
- `mpi_tools_finalize`6.xSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/105V5 add cli2022-02-08T19:01:57+01:00Sebastian MüllerV5 add cliThis MR adds backports of the CLI from mHM v6 (see !91):
- new command line interface to pass used pathes to mhm (`mo_mhm_cli`):
```
Usage: mhm [options] <cwd>
Options:
<cwd>
Description: The desired working directory ...This MR adds backports of the CLI from mHM v6 (see !91):
- new command line interface to pass used pathes to mhm (`mo_mhm_cli`):
```
Usage: mhm [options] <cwd>
Options:
<cwd>
Description: The desired working directory (optional).
--help / -h
Description: Print this help message.
--version / -v
Description: Print the version of the program.
--nml / -n <path>
Description: The mHM configuration namelist.
Default: mhm.nml
--parameter / -p <path>
Description: The mHM parameter namelist.
Default: mhm_parameter.nml
--mhm_output / -o <path>
Description: The mHM output namelist.
Default: mhm_outputs.nml
--mrm_output / -r <path>
Description: The mRM output namelist.
Default: mrm_outputs.nml
```
- new module for interfaces to control mHM as a library (`mo_mhm_interface`):
- `mhm_interface_init`: init routine to setup mHM with given namlist paths
- `mhm_interface_run`: run mhm with current setup
- `mhm_interface_run_optimization`: run parameter optimization with current setup
- `mhm_interface_finalize`: finalize mhm (writing restart files of mhm and mrm)
- new module for messages during execution (`mo_mhm_messages`):
- `startup_message`
- `domain_dir_check_message`
- `finish_message`
- new init and finalize routine for MPI in `mo_common_MPI_tools`:
- `mpi_tools_init`
- `mpi_tools_finalize`v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/107CI: solve coverage bug with build first; use conda2022-02-09T01:18:23+01:00Sebastian MüllerCI: solve coverage bug with build first; use condaSolve failing coverage job in CI.Solve failing coverage job in CI.v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/94Interface update No. 2: refactoring mhm_eval2022-02-10T15:09:32+01:00Sebastian MüllerInterface update No. 2: refactoring mhm_evalRefactor mhm_eval: copy everything into subroutines
- remove PGI pre-processor directives
- put all `L1` variables into one container
- new module: `mo_mhm_interface_run.f90`
```fortran
use mo_mhm_interface_run, only : &
mhm_inte...Refactor mhm_eval: copy everything into subroutines
- remove PGI pre-processor directives
- put all `L1` variables into one container
- new module: `mo_mhm_interface_run.f90`
```fortran
use mo_mhm_interface_run, only : &
mhm_interface_run_prepare, &
mhm_interface_run_get_ndomains, &
mhm_interface_run_prepare_domain, &
mhm_interface_run_finished, &
mhm_interface_run_do_time_step, &
mhm_interface_run_write_output, &
mhm_interface_run_update_optisim, &
mhm_interface_run_finalize_domain, &
mhm_interface_run_finalize
```
- use subroutines for every step in the eval routine:
```fortran
! prepare the mhm run
call mhm_interface_run_prepare(parameterset, opti_domain_indices, present(runoff))
! get number of domains to loop over
call mhm_interface_run_get_ndomains(nDomains)
! loop over Domains
DomainLoop: do ii = 1, nDomains
! prepare current domain
call mhm_interface_run_prepare_domain(ii, etOptiSim, twsOptiSim, neutronsOptiSim, smOptiSim)
! run time-loop at least once
time_loop_finished = .false.
! Loop over time
TimeLoop: do while(.not. time_loop_finished)
! do one time-step on current domain
call mhm_interface_run_do_time_step()
! write output
call mhm_interface_run_write_output()
! update optisim data
call mhm_interface_run_update_optisim(etOptiSim, twsOptiSim, neutronsOptiSim, smOptiSim)
! check whether to run the time-loop further
call mhm_interface_run_finished(time_loop_finished)
end do TimeLoop !<< TIME STEPS LOOP
! finalize domain
call mhm_interface_run_finalize_domain()
end do DomainLoop !<< Domain LOOP
! SET RUNOFF OUTPUT VARIABLE; reset init-flag for MPR
call mhm_interface_run_finalize(runoff)
```6.xSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/104Add FORCES as dependency to v5.x2022-02-10T15:23:22+01:00Sebastian MüllerAdd FORCES as dependency to v5.xv5: add FORCES as dependency
See merge request !103v5: add FORCES as dependency
See merge request !103v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/111Update v5 with latest develop2022-02-24T12:47:11+01:00Sebastian MüllerUpdate v5 with latest developSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/114subdaily discharge output2022-04-08T12:46:32+02:00Pallav Kumar Shresthapallav-kumar.shrestha@ufz.desubdaily discharge output@najafi and I worked on the following:
**New Subdaily discharge output**
- mHM now produces point output in subdaily as well.
- The new point output include - `subdaily_discharge.out`, `subdaily_discharge.nc` and subdaily runtime messa...@najafi and I worked on the following:
**New Subdaily discharge output**
- mHM now produces point output in subdaily as well.
- The new point output include - `subdaily_discharge.out`, `subdaily_discharge.nc` and subdaily runtime messages (performance metrics)
- A new subroutine `write_subdaily_obs_sim_discharge` is written which has similar code structure to `write_daily_obs_sim_discharge`
- These subdaily output are only processed if nMeasPerDay is > 1
**Subdaily read_timeseries bug fixed**
- read_timeseries in mo_read_timeseries had already incorporated nMeasPerDay and was flexible for reading sub-daily Qobs. However, a bug was found for the index variables which was fixed.v5.12Stephan ThoberStephan Thoberhttps://git.ufz.de/mhm/mhm/-/merge_requests/115Update v5.x with develop2022-04-08T13:29:07+02:00Sebastian MüllerUpdate v5.x with developAdd recent changes to v5.x:
- https://git.ufz.de/mhm/mhm/-/merge_requests/112 Update mo_read_nc.f90, "improve error message" when time steps of input files are inconsistent.
- https://git.ufz.de/mhm/mhm/-/merge_requests/113 hydrograph.R...Add recent changes to v5.x:
- https://git.ufz.de/mhm/mhm/-/merge_requests/112 Update mo_read_nc.f90, "improve error message" when time steps of input files are inconsistent.
- https://git.ufz.de/mhm/mhm/-/merge_requests/113 hydrograph.R can now plot hydrograph from both discharge.nc and daily_discharge.out
- https://git.ufz.de/mhm/mhm/-/merge_requests/114 subdaily discharge outputv5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/109Add run interfaces to v5.x2022-04-28T15:25:02+02:00Sebastian MüllerAdd run interfaces to v5.xThis MR adds the run interfaces from !108 which are backports of !94.This MR adds the run interfaces from !108 which are backports of !94.v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/106Add CLI to v5.x2022-04-28T15:25:02+02:00Sebastian MüllerAdd CLI to v5.xThis adds cli from !105This adds cli from !105v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/116BFI target function2022-05-05T11:51:55+02:00Sebastian MüllerBFI target functionAdded BFI-target function to mHM:
- `opti_function=34`:
```fortran
!> (34) SO: Q: (1 + |BFI_o - BFI_s|)(1 - KGE)
!> BFI_s = mean_t(<q_2>) / mean_t(<q_total>)
!> BFI_o = given in separate namelist per domai...Added BFI-target function to mHM:
- `opti_function=34`:
```fortran
!> (34) SO: Q: (1 + |BFI_o - BFI_s|)(1 - KGE)
!> BFI_s = mean_t(<q_2>) / mean_t(<q_total>)
!> BFI_o = given in separate namelist per domain
!> <.> is a spatial average
```
- you can either specify a baseflow index per domain or you can let calculate this by mhm intern with the Eckhardt filter
- a new namelist was added to the `mhm.nml`:
```fortran
!******************************************************************************************
! SETTINGS FOR OPTIMIZATION for baseflow-index (opti_function = 34)
!******************************************************************************************
&BFI_inputs
!> Calculate BFI from discharge time series with the Eckhardt filter
!> Eckhardt et al. (2008, doi: 10.1016/j.jhydrol.2008.01.005)
!> This option **requires** one gauge per domain at the outlet of the basin.
BFI_calc = .true.
!> baseflow index per domain. Only needed if not calculated (BFI_calc = .false.)
!> You can overwrite single BFI values to not calculate them internally (if BFI_calc = .true.).
! BFI_obs(1) = 0.124
! BFI_obs(2) = 0.256
/
```
- when calculating internally, you need to have exactly one gauge per domainv5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/117Update dependencies2022-05-05T11:51:55+02:00Sebastian MüllerUpdate dependencies- cmake-fortran-scripts v1.6
- doxygen-awesome v2.0.3
- simplify CI commands- cmake-fortran-scripts v1.6
- doxygen-awesome v2.0.3
- simplify CI commandsv5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/118Update v5.x with develop (BFI, cmake)2022-05-05T12:03:56+02:00Sebastian MüllerUpdate v5.x with develop (BFI, cmake)Recent changes from develop:
- BFI !116
- deps !117Recent changes from develop:
- BFI !116
- deps !117v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/119update forces version to v0.3.12022-05-10T15:03:38+02:00Sebastian Müllerupdate forces version to v0.3.1- update forces version to v0.3.1
- simplify CPM include of forces
- better flag control with CMake- update forces version to v0.3.1
- simplify CPM include of forces
- better flag control with CMakev5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/120Add L1_temp_calc and L1_prec_calc for coupling and cleanup routine2022-06-01T14:41:44+02:00Sebastian MüllerAdd L1_temp_calc and L1_prec_calc for coupling and cleanup routine# FINAM updates
Models like mQM would like to get temperature from mHM, to use the same forcings.
Internally temperature gets dis-aggregated but was not accessible from outside.
Therefore I added `L1_temp_calc` and `L1_prec_calc` (next ...# FINAM updates
Models like mQM would like to get temperature from mHM, to use the same forcings.
Internally temperature gets dis-aggregated but was not accessible from outside.
Therefore I added `L1_temp_calc` and `L1_prec_calc` (next to `L1_pet_calc`) to hold the dis-aggregated values for temperature and precipitation.
In addition, a module `mo_clean_up` was added with a routine to deallocate all arrays from the mHM run.
This is now called in `mhm_interface_finalize`.
With this addition, mHM can be run multiple times called from the python bindings, where the process is still active after mHM was finalized.v5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/121Bug fix of mo_restart on reading the correct dimension of Landcover (years), ...2022-06-01T17:00:58+02:00Pallav Kumar Shresthapallav-kumar.shrestha@ufz.deBug fix of mo_restart on reading the correct dimension of Landcover (years), LAI (time) and Soil (horizons)Closes: #225 #226
Bug fix: mo_restart now reads the correct dimension for the number of dimension slices of landcover, soil and LAI
Minor: fixed incorrect restart out path for test domain 2 in namelistCloses: #225 #226
Bug fix: mo_restart now reads the correct dimension for the number of dimension slices of landcover, soil and LAI
Minor: fixed incorrect restart out path for test domain 2 in namelistv5.12Sebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/122Cmake + ninja cleanup2022-06-08T16:25:04+02:00Sebastian MüllerCmake + ninja cleanupNinja had problems building mhm as dependency of mhm_pybind, since there is an issue with `..` and `.` in paths, that then can't get resolved correctly (See [link](https://gitlab.kitware.com/cmake/cmake/-/issues/17601))
Also, following ...Ninja had problems building mhm as dependency of mhm_pybind, since there is an issue with `..` and `.` in paths, that then can't get resolved correctly (See [link](https://gitlab.kitware.com/cmake/cmake/-/issues/17601))
Also, following https://git.ufz.de/chs/forces/-/merge_requests/57, we shouldn't alter `CMAKE_MODULE_PATH` and use full paths to `*.cmake` files.v5.12Sebastian MüllerSebastian Müller