MONC
state.F90
Go to the documentation of this file.
1 
2 module state_mod
3  use collections_mod, only : hashmap_type
8  implicit none
9 
10 #ifndef TEST_MODE
11  private
12 #endif
13 
19 
21  type, public :: parallel_state_type
22  integer :: processes, & !> Total number of processes
23  my_rank,& !> My process rank in the system
24  neighbour_comm,& !> Neighbour communicator
25  monc_communicator=-1, io_communicator=-1, corresponding_io_server_process
26  integer, dimension(3) :: &
27  my_coords,& !> My process coordinates in each dimension
28  dim_sizes
29  logical, dimension(3,2) :: wrapped_around
30  procedure(), nopass, pointer :: decomposition_procedure => null()
31  end type parallel_state_type
32 
39  type, public :: model_state_type
40  logical :: continue_timestep=.true., initialised=.false., continuation_run=.false.
41  logical :: use_viscosity_and_diffusion=.true., &
42  use_surface_boundary_conditions=.true., backscatter=.true.
43 
44  type(hashmap_type) :: options_database
45  type(global_grid_type) :: global_grid
46  type(local_grid_type) :: local_grid
47  type(parallel_state_type) :: parallel
48  type(prognostic_field_type) :: u, w, v, th, p, zu, zw, zv, zth, su, sw, sv, sth, savu, savv, savw, vis_coefficient, &
49  diff_coefficient, dis, dis_th
50  type(prognostic_field_type), dimension(:), allocatable :: q, zq, sq, disq
51  type(halo_communication_type) :: viscosity_halo_swap_state, diffusion_halo_swap_state
52  real(kind=DEFAULT_PRECISION) :: time=.0_default_precision,& ! Model time in seconds
53  dtm,& ! Modeltimestep (s)
54  absolute_new_dtm, &
55  thref0,&
56  rhobous,&
57  tsmth=1e-2_default_precision,&
58  timestep_runtime,&
59  local_divmax, global_divmax, cvis=0.0_default_precision, surface_temperature_flux, &
60  surface_vapour_flux, theta_surf, surface_vapour_mixing_ratio, fbuoy, &
61  fbuoynew, theta_virtual_surf, cmbc, rcmbc, ellmocon, velmax, velmin, aloginv, cneut, cfc, &
62  surface_pressure=100000.0_default_precision, surface_reference_pressure = 100000.0_default_precision, &
63  cvel, cvel_x, cvel_y, cvel_z, dtm_new, rmlmax, geostrophic_wind_rate_of_change_in_x, &
64  geostrophic_wind_rate_of_change_in_y, surface_geostrophic_wind_x, surface_geostrophic_wind_y, &
65  local_zumin, local_zumax, local_zvmin, local_zvmax, local_cvel_z
66  real(kind=DEFAULT_PRECISION), dimension(:), allocatable :: lookup_table_velocity, &
67  lookup_table_ustr, cq, abswmax
68  real(kind=DEFAULT_PRECISION), dimension(:,:), allocatable :: psrce_recv_buffer_x, psrce_recv_buffer_y
69  integer :: timestep=1, column_global_x, column_global_y, column_local_x, column_local_y, field_stepping, scalar_stepping, &
70  momentum_stepping, number_q_fields=0, start_timestep=1, type_of_surface_boundary_conditions, lookup_table_entries, &
71  cfl_frequency, termination_reason
72  integer :: water_vapour_mixing_ratio_index=0, liquid_water_mixing_ratio_index=0, &
73  psrce_x_hs_send_request, psrce_y_hs_send_request, psrce_x_hs_recv_request, psrce_y_hs_recv_request
74  logical :: first_timestep_column, last_timestep_column, halo_column, first_nonhalo_timestep_column, &
75  passive_q=.false., passive_th=.false., &
76  use_time_varying_surface_values, use_anelastic_equations, & ! use_anelastic_equations or use Boussinesq
77  saturated_surface, update_dtm=.false., calculate_th_and_q_init, origional_vertical_grid_setup=.true., &
78  io_server_enabled
79  logical, allocatable :: l_forceq(:)
80  double precision :: model_start_wtime
81 
82  logical :: galilean_transformation=.true., fix_ugal=.false., fix_vgal=.false.
83  real(kind=DEFAULT_PRECISION) :: ugal=0.,vgal=0.
84  end type model_state_type
85 end module state_mod
integer, parameter, public message_termination_reason
Definition: state.F90:17
integer, parameter, public forward_stepping
Definition: state.F90:15
Contains the types used for communication, holding the state of communications and supporting activit...
Contains prognostic field definitions and functions.
Definition: prognostics.F90:2
A prognostic field which is assumed to be 3D.
Definition: prognostics.F90:13
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17
Information about the parallel aspects of the system.
Definition: state.F90:21
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
The ModelState which represents the current state of a run.
Definition: state.F90:39
integer, parameter, public centred_stepping
Stepping parameter values which determine centred or forward stepping.
Definition: state.F90:15
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
Definition: collections.F90:94
integer, parameter, public prescribed_surface_fluxes
Definition: state.F90:15
integer, parameter, public timestep_termination_reason
Definition: state.F90:17
Maintains the state of a halo swap and contains buffers, neighbours etc.
Defines the global grid.
Definition: grids.F90:100
Defined the local grid, i.e. the grid held on this process after decomposition.
Definition: grids.F90:111
Collection data structures.
Definition: collections.F90:7
integer, parameter, public time_termination_reason
The constants defining the reason why the model has terminated.
Definition: state.F90:17
integer, parameter, public prescribed_surface_values
Definition: state.F90:15
Functionality to support the different types of grid and abstraction between global grids and local o...
Definition: grids.F90:5
integer, parameter, public walltime_termination_reason
Definition: state.F90:17
The model state which represents the current state of a run.
Definition: state.F90:2