mom_diag_mediator module reference

The subroutines here provide convenient wrappers to the FMS diag_manager interfaces with additional diagnostic capabilities.

More…

Data Types

diag_dsamp

Contained for down sampled masks.

axes_grp

A group of 1D axes that comprise a 1D/2D/3D mesh.

diag_grids_type

Contains an array to store a diagnostic target grid.

diag_grid_storage

Stores all the remapping grids and the model's native space thicknesses.

diag_type

This type is used to represent a diagnostic at the diag_mediator level.

diagcs_dsamp

Container for down sampling information.

diag_ctrl

The following data type a list of diagnostic fields an their variants, as well as variables that control the handling of model output.

Functions/Subroutines

set_axes_info()

Sets up diagnostics axes.

set_axes_info_dsamp()

set_masks_for_axes()

set_masks_for_axes sets up the 2d and 3d masks for diagnostics using the current grid recorded after calling diag_update_remap_grids()

set_masks_for_axes_dsamp()

diag_register_area_ids()

Attaches the id of cell areas to axes groups for use with cell_measures.

register_cell_measure()

Sets a handle inside diagnostics mediator to associate 3d cell measures.

diag_associate_volume_cell_measure()

Attaches the id of cell volumes to axes groups for use with cell_measures.

diag_get_volume_cell_measure_dm_id()

Returns diag_manager id for cell measure of h-cells.

define_axes_group()

Define a group of "axes" from a list of handles and associate a mask with it.

define_axes_group_dsamp()

Defines a group of downsampled "axes" from list of handles.

set_diag_mediator_grid()

Set up the array extents for doing diagnostics.

post_data_0d()

Make a real scalar diagnostic available for averaging or output.

post_data_1d_k()

Make a real 1-d array diagnostic available for averaging or output.

post_data_2d()

Make a real 2-d array diagnostic available for averaging or output.

post_data_2d_low()

Make a real 2-d array diagnostic available for averaging or output using a diag_type() instead of an integer id.

post_data_3d()

Make a real 3-d array diagnostic available for averaging or output.

post_data_3d_low()

Make a real 3-d array diagnostic available for averaging or output using a diag_type() instead of an integer id.

post_data_3d_by_column()

Put data into the buffer for a diagnostic one column at a time.

post_data_3d_by_point()

Put data into the buffer for a diagnostic one point at a time.

post_data_3d_final()

Post the final buffer using the standard post_data() interface.

post_product_u()

Calculate and write out diagnostics that are the product of two 3-d arrays at u-points.

post_product_sum_u()

Calculate and write out diagnostics that are the vertical sum of the product of two 3-d arrays at u-points.

post_product_v()

Calculate and write out diagnostics that are the product of two 3-d arrays at v-points.

post_product_sum_v()

Calculate and write out diagnostics that are the vertical sum of the product of two 3-d arrays at v-points.

post_xy_average()

Post the horizontally area-averaged diagnostic.

enable_averaging()

This subroutine enables the accumulation of time averages over the specified time interval.

enable_averages()

Enable the accumulation of time averages over the specified time interval in time units.

disable_averaging()

Call this subroutine to avoid averaging any offered fields.

query_averaging_enabled()

Call this subroutine to determine whether the averaging is currently enabled.

get_diag_time_end()

This function returns the valid end time for use with diagnostics that are handled outside of the MOM6 diagnostics infrastructure.

register_diag_field()

Returns the "diag_mediator" handle for a group (native, CMOR, z-coord, ...) of diagnostics derived from one field.

register_diag_field_expand_cmor()

Returns True if either the native or CMOR version of the diagnostic were registered.

register_diag_field_expand_axes()

Returns an FMS id from register_diag_field_fms (the diag_manager routine) after expanding axes (axes-group) into handles and conditionally adding an FMS area_id for cell_measures.

add_diag_to_list()

Create a diagnostic type and attached to list.

add_xyz_method()

Adds the encoded "cell_methods" for a diagnostics as a diag% property This allows access to the cell_method for a given diagnostics at the time of sending.

attach_cell_methods()

Attaches "cell_methods" attribute to a variable based on defaults for axes_grp() or optional arguments.

register_scalar_field()

Registers a scalar diagnostic, returning an integer handle.

register_static_field()

Registers a static diagnostic, returning an integer handle.

describe_option()

Describe an option setting in the diagnostic files.

ocean_register_diag()

Registers a diagnostic using the information encapsulated in the vardesc type argument and returns an integer handle to this diagnostic.

diag_mediator_infrastructure_init()

diag_mediator_init()

diag_mediator_init initializes the MOM diag_mediator and opens the available diagnostics file, if appropriate.

diag_set_state_ptrs()

Set pointers to the default state fields used to remap diagnostics.

diag_update_remap_grids()

Build/update vertical grids for diagnostic remapping.

diag_masks_set()

Sets up the 2d and 3d masks for native diagnostics.

set_piecemeal_extents()

Set the extents and fill values for the piecemeal buffers for all axes.

diag_mediator_close_registration()

axes_grp_end()

diag_mediator_end()

get_new_diag_id()

Returns a new diagnostic id, it may be necessary to expand the diagnostics array.

initialize_diag_type()

Initializes a diag_type() (used after allocating new memory) (used after allocating new memory)

alloc_diag_with_id()

Make a new diagnostic.

log_available_diag()

Log a diagnostic to the available diagnostics file.

log_chksum_diag()

Log the diagnostic chksum to the chksum diag file.

diag_grid_storage_init()

Allocates fields necessary to store diagnostic remapping fields.

diag_copy_diag_to_storage()

Copy from the main diagnostic arrays to the grid storage as well as the native thicknesses.

diag_copy_storage_to_diag()

Copy from the stored diagnostic arrays to the main diagnostic grids.

diag_save_grids()

Save the current diagnostic grids in the temporary structure within diag.

diag_restore_grids()

Restore the diagnostic grids from the temporary structure within diag.

diag_grid_storage_end()

Deallocates the fields in the remapping fields container.

downsample_diag_masks_set()

downsample_diag_indices_get()

Get the diagnostics-compute indices (to be passed to send_data) based on the shape of the diagnostic field (the same way they are deduced for non-downsampled fields)

downsample_diag_field_3d()

This subroutine allocates and computes a downsampled array from an input array.

downsample_diag_field_2d()

This subroutine allocates and computes a downsampled array from an input array.

downsample_field_3d()

This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table.

downsample_field_2d()

This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table.

downsample_mask_2d()

Allocate and compute the 2d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub-cells are open, otherwise it's closed (0)

downsample_mask_3d()

Allocate and compute the 3d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub-cells are open, otherwise it's closed (0)

found_in_diagtable()

Fakes a register of a diagnostic to find out if an obsolete parameter appears in the diag_table.

Detailed Description

The subroutines here provide convenient wrappers to the FMS diag_manager interfaces with additional diagnostic capabilities.

Type Documentation

type  mom_diag_mediator/diag_dsamp

Contained for down sampled masks.

Type fields:
  • % mask2d :: real, dimension(:,:), pointer, private Mask for 2d (x-y) axes [nondim].

  • % mask3d :: real, dimension(:,:,:), pointer, private Mask for 3d axes [nondim].

[source]

type  mom_diag_mediator/axes_grp

A group of 1D axes that comprise a 1D/2D/3D mesh.

Type fields:
  • % id :: character(len=15) The id string for this particular combination of handles.

  • % rank :: integer Number of dimensions in the list of axes.

  • % handles :: integer, dimension(:), allocatable Handles to 1D axes.

  • % diag_cs :: type(diag_ctrl), pointer Circular link back to the main diagnostics control structure (Used to avoid passing said structure into every possible call).

  • % x_cell_method :: character(len=9) Default nature of data representation, if axes group includes x-direction.

  • % y_cell_method :: character(len=9) Default nature of data representation, if axes group includes y-direction.

  • % v_cell_method :: character(len=9) Default nature of data representation, if axes group includes vertical direction.

  • % nz :: integer Vertical dimension of diagnostic.

  • % vertical_coordinate_number :: integer Index of the corresponding diag_remap_ctrl for this axis group.

  • % is_h_point :: logical If true, indicates that this axes group is for an h-point located field.

  • % is_q_point :: logical If true, indicates that this axes group is for a q-point located field.

  • % is_u_point :: logical If true, indicates that this axes group is for a u-point located field.

  • % is_v_point :: logical If true, indicates that this axes group is for a v-point located field.

  • % is_layer :: logical If true, indicates that this axes group is for a layer vertically-located field.

  • % is_interface :: logical If true, indicates that this axes group is for an interface vertically-located field.

  • % is_native :: logical If true, indicates that this axes group is for a native model grid. False for any other grid. Used for rank>2.

  • % needs_remapping :: logical If true, indicates that this axes group is for a intensive layer-located field that must be remapped to these axes. Used for rank>2.

  • % needs_interpolating :: logical If true, indicates that this axes group is for a sampled interface-located field that must be interpolated to these axes. Used for rank>2.

  • % downsample_level :: integer If greater than 1, the factor by which this diagnostic/axes/masks be downsampled.

  • % xyave_axes :: type(axes_grp), pointer The associated 1d axes for horizontally area-averaged diagnostics.

  • % id_area :: integer The diag_manager id for area to be used for cell_measure of variables with this

  • % id_volume :: integer The diag_manager id for volume to be used for cell_measure of variables with this

  • % mask2d :: real, dimension(:,:), pointer Mask for 2d (x-y) axes [nondim].

  • % mask3d :: real, dimension(:,:,:), pointer Mask for 3d axes [nondim].

  • % dsamp :: type(diag_dsamp), dimension(2:2) Downsample container.

  • % piecemeal_2d :: type(diag_buffer_2d) A dynamically reallocated buffer for 2d piecemeal diagnostics.

  • % piecemeal_3d :: type(diag_buffer_3d) A dynamically reallocated buffer for 3d piecemeal diagnostics.

