FMS  2024.03
Flexible Modeling System
fms_diag_input_buffer_mod

Data Types

type  fmsdiaginputbuffer_t
 Type to hold the information needed for the input buffer This is used when set_math_needs_to_be_done = .true. (i.e calling send_data from an openmp region with multiple threads) More...
 
interface  sum_data_buffer
 Sums the data in the input_data_buffer. More...
 

Functions/Subroutines

procedure allocate_input_buffer_object
 
character(len=128) function allocate_input_buffer_object (this, input_data, axis_ids, diag_axis)
 Initiliazes an input data buffer. More...
 
 append_data_buffer_r4
 
 append_data_buffer_r8
 
character(len=128) function append_data_buffer_wrapper (mask_out, mask_in, data_out, data_in)
 Appends the input_data_buffer and the mask (only when the mask is set to .True.) More...
 
procedure get_buffer
 
class(*) function, dimension(:,:,:,:), pointer get_buffer (this)
 Get the buffer from the input buffer object. More...
 
procedure get_send_data_time
 
type(time_type) function get_send_data_time (this)
 Get the time send data was called last. More...
 
procedure get_weight
 
real(kind=r8_kind) function, pointer get_weight (this)
 Get the weight from the input buffer object. More...
 
procedure init_input_buffer_object
 
subroutine init_input_buffer_object (this)
 Initiliazes an input data buffer and the counter. More...
 
procedure is_initialized
 
pure logical function is_initialized (this)
 Determine if an input buffer is initialized. More...
 
procedure prepare_input_buffer_object
 
subroutine prepare_input_buffer_object (this, field_info)
 Prepare the input data buffer to do the reduction methods (i.e divide by the number of times send data has been called) More...
 
procedure set_input_buffer_object
 
character(len=128) function set_input_buffer_object (this, input_data, weight, is, js, ks, ie, je, ke)
 Sets the members of the input buffer object. More...
 
procedure set_send_data_time
 
subroutine set_send_data_time (this, time)
 Sets the time send data was called last. More...
 
 sum_data_buffer_r4
 
 sum_data_buffer_r8
 
character(len=128) function sum_data_buffer_wrapper (mask, data_out, data_in, counter, var_is_masked)
 Sums the data in the input_data_buffer. More...
 
procedure update_input_buffer_object
 
character(len=128) function update_input_buffer_object (this, input_data, is, js, ks, ie, je, ke, mask_in, mask_out, mask_variant, var_is_masked)
 Updates the input data buffer object for the current send_data call. More...
 

Variables

class(*), dimension(:,:,:,:), allocatable buffer
 Input data passed in send_data.
 
integer, dimension(:,:,:,:), allocatable counter
 Number of send_data calls for each point.
 
logical initialized
 .True. if the input buffer has been initialized
 
type(time_typesend_data_time
 The time send data was called last.
 
real(kind=r8_kind) weight
 Weight passed in send_data.
 

Detailed Description


Data Type Documentation

◆ fms_diag_input_buffer_mod::fmsdiaginputbuffer_t

type fms_diag_input_buffer_mod::fmsdiaginputbuffer_t

Type to hold the information needed for the input buffer This is used when set_math_needs_to_be_done = .true. (i.e calling send_data from an openmp region with multiple threads)

Definition at line 46 of file fms_diag_input_buffer.F90.

Collaboration diagram for fmsdiaginputbuffer_t:
[legend]

Private Member Functions

procedure allocate_input_buffer_object
 
procedure get_buffer
 
procedure get_send_data_time
 
procedure get_weight
 
procedure init_input_buffer_object
 
procedure is_initialized
 
procedure prepare_input_buffer_object
 
procedure set_input_buffer_object
 
procedure set_send_data_time
 
procedure update_input_buffer_object
 

Private Attributes

class(*), dimension(:,:,:,:), allocatable buffer
 Input data passed in send_data.
 
integer, dimension(:,:,:,:), allocatable counter
 Number of send_data calls for each point.
 
logical initialized
 .True. if the input buffer has been initialized
 
type(time_typesend_data_time
 The time send data was called last.
 
real(kind=r8_kind) weight
 Weight passed in send_data.
 

◆ fms_diag_input_buffer_mod::sum_data_buffer

interface fms_diag_input_buffer_mod::sum_data_buffer

Sums the data in the input_data_buffer.

Definition at line 39 of file fms_diag_input_buffer.F90.

Private Member Functions

 sum_data_buffer_r4
 
 sum_data_buffer_r8
 

Function/Subroutine Documentation

◆ allocate_input_buffer_object()

character(len=128) function fms_diag_input_buffer_mod::allocate_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(out)  this,
class(*), dimension(:,:,:,:), intent(in)  input_data,
integer, dimension(:), intent(in), target  axis_ids,
class(fmsdiagaxiscontainer_type), dimension(:), intent(in)  diag_axis 
)
private

Initiliazes an input data buffer.

Returns
Error message if something went wrong
Parameters
[out]thisinput buffer object
[in]input_datainput data
[in]axis_idsaxis ids for the field
[in]diag_axisArray of diag_axis

Initialize the axis lengths to 1. Any dimension that does not have an axis will have a length of 1.

Definition at line 93 of file fms_diag_input_buffer.F90.

◆ append_data_buffer_wrapper()

character(len=128) function fms_diag_input_buffer_mod::append_data_buffer_wrapper ( logical, dimension(:,:,:,:), intent(inout)  mask_out,
logical, dimension(:,:,:,:), intent(in)  mask_in,
class(*), dimension(:,:,:,:), intent(inout)  data_out,
class(*), dimension(:,:,:,:), intent(in)  data_in 
)
private

Appends the input_data_buffer and the mask (only when the mask is set to .True.)

Returns
Error message (if an error occurs)
Parameters
[in,out]mask_outMask currently in the input_data_buffer
[in]mask_inMask passed in to send_data
[in,out]data_outData currently in the input_data_buffer
[in]data_inData passed in to send_data

Definition at line 255 of file fms_diag_input_buffer.F90.

◆ get_buffer()

class(*) function, dimension(:,:,:,:), pointer fms_diag_input_buffer_mod::get_buffer ( class(fmsdiaginputbuffer_t), intent(in), target  this)
private

Get the buffer from the input buffer object.

Returns
a pointer to the buffer
Parameters
[in]thisinput buffer object

Definition at line 72 of file fms_diag_input_buffer.F90.

◆ get_send_data_time()

type(time_type) function fms_diag_input_buffer_mod::get_send_data_time ( class(fmsdiaginputbuffer_t), intent(in)  this)
private

Get the time send data was called last.

Returns
the time send data was called last
Parameters
[in]thisinput buffer object

Definition at line 169 of file fms_diag_input_buffer.F90.

◆ get_weight()

real(kind=r8_kind) function, pointer fms_diag_input_buffer_mod::get_weight ( class(fmsdiaginputbuffer_t), intent(in), target  this)
private

Get the weight from the input buffer object.

Returns
a pointer to the weight
Parameters
[in]thisinput buffer object

Definition at line 83 of file fms_diag_input_buffer.F90.

◆ init_input_buffer_object()

subroutine fms_diag_input_buffer_mod::init_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this)
private

