MONC
prognostics.F90
Go to the documentation of this file.
1 
3  use grids_mod, only : primal_grid
5  use mpi, only : mpi_request_null
6  implicit none
7 
8 #ifndef TEST_MODE
9  private
10 #endif
11 
13  type, public :: prognostic_field_type
14  logical :: active = .false., halo_allocated=.false.
15  integer, dimension(3) :: grid
16  real(kind=default_precision), dimension(:,:,:), allocatable :: data
17  real(kind=default_precision), dimension(:), allocatable :: flux_previous_y, flux_y_buffer
18  real(kind=default_precision), dimension(:,:), allocatable :: flux_previous_x
19  integer :: async_flux_handle = mpi_request_null
20  end type prognostic_field_type
21 
24  type, public :: prognostic_field_ptr_type
25  type(prognostic_field_type), pointer :: ptr
27 
29 contains
30 
34  type(prognostic_field_type), intent(inout) :: field
35  logical, dimension(3) :: get_field_interpolation_index
36 
37  integer :: i
38  do i=1,3
39  get_field_interpolation_index(i) = merge(.true., .false., field%grid(i) == primal_grid)
40  end do
42 end module prognostics_mod
prognostics_mod
Contains prognostic field definitions and functions.
Definition: prognostics.F90:2
grids_mod::primal_grid
integer, parameter, public primal_grid
Grid type parameters (usually applied to each dimension of a prognostic)
Definition: grids.F90:16
prognostics_mod::prognostic_field_ptr_type
A pointer to the prognostic field. This is so we can wrap prognostics up in an array and still refer ...
Definition: prognostics.F90:24
prognostics_mod::get_field_interpolation_index
logical function, dimension(3), public get_field_interpolation_index(field)
Retrieves the index(s) that require interpolation to go from the primal the dual grid.
Definition: prognostics.F90:34
prognostics_mod::prognostic_field_type
A prognostic field which is assumed to be 3D.
Definition: prognostics.F90:13
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