5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_grid Module Reference

gridding tools More...

Functions/Subroutines

subroutine, public init_lowres_level (highres, target_resolution, lowres, highres_lowres_remap)
 Level-1 variable initialization.
 
subroutine, public set_domain_indices (grids, indices)
 TODO: add description.
 
subroutine, public l0_grid_setup (new_grid)
 level 0 variable initialization
 
subroutine, public mapcoordinates (level, y, x)
 Generate map coordinates.
 
subroutine, public geocoordinates (level, lat, lon)
 Generate geographic coordinates.
 
subroutine calculate_grid_properties (nrowsin, ncolsin, xllcornerin, yllcornerin, cellsizein, aimingresolution, nrowsout, ncolsout, xllcornerout, yllcornerout, cellsizeout)
 Calculates basic grid properties at a required coarser level using information of a given finer level.
 

Detailed Description

gridding tools

Common tools to deal with grids in mHM.

Authors
Robert Schweppe
Date
Jun 2018

Function/Subroutine Documentation

◆ calculate_grid_properties()

subroutine mo_grid::calculate_grid_properties ( integer(i4), intent(in)  nrowsin,
integer(i4), intent(in)  ncolsin,
real(dp), intent(in)  xllcornerin,
real(dp), intent(in)  yllcornerin,
real(dp), intent(in)  cellsizein,
real(dp), intent(in)  aimingresolution,
integer(i4), intent(out)  nrowsout,
integer(i4), intent(out)  ncolsout,
real(dp), intent(out)  xllcornerout,
real(dp), intent(out)  yllcornerout,
real(dp), intent(out)  cellsizeout 
)
private

Calculates basic grid properties at a required coarser level using information of a given finer level.

Calculates basic grid properties at a required coarser level (e.g., L11) using information of a given finer level (e.g., L0). Basic grid properties such as nrows, ncols, xllcorner, yllcorner cellsize are estimated in this routine.

TODO: add description

Parameters
[in]integer(i4) :: nrowsInno. of rows at an input level
[in]integer(i4) :: ncolsInno. of cols at an input level
[in]real(dp) :: xllcornerInxllcorner at an input level
[in]real(dp) :: yllcornerInyllcorner at an input level
[in]real(dp) :: cellsizeIncell size at an input level
[in]real(dp) :: aimingResolutionresolution of an output level
[out]integer(i4) :: nrowsOutno. of rows at an output level
[out]integer(i4) :: ncolsOutno. of cols at an output level
[out]real(dp) :: xllcornerOutxllcorner at an output level
[out]real(dp) :: yllcornerOutyllcorner at an output level
[out]real(dp) :: cellsizeOutcell size at an output level
Authors
Matthias Zink & Rohini Kumar
Date
Feb 2013

Definition at line 489 of file mo_grid.f90.

Referenced by init_lowres_level().

Here is the caller graph for this function:

◆ geocoordinates()

subroutine, public mo_grid::geocoordinates ( type(grid), intent(in)  level,
real(dp), dimension(:, :), intent(out), allocatable  lat,
real(dp), dimension(:, :), intent(out), allocatable  lon 
)

Generate geographic coordinates.

Generate geographic coordinate arrays for given domain and level

Parameters
[in]type(Grid) :: level-> grid reference
[out]real(dp), dimension(:, :) :: lat, lon
[out]real(dp), dimension(:, :) :: lat, lon
Authors
Matthias Zink
Date
Apr 2013

Definition at line 433 of file mo_grid.f90.

Referenced by mo_nc_output::createoutputfile().

Here is the caller graph for this function:

◆ init_lowres_level()

subroutine, public mo_grid::init_lowres_level ( type(grid), intent(in), target  highres,
real(dp), intent(in)  target_resolution,
type(grid), intent(inout), target  lowres,
type(gridremapper), intent(inout), optional  highres_lowres_remap 
)

Level-1 variable initialization.

following tasks are performed for L1 datasets

  • cell id & numbering
  • mask creation
  • storage of cell cordinates (row and coloum id)
  • sorage of four corner L0 cordinates 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
    Parameters
    [in]type(Grid) :: highres
    [in]real(dp) :: target_resolution
    [in,out]type(Grid) :: lowres
    [in,out]type(GridRemapper), optional :: highres_lowres_remap
    Authors
    Rohini Kumar
    Date
    Jan 2013

Definition at line 58 of file mo_grid.f90.

References calculate_grid_properties(), mo_common_constants::nodata_dp, and mo_common_constants::nodata_i4.

Referenced by mo_meteo_handler::init_level2(), mo_mpr_startup::mpr_initialize(), and mo_mrm_init::mrm_init().

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

◆ l0_grid_setup()

subroutine, public mo_grid::l0_grid_setup ( type(grid), intent(inout)  new_grid)

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
    Parameters
    [in,out]type(Grid) :: new_grid
    Authors
    Rohini Kumar
    Date
    Jan 2013

Definition at line 267 of file mo_grid.f90.

References mo_common_variables::iflag_cordinate_sys.

Referenced by mo_mpr_startup::l0_variable_init(), and mo_mrm_init::mrm_init().

Here is the caller graph for this function:

◆ mapcoordinates()

subroutine, public mo_grid::mapcoordinates ( type(grid), intent(in)  level,
real(dp), dimension(:), intent(out), allocatable  y,
real(dp), dimension(:), intent(out), allocatable  x 
)

Generate map coordinates.

Generate map coordinate arrays for given domain and level

Parameters
[in]type(Grid) :: level-> grid reference
[out]real(dp), dimension(:) :: x, y
[out]real(dp), dimension(:) :: x, y
Authors
Matthias Zink
Date
Apr 2013

Definition at line 370 of file mo_grid.f90.

Referenced by mo_nc_output::createoutputfile().

Here is the caller graph for this function:

◆ set_domain_indices()

subroutine, public mo_grid::set_domain_indices ( type(grid), dimension(:), intent(inout)  grids,
integer(i4), dimension(:), intent(in), optional  indices 
)

TODO: add description.

TODO: add description

Parameters
[in,out]type(Grid), dimension(:) :: grids
Authors
Robert Schweppe
Date
Jun 2018

Definition at line 204 of file mo_grid.f90.

Referenced by mo_meteo_handler::init_level2(), mo_startup::mhm_initialize(), mo_mpr_startup::mpr_initialize(), mo_mrm_init::mrm_init(), and mo_common_read_data::read_dem().

Here is the caller graph for this function: