5.13.3-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_mpr_startup Module Reference

Startup procedures for mHM. More...

Functions/Subroutines

subroutine, public mpr_initialize
 Initialize main mHM variables.
 
subroutine l0_check_input (idomain)
 Check for errors in L0 input data.
 
subroutine l0_variable_init (idomain)
 level 0 variable initialization
 
subroutine, public init_eff_params (ncells1)
 Allocation of space for mHM related L1 and L11 variables.
 

Detailed Description

Startup procedures for mHM.

This module initializes all variables required to run mHM. This module needs to be run only one time at the beginning of a simulation if re-starting files do not exist.

Authors
Luis Samaniego, Rohini Kumar
Date
Dec 2012


Function/Subroutine Documentation

◆ init_eff_params()

subroutine, public mo_mpr_startup::init_eff_params ( integer(i4), intent(in) ncells1)

Allocation of space for mHM related L1 and L11 variables.

Allocation of space for mHM related L1 and L11 variables (e.g., states, fluxes, and parameters) for a given domain. Variables allocated here is defined in them mo_global_variables.f90 file. After allocating any variable in this routine, initalize them in the following variables_default_init subroutine.

Changelog
  • R. Kumar Sep 2013
    • documentation added according to the template
  • S. Thober Aug 2015
    • removed routing related variables
  • Zink M. Demirel C. Mar 2017
    • Init Jarvis soil water stress variable at SM process(3)
  • Robert Schweppe Dec 2017
    • restructured allocation in variables_alloc, expanded dimensions of effective parameters
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Rohini Kumar Oct 2021
    • Added Neutron count module to mHM integrate into develop branch (5.11.2)
  • Sebastian Müller Mar 2023
    • made L1_alpha, L1_kSlowFlow, L1_kBaseFlow and L1_kPerco land cover dependent
Authors
Rohini Kumar
Date
Jan 2013
Parameters
[in]ncells1number of L1 cells

Definition at line 363 of file mo_mpr_startup.f90.

References mo_mpr_global_variables::l1_aeroresist, mo_mpr_global_variables::l1_alpha, mo_mpr_global_variables::l1_bulkdens, mo_mpr_global_variables::l1_cosmicl3, mo_mpr_global_variables::l1_degday, mo_mpr_global_variables::l1_degdayinc, mo_mpr_global_variables::l1_degdaymax, mo_mpr_global_variables::l1_degdaynopre, mo_mpr_global_variables::l1_fasp, mo_mpr_global_variables::l1_froots, mo_mpr_global_variables::l1_fsealed, mo_mpr_global_variables::l1_harsamcoeff, mo_mpr_global_variables::l1_jarvis_thresh_c1, mo_mpr_global_variables::l1_karstloss, mo_mpr_global_variables::l1_kbaseflow, mo_mpr_global_variables::l1_kfastflow, mo_mpr_global_variables::l1_kperco, mo_mpr_global_variables::l1_kslowflow, mo_mpr_global_variables::l1_latticewater, mo_mpr_global_variables::l1_maxinter, mo_mpr_global_variables::l1_no_count, mo_mpr_global_variables::l1_petlaicorfactor, mo_mpr_global_variables::l1_prietayalpha, mo_mpr_global_variables::l1_sealedthresh, mo_mpr_global_variables::l1_soilmoistexp, mo_mpr_global_variables::l1_soilmoistfc, mo_mpr_global_variables::l1_soilmoistsat, mo_mpr_global_variables::l1_surfresist, mo_mpr_global_variables::l1_tempthresh, mo_mpr_global_variables::l1_unsatthresh, mo_mpr_global_variables::l1_wiltingpoint, mo_mpr_global_variables::nlai, mo_common_variables::nlcoverscene, mo_mpr_global_variables::nsoilhorizons_mhm, and mo_common_constants::p1_initstatefluxes.

Referenced by mo_startup::mhm_initialize(), and mpr_initialize().

Here is the caller graph for this function:

◆ l0_check_input()

subroutine mo_mpr_startup::l0_check_input ( integer(i4), intent(in) idomain)
private

Check for errors in L0 input data.

Check for possible errors in input data (morphological and land cover) at level-0

Changelog
  • Rohini Kumar Aug 2013
    • added iFlag_LAI_data_format to handle LAI options, and changed within the code made accordingly
  • Rohini Kumar Sep 2013
    • read input data for routing processes according & Stephan Thober, to process_matrix flag
  • Stephan Thober Aug 2015
    • moved check of L0 routing variables to mRM
  • Rohini Kumar Mar 2016
    • changes for handling multiple soil database options
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
Authors
Rohini Kumar
Date
Jan 2013
Parameters
[in]idomaindomain id

