MONC
grids.F90
Go to the documentation of this file.
1 
5 module grids_mod
7  implicit none
8 
9 #ifndef TEST_MODE
10  private
11 #endif
12 
14  integer, parameter, public :: z_index = 1, y_index = 2, x_index = 3
16  integer, parameter, public :: primal_grid=1, dual_grid=2
17 
20  real(kind=default_precision) dx, dy
21  real(kind=default_precision) cx, cy
22  real(kind=default_precision) cx2, cy2
23  real(kind=default_precision) cxy
24  real(kind=default_precision) tcx, tcy
26 
29  real(kind=default_precision), dimension(:), allocatable :: &
30  z,&
31  zn,&
32  dz,&
33  dzn,&
34  rdz,&
35  rdzn,&
36  rho,&
37  rhon,&
38  thref,&
39  dthref,&
40  tref,&
41  theta_init,&
42  temp_init,&
43  rh_init, &
44  u_init,&
45  v_init,&
46  prefn,&
47  pdiff,&
48  prefrcp,&
49  rprefrcp,&
50  czb,&
51  cza,&
52  czg,&
53  czh,&
54  tzc1,&
55  tzc2,&
56  tzd1,&
57  tzd2,&
58  w_subs,&
59  olubar,&
60  savolubar,&
61  olvbar,&
62  savolvbar,&
63  olthbar,&
64  olzubar,&
65  olzvbar,&
66  olzthbar,&
67  dmpco,&
68  dmpcoz,&
69  tstarpr,& ! Temperature about which Taylor Expansion
70  qsat,&
71  dqsatdt,&
72  qsatfac,&
73  rneutml,&
74  rneutml_sq,&
75  buoy_co, &
76  theta_rand, &
77  theta_force, &
78  u_force, &
79  v_force, &
80  w_up, &
81  w_dwn, &
82  w_rand
83 
84 
85 
86  real(kind=default_precision), dimension(:,:), allocatable :: q_init
87  real(kind=default_precision), dimension(:,:), allocatable :: q_rand
88  real(kind=default_precision), dimension(:,:), allocatable :: q_force
89 
90  real(kind=default_precision), dimension(:,:), allocatable :: olqbar,olzqbar
91  ! time varying forcing terms
92  real(kind=default_precision), dimension(:,:), allocatable :: wsubs_time_vary
93 
94  real(kind=default_precision), dimension(:), allocatable :: hgd
95  real(kind=default_precision) :: czn, zlogm, zlogth, vk_on_zlogm
96  integer, dimension(:), allocatable :: kgd
97  integer :: kdmpmin
99 
101  type, public :: grid_configuration_type
104  end type grid_configuration_type
105 
107  type, public :: global_grid_type
108  type(grid_configuration_type) :: configuration
109  real(kind=default_precision), dimension(3) :: bottom,&
110  top,&
111  resolution
112  integer, dimension(3) :: size
113  logical, dimension(3) :: active = (/ .false., .false., .false. /)
114  integer :: dimensions = 0
115  end type global_grid_type
116 
118  type, public :: local_grid_type
119  integer, dimension(3) :: start,& !< Global start coordinates of local grid
120  end,& !< Global end coordinates of local grid
121  size,& !< Grid points held locally
122  halo_size,& !< Grid point size of the halo (halo_depth)
123  local_domain_start_index,& !< The start index of computation data (local data is halo->data->halo so this precomputes the data start)
124  local_domain_end_index
125  logical, dimension(3) :: active = (/ .false., .false., .false. /)
126  integer, dimension(:,:), allocatable :: neighbours , corner_neighbours
127  integer :: dimensions = 0
128  end type local_grid_type
129 end module grids_mod
grids_mod::dual_grid
integer, parameter, public dual_grid
Definition: grids.F90:16
grids_mod::x_index
integer, parameter, public x_index
Definition: grids.F90:14
grids_mod::y_index
integer, parameter, public y_index
Definition: grids.F90:14
grids_mod::global_grid_type
Defines the global grid.
Definition: grids.F90:107
grids_mod::grid_configuration_type
Wraps the dimensional configuration types.
Definition: grids.F90:101
grids_mod::horizontal_grid_configuration_type
The configuration of the grid horizontally.
Definition: grids.F90:19
grids_mod::z_index
integer, parameter, public z_index
Grid index parameters.
Definition: grids.F90:14
grids_mod::primal_grid
integer, parameter, public primal_grid
Grid type parameters (usually applied to each dimension of a prognostic)
Definition: grids.F90:16
grids_mod::local_grid_type
Defined the local grid, i.e. the grid held on this process after decomposition.
Definition: grids.F90:118
grids_mod::vertical_grid_configuration_type
The configuration of the grid vertically.
Definition: grids.F90:28
datadefn_mod
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
grids_mod
Functionality to support the different types of grid and abstraction between global grids and local o...
Definition: grids.F90:5
datadefn_mod::default_precision
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17