24 type(
map_type),
intent(inout) :: action_attributes
26 subroutine perform_activity(io_configuration, field_values, action_attributes, source_monc_location, &
27 source_monc, operator_result_values)
31 type(
map_type),
intent(inout) :: action_attributes
32 integer,
intent(in) :: source_monc_location, source_monc
33 real(kind=DEFAULT_PRECISION),
dimension(:),
allocatable,
intent(inout) :: operator_result_values
43 call initialise_arithmetic_operator()
48 call finalise_arithmetic_operator()
55 character(len=*),
intent(in) :: operator_name
58 if (trim(operator_name) .eq.
"arithmetic")
then 59 get_operator_perform_procedure=>perform_arithmetic_operator
60 else if (trim(operator_name) .eq.
"localreduce")
then 61 get_operator_perform_procedure=>perform_localreduce_operator
62 else if (trim(operator_name) .eq.
"reductionlocation")
then 63 get_operator_perform_procedure=>perform_reductionlocation_operator
64 else if (trim(operator_name) .eq.
"field_slicer")
then 65 get_operator_perform_procedure=>perform_fieldslicer_operator
66 else if (trim(operator_name) .eq.
"field_coarsener")
then 67 get_operator_perform_procedure=>perform_fieldcoarsener_operator
69 call log_log(log_error,
"Operator '"//trim(operator_name)//
"' not found so ignoring")
76 type(list_type) function get_operator_required_fields(operator_name, action_attributes)
77 character(len=*),
intent(in) :: operator_name
78 type(map_type),
intent(inout) :: action_attributes
80 if (trim(operator_name) .eq.
"arithmetic")
then 82 else if (trim(operator_name) .eq.
"localreduce")
then 84 else if (trim(operator_name) .eq.
"reductionlocation")
then 86 else if (trim(operator_name) .eq.
"field_slicer")
then 88 else if (trim(operator_name) .eq.
"field_coarsener")
then 91 call log_log(log_error,
"Operator '"//trim(operator_name)//
"' not found so ignoring")
95 integer function get_operator_auto_size(io_configuration, operator_name, auto_dimension, action_attributes)
96 type(io_configuration_type),
intent(inout) :: io_configuration
97 character(len=*),
intent(in) :: operator_name, auto_dimension
98 type(map_type),
intent(inout) :: action_attributes
100 if (trim(operator_name) .eq.
"field_coarsener")
then 101 get_operator_auto_size=fieldcoarsener_operator_get_auto_size(io_configuration, auto_dimension, action_attributes)
Slices a field based upon the selected dimension and index.
subroutine, public perform_arithmetic_operator(io_configuration, field_values, action_attributes, source_monc_location, source_monc, operator_result_values)
Executes this arithmetic operator by attempting to retrieved the cached equation (and creates one if ...
Overall IO configuration.
integer, parameter, public log_error
Only log ERROR messages.
subroutine, public perform_fieldslicer_operator(io_configuration, field_values, action_attributes, source_monc_location, source_monc, operator_result_values)
Performs the actual field slicing.
type(list_type) function, public get_operator_required_fields(operator_name, action_attributes)
Retrieves the list of fields required by an operator before it can run.
The arithmetic operator which allows the user to define arithmetic formulas based on fields and const...
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Contains common definitions for the data and datatypes used by MONC.
subroutine, public initialise_arithmetic_operator()
Initialises this operator.
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
Performs a local reduction, reducing a local array into a single scalar value.
Operator federator which manages the different operators which are available. Operators take in any n...
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...
type(list_type) function, public localreduce_operator_get_required_fields(action_attributes)
Retrieves the list of fields needed by this operator for a specific configuration.
Map data structure that holds string (length 20 maximum) key value pairs.
subroutine, public finalise_arithmetic_operator()
Finalises this opertor.
subroutine, public finalise_operators()
Finalises any operators that require finalisation.
Collection data structures.
procedure(perform_activity) function, pointer, public get_operator_perform_procedure(operator_name)
Retrieves the operator execution procedure of an operator with a specific name.
type(list_type) function, public fieldslicer_operator_get_required_fields(action_attributes)
Retrieves a list of the required fields for running this operator.
type(list_type) function, public fieldcoarsener_operator_get_required_fields(action_attributes)
Retrieves a list of the required fields for running this operator.
type(list_type) function, public arithmetic_operator_get_required_fields(action_attributes)
Retrieves the list of fields needed by this operator for a specific configuration.
subroutine, public perform_localreduce_operator(io_configuration, field_values, action_attributes, source_monc_location, source_monc, operator_result_values)
Executes this local reduction operator.
List data structure which implements a doubly linked list. This list will preserve its order...
subroutine, public perform_fieldcoarsener_operator(io_configuration, field_values, action_attributes, source_monc_location, source_monc, operator_result_values)
Performs the field coarsener operator on a specific field.
integer function, public fieldcoarsener_operator_get_auto_size(io_configuration, auto_dimension, action_attributes)
Retrieves the size of an auto dimension based upon the work that will be completed here...
subroutine, public perform_reductionlocation_operator(io_configuration, field_values, action_attributes, source_monc_location, source_monc, operator_result_values)
Coarsens a field by selecting data with a specific period in any number of dimensions.
type(list_type) function, public reductionlocation_operator_get_required_fields(action_attributes)
integer function, public get_operator_auto_size(io_configuration, operator_name, auto_dimension, action_attributes)
Parses the XML configuration file to produce the io configuration description which contains the data...
subroutine, public initialise_operators()
Initialises any operators that require initialisation.