MONC
monc_component.F90
Go to the documentation of this file.
1 
7  use state_mod, only : model_state_type
9  implicit none
10 
11 #ifndef TEST_MODE
12  private
13 #endif
14 
17 
20 
23  real(kind=default_precision), dimension(:,:,:,:), allocatable :: real_4d_array
24  real(kind=default_precision), dimension(:,:,:), allocatable :: real_3d_array
25  real(kind=default_precision), dimension(:,:), allocatable :: real_2d_array
26  real(kind=default_precision), dimension(:), allocatable :: real_1d_array
27  real(kind=default_precision) :: scalar_real
28  integer :: scalar_int
30 
32  integer :: field_type, data_type, number_dimensions, dimension_sizes(4)
33  logical :: enabled
35 
42  type, public :: component_descriptor_type
43  procedure(component_initialisation), nopass, pointer :: initialisation => null()
44  procedure(component_timestep), nopass, pointer :: timestep => null()
45  procedure(component_finalisation), nopass, pointer :: finalisation => null()
46  procedure(component_get_field_value), nopass, pointer :: field_value_retrieval => null()
47  procedure(component_get_field_information), nopass, pointer :: field_information_retrieval => null()
48  character(len=STRING_LENGTH), dimension(:), pointer :: published_fields => null()
49  character(len=STRING_LENGTH) :: name
50  real(kind=default_precision) :: version
52 
56  abstract interface
60  end function component_get_description
63  subroutine component_initialisation(current_state)
64  import :: model_state_type
65  type(model_state_type), target, intent(inout) :: current_state
66  end subroutine component_initialisation
67 
70  subroutine component_timestep(current_state)
71  import :: model_state_type
72  type(model_state_type), target, intent(inout) :: current_state
73  end subroutine component_timestep
74 
77  subroutine component_finalisation(current_state)
78  import :: model_state_type
79  type(model_state_type), target, intent(inout) :: current_state
80  end subroutine component_finalisation
81 
82  subroutine component_get_field_information(current_state, name, field_sizing)
84  type(model_state_type), target, intent(inout) :: current_state
85  character(len=*), intent(in) :: name
86  type(component_field_information_type), intent(out) :: field_sizing
87  end subroutine component_get_field_information
88 
92  subroutine component_get_field_value(current_state, name, field_value)
94  type(model_state_type), target, intent(inout) :: current_state
95  character(len=*), intent(in) :: name
96  type(component_field_value_type), intent(out) :: field_value
97  end subroutine component_get_field_value
98  end interface
99 
102 end module monc_component_mod
monc_component_mod::init_priority_index
integer, parameter, public init_priority_index
Index of each priority value in the descriptor.
Definition: monc_component.F90:19
monc_component_mod::timestep_priority_index
integer, parameter, public timestep_priority_index
Definition: monc_component.F90:19
monc_component_mod::component_get_description
Interface defining the signature of each callback hook that a component may specify.
Definition: monc_component.F90:57
monc_component_mod
Interfaces and types that MONC components must specify.
Definition: monc_component.F90:6
monc_component_mod::component_field_value_type
Wrapper type for the value returned for a published field from a component.
Definition: monc_component.F90:22
state_mod::model_state_type
The ModelState which represents the current state of a run.
Definition: state.F90:39
monc_component_mod::component_field_information_type
Definition: monc_component.F90:31
monc_component_mod::component_get_field_information
Definition: monc_component.F90:82
monc_component_mod::component_scalar_field_type
integer, parameter, public component_scalar_field_type
Definition: monc_component.F90:15
monc_component_mod::component_initialisation
Component initialisation callback hook signature.
Definition: monc_component.F90:63
monc_component_mod::component_timestep
Component timestep callback hook signature.
Definition: monc_component.F90:70
datadefn_mod
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
monc_component_mod::component_finalisation
Component finalisation callback hook signature.
Definition: monc_component.F90:77
datadefn_mod::string_length
integer, parameter, public string_length
Default length of strings.
Definition: datadefn.F90:10
monc_component_mod::component_get_field_value
Retrieves a specific published field value from a component.
Definition: monc_component.F90:92
monc_component_mod::component_integer_data_type
integer, parameter, public component_integer_data_type
Definition: monc_component.F90:16
monc_component_mod::finalisation_priority_index
integer, parameter, public finalisation_priority_index
Definition: monc_component.F90:19
monc_component_mod::component_descriptor_type
Description of a component.
Definition: monc_component.F90:42
monc_component_mod::component_double_data_type
integer, parameter, public component_double_data_type
Definition: monc_component.F90:16
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
state_mod
The model state which represents the current state of a run.
Definition: state.F90:2
monc_component_mod::component_array_field_type
integer, parameter, public component_array_field_type
Definition: monc_component.F90:15