[source]

type  mom_diag_mediator/diag_grids_type

Contains an array to store a diagnostic target grid.

Type fields:
  • % h :: real, dimension(:,:,:), allocatable, private Target grid for remapped coordinate [H ~> m or kg m-2] or [Z ~> m].

[source]

type  mom_diag_mediator/diag_grid_storage

Stores all the remapping grids and the model’s native space thicknesses.

Type fields:
  • % num_diag_coords :: integer Number of target coordinates.

  • % h_state :: real, dimension(:,:,:), allocatable Layer thicknesses in native space [H ~> m or kg m-2].

  • % diag_grids :: type(diag_grids_type), dimension(:), allocatable Primarily empty, except h field.

[source]

type  mom_diag_mediator/diag_type

This type is used to represent a diagnostic at the diag_mediator level.

Type fields:
  • % in_use :: logical, private True if this entry is being used.

  • % fms_diag_id :: integer, private Underlying FMS diag_manager id.

  • % fms_xyave_diag_id :: integer, private For a horizontally area-averaged diagnostic.

  • % downsample_diag_id :: integer, private For a horizontally area-downsampled diagnostic.

  • % debug_str :: character(len=64), private The diagnostic name and module for FATAL errors and debugging.

  • % axes :: type(axes_grp), pointer, private The axis group for this diagnostic.

  • % next :: type(diag_type), pointer, private Pointer to the next diagnostic.

  • % conversion_factor :: real, private If non-zero, a factor to multiply data by before posting to FMS, often including factors to undo internal scaling in units of [a A-1 ~> 1].

  • % v_extensive :: logical, private True for vertically extensive fields (vertically integrated). False for intensive (concentrations).

  • % xyz_method :: integer, private A 3 digit integer encoding the diagnostics cell method It can be used to determine the downsample algorithm.

[source]

type  mom_diag_mediator/diagcs_dsamp

Container for down sampling information.

Type fields:
  • % axesbl :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axestl :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescul :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescvl :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axesbi :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axesti :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescui :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescvi :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axesb1 :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axest1 :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescu1 :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % axescv1 :: type(axes_grp), private Axes for each location on a diagnostic grid.

  • % remap_axestl :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axesbl :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axescul :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axescvl :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axesti :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axesbi :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axescui :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % remap_axescvi :: type(axes_grp), dimension(:), allocatable, private Axes for each location on a diagnostic grid.

  • % mask3dtl :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dbl :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dcul :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dcvl :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dti :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dbi :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dcui :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % mask3dcvi :: real, dimension(:,:,:), pointer, private 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i), all [nondim]

  • % isc :: integer, private The start i-index of cell centers within the computational domain.

  • % iec :: integer, private The end i-index of cell centers within the computational domain.

  • % jsc :: integer, private The start j-index of cell centers within the computational domain.

  • % jec :: integer, private The end j-index of cell centers within the computational domain.

  • % isd :: integer, private The start i-index of cell centers within the data domain.

  • % ied :: integer, private The end i-index of cell centers within the data domain.

  • % jsd :: integer, private The start j-index of cell centers within the data domain.

  • % jed :: integer, private The end j-index of cell centers within the data domain.

  • % isg :: integer, private The start i-index of cell centers within the global domain.

  • % ieg :: integer, private The end i-index of cell centers within the global domain.

  • % jsg :: integer, private The start j-index of cell centers within the global domain.

  • % jeg :: integer, private The end j-index of cell centers within the global domain.

  • % isgb :: integer, private The start i-index of cell corners within the global domain.

  • % iegb :: integer, private The end i-index of cell corners within the global domain.

  • % jsgb :: integer, private The start j-index of cell corners within the global domain.

  • % jegb :: integer, private The end j-index of cell corners within the global domain.

  • % mask2dt :: real, dimension(:,:), pointer, private 2D mask array for cell-center points [nondim]

  • % mask2dbu :: real, dimension(:,:), pointer, private 2D mask array for cell-corner points [nondim]

  • % mask2dcu :: real, dimension(:,:), pointer, private 2D mask array for east-face points [nondim]

  • % mask2dcv :: real, dimension(:,:), pointer, private 2D mask array for north-face points [nondim]

[source]

type  mom_diag_mediator/diag_ctrl

The following data type a list of diagnostic fields an their variants, as well as variables that control the handling of model output.

Type fields:
  • % axesbl :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axestl :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescul :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescvl :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axesbi :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axesti :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescui :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescvi :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axesb1 :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axest1 :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescu1 :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % axescv1 :: type(axes_grp) The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

  • % mask3dtl :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dbl :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dcul :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dcvl :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dti :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dbi :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dcui :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % mask3dcvi :: real, dimension(:,:,:), pointer 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i) all [nondim]

  • % dsamp :: type(diagcs_dsamp), dimension(2:max_dsamp_lev) Downsample control container.

  • % remap_axestl :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axesbl :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axescul :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axescvl :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axesti :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axesbi :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axescui :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % remap_axescvi :: type(axes_grp), dimension(:), allocatable Axes used for remapping.

  • % available_diag_doc_unit :: integer The unit number of a diagnostic documentation file. This file is open if available_diag_doc_unit is > 0.

  • % chksum_iounit :: integer The unit number of a diagnostic documentation file. This file is open if available_diag_doc_unit is > 0.

  • % diag_as_chksum :: logical If true, log chksums in a text file instead of posting diagnostics.

  • % show_call_tree :: logical Display the call tree while running. Set by VERBOSITY level.

  • % index_space_axes :: logical If true, diagnostic horizontal coordinates axes are in index space.

  • % is :: integer The start i-index of cell centers within the computational domain.

  • % ie :: integer The end i-index of cell centers within the computational domain.

  • % js :: integer The start j-index of cell centers within the computational domain.

  • % je :: integer The end j-index of cell centers within the computational domain.

  • % isd :: integer The start i-index of cell centers within the data domain.

  • % ied :: integer The end i-index of cell centers within the data domain.

  • % jsd :: integer The start j-index of cell centers within the data domain.

  • % jed :: integer The end j-index of cell centers within the data domain.

  • % time_int :: real The time interval for any fields that are offered for averaging [s].

  • % time_end :: type(time_type) The end time of the valid interval for any offered field.

  • % ave_enabled :: logical True if averaging is enabled.

  • % axeszi :: type(axes_grp) A 1-D z-space axis at interfaces.

  • % axeszl :: type(axes_grp) A 1-D z-space axis at layer centers.

  • % axesnull :: type(axes_grp) An axis group for scalars.

  • % mask2dt :: real, dimension(:,:), pointer 2D mask array for cell-center points [nondim]

  • % mask2dbu :: real, dimension(:,:), pointer 2D mask array for cell-corner points [nondim]

  • % mask2dcu :: real, dimension(:,:), pointer 2D mask array for east-face points [nondim]

  • % mask2dcv :: real, dimension(:,:), pointer 2D mask array for north-face points [nondim]

  • % diags :: type(diag_type), dimension(:), allocatable The list of diagnostics.

  • % next_free_diag_id :: integer The next unused diagnostic ID.

  • % missing_value :: real default missing value to be sent to ALL diagnostics registrations [various]

  • % num_diag_coords :: integer Number of diagnostic vertical coordinates (remapped)

  • % diag_remap_cs :: type(diag_remap_ctrl), dimension(:), allocatable Control structure for each possible coordinate.

  • % diag_grid_temp :: type(diag_grid_storage) Stores the remapped diagnostic grid.

  • % diag_grid_overridden :: logical True if the diagnostic grids have been overriden.

  • % remap_axeszl :: type(axes_grp), dimension(:), allocatable The 1-D z-space cell-centered axis for remapping.

  • % remap_axeszi :: type(axes_grp), dimension(:), allocatable The 1-D z-space interface axis for remapping.

  • % h :: real, dimension(:,:,:), pointer The thicknesses needed for remapping [H ~> m or kg m-2].

  • % t :: real, dimension(:,:,:), pointer The temperatures needed for remapping [C ~> degC].

  • % s :: real, dimension(:,:,:), pointer The salinities needed for remapping [S ~> ppt].

  • % eqn_of_state :: type(eos_type), pointer The equation of state type.

  • % tv :: type(thermo_var_ptrs), pointer A structure with thermodynamic variables that are are used to convert thicknesses to vertical extents.

  • % g :: type(ocean_grid_type), pointer The ocean grid type.

  • % gv :: type(verticalgrid_type), pointer The model’s vertical ocean grid.

  • % us :: type(unit_scale_type), pointer A dimensional unit scaling type.

  • % volume_cell_measure_dm_id :: integer The volume cell measure (special diagnostic) manager id.

  • % num_chksum_diags :: integer Number of checksum-only diagnostics.

  • % h_begin :: real, dimension(:,:,:), allocatable Layer thicknesses at the beginning of the timestep used for remapping of extensive variables [H ~> m or kg m-2].

  • % dz_begin :: real, dimension(:,:,:), allocatable Layer vertical extents at the beginning of the timestep used for remapping of extensive variables [Z ~> m].

