5.13.2-dev0
Version ...
current as pdf
coverage
stable
latest
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_common_types.F90
Go to the documentation of this file.
1
!> \file mo_common_types.F90
2
!> \brief \copybrief mo_common_types
3
!> \details \copydetails mo_common_types
4
5
!> \brief Provides common types needed by mHM, mRM and/or mpr.
6
!> \changelog
7
!! - Stephan Thober Nov 2016
8
!! - moved processdescription from mo_global_variables to here
9
!! - Robert Schweppe Dec 2017
10
!! - merged more duplicated variables from mhm and mrm global variables
11
!! - Robert Schweppe Jun 2018
12
!! - refactoring and reformatting
13
!! - Sebastian Müller Mar 2023
14
!! - moving types to a separate module
15
!> \authors Stephan Thober
16
!> \date Sep 2015
17
!> \authors Sebastian Müller
18
!> \date Mar 2023
19
!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
20
!! mHM is released under the LGPLv3+ license \license_note
21
!> \ingroup f_common
22
module
mo_common_types
23
24
use
mo_kind,
only
: i4, dp
25
#ifdef MPI
26
USE
mpi_f08
27
#endif
28
implicit none
29
30
! -------------------------------------------------------------------
31
! PERIOD description
32
! -------------------------------------------------------------------
33
!> \class period
34
!> \brief period description
35
type
,
public
::
period
36
integer(i4)
:: dstart
!< first day
37
integer(i4)
:: mstart
!< first month
38
integer(i4)
:: ystart
!< first year
39
integer(i4)
:: dend
!< last day
40
integer(i4)
:: mend
!< last month
41
integer(i4)
:: yend
!< last year
42
integer(i4)
:: julstart
!< first julian day
43
integer(i4)
:: julend
!< last julian day
44
integer(i4)
:: nobs
!< total number of observations
45
end type
period
46
47
! -------------------------------------------------------------------
48
! GRID description
49
! -------------------------------------------------------------------
50
!> \class grid
51
!> \brief grid description
52
type
,
public
::
grid
53
! general domain information
54
integer(i4)
:: ncols
!< Number of columns
55
integer(i4)
:: nrows
!< Number of rows
56
integer(i4)
:: ncells
!< Number of cells in mask
57
real
(dp) :: xllcorner
!< x coordinate of the lowerleft corner
58
real
(dp) :: yllcorner
!< y coordinate of the lowerleft corner
59
real
(dp) :: cellsize
!< Cellsize x = cellsize y
60
real
(dp) :: nodata_value
!< Code to define the mask
61
real
(dp),
dimension(:, :)
,
allocatable
:: x
!< 2d longitude array (unmasked version is needed for output anyway)
62
real
(dp),
dimension(:, :)
,
allocatable
:: y
!< 2d latitude array (unmasked version is needed for output anyway)
63
logical
,
dimension(:, :)
,
allocatable
:: mask
!< the mask for valid cells in the original grid (nrows*ncols)
64
! for referencing values in the nValidCells vector
65
integer(i4)
:: istart
!< Starting cell index of a given domain
66
integer(i4)
:: iend
!< Ending cell index of a given domain
67
! dimension(nCells, (x,y) )
68
integer(i4)
,
dimension(:, :)
,
allocatable
:: cellcoor
!< this is only used for mRM
69
real
(dp),
dimension(:)
,
allocatable
:: cellarea
!< area of the cell in sq m
70
integer(i4)
,
dimension(:)
,
allocatable
:: id
!< id
71
72
end type
grid
73
74
!> \class gridremapper
75
!> \brief grid remapper
76
type
,
public
::
gridremapper
77
type
(
grid
),
pointer
:: high_res_grid
!< high resolution grid
78
type
(
grid
),
pointer
:: low_res_grid
!< low resolution grid
79
80
! dimension nCells
81
integer(i4)
,
dimension(:)
,
allocatable
:: lower_bound
!< 1d index of lower side subgrid
82
integer(i4)
,
dimension(:)
,
allocatable
:: upper_bound
!< 1d index of upper side subgrid
83
integer(i4)
,
dimension(:)
,
allocatable
:: left_bound
!< 1d index of left side subgrid
84
integer(i4)
,
dimension(:)
,
allocatable
:: right_bound
!< 1d index of right side subgrid
85
integer(i4)
,
dimension(:)
,
allocatable
:: n_subcells
!< 1d numberof valid subgrid cells
86
integer(i4)
,
dimension(:, :)
,
allocatable
:: lowres_id_on_highres
!< 2d index array of lowres id
87
88
end type
gridremapper
89
90
! -------------------------------------------------------------------
91
! DOMAIN general description
92
! -------------------------------------------------------------------
93
!> \class domain_meta
94
!> \brief DOMAIN general description
95
type
,
public
::
domain_meta
96
integer(i4)
:: ndomains
!< number of domains
97
integer(i4)
:: overallnumberofdomains
!< Number of domains for multi-domain optimization
98
integer(i4)
,
dimension(:)
,
allocatable
:: indices
!< indices
99
integer(i4)
,
dimension(:)
,
allocatable
:: l0datafrom
!< index of associated level-0 domain
100
! optidata saves for each domain which optional data is assigned to it
101
! (0) default: the program decides. If you are confused, choose 0
102
! (1) runoff
103
! (2) sm
104
! (3) tws
105
! (4) neutons
106
! (5) et
107
! (6) et & tws
108
integer(i4)
,
dimension(:)
,
allocatable
:: optidata
!< optidata flag (0-6)
109
logical
,
dimension(:)
,
allocatable
:: dorouting
!< flag to indicate if routing is done
110
#ifdef MPI
111
logical
:: ismasterincomlocal
!< true if the process is master proc in comLocal
112
!> the communicater the domains are using to send messages to each other here are all processes wich have rank 0 in comLocal
113
type
(mpi_comm) :: commaster
114
type
(mpi_comm) :: comlocal
!< the communicater the domain internal communication takes place
115
#endif
116
end type
domain_meta
117
118
end module
mo_common_types
mo_common_types
Provides common types needed by mHM, mRM and/or mpr.
Definition
mo_common_types.F90:22
mo_common_types::domain_meta
DOMAIN general description.
Definition
mo_common_types.F90:95
mo_common_types::grid
grid description
Definition
mo_common_types.F90:52
mo_common_types::gridremapper
grid remapper
Definition
mo_common_types.F90:76
mo_common_types::period
period description
Definition
mo_common_types.F90:35
src
common
mo_common_types.F90
Generated on Tue Apr 30 2024 08:51:35 for mHM by
1.9.7