MOM6
MOM_diag_mediator.F90 File Reference

Go to the source code of this file.

Data Types

interface  mom_diag_mediator::post_data
 Make a diagnostic available for averaging or output. More...
 
interface  mom_diag_mediator::downsample_field
 Down sample a field. More...
 
interface  mom_diag_mediator::downsample_mask
 Down sample the mask of a field. More...
 
interface  mom_diag_mediator::downsample_diag_field
 Down sample a diagnostic field. More...
 
type  mom_diag_mediator::diag_dsamp
 Contained for down sampled masks. More...
 
type  mom_diag_mediator::axes_grp
 A group of 1D axes that comprise a 1D/2D/3D mesh. More...
 
type  mom_diag_mediator::diag_grids_type
 Contains an array to store a diagnostic target grid. More...
 
type  mom_diag_mediator::diag_grid_storage
 Stores all the remapping grids and the model's native space thicknesses. More...
 
type  mom_diag_mediator::diag_type
 This type is used to represent a diagnostic at the diag_mediator level. More...
 
type  mom_diag_mediator::diagcs_dsamp
 Container for down sampling information. More...
 
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. More...
 

Modules

module  mom_diag_mediator
 The subroutines here provide convenient wrappers to the fms diag_manager interfaces with additional diagnostic capabilies.
 

Macros

#define IMPLIES(A, B)   ((.not. (A)) .or. (B))
 
#define MAX_DSAMP_LEV   2
 

Variables

integer mom_diag_mediator::psp =121
 x:point,y:sum,z:point More...
 
integer mom_diag_mediator::pss =122
 x:point,y:sum,z:point More...
 
integer mom_diag_mediator::psm =123
 x:point,y:sum,z:mean More...
 
integer mom_diag_mediator::pmp =131
 x:point,y:mean,z:point More...
 
integer mom_diag_mediator::pmm =133
 x:point,y:mean,z:mean More...
 
integer mom_diag_mediator::spp =211
 x:sum,y:point,z:point More...
 
integer mom_diag_mediator::sps =212
 x:sum,y:point,z:sum More...
 
integer mom_diag_mediator::ssp =221
 x:sum;y:sum,z:point More...
 
integer mom_diag_mediator::mpp =311
 x:mean,y:point,z:point More...
 
integer mom_diag_mediator::mpm =313
 x:mean,y:point,z:mean More...
 
integer mom_diag_mediator::mmp =331
 x:mean,y:mean,z:point More...
 
integer mom_diag_mediator::mms =332
 x:mean,y:mean,z:sum More...
 
integer mom_diag_mediator::sss =222
 x:sum,y:sum,z:sum More...
 
integer mom_diag_mediator::mmm =333
 x:mean,y:mean,z:mean More...
 
integer mom_diag_mediator::msk =-1
 Use the downsample method of a mask. More...
 
integer mom_diag_mediator::id_clock_diag_mediator
 Sets up diagnostics axes. More...
 
integer mom_diag_mediator::id_clock_diag_remap
 Sets up diagnostics axes. More...
 
integer mom_diag_mediator::id_clock_diag_grid_updates
 Sets up diagnostics axes. More...
 
subroutine, public mom_diag_mediator::set_axes_info (G, GV, US, param_file, diag_cs, set_vertical)
 Sets up diagnostics axes. More...
 
subroutine mom_diag_mediator::set_axes_info_dsamp (G, GV, param_file, diag_cs, id_zl_native, id_zi_native)
 
subroutine, public 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() More...
 
subroutine mom_diag_mediator::set_masks_for_axes_dsamp (G, diag_cs)
 
subroutine, public 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. More...
 
subroutine, public mom_diag_mediator::register_cell_measure (G, diag, Time)
 Sets a handle inside diagnostics mediator to associate 3d cell measures. More...
 
subroutine, public 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. More...
 
integer function, public mom_diag_mediator::diag_get_volume_cell_measure_dm_id (diag_cs)
 Returns diag_manager id for cell measure of h-cells. More...
 
subroutine, public 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)
 Defines a group of "axes" from list of handles. More...
 
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. More...
 
subroutine, public mom_diag_mediator::set_diag_mediator_grid (G, diag_cs)
 Set up the array extents for doing diagnostics. More...
 
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. More...
 
subroutine, public 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
subroutine mom_diag_mediator::post_xy_average (diag_cs, diag, field)
 Post the horizontally area-averaged diagnostic. More...
 