[source]

Function/Subroutine Documentation

subroutine mom_diag_mediator/set_axes_info(G, GV, US, param_file, diag_cs, set_vertical)

Sets up diagnostics axes.

Parameters:
  • g :: [inout] Ocean grid structure

  • gv :: [in] ocean vertical grid structure

  • us :: [in] A dimensional unit scaling type

  • param_file :: param_file [in] Parameter file structure

  • diag_cs :: diag_cs [inout] Diagnostics control structure

  • set_vertical :: set_vertical [in] If true or missing, set up vertical axes

Call to:

define_axes_group diag_grid_storage_init set_axes_info_dsamp set_piecemeal_extents

[source]

subroutine mom_diag_mediator/set_axes_info_dsamp(G, GV, param_file, diag_cs, id_zl_native, id_zi_native)
Parameters:
  • g :: [in] Ocean grid structure

  • gv :: [in] ocean vertical grid structure

  • param_file :: param_file [in] Parameter file structure

  • diag_cs :: diag_cs [inout] Diagnostics control structure

  • id_zl_native :: id_zl_native [in] ID of native layers

  • id_zi_native :: id_zi_native [in] ID of native interfaces

Call to:

define_axes_group_dsamp

Called from:

set_axes_info

[source]

subroutine mom_diag_mediator/set_masks_for_axes(G, diag_cs)

set_masks_for_axes sets up the 2d and 3d masks for diagnostics using the current grid recorded after calling diag_update_remap_grids()

Parameters:
  • g :: [in] The ocean grid type.

  • diag_cs :: diag_cs A pointer to a type with many variables used for diagnostics

Call to:

set_masks_for_axes_dsamp

[source]

subroutine mom_diag_mediator/set_masks_for_axes_dsamp(G, diag_cs)
Parameters:
  • g :: [in] The ocean grid type.

  • diag_cs :: diag_cs A pointer to a type with many variables used for diagnostics

Called from:

set_masks_for_axes

[source]

subroutine mom_diag_mediator/diag_register_area_ids(diag_cs, id_area_t, id_area_q)

Attaches the id of cell areas to axes groups for use with cell_measures.

Parameters:
  • diag_cs :: diag_cs [inout] Diagnostics control structure

  • id_area_t :: id_area_t [in] Diag_mediator id for area of h-cells

  • id_area_q :: id_area_q [in] Diag_mediator id for area of q-cells

[source]

subroutine mom_diag_mediator/register_cell_measure(G, diag, Time)

Sets a handle inside diagnostics mediator to associate 3d cell measures.

Parameters:
  • g :: [in] Ocean grid structure

  • diag :: diag [inout] Regulates diagnostic output

  • time :: [in] Model time

Call to:

diag_associate_volume_cell_measure register_diag_field

[source]

subroutine mom_diag_mediator/diag_associate_volume_cell_measure(diag_cs, id_h_volume)

Attaches the id of cell volumes to axes groups for use with cell_measures.

Parameters:
  • diag_cs :: diag_cs [inout] Diagnostics control structure

  • id_h_volume :: id_h_volume [in] Diag_manager id for volume of h-cells

Called from:

register_cell_measure

[source]

function  mom_diag_mediator/diag_get_volume_cell_measure_dm_id(diag_cs)

Returns diag_manager id for cell measure of h-cells.

Parameters:

diag_cs :: diag_cs [in] Diagnostics control structure

[source]

subroutine mom_diag_mediator/define_axes_group(diag_cs, handles, axes, nz, vertical_coordinate_number, x_cell_method, y_cell_method, v_cell_method, is_h_point, is_q_point, is_u_point, is_v_point, is_layer, is_interface, is_native, needs_remapping, needs_interpolating, xyave_axes)

Define a group of “axes” from a list of handles and associate a mask with it.

Parameters:
  • diag_cs :: diag_cs [in] Diagnostics control structure

  • handles :: handles [in] A list of 1D axis handles

  • axes :: axes [out] The group of 1D axes

  • nz :: nz [in] Number of layers in this diagnostic grid

  • vertical_coordinate_number :: vertical_coordinate_number [in] Index number for vertical coordinate

  • x_cell_method :: x_cell_method [in] A x-direction cell method used to construct the “cell_methods” attribute in CF convention

  • y_cell_method :: y_cell_method [in] A y-direction cell method used to construct the “cell_methods” attribute in CF convention

  • v_cell_method :: v_cell_method [in] A vertical direction cell method used to construct the “cell_methods” attribute in CF convention

  • is_h_point :: is_h_point [in] If true, indicates this axes group for h-point located fields

  • is_q_point :: is_q_point [in] If true, indicates this axes group for q-point located fields

  • is_u_point :: is_u_point [in] If true, indicates this axes group for u-point located fields

  • is_v_point :: is_v_point [in] If true, indicates this axes group for v-point located fields

  • is_layer :: is_layer [in] If true, indicates that this axes group is for a layer vertically-located field.

  • is_interface :: is_interface [in] If true, indicates that this axes group is for an interface vertically-located field.

  • is_native :: is_native [in] If true, indicates that this axes group is for a native model grid. False for any other grid.

  • needs_remapping :: needs_remapping [in] If true, indicates that this axes group is for a intensive layer-located field that must be remapped to these axes. Used for rank>2.

  • needs_interpolating :: needs_interpolating [in] If true, indicates that this axes group is for a sampled interface-located field that must be interpolated to these axes. Used for rank>2.

  • xyave_axes :: xyave_axes The corresponding axes group for horizontally area-average diagnostics

Call to:

mom_string_functions::ints_to_string

Called from:

mom_internal_tides::internal_tides_init set_axes_info

[source]

subroutine mom_diag_mediator/define_axes_group_dsamp(diag_cs, handles, axes, dl, nz, vertical_coordinate_number, x_cell_method, y_cell_method, v_cell_method, is_h_point, is_q_point, is_u_point, is_v_point, is_layer, is_interface, is_native, needs_remapping, needs_interpolating, xyave_axes)

Defines a group of downsampled “axes” from list of handles.

Parameters:
  • diag_cs :: diag_cs [in] Diagnostics control structure

  • handles :: handles [in] A list of 1D axis handles

  • axes :: axes [out] The group of 1D axes

  • dl :: dl [in] Downsample level

  • nz :: nz [in] Number of layers in this diagnostic grid

  • vertical_coordinate_number :: vertical_coordinate_number [in] Index number for vertical coordinate

  • x_cell_method :: x_cell_method [in] A x-direction cell method used to construct the “cell_methods” attribute in CF convention

  • y_cell_method :: y_cell_method [in] A y-direction cell method used to construct the “cell_methods” attribute in CF convention

  • v_cell_method :: v_cell_method [in] A vertical direction cell method used to construct the “cell_methods” attribute in CF convention

  • is_h_point :: is_h_point [in] If true, indicates this axes group for h-point located fields

  • is_q_point :: is_q_point [in] If true, indicates this axes group for q-point located fields

  • is_u_point :: is_u_point [in] If true, indicates this axes group for u-point located fields

  • is_v_point :: is_v_point [in] If true, indicates this axes group for v-point located fields

  • is_layer :: is_layer [in] If true, indicates that this axes group is for a layer vertically-located field.

  • is_interface :: is_interface [in] If true, indicates that this axes group is for an interface vertically-located field.

  • is_native :: is_native [in] If true, indicates that this axes group is for a native model grid. False for any other grid.

  • needs_remapping :: needs_remapping [in] If true, indicates that this axes group is for a intensive layer-located field that must be remapped to these axes. Used for rank>2.

  • needs_interpolating :: needs_interpolating [in] If true, indicates that this axes group is for a sampled interface-located field that must be interpolated to these axes. Used for rank>2.

  • xyave_axes :: xyave_axes The corresponding axes group for horizontally area-average diagnostics

