14 use mo_kind,
only : i4, dp
15 use mo_message,
only : message, error_message
51 use mo_julian,
only : caldat, julday
52 use mo_message,
only : message
53 use mo_string_utils,
only : num2str
57 character(*),
intent(in) :: file_namelist
61 integer(i4) :: domainid, idomain
63 integer(i4),
dimension(maxNoDomains) :: warming_days
65 type(
period),
dimension(maxNoDomains) :: eval_per
67 real(dp),
dimension(maxNoDomains) :: resolution_routing
69 character(256),
dimension(maxNoDomains) :: mhm_file_restartin
70 character(256),
dimension(maxNoDomains) :: mrm_file_restartin
91 call message(
'***WARNING: mrm_read_river_network is set to .true. because read_restart is .true.')
109 call error_message(
'***ERROR: cannot read states from restart file when optimizing')
116 call message(
'Warning: although defined in namelist, routing is switched off for domain', trim(num2str(domainid)))
117 call message(
' since the calibration of Q is not possible with the chosen opti input')
126 call error_message(
'mo_startup: timeStep must be a divisor of 24: ', num2str(
timestep))
158 jday = julday(dd =
evalper(idomain)%dStart, mm =
evalper(idomain)%mStart, yy =
evalper(idomain)%yStart)
159 evalper(idomain)%julStart = jday
215 integer(i4) :: n_true_pars
220 call error_message(
'Number of iterations for Optimization (nIterations) must be greater than zero')
222 if (
dds_r .lt. 0.0_dp .or.
dds_r .gt. 1.0_dp)
then
223 call error_message(
'dds_r must be between 0.0 and 1.0')
226 call error_message(
'number of complexes in SCE (sce_ngs) must be at least 1')
231 sce_npg = 2 * n_true_pars + 1_i4
239 call error_message(
'number of points per complex (sce_npg) must be greater or', raise=.false.)
240 call error_message(
'equal number of points per sub-complex (sce_nps)')
253 use mo_string_utils,
only : num2str
257 logical,
intent(in) :: do_message
258 logical,
intent(in) :: allow_subgrid_routing
260 integer(i4) :: idomain, domainid
263 real(dp) :: cellfactorrbyh
274 call message(
'domain ', trim(adjustl(num2str(domainid))),
': ')
275 call message(
'resolution Hydrology (domain ', trim(adjustl(num2str(domainid))),
') = ', &
277 call message(
'resolution Routing (domain ', trim(adjustl(num2str(domainid))),
') = ', &
281 if(nint(cellfactorrbyh * 100.0_dp) .eq. 100)
then
284 call message(
'Resolution of routing and hydrological modeling are equal!')
287 else if ((nint(cellfactorrbyh * 100.0_dp) .gt. 100) .and. .not.allow_subgrid_routing)
then
288 if(nint(mod(cellfactorrbyh, 2.0_dp) * 100.0_dp) .ne. 0)
then
289 call error_message(
'***ERROR: Resolution of routing is not a multiple of hydrological model resolution!', raise=.false.)
290 call error_message(
' FILE: mhm.nml, namelist: mainconfig, variable: resolutionRouting')
295 call message(
'Resolution of routing is bigger than hydrological model resolution by ', &
296 trim(adjustl(num2str(nint(cellfactorrbyh)))),
' times !')
309 type(
period),
intent(inout) :: toPeriod
310 type(
period),
intent(in) :: fromPeriod
312 toperiod%dStart = fromperiod%dStart
313 toperiod%mStart = fromperiod%mStart
314 toperiod%yStart = fromperiod%yStart
315 toperiod%dEnd = fromperiod%dEnd
316 toperiod%mEnd = fromperiod%mEnd
317 toperiod%yEnd = fromperiod%yEnd
318 toperiod%julStart = 0
Provides constants commonly used by mHM, mRM and MPR.
integer(i4), parameter, public maxnodomains
integer(i4), parameter, public nodata_i4
Reading of main model configurations.
subroutine period_copy_period_data(toperiod, fromperiod)
copy period data
subroutine, public common_check_resolution(do_message, allow_subgrid_routing)
check resolution
subroutine, public check_optimization_settings
check optimization settings
subroutine, public common_mhm_mrm_read_config(file_namelist)
Read main configurations for common parts.
Provides structures needed by mHM, mRM and/or mpr.
integer(i4), public niterations
logical, public mrm_read_river_network
integer(i4), public sce_nps
integer(i4), public sce_npg
integer(i4), public sce_ngs
logical, public optimize_restart
character(256), dimension(:), allocatable, public mrmfilerestartin
logical, public restart_reset_fluxes_states
flag to reset fluxes and states read from restart to default values
type(period), dimension(:), allocatable, public warmper
character(256), dimension(:), allocatable, public mhmfilerestartin
integer(i4), public opti_method
real(dp), dimension(:), allocatable, public resolutionrouting
real(dp), dimension(nerror_model), public mcmc_error_params
integer(i4), public ntstepday
logical, public read_old_style_restart_bounds
integer(i4), dimension(:), allocatable, public warmingdays
logical, public mcmc_opti
integer(i4), public opti_function
integer(i4), dimension(:, :), allocatable, public lcyearid
type(period), dimension(:), allocatable, public simper
integer(i4), public timestep
logical, public read_restart
type(period), dimension(:), allocatable, public evalper
Reading of main model configurations.
subroutine, public set_land_cover_scenes_id(sim_per, lcyear_id)
Set land cover scenes IDs.
Provides common types needed by mHM, mRM and/or mpr.
Provides structures needed by mHM, mRM and/or mpr.
real(dp), dimension(:), allocatable, public resolutionhydrology
real(dp), dimension(:, :), allocatable, target, public global_parameters
character(256), dimension(:), allocatable, public lcfilename
type(domain_meta), public domainmeta
integer(i4), dimension(nprocesses, 3), public processmatrix
Module containing all namelists representations.
type(nml_mainconfig_mhm_mrm_t), public nml_mainconfig_mhm_mrm
'mainconfig_mhm_mrm' namelist content
type(nml_optimization_t), public nml_optimization
'optimization' namelist content
type(nml_time_periods_t), public nml_time_periods
'time_periods' namelist content