MOM6
MOM_diag_manager_wrapper.F90
Go to the documentation of this file.
1 !> A simple (very thin) wrapper for register_diag_field to avoid a compiler bug with PGI
3 
4 ! This file is part of MOM6. See LICENSE.md for the license.
5 
6 use mom_time_manager, only : time_type
7 use diag_manager_mod, only : register_diag_field
8 
9 implicit none ; private
10 
12 
13 !> A wrapper for register_diag_field_array()
16 end interface
17 
18 contains
19 
20 !> An integer handle for a diagnostic array returned by register_diag_field()
21 integer function register_diag_field_array_fms(module_name, field_name, axes, init_time, &
22  long_name, units, missing_value, range, mask_variant, standard_name, &
23  verbose, do_not_log, err_msg, interp_method, tile_count, area, volume)
24  character(len=*), intent(in) :: module_name !< Name of this module, usually "ocean_model" or
25  !! "ice_shelf_model"
26  character(len=*), intent(in) :: field_name !< Name of the diagnostic field
27  integer, intent(in) :: axes(:) !< Container w/ up to 3 integer handles that
28  !! indicates axes for this field
29  type(time_type), intent(in) :: init_time !< Time at which a field is first available?
30  character(len=*), optional, intent(in) :: long_name !< Long name of a field.
31  character(len=*), optional, intent(in) :: units !< Units of a field.
32  character(len=*), optional, intent(in) :: standard_name !< Standardized name associated with a field
33  real, optional, intent(in) :: missing_value !< A value that indicates missing values.
34  real, optional, intent(in) :: range(2) !< Valid range of a variable (not used in MOM?)
35  logical, optional, intent(in) :: mask_variant !< If true a logical mask must be provided with
36  !! post_data calls (not used in MOM?)
37  logical, optional, intent(in) :: verbose !< If true, FMS is verbose (not used in MOM?)
38  logical, optional, intent(in) :: do_not_log !< If true, do not log something (not used in MOM?)
39  character(len=*), optional, intent(out):: err_msg !< String into which an error message might be
40  !! placed (not used in MOM?)
41  character(len=*), optional, intent(in) :: interp_method !< If 'none' indicates the field should not be
42  !! interpolated as a scalar
43  integer, optional, intent(in) :: tile_count !< no clue (not used in MOM?)
44  integer, optional, intent(in) :: area !< The FMS id of cell area
45  integer, optional, intent(in) :: volume !< The FMS id of cell volume
46  ! Local variables
47 
48  register_diag_field_array_fms = register_diag_field(module_name, field_name, axes, &
49  init_time, long_name=long_name, units=units, missing_value=missing_value, &
50  mask_variant=mask_variant, standard_name=standard_name, &
51  verbose=verbose, do_not_log=do_not_log, err_msg=err_msg, &
52  area=area, volume=volume, interp_method=interp_method)
53 
55 
56 !> An integer handle for a diagnostic scalar array returned by register_diag_field()
57 integer function register_diag_field_scalar_fms(module_name, field_name, init_time, &
58  long_name, units, missing_value, range, mask_variant, standard_name, &
59  verbose, do_not_log, err_msg, interp_method, tile_count, area, volume)
60  character(len=*), intent(in) :: module_name !< Name of this module, usually "ocean_model"
61  !! or "ice_shelf_model"
62  character(len=*), intent(in) :: field_name !< Name of the diagnostic field
63  type(time_type), intent(in) :: init_time !< Time at which a field is first available?
64  character(len=*), optional, intent(in) :: long_name !< Long name of a field.
65  character(len=*), optional, intent(in) :: units !< Units of a field.
66  character(len=*), optional, intent(in) :: standard_name !< Standardized name associated with a field
67  real, optional, intent(in) :: missing_value !< A value that indicates missing values.
68  real, optional, intent(in) :: range(2) !< Valid range of a variable (not used in MOM?)
69  logical, optional, intent(in) :: mask_variant !< If true a logical mask must be provided with
70  !! post_data calls (not used in MOM?)
71  logical, optional, intent(in) :: verbose !< If true, FMS is verbose (not used in MOM?)
72  logical, optional, intent(in) :: do_not_log !< If true, do not log something (not used in MOM?)
73  character(len=*), optional, intent(out):: err_msg !< String into which an error message might
74  !! be placed (not used in MOM?)
75  character(len=*), optional, intent(in) :: interp_method !< If 'none' indicates the field should not
76  !! be interpolated as a scalar
77  integer, optional, intent(in) :: tile_count !< no clue (not used in MOM?)
78  integer, optional, intent(in) :: area !< The FMS id of cell area (not used for scalars)
79  integer, optional, intent(in) :: volume !< The FMS id of cell volume (not used for scalars)
80  ! Local variables
81 
82  register_diag_field_scalar_fms = register_diag_field(module_name, field_name, &
83  init_time, long_name=long_name, units=units, missing_value=missing_value, &
84  standard_name=standard_name, do_not_log=do_not_log, err_msg=err_msg)
85 
87 
88 !> \namespace mom_diag_manager_wrapper
89 !!
90 !! This module simply wraps register_diag_field() from FMS's diag_manager_mod.
91 !! We used to be able to import register_diag_field and rename it to register_diag_field_fms
92 !! with a simple "use, only : register_diag_field_fms => register_diag_field" but PGI 16.5
93 !! has a bug that refuses to compile this - earlier versions did work.
94 
95 end module mom_diag_manager_wrapper
mom_time_manager
Wraps the FMS time manager functions.
Definition: MOM_time_manager.F90:2
mom_diag_manager_wrapper::register_diag_field_array_fms
integer function register_diag_field_array_fms(module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, area, volume)
An integer handle for a diagnostic array returned by register_diag_field()
Definition: MOM_diag_manager_wrapper.F90:24
mom_diag_manager_wrapper::register_diag_field_scalar_fms
integer function register_diag_field_scalar_fms(module_name, field_name, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, area, volume)
An integer handle for a diagnostic scalar array returned by register_diag_field()
Definition: MOM_diag_manager_wrapper.F90:60
mom_diag_manager_wrapper::register_diag_field_fms
A wrapper for register_diag_field_array()
Definition: MOM_diag_manager_wrapper.F90:14
mom_diag_manager_wrapper
A simple (very thin) wrapper for register_diag_field to avoid a compiler bug with PGI.
Definition: MOM_diag_manager_wrapper.F90:2