Call to:

mom_string_functions::ints_to_string

Called from:

set_axes_info_dsamp

[source]

subroutine mom_diag_mediator/set_diag_mediator_grid(G, diag_cs)

Set up the array extents for doing diagnostics.

Parameters:
  • g :: [inout] The ocean’s grid structure

  • diag_cs :: diag_cs [inout] Structure used to regulate diagnostic output

[source]

subroutine mom_diag_mediator/post_data_0d(diag_field_id, field, diag_cs, is_static)

Make a real scalar diagnostic available for averaging or output.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] real value being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

[source]

subroutine mom_diag_mediator/post_data_1d_k(diag_field_id, field, diag_cs, is_static)

Make a real 1-d array diagnostic available for averaging or output.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] 1-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

[source]

subroutine mom_diag_mediator/post_data_2d(diag_field_id, field, diag_cs, is_static, mask)

Make a real 2-d array diagnostic available for averaging or output.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] 2-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

[source]

subroutine mom_diag_mediator/post_data_2d_low(diag, field, diag_cs, is_static, mask)

Make a real 2-d array diagnostic available for averaging or output using a diag_type() instead of an integer id. instead of an integer id.

Parameters:
  • diag :: diag [in] A structure describing the diagnostic to post

  • field :: field [in] 2-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

Call to:

downsample_field_2d msk

Called from:

mom_diag_mediator::post_data::post_data_2d

[source]

subroutine mom_diag_mediator/post_data_3d(diag_field_id, field, diag_cs, is_static, mask, alt_h)

Make a real 3-d array diagnostic available for averaging or output.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] 3-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

  • alt_h :: alt_h [in] An alternate thickness to use for vertically

[source]

subroutine mom_diag_mediator/post_data_3d_low(diag, field, diag_cs, is_static, mask)

Make a real 3-d array diagnostic available for averaging or output using a diag_type() instead of an integer id. instead of an integer id.

Parameters:
  • diag :: diag [in] A structure describing the diagnostic to post

  • field :: field [in] 3-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • is_static :: is_static [in] If true, this is a static field that is always offered.

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

Call to:

downsample_field_3d msk post_xy_average

Called from:

mom_diag_mediator::post_data::post_data_3d

[source]

subroutine mom_diag_mediator/post_data_3d_by_column(diag_field_id, field, diag_cs, i, j)

Put data into the buffer for a diagnostic one column at a time.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] 3-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • i :: i [in] The i-index to post the data in the buffer

  • j :: j [in] The j-index to post the data in the buffer

[source]

subroutine mom_diag_mediator/post_data_3d_by_point(diag_field_id, field, diag_cs, i, j, k)

Put data into the buffer for a diagnostic one point at a time.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • field :: field [in] 3-d array being offered for output or averaging in internally scaled arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • i :: i [in] The i-index to post the data in the buffer

  • j :: j [in] The j-index to post the data in the buffer

  • k :: k [in] The k-index to post the data in the buffer

[source]

subroutine mom_diag_mediator/post_data_3d_final(diag_field_id, diag_cs)

Post the final buffer using the standard post_data() interface. interface.

Parameters:
  • diag_field_id :: diag_field_id [in] The id for an output variable returned by a previous call to register_diag_field.

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

[source]

subroutine mom_diag_mediator/post_product_u(id, u_a, u_b, G, nz, diag, mask, alt_h)

Calculate and write out diagnostics that are the product of two 3-d arrays at u-points.

Parameters:
  • id :: id [in] The ID for this diagnostic

  • g :: [in] ocean grid structure

  • nz :: nz [in] The size of the arrays in the vertical

  • u_a :: u_a [in] The first u-point array in arbitrary units [A]

  • u_b :: u_b [in] The second u-point array in arbitrary units [B]

  • diag :: diag [in] regulates diagnostic output

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

  • alt_h :: alt_h [in] An alternate thickness to use for vertically remapping this diagnostic [H ~> m or kg m-2]

[source]

subroutine mom_diag_mediator/post_product_sum_u(id, u_a, u_b, G, nz, diag)

Calculate and write out diagnostics that are the vertical sum of the product of two 3-d arrays at u-points.

Parameters:
  • id :: id [in] The ID for this diagnostic

  • g :: [in] ocean grid structure

  • nz :: nz [in] The size of the arrays in the vertical

  • u_a :: u_a [in] The first u-point array in arbitrary units [A]

  • u_b :: u_b [in] The second u-point array in arbitrary units [B]

  • diag :: diag [in] regulates diagnostic output

[source]

subroutine mom_diag_mediator/post_product_v(id, v_a, v_b, G, nz, diag, mask, alt_h)

Calculate and write out diagnostics that are the product of two 3-d arrays at v-points.

Parameters:
  • id :: id [in] The ID for this diagnostic

  • g :: [in] ocean grid structure

  • nz :: nz [in] The size of the arrays in the vertical

  • v_a :: v_a [in] The first v-point array in arbitrary units [A]

  • v_b :: v_b [in] The second v-point array in arbitrary units [B]

  • diag :: diag [in] regulates diagnostic output

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

  • alt_h :: alt_h [in] An alternate thickness to use for vertically remapping this diagnostic [H ~> m or kg m-2]

[source]

subroutine mom_diag_mediator/post_product_sum_v(id, v_a, v_b, G, nz, diag)

Calculate and write out diagnostics that are the vertical sum of the product of two 3-d arrays at v-points.

Parameters:
  • id :: id [in] The ID for this diagnostic

  • g :: [in] ocean grid structure

  • nz :: nz [in] The size of the arrays in the vertical

  • v_a :: v_a [in] The first v-point array in arbitrary units [A]

  • v_b :: v_b [in] The second v-point array in arbitrary units [B]

  • diag :: diag [in] regulates diagnostic output

[source]

subroutine mom_diag_mediator/post_xy_average(diag_cs, diag, field)

Post the horizontally area-averaged diagnostic.

Parameters:
  • diag :: diag [in] This diagnostic

  • field :: field [in] Diagnostic field in arbitrary units [A ~> a]

  • diag_cs :: diag_cs [in] Diagnostics mediator control structure

Call to:

mom_checksums::zchksum

Called from:

post_data_3d_low

[source]

subroutine mom_diag_mediator/enable_averaging(time_int_in, time_end_in, diag_cs)

This subroutine enables the accumulation of time averages over the specified time interval.

Parameters:
  • time_int_in :: time_int_in [in] The time interval [s] over which any values that are offered are valid.

  • time_end_in :: time_end_in [in] The end time of the valid interval

  • diag_cs :: diag_cs [inout] Structure used to regulate diagnostic output

Called from:

mom_barotropic::btstep_timeloop

[source]

subroutine mom_diag_mediator/enable_averages(time_int, time_end, diag_CS, T_to_s)

Enable the accumulation of time averages over the specified time interval in time units.

Parameters:
  • time_int :: time_int [in] The time interval over which any values that are offered are valid [T ~> s].

  • time_end :: time_end [in] The end time of the valid interval.

  • diag_cs :: [inout] A structure that is used to regulate diagnostic output

  • t_to_s :: [in] A conversion factor for time_int to seconds [s T-1 ~> 1].

Called from:

mom_stochastics::apply_skeb mom_barotropic::btstep_timeloop mom_forcing_type::forcing_diagnostics mom_forcing_type::mech_forcing_diags

[source]

subroutine mom_diag_mediator/disable_averaging(diag_cs)

Call this subroutine to avoid averaging any offered fields.

Parameters:

diag_cs :: diag_cs [inout] Structure used to regulate diagnostic output

Called from:

mom_stochastics::apply_skeb mom_forcing_type::forcing_diagnostics mom_forcing_type::mech_forcing_diags

[source]

function  mom_diag_mediator/query_averaging_enabled(diag_cs, time_int, time_end)

Call this subroutine to determine whether the averaging is currently enabled. .true. is returned if it is.

Parameters:
  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • time_int :: time_int [out] Current setting of diagtime_int [s]

  • time_end :: time_end [out] Current setting of diagtime_end

Called from:

mom_ale::ale_regrid mom_lateral_mixing_coeffs::calc_resoln_function mom_lateral_mixing_coeffs::calc_slope_functions mom_lateral_mixing_coeffs::calc_sqg_struct mom_lateral_mixing_coeffs::calc_visbeck_coeffs_old mom_opacity::set_opacity mom_vert_friction::vertvisc mom_vert_friction::vertvisc_coef

[source]

function  mom_diag_mediator/get_diag_time_end(diag_cs)

This function returns the valid end time for use with diagnostics that are handled outside of the MOM6 diagnostics infrastructure.

Parameters:

diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

[source]

function  mom_diag_mediator/register_diag_field(module_name, field_name, axes_in, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, cell_methods, x_cell_method, y_cell_method, v_cell_method, conversion, v_extensive)

Returns the “diag_mediator” handle for a group (native, CMOR, z-coord, …) of diagnostics derived from one field.

Parameters:
  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of the diagnostic field

  • axes_in :: axes_in [in] Container w/ up to 3 integer handles that indicates axes for this field

  • init_time :: init_time [in] Time at which a field is first available?

  • long_name :: long_name [in] Long name of a field.

  • units :: units [in] Units of a field.

  • standard_name :: standard_name [in] Standardized name associated with a field

  • missing_value :: missing_value [in] A value that indicates missing values in output files, in unscaled arbitrary units [a]

  • range :: range [in] Valid range of a variable (not used in MOM?) in arbitrary units [a]

  • mask_variant :: mask_variant [in] If true a logical mask must be provided with post_data() calls (not used in MOM?) calls (not used in MOM?)

  • verbose :: verbose [in] If true, FMS is verbose (not used in MOM?)

  • do_not_log :: do_not_log [in] If true, do not log something (not used in MOM?)

  • err_msg :: err_msg [out] String into which an error message might be placed (not used in MOM?)

  • interp_method :: interp_method [in] If ‘none’ indicates the field should not be interpolated as a scalar

  • tile_count :: tile_count [in] no clue (not used in MOM?)

  • cmor_field_name :: cmor_field_name [in] CMOR name of a field

  • cmor_long_name :: cmor_long_name [in] CMOR long name of a field

  • cmor_units :: cmor_units [in] CMOR units of a field

  • cmor_standard_name :: cmor_standard_name [in] CMOR standardized name associated with a field

  • cell_methods :: cell_methods [in] String to append as cell_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

  • x_cell_method :: x_cell_method [in] Specifies the cell method for the x-direction. Use ‘’ have no method.

  • y_cell_method :: y_cell_method [in] Specifies the cell method for the y-direction. Use ‘’ have no method.

  • v_cell_method :: v_cell_method [in] Specifies the cell method for the vertical direction. Use ‘’ have no method.

  • conversion :: conversion [in] A value to multiply data by before writing to files, often including factors to undo internal scaling and in units of [a A-1 ~> 1]

  • v_extensive :: v_extensive [in] True for vertically extensive fields (vertically integrated). Default/absent for intensive.

Call to:

attach_cell_methods mom_diag_remap::diag_remap_set_active log_available_diag register_diag_field_expand_cmor mom_string_functions::trim_trailing_commas

Called from:

mom_controlled_forcing::controlled_forcing_init mom_coriolisadv::coriolisadv_init mom_diapyc_energy_req::diapyc_energy_req_init mom_cfc_cap::initialize_cfc_cap regional_dyes::initialize_dye_tracer marbl_tracers::initialize_marbl_tracers mom_int_tide_input::int_tide_input_init mom_interface_filter::interface_filter_init mom_cvmix_kpp::kpp_init marbl_forcing_mod::marbl_forcing_init mom_stoch_eos::mom_stoch_eos_init ocean_register_diag mom_opacity::opacity_init mom_porous_barriers::porous_barriers_init register_cell_measure mom_offline_main::register_diags_offline_transport marbl_tracers::register_marbl_diags mom_set_diffusivity::set_diffusivity_init mom_tracer_hor_diff::tracer_hor_diff_init mom_zanna_bolton::zb2020_init

[source]

function  mom_diag_mediator/register_diag_field_expand_cmor(dm_id, 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, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, cell_methods, x_cell_method, y_cell_method, v_cell_method, conversion, v_extensive)

Returns True if either the native or CMOR version of the diagnostic were registered. Updates ‘dm_id’ after calling register_diag_field_expand_axes() for both native and CMOR variants of the field. for both native and CMOR variants of the field.

Parameters:
  • dm_id :: dm_id [inout] The diag_mediator ID for this diagnostic group

  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of the diagnostic field

  • axes :: axes [in] Container with up to 3 integer handles that indicates axes for this field

  • init_time :: init_time [in] Time at which a field is first available?

  • long_name :: long_name [in] Long name of a field.

  • units :: units [in] Units of a field.

  • standard_name :: standard_name [in] Standardized name associated with a field

  • missing_value :: missing_value [in] A value that indicates missing values in output files, in unscaled arbitrary units [a]

  • range :: range [in] Valid range of a variable (not used in MOM?) in arbitrary units [a]

  • mask_variant :: mask_variant [in] If true a logical mask must be provided with post_data() calls (not used in MOM?) calls (not used in MOM?)

  • verbose :: verbose [in] If true, FMS is verbose (not used in MOM?)

  • do_not_log :: do_not_log [in] If true, do not log something (not used in MOM?)

  • err_msg :: err_msg [out] String into which an error message might be placed (not used in MOM?)

  • interp_method :: interp_method [in] If ‘none’ indicates the field should not be interpolated as a scalar

  • tile_count :: tile_count [in] no clue (not used in MOM?)

  • cmor_field_name :: cmor_field_name [in] CMOR name of a field

  • cmor_long_name :: cmor_long_name [in] CMOR long name of a field

  • cmor_units :: cmor_units [in] CMOR units of a field

  • cmor_standard_name :: cmor_standard_name [in] CMOR standardized name associated with a field

  • cell_methods :: cell_methods [in] String to append as cell_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

  • x_cell_method :: x_cell_method [in] Specifies the cell method for the x-direction. Use ‘’ have no method.

  • y_cell_method :: y_cell_method [in] Specifies the cell method for the y-direction. Use ‘’ have no method.

  • v_cell_method :: v_cell_method [in] Specifies the cell method for the vertical direction. Use ‘’ have no method.

  • conversion :: conversion [in] A value to multiply data by before writing to files, often including factors to undo internal scaling and in units of [a A-1 ~> 1]

  • v_extensive :: v_extensive [in] True for vertically extensive fields (vertically integrated). Default/absent for intensive.

Call to:

add_diag_to_list add_xyz_method attach_cell_methods register_diag_field_expand_axes

Called from:

register_diag_field

[source]

function  mom_diag_mediator/register_diag_field_expand_axes(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)

Returns an FMS id from register_diag_field_fms (the diag_manager routine) after expanding axes (axes-group) into handles and conditionally adding an FMS area_id for cell_measures.

Parameters:
  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of the diagnostic field

  • axes :: axes [in] Container with up to 3 integer handles that indicates axes for this field

  • init_time :: init_time [in] Time at which a field is first available?

  • long_name :: long_name [in] Long name of a field.

  • units :: units [in] Units of a field.

  • standard_name :: standard_name [in] Standardized name associated with a field

  • missing_value :: missing_value [in] A value that indicates missing values in output files, in unscaled arbitrary units [a]

  • range :: range [in] Valid range of a variable (not used in MOM?) in arbitrary units [a]

  • mask_variant :: mask_variant [in] If true a logical mask must be provided with post_data() calls (not used in MOM?) calls (not used in MOM?)

  • verbose :: verbose [in] If true, FMS is verbose (not used in MOM?)

  • do_not_log :: do_not_log [in] If true, do not log something (not used in MOM?)

  • err_msg :: err_msg [out] String into which an error message might be placed (not used in MOM?)

  • interp_method :: interp_method [in] If ‘none’ indicates the field should not be interpolated as a scalar

  • tile_count :: tile_count [in] no clue (not used in MOM?)

Called from:

register_diag_field_expand_cmor

[source]

subroutine mom_diag_mediator/add_diag_to_list(diag_cs, dm_id, fms_id, this_diag, axes, module_name, field_name)

Create a diagnostic type and attached to list.

Parameters:
  • diag_cs :: diag_cs Diagnostics mediator control structure

  • dm_id :: dm_id [inout] The diag_mediator ID for this diagnostic group

  • fms_id :: fms_id [in] The FMS diag_manager ID for this diagnostic

  • this_diag :: this_diag This diagnostic

  • axes :: axes [in] Container with up to 3 integer handles that indicates axes for this field

  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of diagnostic

Call to:

alloc_diag_with_id get_new_diag_id

Called from:

register_diag_field_expand_cmor

[source]

subroutine mom_diag_mediator/add_xyz_method(diag, axes, x_cell_method, y_cell_method, v_cell_method, v_extensive)

Adds the encoded “cell_methods” for a diagnostics as a diag% property This allows access to the cell_method for a given diagnostics at the time of sending.

