FMS  2024.03
Flexible Modeling System
fms_diag_time_reduction_mod

fms_diag_time_reduction_mod defines classes encapsulating the diag_manager time redution types. More...

Data Types

interface  fmsdiagtimereduction_type
 

Functions/Subroutines

procedure, public copy
 
subroutine copy (this, source)
 Copy the source time reduction object into the this object. More...
 
procedure, public do_time_averaging => do_time_averaging_imp
 
pure logical function do_time_averaging_imp (this)
 Returns true iff time_averaging is true. More...
 
class(fmsdiagtimereduction_type) function, allocatable fmsdiagtimereduction_type_constructor (dt, out_frequency)
 The class contructors. Just allocates the class and calls an initializer. More...
 
procedure, public has_time_ops => has_time_ops_imp
 
pure logical function has_time_ops_imp (this)
 Returns true if any of time_min, time_max, time_rms or time_average is true. More...
 
procedure, public initialize
 
subroutine initialize (this, dt, out_frequency)
 Initialize the object. As an alternative to the constructor, one can allocate an fmsDiagTimeReduction_type instance, then call its initialize function. More...
 
procedure, public is_time_average => is_time_average_imp
 
pure logical function is_time_average_imp (this)
 Returns true iff the_time_reduction is time_average. More...
 
procedure, public is_time_diurnal => is_time_diurnal_imp
 
pure logical function is_time_diurnal_imp (this)
 Returns true iff the_time_reduction is time_diurnal. More...
 
procedure, public is_time_max => is_time_max_imp
 
pure logical function is_time_max_imp (this)
 Returns true iff the_time_reduction is time_max. More...
 
procedure, public is_time_min => is_time_min_imp
 
pure logical function is_time_min_imp (this)
 Returns true iff the_time_reduction is time_min. More...
 
procedure, public is_time_none => is_time_none_imp
 
pure logical function is_time_none_imp (this)
 Returns true iff the_time_reduction is time_none. More...
 
procedure, public is_time_power => is_time_power_imp
 
pure logical function is_time_power_imp (this)
 Returns true iff the_time_reduction is time_power. More...
 
procedure, public is_time_rms => is_time_rms_imp
 
pure logical function is_time_rms_imp (this)
 Returns true iff the_time_reduction is time_rms. More...
 
procedure, public is_time_sum => is_time_sum_imp
 
pure logical function is_time_sum_imp (this)
 Returns true iff the_time_reduction is time_sum. More...
 

Variables

integer, private the_time_reduction
 The time reduction type, as an integer defined above.
 
integer, parameter time_average = 1
 The reduction method is average.
 
logical, private time_averaging
 Set true iff time_average, time_rms, time_power or time_diurnal is true.
 
integer, parameter time_diurnal = 6
 The reduction method is diurnal.
 
integer, parameter time_max = 3
 The reduction method is max.
 
integer, parameter time_min = 4
 The reduction method is min.
 
logical, private time_ops
 Set true iff time_min, time_max, time_rms or time_average is true.
 
integer, parameter time_power = 7
 The reduction method is power.
 
integer, parameter time_rms = 2
 The reduction method is rms.
 
integer, parameter time_sum = 5
 The reudction method is sum.
 

Detailed Description

fms_diag_time_reduction_mod defines classes encapsulating the diag_manager time redution types.

This interface is for the class constructor.

Class fmsDiagTimeReduction_type has an encapsulation of the "Fortran enum" time reduction integer parameters, plus an encapsulation of the groupings of the time reduction types. It is intended to provide some of the functionality that was coded in the legacy function diag_data.F90:init_output_fields. The functionality in the end is used by send_data in (EFFICIENT) do loops calling the weighting or math functions to update buffers. The integer parameters above are the legal time reduction types, but they are not necessarily mutually exclusive in some contexts.

Author
Miguel Zuniga

Data Type Documentation

◆ fms_diag_time_reduction_mod::fmsdiagtimereduction_type

interface fms_diag_time_reduction_mod::fmsdiagtimereduction_type

Definition at line 63 of file fms_diag_time_reduction.F90.

Collaboration diagram for fmsdiagtimereduction_type:
[legend]

Public Member Functions

procedure, public copy
 
procedure, public do_time_averaging => do_time_averaging_imp
 
procedure, public has_time_ops => has_time_ops_imp
 
procedure, public initialize
 
procedure, public is_time_average => is_time_average_imp
 
procedure, public is_time_diurnal => is_time_diurnal_imp
 
procedure, public is_time_max => is_time_max_imp
 
procedure, public is_time_min => is_time_min_imp
 
procedure, public is_time_none => is_time_none_imp
 
procedure, public is_time_power => is_time_power_imp
 
procedure, public is_time_rms => is_time_rms_imp
 
procedure, public is_time_sum => is_time_sum_imp
 

Private Attributes

integer, private the_time_reduction
 The time reduction type, as an integer defined above.
 
logical, private time_averaging
 Set true iff time_average, time_rms, time_power or time_diurnal is true.
 
