mHM merge requestshttps://git.ufz.de/mhm/mhm/-/merge_requests2022-02-10T15:09:32+01:00https://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/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/90MPR integration2022-02-01T11:40:29+01:00Sebastian MüllerMPR integrationThis is the first step to integrate the new MPR as an outside dependecy.
Onging development documented in #215This is the first step to integrate the new MPR as an outside dependecy.
Onging development documented in #2156.xSebastian MüllerSebastian Müllerhttps://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/84merging the MPR_mHM_v5.9 branch into v6_develop without the call of the new MPR2021-07-28T11:18:37+02:00Robert Schweppemerging the MPR_mHM_v5.9 branch into v6_develop without the call of the new MPR- renamed nlcoverscene to nLandCoverPeriods in mhm.nml
- added path_mpr_nml in mhm.nml
- built procedure to allocate domainMeta fields
- moved read_mhm_parameters to mo_common_read_config.f90
- removed variable mrm_coupling_mode
- added ...- renamed nlcoverscene to nLandCoverPeriods in mhm.nml
- added path_mpr_nml in mhm.nml
- built procedure to allocate domainMeta fields
- moved read_mhm_parameters to mo_common_read_config.f90
- removed variable mrm_coupling_mode
- added routine common_check_dimension_consistency
- moved read_data call right before mpr_initialize and mpr_eval for easier replacement later on
- commented all future routines in mo_mhm_mpr_interface.f90
- fixed numerous bugs and errors6.xSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/83WIP: mHM v6 develop merge2022-02-01T12:10:01+01:00Sebastian MüllerWIP: mHM v6 develop mergeMerge of MPR and related changes. To be documented.
`develop` branch will hold the development of version 6 in the near future. v5 related fixes are place in the `v5.x` branch.Merge of MPR and related changes. To be documented.
`develop` branch will hold the development of version 6 in the near future. v5 related fixes are place in the `v5.x` branch.6.xSebastian MüllerSebastian Müllerhttps://git.ufz.de/mhm/mhm/-/merge_requests/38WIP: water quality model2022-06-17T13:26:00+02:00Stephan ThoberWIP: water quality modelmQM developmentmQM development6.xStephan ThoberStephan Thoberhttps://git.ufz.de/mhm/mhm/-/merge_requests/33WIP: Opti restart dds2021-05-21T23:44:29+02:00Maren KaluzaWIP: Opti restart ddsdds did not implement restart before. Now it is.
If opti method dds is active mHM now writes a file mo_dds.restart into the root directory where mhm is executed. I copied that from the scc method. If restart_opti is enabled, mHM does no...dds did not implement restart before. Now it is.
If opti method dds is active mHM now writes a file mo_dds.restart into the root directory where mhm is executed. I copied that from the scc method. If restart_opti is enabled, mHM does not start from the first iteration step but from the last executed instead.
mo_dds.restart is a namelist. It saves all the data needed for a restart including the save state of the random number generator.
There is a new mhm.nml-variable dIterations. It says how many iterations steps dds should do in the current run. The codes stops executing if either dIterations steps have been done or if nIterations is reached.
For discussion:
- if dIteration is not defined, dIterations is set to nIterations + 1, so nIterations will determine the iterations steps. Can this be done more intuitive?
- how can we create a test case? Usually a test case includes only one run for mHM. For this we would need to compare one run with a whole iteration and at least two with the same iteration separated into to sub-runs.6.xStephan ThoberStephan Thober