Parameters:
  • diag :: diag This diagnostic

  • axes :: axes [in] Container w/ up to 3 integer handles that indicates axes for this field

  • x_cell_method :: x_cell_method [in] Specifies the cell method for the x-direction. Use ‘’ have no method.

  • y_cell_method :: y_cell_method [in] Specifies the cell method for the y-direction. Use ‘’ have no method.

  • v_cell_method :: v_cell_method [in] Specifies the cell method for the vertical direction. Use ‘’ have no method.

  • v_extensive :: v_extensive [in] True for vertically extensive fields (vertically integrated). Default/absent for intensive.

Called from:

register_diag_field_expand_cmor

[source]

subroutine mom_diag_mediator/attach_cell_methods(id, axes, ostring, cell_methods, x_cell_method, y_cell_method, v_cell_method, v_extensive)

Attaches “cell_methods” attribute to a variable based on defaults for axes_grp() or optional arguments. or optional arguments.

Parameters:
  • id :: id [in] Handle to diagnostic

  • axes :: axes [in] Container with up to 3 integer handles that indicates axes for this field

  • ostring :: ostring [out] The cell_methods strings that would appear in the file

  • cell_methods :: cell_methods [in] String to append as cell_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

  • x_cell_method :: x_cell_method [in] Specifies the cell method for the x-direction. Use ‘’ have no method.

  • y_cell_method :: y_cell_method [in] Specifies the cell method for the y-direction. Use ‘’ have no method.

  • v_cell_method :: v_cell_method [in] Specifies the cell method for the vertical direction. Use ‘’ have no method.

  • v_extensive :: v_extensive [in] True for vertically extensive fields (vertically integrated). Default/absent for intensive.

Called from:

register_diag_field register_diag_field_expand_cmor

[source]

function  mom_diag_mediator/register_scalar_field(module_name, field_name, init_time, diag_cs, long_name, units, missing_value, range, standard_name, do_not_log, err_msg, interp_method, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, conversion)

Registers a scalar diagnostic, returning an integer handle.

Return:

undefined :: An integer handle for a diagnostic array.

Parameters:
  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of the diagnostic field

  • init_time :: init_time [in] Time at which a field is first available?

  • diag_cs :: diag_cs [inout] Structure used to regulate diagnostic output

  • long_name :: long_name [in] Long name of a field.

  • units :: units [in] Units of a field.

  • standard_name :: standard_name [in] Standardized name associated with a field

  • missing_value :: missing_value [in] A value that indicates missing values in output files, in unscaled arbitrary units [a]

  • range :: range [in] Valid range of a variable (not used in MOM?) in arbitrary units [a]

  • do_not_log :: do_not_log [in] If true, do not log something (not used in MOM?)

  • err_msg :: err_msg [out] String into which an error message might be placed (not used in MOM?)

  • interp_method :: interp_method [in] If ‘none’ indicates the field should not be interpolated as a scalar

  • cmor_field_name :: cmor_field_name [in] CMOR name of a field

  • cmor_long_name :: cmor_long_name [in] CMOR long name of a field

  • cmor_units :: cmor_units [in] CMOR units of a field

  • cmor_standard_name :: cmor_standard_name [in] CMOR standardized name associated with a field

  • conversion :: conversion [in] A value to multiply data by before writing to files, often including factors to undo internal scaling and in units of [a A-1 ~> 1]

Call to:

alloc_diag_with_id get_new_diag_id log_available_diag

Called from:

mom_diagnose_kdwork::kdwork_init

[source]

function  mom_diag_mediator/register_static_field(module_name, field_name, axes, long_name, units, missing_value, range, mask_variant, standard_name, do_not_log, interp_method, tile_count, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, area, x_cell_method, y_cell_method, area_cell_method, conversion)

Registers a static diagnostic, returning an integer handle.

Return:

undefined :: An integer handle for a diagnostic array.

Parameters:
  • module_name :: module_name [in] Name of this module, usually “ocean_model” or “ice_shelf_model”

  • field_name :: field_name [in] Name of the diagnostic field

  • axes :: axes [in] Container with up to 3 integer handles that indicates axes for this field

  • long_name :: long_name [in] Long name of a field.

  • units :: units [in] Units of a field.

  • standard_name :: standard_name [in] Standardized name associated with a field

  • missing_value :: missing_value [in] A value that indicates missing values in output files, in unscaled arbitrary units [a]

  • range :: range [in] Valid range of a variable (not used in MOM?) in arbitrary units [a]

  • mask_variant :: mask_variant [in] If true a logical mask must be provided with post_data() calls (not used in MOM?) calls (not used in MOM?)

  • do_not_log :: do_not_log [in] If true, do not log something (not used in MOM?)

  • interp_method :: interp_method [in] If ‘none’ indicates the field should not be interpolated as a scalar

  • tile_count :: tile_count [in] no clue (not used in MOM?)

  • cmor_field_name :: cmor_field_name [in] CMOR name of a field

  • cmor_long_name :: cmor_long_name [in] CMOR long name of a field

  • cmor_units :: cmor_units [in] CMOR units of a field

  • cmor_standard_name :: cmor_standard_name [in] CMOR standardized name associated with a field

  • area :: area [in] fms_id for area_t

  • x_cell_method :: x_cell_method [in] Specifies the cell method for the x-direction.

  • y_cell_method :: y_cell_method [in] Specifies the cell method for the y-direction.

  • area_cell_method :: area_cell_method [in] Specifies the cell method for area

  • conversion :: conversion [in] A value to multiply data by before writing to files, often including factors to undo internal scaling and in units of [a A-1 ~> 1]

Call to:

alloc_diag_with_id get_new_diag_id log_available_diag mom_string_functions::trim_trailing_commas

Called from:

mom_geothermal::geothermal_init mom_stochastics::stochastics_init

[source]

subroutine mom_diag_mediator/describe_option(opt_name, value, diag_CS)

Describe an option setting in the diagnostic files.

Parameters:
  • opt_name :: opt_name [in] The name of the option

  • value :: value [in] A character string with the setting of the option.

  • diag_cs :: [in] Structure used to regulate diagnostic output

Called from:

log_available_diag

[source]

function  mom_diag_mediator/ocean_register_diag(var_desc, G, diag_CS, day)

Registers a diagnostic using the information encapsulated in the vardesc type argument and returns an integer handle to this diagnostic. That integer handle is negative if the diagnostic is unused.

Return:

undefined :: An integer handle to this diagnostic.

Parameters:
  • var_desc :: var_desc [in] The vardesc type describing the diagnostic

  • g :: [in] The ocean’s grid type

  • diag_cs :: [in] The diagnostic control structure

  • day :: day [in] The current model time

Call to:

register_diag_field

[source]

subroutine mom_diag_mediator/diag_mediator_infrastructure_init(err_msg)
Parameters:

err_msg :: err_msg [out] An error message

[source]

subroutine mom_diag_mediator/diag_mediator_init(G, GV, US, nz, param_file, diag_cs, doc_file_dir)

diag_mediator_init initializes the MOM diag_mediator and opens the available diagnostics file, if appropriate.

Parameters:
  • g :: [inout] The ocean grid type.

  • gv :: [in] The ocean vertical grid structure

  • us :: [in] A dimensional unit scaling type

  • nz :: nz [in] The number of layers in the model’s native grid.

  • param_file :: param_file [in] Parameter file structure

  • diag_cs :: diag_cs [inout] A pointer to a type with many variables used for diagnostics

  • doc_file_dir :: doc_file_dir [in] A directory in which to create the file

Call to:

mom_io::get_filename_appendix id_clock_diag_grid_updates id_clock_diag_mediator id_clock_diag_remap initialize_diag_type mom_string_functions::slasher

[source]

subroutine mom_diag_mediator/diag_set_state_ptrs(h, tv, diag_cs)

Set pointers to the default state fields used to remap diagnostics.

Parameters:
  • h :: h [in] the model thickness array [H ~> m or kg m-2]

  • tv :: tv [in] A structure with thermodynamic variables that are are used to convert thicknesses to vertical extents

  • diag_cs :: diag_cs [inout] diag mediator control structure

[source]

subroutine mom_diag_mediator/diag_update_remap_grids(diag_cs, alt_h, alt_T, alt_S, update_intensive, update_extensive)

Build/update vertical grids for diagnostic remapping.

Parameters:
  • diag_cs :: diag_cs [inout] Diagnostics control structure

  • alt_h :: alt_h [in] Used if remapped grids should be something other than the current thicknesses [H ~> m or kg m-2]

  • alt_t :: [in] Used if remapped grids should be something other than the current temperatures [C ~> degC]

  • alt_s :: [in] Used if remapped grids should be something other than the current salinity [S ~> ppt]

  • update_intensive :: update_intensive [in] If true (default), update the grids used for intensive diagnostics

  • update_extensive :: update_extensive [in] If true (not default), update the grids used for intensive diagnostics