by default; when iFlag_soilDB = 0

Definition at line 126 of file mo_mpr_startup.f90.

References mo_common_constants::eps_dp, mo_mpr_global_variables::iflag_soildb, mo_mpr_global_variables::l0_asp, mo_common_variables::l0_elev, mo_mpr_global_variables::l0_geounit, mo_mpr_global_variables::l0_gridded_lai, mo_common_variables::l0_lcover, mo_mpr_global_variables::l0_slope, mo_mpr_global_variables::l0_soilid, mo_common_variables::level0, mo_common_variables::nlcoverscene, mo_common_constants::nodata_dp, mo_common_constants::nodata_i4, mo_mpr_global_variables::nsoilhorizons_mhm, and mo_mpr_global_variables::timestep_lai_input.

Referenced by mpr_initialize().

Here is the caller graph for this function:

◆ l0_variable_init()

subroutine mo_mpr_startup::l0_variable_init ( integer(i4), intent(in) idomain)
private

level 0 variable initialization

following tasks are performed for L0 data sets

  • cell id & numbering
  • storage of cell cordinates (row and coloum id)
  • empirical dist. of terrain slope
  • flag to determine the presence of a particular soil id in this configuration of the model run If a variable is added or removed here, then it also has to be added or removed in the subroutine config_variables_set in module mo_restart and in the subroutine set_config in module mo_set_netcdf_restart
    Changelog
  • Rohini Kumar & Matthias Cuntz May 2014
    • cell area calulation based on a regular lat-lon grid or on a regular X-Y coordinate system
  • Matthias Cuntz May 2014
    • changed empirical distribution function so that doubles get the same value
  • Matthias Zink & Matthias Cuntz Feb 2016
    • code speed up due to reformulation of CDF calculation
  • Rohini Kumar Mar 2016
    • changes for handling multiple soil database options
  • Maren Kaluza Feb 2018
    • removed slope_val, temp, only sort the index to speed up finding the empirical distribution slope_emp
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
      Authors
      Rohini Kumar
      Date
      Jan 2013
      Parameters
      [in]idomaindomain id

by default; when iFlag_soilDB = 0

Definition at line 237 of file mo_mpr_startup.f90.

References mo_mpr_global_variables::iflag_soildb, mo_common_grid::l0_grid_setup(), mo_mpr_global_variables::l0_slope, mo_mpr_global_variables::l0_slope_emp, mo_mpr_global_variables::l0_soilid, mo_common_variables::level0, mo_mpr_global_variables::nsoilhorizons_mhm, mo_mpr_global_variables::nsoiltypes, and mo_mpr_global_variables::soildb.

Referenced by mpr_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mpr_initialize()

subroutine, public mo_mpr_startup::mpr_initialize

Initialize main mHM variables.

Initialize main mHM variables for a given domain. Calls the following procedures in this order:

  • Constant initialization.
  • Generate soil database.
  • Checking inconsistencies input fields.
  • Variable initialization at level-0.
  • Variable initialization at level-1.
  • Variable initialization at level-11.
  • Space allocation of remaining variable/parameters. Global variables will be used at this stage.
    Changelog
  • Luis Samaniego Mar 2008
    • fully distributed multilayer
  • Rohini Kumar Oct 2010
    • matrix to vector version
    • openmp parallelization
    • routing level 11
  • Luis Samaniego Jul 2012
    • removal of IMSL dependencies
  • Luis Samaniego Dec 2012
    • modular version
  • Rohini Kumar May 2013
    • code cleaned and error checks
  • Rohini Kumar Nov 2013
    • updated documentation
  • Stephan Thober Jun 2014
    • copied L2 initialization from mo_meteo_forcings
  • Stephan Thober Jun 2014
    • updated flag for read_restart
  • Stephan Thober Aug 2015
    • removed initialisation of routing
  • Rohini Kumar Mar 2016
    • changes for handling multiple soil database options
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
      Authors
      Luis Samaniego, Rohini Kumar
      Date
      Dec 2012

Definition at line 64 of file mo_mpr_startup.f90.

References mo_common_variables::domainmeta, mo_soil_database::generate_soil_database(), init_eff_params(), mo_common_grid::init_lowres_level(), l0_check_input(), mo_common_variables::l0_l1_remap, l0_variable_init(), mo_common_variables::level0, mo_common_variables::level1, mo_read_latlon::read_latlon(), mo_common_variables::resolutionhydrology, and mo_common_grid::set_domain_indices().

Referenced by mo_startup::mhm_initialize().

Here is the call graph for this function:
Here is the caller graph for this function: