FMS 2025.01.02-dev
Flexible Modeling System
Loading...
Searching...
No Matches
fms_diag_fieldbuff_update.F90
1!***********************************************************************
2!* GNU Lesser General Public License
3!*
4!* This file is part of the GFDL Flexible Modeling System (FMS).
5!*
6!* FMS is free software: you can redistribute it and/or modify it under
7!* the terms of the GNU Lesser General Public License as published by
8!* the Free Software Foundation, either version 3 of the License, or (at
9!* your option) any later version.
10!*
11!* FMS is distributed in the hope that it will be useful, but WITHOUT
12!* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13!* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14!* for more details.
15!*
16!* You should have received a copy of the GNU Lesser General Public
17!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18!***********************************************************************
19
20!> @defgroup fms_diag_fieldbuff_update_mod fms_diag_fieldbuff_update_mod
21!> @ingroup diag_manager
22!> @brief fms_diag_fieldbuff_update_mod Contains routines for updating the
23!! buffer (array) of field data statistics (e.g. average, rms) with new field data.
24!!
25!> @author Miguel Zuniga
26!!
27!! <TT>fms_diag_fieldbuff_update_mod</TT> contains routines for updating the buffer
28!!(array) of field data statistics (e.g. average, rms) with new field data. These
29!! routines are called by the send_data routines in the diag_manager.
30!!
31!> @file
32!> @brief File for @ref fms_diag_fieldbuff_update_mod
33!> @addtogroup fms_diag_fieldbuff_update_mod
34!> @{
35MODULE fms_diag_fieldbuff_update_mod
36 USE platform_mod
37 USE mpp_mod, ONLY: mpp_pe, mpp_root_pe
38 USE time_manager_mod, ONLY: time_type
39 USE fms_mod, ONLY: error_mesg, fatal, warning, note, stdout, stdlog, write_version_number,fms_error_handler
40 USE diag_data_mod, ONLY: debug_diag_manager
41 USE fms_diag_outfield_mod, ONLY: fmsdiagoutfieldindex_type, fmsdiagoutfield_type
42 USE diag_util_mod, ONLY: fms_diag_check_out_of_bounds
43 USE fms_diag_time_reduction_mod, ONLY: fmsdiagtimereduction_type
44 USE fms_diag_elem_weight_procs_mod, ONLY: addwf
45 USE fms_diag_bbox_mod, ONLY: fmsdiagibounds_type
46
47 implicit none
48
49 !!TODO: (MDM) Remove commented integer versions.
50
51 !> @brief Interface fieldbuff_update updates elements of field output buffer based on input field
52 !! data and mathematical operations on the field data.
53 !> @ingroup fms_diag_fieldbuff_update_mod
55 !< r4 version of the interface
56 module procedure fieldbuff_update_r4
57 !< r8 version of the interface
58 module procedure fieldbuff_update_r8
59 !< r4 version of the interface, where the field is 3D
60 module procedure fieldbuff_update_3d_r4
61 !< r8 version of the interface
62 module procedure fieldbuff_update_3d_r8
63 !< i4 version of the interface, , where the field is 3D
64 !module procedure fieldbuff_update_i4
65 !< i8 version of the interface
66 ! module procedure fieldbuff_update_i8
67 end interface
68
69 !> @brief Interface fieldbuff_copy_missvals updates elements of the field output buffer with
70 !! the missvalue input argument.
71 !> @ingroup fms_diag_fieldbuff_update_mod
73 !< r4 version of the interface
74 module procedure fieldbuff_copy_missvals_r4
75 !< r8 version of the interface
76 module procedure fieldbuff_copy_missvals_r8
77 !< r4 version of the interface, , where the field is 3D
78 module procedure fieldbuff_copy_missvals_3d_r4
79 !< r8 version of the interface, , where the field is 3D
80 module procedure fieldbuff_copy_missvals_3d_r8
81 !< i4 version of the interface
82 !module procedure fieldbuff_copy_missvals_i4
83 !< i8 version of the interface
84 !module procedure fieldbuff_copy_missvals_i8
85 end interface
86
87 !> @brief Interface fieldbuff_copy_fieldvals updates elements of the field output buffer with
88 !! copies of corresponding element values in the input field data.
89 !> @ingroup fms_diag_fieldbuff_update_mod
91 !< r4 version of the interface
92 module procedure fieldbuff_copy_fieldvals_r4
93 !< r8 version of the interface
94 module procedure fieldbuff_copy_fieldvals_r8
95 !< r4 version of the interface, , where the field is 3D
96 module procedure fieldbuff_copy_fieldvals_3d_r4
97 !< r8 version of the interface, , where the field is 3D
98 module procedure fieldbuff_copy_fieldvals_3d_r8
99 !< i4 version of the interface
100 !module procedure fieldbuff_copy_fieldvals_i4
101 !< i8 version of the interface
102 !module procedure fieldbuff_copy_fieldvals_i8
103 end interface
104contains
105
106#include "fms_diag_fieldbuff_update.inc"
107
108END MODULE fms_diag_fieldbuff_update_mod
109!> @}
110! close documentation grouping
Interface for the elemental function addwf, which Calculates and returns the value given by this form...
Interface fieldbuff_copy_fieldvals updates elements of the field output buffer with copies of corresp...
Interface fieldbuff_copy_missvals updates elements of the field output buffer with the missvalue inpu...
Interface fieldbuff_update updates elements of field output buffer based on input field data and math...
Class fmsDiagOutfield_type (along with class ms_diag_outfield_index_type ) contain information used i...
Class fms_diag_outfield_index_type which (along with class fmsDiagOutfield_type) encapsulate related ...
Type to represent amounts of time. Implemented as seconds and days to allow for larger intervals.
Data structure holding a 3D bounding box. It is commonlyused to represent the interval bounds or limi...