Call to:

mom_error_handler::calltree_enter mom_error_handler::calltree_leave id_clock_diag_grid_updates

Called from:

mom_bulk_mixed_layer::bulkmixedlayer mom_mixed_layer_restrat::mixedlayer_restrat_bodner mom_mixed_layer_restrat::mixedlayer_restrat_om4 mom_dynamics_split_rk2::step_mom_dyn_split_rk2 mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b mom_dynamics_unsplit::step_mom_dyn_unsplit mom_thickness_diffuse::thickness_diffuse

[source]

subroutine mom_diag_mediator/diag_masks_set(G, nz, diag_cs)

Sets up the 2d and 3d masks for native diagnostics.

Parameters:
  • g :: [in] The ocean grid type.

  • nz :: nz [in] The number of layers in the model’s native grid.

  • diag_cs :: diag_cs A pointer to a type with many variables used for diagnostics

Call to:

downsample_diag_masks_set

[source]

subroutine mom_diag_mediator/set_piecemeal_extents(diag_cs)

Set the extents and fill values for the piecemeal buffers for all axes.

Parameters:

diag_cs :: diag_cs [inout] A pointer to a type with many variables used for diagnostics

Called from:

set_axes_info

[source]

subroutine mom_diag_mediator/diag_mediator_close_registration(diag_CS)
Parameters:

diag_cs :: [inout] Structure used to regulate diagnostic output

Call to:

mom_diag_remap::diag_remap_diag_registration_closed

Called from:

mom6 ocean_model_mod::ocean_model_init

[source]

subroutine mom_diag_mediator/axes_grp_end(axes)
Parameters:

axes :: axes [inout] Axes group to be destroyed

Called from:

diag_mediator_end

[source]

subroutine mom_diag_mediator/diag_mediator_end(time, diag_CS, end_diag_manager)
Parameters:
  • time :: time [in] The current model time

  • diag_cs :: [inout] Structure used to regulate diagnostic output

  • end_diag_manager :: end_diag_manager [in] If true, call diag_manager_end()

Call to:

axes_grp_end diag_grid_storage_end

Called from:

mom6 ocean_model_mod::ocean_model_end

[source]

function  mom_diag_mediator/get_new_diag_id(diag_cs)

Returns a new diagnostic id, it may be necessary to expand the diagnostics array.

Parameters:

diag_cs :: diag_cs [inout] Diagnostics control structure

Call to:

initialize_diag_type

Called from:

add_diag_to_list register_scalar_field register_static_field

[source]

subroutine mom_diag_mediator/initialize_diag_type(diag)

Initializes a diag_type() (used after allocating new memory) (used after allocating new memory)

Parameters:

diag :: diag [inout] diag_type() to be initialized to be initialized

Called from:

diag_mediator_init get_new_diag_id

[source]

subroutine mom_diag_mediator/alloc_diag_with_id(diag_id, diag_cs, diag)

Make a new diagnostic. Either use memory which is in the array of ‘primary’ diagnostics, or if that is in use, insert it to the list of secondary diagnostics.

Parameters:
  • diag_id :: diag_id [in] id for the diagnostic

  • diag_cs :: diag_cs [inout] structure used to regulate diagnostic output

  • diag :: diag structure representing a diagnostic (inout)

Called from:

add_diag_to_list register_scalar_field register_static_field

[source]

subroutine mom_diag_mediator/log_available_diag(used, module_name, field_name, cell_methods_string, comment, diag_CS, long_name, units, standard_name, variants, dimensions)

Log a diagnostic to the available diagnostics file.

Parameters:
  • used :: used [in] Whether this diagnostic was in the diag_table or not

  • module_name :: module_name [in] Name of the diagnostic module

  • field_name :: field_name [in] Name of this diagnostic field

  • cell_methods_string :: cell_methods_string [in] The spatial component of the CF cell_methods attribute

  • comment :: comment [in] A comment to append after [Used|Unused]

  • diag_cs :: [in] The diagnostics control structure

  • dimensions :: dimensions [in] Descriptor of the horizontal and vertical dimensions

  • long_name :: long_name [in] CF long name of diagnostic

  • units :: units [in] Units for diagnostic

  • standard_name :: standard_name [in] CF standardized name of diagnostic

  • variants :: variants [in] Alternate modules and variable names for this diagnostic and derived diagnostics

Call to:

describe_option

Called from:

register_diag_field register_scalar_field register_static_field

[source]

subroutine mom_diag_mediator/log_chksum_diag(docunit, description, chksum)

Log the diagnostic chksum to the chksum diag file.

Parameters:
  • docunit :: docunit [in] Handle of the log file

  • description :: description [in] Name of the diagnostic module

  • chksum :: chksum [in] chksum of the diagnostic

[source]

subroutine mom_diag_mediator/diag_grid_storage_init(grid_storage, G, GV, diag)

Allocates fields necessary to store diagnostic remapping fields.

Parameters:
  • grid_storage :: grid_storage [inout] Structure containing a snapshot of the target grids

  • g :: [in] Horizontal grid

  • gv :: [in] ocean vertical grid structure

  • diag :: diag [in] Diagnostic control structure used as the constructor template for this routine

Called from:

set_axes_info

[source]

subroutine mom_diag_mediator/diag_copy_diag_to_storage(grid_storage, h_state, diag)

Copy from the main diagnostic arrays to the grid storage as well as the native thicknesses.

Parameters:
  • grid_storage :: grid_storage [inout] Structure containing a snapshot of the target grids

  • h_state :: h_state [in] Current model thicknesses [H ~> m or kg m-2]

  • diag :: diag [in] Diagnostic control structure used as the constructor

Called from:

mom::initialize_mom mom::step_mom

[source]

subroutine mom_diag_mediator/diag_copy_storage_to_diag(diag, grid_storage)

Copy from the stored diagnostic arrays to the main diagnostic grids.

Parameters:
  • diag :: diag [inout] Diagnostic control structure used as the constructor

  • grid_storage :: grid_storage [in] Structure containing a snapshot of the target grids

Called from:

mom_diagnostics::calculate_diagnostic_fields mom_tracer_registry::post_tracer_diagnostics_at_sync mom_diagnostics::post_transport_diagnostics

[source]

subroutine mom_diag_mediator/diag_save_grids(diag)

Save the current diagnostic grids in the temporary structure within diag.

Parameters:

diag :: diag [inout] Diagnostic control structure used as the constructor

Called from:

mom_diagnostics::calculate_diagnostic_fields mom_tracer_registry::post_tracer_diagnostics_at_sync mom_diagnostics::post_transport_diagnostics

[source]

subroutine mom_diag_mediator/diag_restore_grids(diag)

Restore the diagnostic grids from the temporary structure within diag.

Parameters:

diag :: diag [inout] Diagnostic control structure used as the constructor

Called from:

mom_diagnostics::calculate_diagnostic_fields mom_tracer_registry::post_tracer_diagnostics_at_sync mom_diagnostics::post_transport_diagnostics

[source]

subroutine mom_diag_mediator/diag_grid_storage_end(grid_storage)

Deallocates the fields in the remapping fields container.

Parameters:

grid_storage :: grid_storage [inout] Structure containing a snapshot of the target grids

Called from:

diag_mediator_end

[source]

subroutine mom_diag_mediator/downsample_diag_masks_set(G, nz, diag_cs)
Parameters:
  • g :: [in] The ocean grid type.

  • nz :: nz [in] The number of layers in the model’s native grid.

  • diag_cs :: diag_cs A pointer to a type with many variables used for diagnostics

Called from:

diag_masks_set

[source]

subroutine mom_diag_mediator/downsample_diag_indices_get(fo1, fo2, dl, diag_cs, isv, iev, jsv, jev)

Get the diagnostics-compute indices (to be passed to send_data) based on the shape of the diagnostic field (the same way they are deduced for non-downsampled fields)

Parameters:
  • fo1 :: fo1 [in] The size of the diag field in x

  • fo2 :: fo2 [in] The size of the diag field in y

  • dl :: dl [in] Integer downsample level

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • isv :: isv [out] i-start index for diagnostics

  • iev :: iev [out] i-end index for diagnostics

  • jsv :: jsv [out] j-start index for diagnostics

  • jev :: jev [out] j-end index for diagnostics

Called from:

mom_diag_mediator::downsample_diag_field::downsample_diag_field_2d mom_diag_mediator::downsample_diag_field::downsample_diag_field_3d

[source]

subroutine mom_diag_mediator/downsample_diag_field_3d(locfield, locfield_dsamp, dl, diag_cs, diag, isv, iev, jsv, jev, mask)