Initiliazes an input data buffer and the counter.

Parameters
[in,out]thisinput buffer object

Definition at line 147 of file fms_diag_input_buffer.F90.

◆ is_initialized()

pure logical function fms_diag_input_buffer_mod::is_initialized ( class(fmsdiaginputbuffer_t), intent(in)  this)
private

Determine if an input buffer is initialized.

Returns
.true. if the input buffer is initialized
Parameters
[in]thisinput buffer object

Definition at line 340 of file fms_diag_input_buffer.F90.

◆ prepare_input_buffer_object()

subroutine fms_diag_input_buffer_mod::prepare_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this,
character(len=*), intent(in)  field_info 
)
private

Prepare the input data buffer to do the reduction methods (i.e divide by the number of times send data has been called)

Parameters
[in,out]thisinput buffer object
[in]field_infoField info to append to error message

Definition at line 208 of file fms_diag_input_buffer.F90.

◆ set_input_buffer_object()

character(len=128) function fms_diag_input_buffer_mod::set_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this,
class(*), dimension(:,:,:,:), intent(in)  input_data,
real(kind=r8_kind), intent(in)  weight,
integer, intent(in)  is,
integer, intent(in)  js,
integer, intent(in)  ks,
integer, intent(in)  ie,
integer, intent(in)  je,
integer, intent(in)  ke 
)
private

Sets the members of the input buffer object.

Returns
Error message if something went wrong
Parameters
[in,out]thisinput buffer object
[in]input_dataField data
[in]weightWeight for the field
[in]ksStarting index for each of the dimension
[in]keEnding index for each of the dimensions

Definition at line 283 of file fms_diag_input_buffer.F90.

◆ set_send_data_time()

subroutine fms_diag_input_buffer_mod::set_send_data_time ( class(fmsdiaginputbuffer_t), intent(inout)  this,
type(time_type), intent(in)  time 
)
private

Sets the time send data was called last.

Parameters
[in,out]thisinput buffer object
[in]timeThe time send data was called

Definition at line 160 of file fms_diag_input_buffer.F90.

◆ sum_data_buffer_wrapper()

character(len=128) function fms_diag_input_buffer_mod::sum_data_buffer_wrapper ( logical, dimension(:,:,:,:), intent(in)  mask,
class(*), dimension(:,:,:,:), intent(inout)  data_out,
class(*), dimension(:,:,:,:), intent(in)  data_in,
integer, dimension(:,:,:,:), intent(inout)  counter,
logical, intent(in)  var_is_masked 
)
private

Sums the data in the input_data_buffer.

Returns
Error message (if an error occurs)
Parameters
[in]maskMask passed into send_data
[in,out]data_outData currently saved in the input_data_buffer
[in]data_inData passed into send_data
[in,out]counterNumber of times data has been summed
[in]var_is_masked.True. if the variable is masked

Definition at line 225 of file fms_diag_input_buffer.F90.

◆ update_input_buffer_object()

character(len=128) function fms_diag_input_buffer_mod::update_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this,
class(*), dimension(:,:,:,:), intent(in)  input_data,
integer, intent(in)  is,
integer, intent(in)  js,
integer, intent(in)  ks,
integer, intent(in)  ie,
integer, intent(in)  je,
integer, intent(in)  ke,
logical, dimension(:,:,:,:), intent(in)  mask_in,
logical, dimension(:,:,:,:), intent(inout)  mask_out,
logical, intent(in)  mask_variant,
logical, intent(in)  var_is_masked 
)
private

Updates the input data buffer object for the current send_data call.

Returns
Error message (if an error occurs)
Parameters
[in,out]thisinput buffer object
[in]input_dataField data
[in]ksStarting index for each of the dimension
[in]keEnding index for each of the dimensions

Definition at line 179 of file fms_diag_input_buffer.F90.