logical, private time_ops
 Set true iff time_min, time_max, time_rms or time_average is true.
 

Function/Subroutine Documentation

◆ copy()

subroutine fms_diag_time_reduction_mod::copy ( class (fmsdiagtimereduction_type), intent(inout)  this,
class (fmsdiagtimereduction_type), intent(in)  source 
)

Copy the source time reduction object into the this object.

Parameters
[in,out]thisThe fmsDiagTimeReduction_type object
[in]sourceThe fmsDiagTimeReduction_type object

Definition at line 137 of file fms_diag_time_reduction.F90.

◆ do_time_averaging_imp()

pure logical function fms_diag_time_reduction_mod::do_time_averaging_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff time_averaging is true.

Returns
true iff time_averaging is true.
Parameters
[in]thisThe object this function is bound to.

Definition at line 155 of file fms_diag_time_reduction.F90.

◆ fmsdiagtimereduction_type_constructor()

class (fmsdiagtimereduction_type) function, allocatable fms_diag_time_reduction_mod::fmsdiagtimereduction_type_constructor ( integer, intent(in)  dt,
integer, intent(in)  out_frequency 
)

The class contructors. Just allocates the class and calls an initializer.

Returns
An allocated instance of fmsDiagTimeReduction_type, which is nitialized using provided values for arguments dt and out_freqeuncy.
Parameters
[in]dtThe redution type (time_rms, time_power, etc)
[in]out_frequencyThe output frequency.
Returns
The instance of the fmsDiagTimeReduction_type class allocated and returned by this constructor.

Definition at line 93 of file fms_diag_time_reduction.F90.

◆ has_time_ops_imp()

pure logical function fms_diag_time_reduction_mod::has_time_ops_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true if any of time_min, time_max, time_rms or time_average is true.

Returns
true if any of time_min, time_max, time_rms or time_average is true.
Parameters
[in]thisThe object this function is bound to.

Definition at line 147 of file fms_diag_time_reduction.F90.

◆ initialize()

subroutine fms_diag_time_reduction_mod::initialize ( class (fmsdiagtimereduction_type), intent(inout)  this,
integer, intent(in)  dt,
integer, intent(in)  out_frequency 
)

Initialize the object. As an alternative to the constructor, one can allocate an fmsDiagTimeReduction_type instance, then call its initialize function.

Parameters
[in,out]thisThe fmsDiagTimeReduction_type object
[in]dtThe redution type (time_rms, time_porer, etc)
[in]out_frequencyThe output frequency.

Definition at line 104 of file fms_diag_time_reduction.F90.

◆ is_time_average_imp()

pure logical function fms_diag_time_reduction_mod::is_time_average_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_average.

Returns
true iff the_time_reduction is time_average
Parameters
[in]thisThe object this function is bound to.

Definition at line 163 of file fms_diag_time_reduction.F90.

◆ is_time_diurnal_imp()

pure logical function fms_diag_time_reduction_mod::is_time_diurnal_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_diurnal.

Returns
true iff the_time_reduction is time_diurnal
Parameters
[in]thisThe object this function is bound to.

Definition at line 211 of file fms_diag_time_reduction.F90.

◆ is_time_max_imp()

pure logical function fms_diag_time_reduction_mod::is_time_max_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_max.

Returns
true iff the_time_reduction is time_max
Parameters
[in]thisThe object this function is bound to.

Definition at line 187 of file fms_diag_time_reduction.F90.

◆ is_time_min_imp()

pure logical function fms_diag_time_reduction_mod::is_time_min_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_min.

Returns
true iff the_time_reduction is time_min
Parameters
[in]thisThe object this function is bound to.

Definition at line 195 of file fms_diag_time_reduction.F90.

◆ is_time_none_imp()

pure logical function fms_diag_time_reduction_mod::is_time_none_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_none.

Returns
true iff the_time_reduction is time_none
Parameters
[in]thisThe object this function is bound to.

Definition at line 171 of file fms_diag_time_reduction.F90.

◆ is_time_power_imp()

pure logical function fms_diag_time_reduction_mod::is_time_power_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_power.

Returns
true iff the_time_reduction is time_power
Parameters
[in]thisThe object this function is bound to.

Definition at line 219 of file fms_diag_time_reduction.F90.

◆ is_time_rms_imp()

pure logical function fms_diag_time_reduction_mod::is_time_rms_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_rms.

Returns
true iff the_time_reduction is time_rms
Parameters
[in]thisThe object this function is bound to.

Definition at line 179 of file fms_diag_time_reduction.F90.

◆ is_time_sum_imp()

pure logical function fms_diag_time_reduction_mod::is_time_sum_imp ( class (fmsdiagtimereduction_type), intent(in)  this)

Returns true iff the_time_reduction is time_sum.

Returns
true iff the_time_reduction is time_sum
Parameters
[in]thisThe object this function is bound to.

Definition at line 203 of file fms_diag_time_reduction.F90.