This subroutine allocates and computes a downsampled array from an input array. It also determines the diagnostic computational grid indices for the downsampled array. 3d interface.

Parameters:
  • locfield :: locfield Input array pointer in arbitrary units [A ~> a]

  • locfield_dsamp :: locfield_dsamp [inout] Output (downsampled) array [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • diag :: diag [in] A structure describing the diagnostic to post

  • dl :: dl [in] Level of down sampling

  • isv :: isv [inout] i-start index for diagnostics

  • iev :: iev [inout] i-end index for diagnostics

  • jsv :: jsv [inout] j-start index for diagnostics

  • jev :: jev [inout] j-end index for diagnostics

  • mask :: mask [in] If present, use this real array as the data mask [nondim]

[source]

subroutine mom_diag_mediator/downsample_diag_field_2d(locfield, locfield_dsamp, dl, diag_cs, diag, isv, iev, jsv, jev, mask)

This subroutine allocates and computes a downsampled array from an input array. It also determines the diagnostic computational grid indices for the downsampled array. 2d interface.

Parameters:
  • locfield :: locfield Input array pointer in arbitrary units [A ~> a]

  • locfield_dsamp :: locfield_dsamp [inout] Output (downsampled) array [A ~> a]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • diag :: diag [in] A structure describing the diagnostic to post

  • dl :: dl [in] Level of down sampling

  • isv :: isv [inout] i-start index for diagnostics

  • iev :: iev [inout] i-end index for diagnostics

  • jsv :: jsv [inout] j-start index for diagnostics

  • jev :: jev [inout] j-end index for diagnostics

  • mask :: mask [in] If present, use this real array as the data mask [nondim].

[source]

subroutine mom_diag_mediator/downsample_field_3d(field_in, field_out, dl, method, mask, diag_cs, diag, isv_o, jsv_o, isv_d, iev_d, jsv_d, jev_d)

This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the “cell_methods” for the diagnostics as explained in the above table.

The down sample method could be deduced (before send_data call) from the diagx_cell_method, diagy_cell_method and diagv_cell_method

This is the summary of the down sample algorithm for a diagnostic field f:

\[f(Id,Jd) = \sum_{i,j} f(Id+i,Jd+j) * weight(Id+i,Jd+j) / [ \sum_{i,j} weight(Id+i,Jd+j)]\]

Here, i and j run from 0 to dl-1 (dl being the down sample level). Id,Jd are the down sampled (coarse grid) indices run over the coarsened compute grid, if and jf are the original (fine grid) indices.

Example   x_cell y_cell v_cell algorithm_id    implemented weight(if,jf)
---------------------------------------------------------------------------------------
theta     mean   mean   mean   MMM =222        G%areaT(if,jf)*h(if,jf)
u         point  mean   mean   PMM =022        dyCu(if,jf)*h(if,jf)*delta(if,Id)
v         mean   point  mean   MPM =202        dxCv(if,jf)*h(if,jf)*delta(jf,Jd)
?         point  sum    mean   PSM =012        h(if,jf)*delta(if,Id)
volcello  sum    sum    sum    SSS =111        1
T_dfxy_co sum    sum    point  SSP =110        1
umo       point  sum    sum    PSS =011        1*delta(if,Id)
vmo       sum    point  sum    SPS =101        1*delta(jf,Jd)
umo_2d    point  sum    point  PSP =010        1*delta(if,Id)
vmo_2d    sum    point  point  SPP =100        1*delta(jf,Jd)
?         point  mean   point  PMP =020        dyCu(if,jf)*delta(if,Id)
?         mean   point  point  MPP =200        dxCv(if,jf)*delta(jf,Jd)
w         mean   mean   point  MMP =220        G%areaT(if,jf)
h*theta   mean   mean   sum    MMS =221        G%areaT(if,jf)

delta is the Kronecker delta
Parameters:
  • field_in :: field_in Original field to be downsampled in arbitrary units [A ~> a]

  • field_out :: field_out Downsampled field in the same arbitrary units [A ~> a]

  • dl :: dl [in] Level of down sampling

  • method :: method [in] Sampling method

  • mask :: mask Mask for field [nondim]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • diag :: diag [in] A structure describing the diagnostic to post

  • isv_o :: isv_o [in] Original i-start index

  • jsv_o :: jsv_o [in] Original j-start index

  • isv_d :: isv_d [in] i-start index of down sampled data

  • iev_d :: iev_d [in] i-end index of down sampled data

  • jsv_d :: jsv_d [in] j-start index of down sampled data

  • jev_d :: jev_d [in] j-end index of down sampled data

Called from:

post_data_3d_low

[source]

subroutine mom_diag_mediator/downsample_field_2d(field_in, field_out, dl, method, mask, diag_cs, diag, isv_o, jsv_o, isv_d, iev_d, jsv_d, jev_d)

This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the “cell_methods” for the diagnostics as explained in the above table.

Parameters:
  • field_in :: field_in Original field to be downsampled in arbitrary units [A ~> a]

  • field_out :: field_out Downsampled field in the same arbitrary units [A ~> a]

  • dl :: dl [in] Level of down sampling

  • method :: method [in] Sampling method

  • mask :: mask Mask for field [nondim]

  • diag_cs :: diag_cs [in] Structure used to regulate diagnostic output

  • diag :: diag [in] A structure describing the diagnostic to post

  • isv_o :: isv_o [in] Original i-start index

  • jsv_o :: jsv_o [in] Original j-start index

  • isv_d :: isv_d [in] i-start index of down sampled data

  • iev_d :: iev_d [in] i-end index of down sampled data

  • jsv_d :: jsv_d [in] j-start index of down sampled data

  • jev_d :: jev_d [in] j-end index of down sampled data

Called from:

post_data_2d_low

[source]

subroutine mom_diag_mediator/downsample_mask_2d(field_in, field_out, dl, isc_o, jsc_o, isd_o, jsd_o, isc_d, iec_d, jsc_d, jec_d, isd_d, ied_d, jsd_d, jed_d)

Allocate and compute the 2d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub-cells are open, otherwise it’s closed (0)

Parameters:
  • isd_o :: isd_o [in] Original data domain i-start index

  • jsd_o :: jsd_o [in] Original data domain j-start index

  • field_in :: field_in [in] Original field to be down sampled in arbitrary units [A]

  • field_out :: field_out Down sampled field mask [nondim]

  • dl :: dl [in] Level of down sampling

  • isc_o :: isc_o [in] Original i-start index

  • jsc_o :: jsc_o [in] Original j-start index

  • isc_d :: isc_d [in] Computational i-start index of down sampled data

  • iec_d :: iec_d [in] Computational i-end index of down sampled data

  • jsc_d :: jsc_d [in] Computational j-start index of down sampled data

  • jec_d :: jec_d [in] Computational j-end index of down sampled data

  • isd_d :: isd_d [in] Data domain i-start index of down sampled data

  • ied_d :: ied_d [in] Data domain i-end index of down sampled data

  • jsd_d :: jsd_d [in] Data domain j-start index of down sampled data

  • jed_d :: jed_d [in] Data domain j-end index of down sampled data

[source]

subroutine mom_diag_mediator/downsample_mask_3d(field_in, field_out, dl, isc_o, jsc_o, isd_o, jsd_o, isc_d, iec_d, jsc_d, jec_d, isd_d, ied_d, jsd_d, jed_d)

Allocate and compute the 3d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub-cells are open, otherwise it’s closed (0)

Parameters:
  • isd_o :: isd_o [in] Original data domain i-start index

  • jsd_o :: jsd_o [in] Original data domain j-start index

  • field_in :: field_in [in] Original field to be down sampled in arbitrary units [A]

  • field_out :: field_out down sampled field mask [nondim]

  • dl :: dl [in] Level of down sampling

  • isc_o :: isc_o [in] Original i-start index

  • jsc_o :: jsc_o [in] Original j-start index

  • isc_d :: isc_d [in] Computational i-start index of down sampled data

  • iec_d :: iec_d [in] Computational i-end index of down sampled data

  • jsc_d :: jsc_d [in] Computational j-start index of down sampled data

  • jec_d :: jec_d [in] Computational j-end index of down sampled data

  • isd_d :: isd_d [in] Computational i-start index of down sampled data

  • ied_d :: ied_d [in] Computational i-end index of down sampled data

  • jsd_d :: jsd_d [in] Computational j-start index of down sampled data

  • jed_d :: jed_d [in] Computational j-end index of down sampled data

[source]

function  mom_diag_mediator/found_in_diagtable(diag, varName)

Fakes a register of a diagnostic to find out if an obsolete parameter appears in the diag_table.

Parameters:
  • diag :: diag [in] A structure used to control diagnostics.

  • varname :: [in] The obsolete diagnostic name

Called from:

mom_obsolete_diagnostics::diag_found

[source]

[source]