subroutine, public 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. More...
 
subroutine, public 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. More...
 
subroutine, public mom_diag_mediator::disable_averaging (diag_cs)
 Call this subroutine to avoid averaging any offered fields. More...
 
logical function, public 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. More...
 
type(time_type) function, public 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. More...
 
integer function, public 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. More...
 
logical 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. More...
 
integer 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. More...
 
subroutine mom_diag_mediator::add_diag_to_list (diag_cs, dm_id, fms_id, this_diag, axes, module_name, field_name, msg)
 Create a diagnostic type and attached to list. More...
 
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. More...
 
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. More...
 
integer function, public 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)
 
integer function, public 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. More...
 
subroutine mom_diag_mediator::describe_option (opt_name, value, diag_CS)
 Describe an option setting in the diagnostic files. More...
 
integer function, public 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 diagostic. That integer handle is negative if the diagnostic is unused. More...
 
subroutine, public mom_diag_mediator::diag_mediator_infrastructure_init (err_msg)
 
subroutine, public 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. More...
 
subroutine, public mom_diag_mediator::diag_set_state_ptrs (h, T, S, eqn_of_state, diag_cs)
 Set pointers to the default state fields used to remap diagnostics. More...
 
subroutine, public mom_diag_mediator::diag_update_remap_grids (diag_cs, alt_h, alt_T, alt_S)
 Build/update vertical grids for diagnostic remapping. More...
 
subroutine, public mom_diag_mediator::diag_masks_set (G, nz, diag_cs)
 Sets up the 2d and 3d masks for native diagnostics. More...
 
subroutine, public mom_diag_mediator::diag_mediator_close_registration (diag_CS)
 
subroutine, public mom_diag_mediator::diag_mediator_end (time, diag_CS, end_diag_manager)
 
character(len=15) function mom_diag_mediator::i2s (a, n_in)
 Convert the first n elements (up to 3) of an integer array to an underscore delimited string. More...
 
integer function mom_diag_mediator::get_new_diag_id (diag_cs)
 Returns a new diagnostic id, it may be necessary to expand the diagnostics array. More...
 
subroutine mom_diag_mediator::initialize_diag_type (diag)
 Initializes a diag_type (used after allocating new memory) More...
 
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 diags. More...
 
subroutine mom_diag_mediator::log_available_diag (used, module_name, field_name, cell_methods_string, comment, diag_CS, long_name, units, standard_name)
 Log a diagnostic to the available diagnostics file. More...
 
subroutine mom_diag_mediator::log_chksum_diag (docunit, description, chksum)
 Log the diagnostic chksum to the chksum diag file. More...
 
subroutine, public mom_diag_mediator::diag_grid_storage_init (grid_storage, G, diag)
 Allocates fields necessary to store diagnostic remapping fields. More...
 
subroutine, public 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. More...
 
subroutine, public mom_diag_mediator::diag_copy_storage_to_diag (diag, grid_storage)
 Copy from the stored diagnostic arrays to the main diagnostic grids. More...
 
subroutine, public mom_diag_mediator::diag_save_grids (diag)
 Save the current diagnostic grids in the temporary structure within diag. More...
 
subroutine, public mom_diag_mediator::diag_restore_grids (diag)
 Restore the diagnostic grids from the temporary structure within diag. More...
 
subroutine, public mom_diag_mediator::diag_grid_storage_end (grid_storage)
 Deallocates the fields in the remapping fields container. More...
 
subroutine mom_diag_mediator::downsample_diag_masks_set (G, nz, diag_cs)
 
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 diag field (the same way they are deduced for non-downsampled fields) More...
 
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 diagnostics-compurte indices for the downsampled array 3d interface. More...
 
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 diagnostics-compurte indices for the downsampled array 2d interface. More...
 
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. More...
 
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. More...
 
subroutine mom_diag_mediator::downsample_mask_2d (field_in, field_out, dl, isc_o, jsc_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) More...
 
subroutine mom_diag_mediator::downsample_mask_3d (field_in, field_out, dl, isc_o, jsc_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) More...
 

Macro Definition Documentation

◆ IMPLIES

#define IMPLIES (   A,
 
)    ((.not. (A)) .or. (B))

◆ MAX_DSAMP_LEV

#define MAX_DSAMP_LEV   2