FMS 2025.01-dev
Flexible Modeling System
Loading...
Searching...
No Matches
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 (this, input_data, axis_ids, diag_axis)
 Initiliazes an input data buffer.
 
character(len=128) function allocate_input_buffer_object (this, input_data, axis_ids, diag_axis)
 Initiliazes an input data buffer.
 
 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.)
 
procedure get_buffer (this)
 Get the buffer from the input buffer object.
 
class(*) function, dimension(:,:,:,:), pointer get_buffer (this)
 Get the buffer from the input buffer object.
 
procedure get_send_data_time (this)
 Get the time send data was called last.
 
type(time_type) function get_send_data_time (this)
 Get the time send data was called last.
 
procedure get_weight (this)
 Get the weight from the input buffer object.
 
real(kind=r8_kind) function, pointer get_weight (this)
 Get the weight from the input buffer object.
 
procedure init_input_buffer_object (this)
 Initiliazes an input data buffer and the counter.
 
subroutine init_input_buffer_object (this)
 Initiliazes an input data buffer and the counter.
 
procedure is_initialized (this)
 Determine if an input buffer is initialized.
 
pure logical function is_initialized (this)
 Determine if an input buffer is initialized.
 
procedure 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)
 
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)
 
procedure set_input_buffer_object (this, input_data, weight, is, js, ks, ie, je, ke)
 Sets the members of the 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.
 
procedure set_send_data_time (this, time)
 Sets the time send data was called last.
 
subroutine set_send_data_time (this, time)
 Sets the time send data was called last.
 
 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.
 
procedure 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.
 
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.
 

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]

Public Member Functions

procedure allocate_input_buffer_object (this, input_data, axis_ids, diag_axis)
 Initiliazes an input data buffer.
 
procedure get_buffer (this)
 Get the buffer from the input buffer object.
 
procedure get_send_data_time (this)
 Get the time send data was called last.
 
procedure get_weight (this)
 Get the weight from the input buffer object.
 
procedure init_input_buffer_object (this)
 Initiliazes an input data buffer and the counter.
 
procedure is_initialized (this)
 Determine if an input buffer is initialized.
 
procedure 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)
 
procedure set_input_buffer_object (this, input_data, weight, is, js, ks, ie, je, ke)
 Sets the members of the input buffer object.
 
procedure set_send_data_time (this, time)
 Sets the time send data was called last.
 
procedure 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.
 

Public 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.

Public Member Functions

 sum_data_buffer_r4
 
 sum_data_buffer_r8
 

Function/Subroutine Documentation

◆ allocate_input_buffer_object() [1/2]

procedure 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 
)

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

Definition at line 56 of file fms_diag_input_buffer.F90.

◆ allocate_input_buffer_object() [2/2]

character(len=128) function 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 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() [1/2]

procedure get_buffer ( class(fmsdiaginputbuffer_t), intent(in), target  this)

Get the buffer from the input buffer object.

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

Definition at line 54 of file fms_diag_input_buffer.F90.

◆ get_buffer() [2/2]

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

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() [1/2]

procedure get_send_data_time ( class(fmsdiaginputbuffer_t), intent(in)  this)

Get the time send data was called last.

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

Definition at line 62 of file fms_diag_input_buffer.F90.

◆ get_send_data_time() [2/2]

type(time_type) function 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() [1/2]

procedure get_weight ( class(fmsdiaginputbuffer_t), intent(in), target  this)

Get the weight from the input buffer object.

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

Definition at line 55 of file fms_diag_input_buffer.F90.

◆ get_weight() [2/2]

real(kind=r8_kind) function, pointer 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() [1/2]

procedure init_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this)

Initiliazes an input data buffer and the counter.

Parameters
[in,out]thisinput buffer object

Definition at line 57 of file fms_diag_input_buffer.F90.

◆ init_input_buffer_object() [2/2]

subroutine 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() [1/2]

procedure is_initialized ( class(fmsdiaginputbuffer_t), intent(in)  this)

Determine if an input buffer is initialized.

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

Definition at line 63 of file fms_diag_input_buffer.F90.

◆ is_initialized() [2/2]

pure logical function 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() [1/2]

procedure prepare_input_buffer_object ( class(fmsdiaginputbuffer_t), intent(inout)  this,
character(len=*), intent(in)  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)

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

Definition at line 60 of file fms_diag_input_buffer.F90.

◆ prepare_input_buffer_object() [2/2]

subroutine 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() [1/2]

procedure 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 
)

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 58 of file fms_diag_input_buffer.F90.

◆ set_input_buffer_object() [2/2]

character(len=128) function 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() [1/2]

procedure set_send_data_time ( class(fmsdiaginputbuffer_t), intent(inout)  this,
type(time_type), intent(in)  time 
)

Sets the time send data was called last.

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

Definition at line 61 of file fms_diag_input_buffer.F90.

◆ set_send_data_time() [2/2]

subroutine 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 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() [1/2]

procedure 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 
)

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 59 of file fms_diag_input_buffer.F90.

◆ update_input_buffer_object() [2/2]

character(len=128) function 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.

Variable Documentation

◆ buffer

class(*), dimension(:,:,:,:), allocatable buffer

Input data passed in send_data.

Definition at line 48 of file fms_diag_input_buffer.F90.

◆ counter

integer, dimension(:,:,:,:), allocatable counter

Number of send_data calls for each point.

Definition at line 49 of file fms_diag_input_buffer.F90.

◆ initialized

logical initialized

.True. if the input buffer has been initialized

Definition at line 47 of file fms_diag_input_buffer.F90.

◆ send_data_time

type(time_type) send_data_time

The time send data was called last.

Definition at line 51 of file fms_diag_input_buffer.F90.

◆ weight

real(kind=r8_kind) weight

Weight passed in send_data.

Definition at line 50 of file fms_diag_input_buffer.F90.