MOM6
|
The subroutines here provide convenient wrappers to the fms diag_manager interfaces with additional diagnostic capabilies.
Data Types | |
type | axes_grp |
A group of 1D axes that comprise a 1D/2D/3D mesh. More... | |
type | 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... | |
type | diag_dsamp |
Contained for down sampled masks. More... | |
type | diag_grid_storage |
Stores all the remapping grids and the model's native space thicknesses. More... | |
type | diag_grids_type |
Contains an array to store a diagnostic target grid. More... | |
type | diag_type |
This type is used to represent a diagnostic at the diag_mediator level. More... | |
type | diagcs_dsamp |
Container for down sampling information. More... | |
interface | downsample_diag_field |
Down sample a diagnostic field. More... | |
interface | downsample_field |
Down sample a field. More... | |
interface | downsample_mask |
Down sample the mask of a field. More... | |
interface | post_data |
Make a diagnostic available for averaging or output. More... | |
Variables | |
integer | psp =121 |
x:point,y:sum,z:point More... | |
integer | pss =122 |
x:point,y:sum,z:point More... | |
integer | psm =123 |
x:point,y:sum,z:mean More... | |
integer | pmp =131 |
x:point,y:mean,z:point More... | |
integer | pmm =133 |
x:point,y:mean,z:mean More... | |
integer | spp =211 |
x:sum,y:point,z:point More... | |
integer | sps =212 |
x:sum,y:point,z:sum More... | |
integer | ssp =221 |
x:sum;y:sum,z:point More... | |
integer | mpp =311 |
x:mean,y:point,z:point More... | |
integer | mpm =313 |
x:mean,y:point,z:mean More... | |
integer | mmp =331 |
x:mean,y:mean,z:point More... | |
integer | mms =332 |
x:mean,y:mean,z:sum More... | |
integer | sss =222 |
x:sum,y:sum,z:sum More... | |
integer | mmm =333 |
x:mean,y:mean,z:mean More... | |
integer | msk =-1 |
Use the downsample method of a mask. More... | |
integer | id_clock_diag_mediator |
Sets up diagnostics axes. More... | |
integer | id_clock_diag_remap |
Sets up diagnostics axes. More... | |
integer | id_clock_diag_grid_updates |
Sets up diagnostics axes. More... | |
subroutine, public | set_axes_info (G, GV, US, param_file, diag_cs, set_vertical) |
Sets up diagnostics axes. More... | |
subroutine | set_axes_info_dsamp (G, GV, param_file, diag_cs, id_zl_native, id_zi_native) |
subroutine, public | 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 | set_masks_for_axes_dsamp (G, diag_cs) |
subroutine, public | 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 | register_cell_measure (G, diag, Time) |
Sets a handle inside diagnostics mediator to associate 3d cell measures. More... | |
subroutine, public | 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 | diag_get_volume_cell_measure_dm_id (diag_cs) |
Returns diag_manager id for cell measure of h-cells. More... | |
subroutine, public | 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 | 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 | set_diag_mediator_grid (G, diag_cs) |
Set up the array extents for doing diagnostics. More... | |
subroutine | post_data_0d (diag_field_id, field, diag_cs, is_static) |
Make a real scalar diagnostic available for averaging or output. More... | |
subroutine, public | 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 | 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 | 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 | 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 | 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 | post_xy_average (diag_cs, diag, field) |
Post the horizontally area-averaged diagnostic. More... | |
subroutine, public | 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 | 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 | disable_averaging (diag_cs) |
Call this subroutine to avoid averaging any offered fields. More... | |
logical function, public | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | describe_option (opt_name, value, diag_CS) |
Describe an option setting in the diagnostic files. More... | |
integer function, public | 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 | diag_mediator_infrastructure_init (err_msg) |
subroutine, public | 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 | 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 | diag_update_remap_grids (diag_cs, alt_h, alt_T, alt_S) |
Build/update vertical grids for diagnostic remapping. More... | |
subroutine, public | diag_masks_set (G, nz, diag_cs) |
Sets up the 2d and 3d masks for native diagnostics. More... | |
subroutine, public | diag_mediator_close_registration (diag_CS) |
subroutine, public | diag_mediator_end (time, diag_CS, end_diag_manager) |
character(len=15) function | i2s (a, n_in) |
Convert the first n elements (up to 3) of an integer array to an underscore delimited string. More... | |
integer function | get_new_diag_id (diag_cs) |
Returns a new diagnostic id, it may be necessary to expand the diagnostics array. More... | |
subroutine | initialize_diag_type (diag) |
Initializes a diag_type (used after allocating new memory) More... | |
subroutine | 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 | 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 | log_chksum_diag (docunit, description, chksum) |
Log the diagnostic chksum to the chksum diag file. More... | |
subroutine, public | diag_grid_storage_init (grid_storage, G, diag) |
Allocates fields necessary to store diagnostic remapping fields. More... | |
subroutine, public | 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 | diag_copy_storage_to_diag (diag, grid_storage) |
Copy from the stored diagnostic arrays to the main diagnostic grids. More... | |
subroutine, public | diag_save_grids (diag) |
Save the current diagnostic grids in the temporary structure within diag. More... | |
subroutine, public | diag_restore_grids (diag) |
Restore the diagnostic grids from the temporary structure within diag. More... | |
subroutine, public | diag_grid_storage_end (grid_storage) |
Deallocates the fields in the remapping fields container. More... | |
subroutine | downsample_diag_masks_set (G, nz, diag_cs) |
subroutine | 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 | 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 | 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 | 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 | 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 | 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 | 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... | |
|
private |
Create a diagnostic type and attached to list.
diag_cs | Diagnostics mediator control structure | |
[in,out] | dm_id | The diag_mediator ID for this diagnostic group |
[in] | fms_id | The FMS diag_manager ID for this diagnostic |
this_diag | This diagnostic | |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of diagnostic |
[in] | msg | Message for errors |
Definition at line 2388 of file MOM_diag_mediator.F90.
References alloc_diag_with_id(), mom_error_handler::assert(), and get_new_diag_id().
Referenced by register_diag_field_expand_cmor().
|
private |
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.
diag | This diagnostic | |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | x_cell_method | Specifies the cell method for the x-direction. Use '' have no method. |
[in] | y_cell_method | Specifies the cell method for the y-direction. Use '' have no method. |
[in] | v_cell_method | Specifies the cell method for the vertical direction. Use '' have no method. |
[in] | v_extensive | True for vertically extensive fields (vertically integrated). Default/absent for intensive. |
Definition at line 2414 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error().
Referenced by register_diag_field_expand_cmor().
|
private |
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.
[in] | diag_id | id for the diagnostic |
[in,out] | diag_cs | structure used to regulate diagnostic output |
diag | structure representing a diagnostic (inout) |
Definition at line 3421 of file MOM_diag_mediator.F90.
Referenced by add_diag_to_list(), register_scalar_field(), and register_static_field().
|
private |
Attaches "cell_methods" attribute to a variable based on defaults for axes_grp or optional arguments.
[in] | id | Handle to diagnostic |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[out] | ostring | The cell_methods strings that would appear in the file |
[in] | cell_methods | 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. |
[in] | x_cell_method | Specifies the cell method for the x-direction. Use '' have no method. |
[in] | y_cell_method | Specifies the cell method for the y-direction. Use '' have no method. |
[in] | v_cell_method | Specifies the cell method for the vertical direction. Use '' have no method. |
[in] | v_extensive | True for vertically extensive fields (vertically integrated). Default/absent for intensive. |
Definition at line 2477 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error().
Referenced by register_diag_field_expand_cmor().
subroutine, public mom_diag_mediator::define_axes_group | ( | type(diag_ctrl), intent(in), target | diag_cs, |
integer, dimension(:), intent(in) | handles, | ||
type(axes_grp), intent(out) | axes, | ||
integer, intent(in), optional | nz, | ||
integer, intent(in), optional | vertical_coordinate_number, | ||
character(len=*), intent(in), optional | x_cell_method, | ||
character(len=*), intent(in), optional | y_cell_method, | ||
character(len=*), intent(in), optional | v_cell_method, | ||
logical, intent(in), optional | is_h_point, | ||
logical, intent(in), optional | is_q_point, | ||
logical, intent(in), optional | is_u_point, | ||
logical, intent(in), optional | is_v_point, | ||
logical, intent(in), optional | is_layer, | ||
logical, intent(in), optional | is_interface, | ||
logical, intent(in), optional | is_native, | ||
logical, intent(in), optional | needs_remapping, | ||
logical, intent(in), optional | needs_interpolating, | ||
type(axes_grp), optional, target | xyave_axes | ||
) |
Defines a group of "axes" from list of handles.
[in] | diag_cs | Diagnostics control structure |
[in] | handles | A list of 1D axis handles |
[out] | axes | The group of 1D axes |
[in] | nz | Number of layers in this diagnostic grid |
[in] | vertical_coordinate_number | Index number for vertical coordinate |
[in] | x_cell_method | A x-direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | y_cell_method | A y-direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | v_cell_method | A vertical direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | is_h_point | If true, indicates this axes group for h-point located fields |
[in] | is_q_point | If true, indicates this axes group for q-point located fields |
[in] | is_u_point | If true, indicates this axes group for u-point located fields |
[in] | is_v_point | If true, indicates this axes group for v-point located fields |
[in] | is_layer | If true, indicates that this axes group is for a layer vertically-located field. |
[in] | is_interface | If true, indicates that this axes group is for an interface vertically-located field. |
[in] | is_native | If true, indicates that this axes group is for a native model grid. False for any other grid. |
[in] | needs_remapping | 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. |
[in] | needs_interpolating | 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 | The corresponding axes group for horizontally area-average diagnostics |
Definition at line 943 of file MOM_diag_mediator.F90.
References i2s(), and mom_error_handler::mom_error().
Referenced by mom_internal_tides::internal_tides_init(), and set_axes_info().
|
private |
Defines a group of downsampled "axes" from list of handles.
[in] | diag_cs | Diagnostics control structure |
[in] | handles | A list of 1D axis handles |
[out] | axes | The group of 1D axes |
[in] | dl | Downsample level |
[in] | nz | Number of layers in this diagnostic grid |
[in] | vertical_coordinate_number | Index number for vertical coordinate |
[in] | x_cell_method | A x-direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | y_cell_method | A y-direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | v_cell_method | A vertical direction cell method used to construct the "cell_methods" attribute in CF convention |
[in] | is_h_point | If true, indicates this axes group for h-point located fields |
[in] | is_q_point | If true, indicates this axes group for q-point located fields |
[in] | is_u_point | If true, indicates this axes group for u-point located fields |
[in] | is_v_point | If true, indicates this axes group for v-point located fields |
[in] | is_layer | If true, indicates that this axes group is for a layer vertically-located field. |
[in] | is_interface | If true, indicates that this axes group is for an interface vertically-located field. |
[in] | is_native | If true, indicates that this axes group is for a native model grid. False for any other grid. |
[in] | needs_remapping | 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. |
[in] | needs_interpolating | 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 | The corresponding axes group for horizontally area-average diagnostics |
Definition at line 1054 of file MOM_diag_mediator.F90.
References i2s(), and mom_error_handler::mom_error().
Referenced by set_axes_info_dsamp().
|
private |
Describe an option setting in the diagnostic files.
[in] | opt_name | The name of the option |
[in] | value | A character string with the setting of the option. |
[in] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 2843 of file MOM_diag_mediator.F90.
Referenced by log_available_diag().
subroutine, public mom_diag_mediator::diag_associate_volume_cell_measure | ( | type(diag_ctrl), intent(inout) | diag_cs, |
integer, intent(in) | id_h_volume | ||
) |
Attaches the id of cell volumes to axes groups for use with cell_measures.
[in,out] | diag_cs | Diagnostics control structure |
[in] | id_h_volume | Diag_manager id for volume of h-cells |
Definition at line 908 of file MOM_diag_mediator.F90.
Referenced by register_cell_measure().
subroutine, public mom_diag_mediator::diag_copy_diag_to_storage | ( | type(diag_grid_storage), intent(inout) | grid_storage, |
real, dimension(:,:,:), intent(in) | h_state, | ||
type(diag_ctrl), intent(in) | diag | ||
) |
Copy from the main diagnostic arrays to the grid storage as well as the native thicknesses.
[in,out] | grid_storage | Structure containing a snapshot of the target grids |
[in] | h_state | Current model thicknesses |
[in] | diag | Diagnostic control structure used as the contructor |
Definition at line 3511 of file MOM_diag_mediator.F90.
Referenced by mom::initialize_mom(), and mom::step_mom().
subroutine, public mom_diag_mediator::diag_copy_storage_to_diag | ( | type(diag_ctrl), intent(inout) | diag, |
type(diag_grid_storage), intent(in) | grid_storage | ||
) |
Copy from the stored diagnostic arrays to the main diagnostic grids.
[in,out] | diag | Diagnostic control structure used as the contructor |
[in] | grid_storage | Structure containing a snapshot of the target grids |
Definition at line 3530 of file MOM_diag_mediator.F90.
Referenced by mom_diagnostics::calculate_diagnostic_fields(), mom_tracer_registry::post_tracer_diagnostics(), and mom_diagnostics::post_transport_diagnostics().
integer function, public mom_diag_mediator::diag_get_volume_cell_measure_dm_id | ( | type(diag_ctrl), intent(in) | diag_cs | ) |
Returns diag_manager id for cell measure of h-cells.
[in] | diag_cs | Diagnostics control structure |
Definition at line 930 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::diag_grid_storage_end | ( | type(diag_grid_storage), intent(inout) | grid_storage | ) |
Deallocates the fields in the remapping fields container.
[in,out] | grid_storage | Structure containing a snapshot of the target grids |
Definition at line 3581 of file MOM_diag_mediator.F90.
Referenced by diag_mediator_end().
subroutine, public mom_diag_mediator::diag_grid_storage_init | ( | type(diag_grid_storage), intent(inout) | grid_storage, |
type(ocean_grid_type), intent(in) | G, | ||
type(diag_ctrl), intent(in) | diag | ||
) |
Allocates fields necessary to store diagnostic remapping fields.
[in,out] | grid_storage | Structure containing a snapshot of the target grids |
[in] | g | Horizontal grid |
[in] | diag | Diagnostic control structure used as the contructor template for this routine |
Definition at line 3486 of file MOM_diag_mediator.F90.
Referenced by set_axes_info().
subroutine, public mom_diag_mediator::diag_masks_set | ( | type(ocean_grid_type), intent(in), target | G, |
integer, intent(in) | nz, | ||
type(diag_ctrl), pointer | diag_cs | ||
) |
Sets up the 2d and 3d masks for native diagnostics.
[in] | g | The ocean grid type. |
[in] | nz | The number of layers in the model's native grid. |
diag_cs | A pointer to a type with many variables used for diagnostics |
Definition at line 3242 of file MOM_diag_mediator.F90.
References downsample_diag_masks_set().
subroutine, public mom_diag_mediator::diag_mediator_close_registration | ( | type(diag_ctrl), intent(inout) | diag_CS | ) |
[in,out] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 3284 of file MOM_diag_mediator.F90.
Referenced by mom_main(), mom_ocean_model_mct::ocean_model_init(), and mom_ocean_model_nuopc::ocean_model_init().
subroutine, public mom_diag_mediator::diag_mediator_end | ( | type(time_type), intent(in) | time, |
type(diag_ctrl), intent(inout) | diag_CS, | ||
logical, intent(in), optional | end_diag_manager | ||
) |
[in] | time | The current model time |
[in,out] | diag_cs | Structure used to regulate diagnostic output |
[in] | end_diag_manager | If true, call diag_manager_end() |
Definition at line 3299 of file MOM_diag_mediator.F90.
References diag_grid_storage_end().
Referenced by mom_main(), mom_ocean_model_nuopc::ocean_model_end(), and mom_ocean_model_mct::ocean_model_end().
subroutine, public mom_diag_mediator::diag_mediator_infrastructure_init | ( | character(len=*), intent(out), optional | err_msg | ) |
[out] | err_msg | An error message |
Definition at line 2963 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::diag_mediator_init | ( | type(ocean_grid_type), intent(inout), target | G, |
type(verticalgrid_type), intent(in), target | GV, | ||
type(unit_scale_type), intent(in), target | US, | ||
integer, intent(in) | nz, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout) | diag_cs, | ||
character(len=*), intent(in), optional | doc_file_dir | ||
) |
diag_mediator_init initializes the MOM diag_mediator and opens the available diagnostics file, if appropriate.
[in,out] | g | The ocean grid type. |
[in] | gv | The ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | nz | The number of layers in the model's native grid. |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | A pointer to a type with many variables used for diagnostics |
[in] | doc_file_dir | A directory in which to create the file |
Definition at line 2972 of file MOM_diag_mediator.F90.
References id_clock_diag_grid_updates, id_clock_diag_mediator, id_clock_diag_remap, initialize_diag_type(), mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
subroutine, public mom_diag_mediator::diag_register_area_ids | ( | type(diag_ctrl), intent(inout) | diag_cs, |
integer, intent(in), optional | id_area_t, | ||
integer, intent(in), optional | id_area_q | ||
) |
Attaches the id of cell areas to axes groups for use with cell_measures.
[in,out] | diag_cs | Diagnostics control structure |
[in] | id_area_t | Diag_mediator id for area of h-cells |
[in] | id_area_q | Diag_mediator id for area of q-cells |
Definition at line 864 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::diag_restore_grids | ( | type(diag_ctrl), intent(inout) | diag | ) |
Restore the diagnostic grids from the temporary structure within diag.
[in,out] | diag | Diagnostic control structure used as the contructor |
Definition at line 3564 of file MOM_diag_mediator.F90.
Referenced by mom_diagnostics::calculate_diagnostic_fields(), mom_tracer_registry::post_tracer_diagnostics(), and mom_diagnostics::post_transport_diagnostics().
subroutine, public mom_diag_mediator::diag_save_grids | ( | type(diag_ctrl), intent(inout) | diag | ) |
Save the current diagnostic grids in the temporary structure within diag.
[in,out] | diag | Diagnostic control structure used as the contructor |
Definition at line 3548 of file MOM_diag_mediator.F90.
Referenced by mom_diagnostics::calculate_diagnostic_fields(), mom_tracer_registry::post_tracer_diagnostics(), and mom_diagnostics::post_transport_diagnostics().
subroutine, public mom_diag_mediator::diag_set_state_ptrs | ( | real, dimension(:,:,:), intent(in), target | h, |
real, dimension(:,:,:), intent(in), target | T, | ||
real, dimension(:,:,:), intent(in), target | S, | ||
type(eos_type), intent(in), target | eqn_of_state, | ||
type(diag_ctrl), intent(inout) | diag_cs | ||
) |
Set pointers to the default state fields used to remap diagnostics.
[in] | h | the model thickness array [H ~> m or kg m-2] |
[in] | t | the model temperature array |
[in] | s | the model salinity array |
[in] | eqn_of_state | Equation of state structure |
[in,out] | diag_cs | diag mediator control structure |
Definition at line 3169 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::diag_update_remap_grids | ( | type(diag_ctrl), intent(inout) | diag_cs, |
real, dimension(:,:,:), intent(in), optional, target | alt_h, | ||
real, dimension(:,:,:), intent(in), optional, target | alt_T, | ||
real, dimension(:,:,:), intent(in), optional, target | alt_S | ||
) |
Build/update vertical grids for diagnostic remapping.
[in,out] | diag_cs | Diagnostics control structure |
[in] | alt_h | Used if remapped grids should be something other than the current thicknesses [H ~> m or kg m-2] |
[in] | alt_t | Used if remapped grids should be something other than the current temperatures |
[in] | alt_s | Used if remapped grids should be something other than the current salinity |
Definition at line 3187 of file MOM_diag_mediator.F90.
References id_clock_diag_grid_updates, and mom_error_handler::mom_error().
Referenced by mom_ale::ale_main(), mom_bulk_mixed_layer::bulkmixedlayer(), mom_mixed_layer_restrat::mixedlayer_restrat_bml(), mom_mixed_layer_restrat::mixedlayer_restrat_general(), mom_dynamics_split_rk2::step_mom_dyn_split_rk2(), mom_dynamics_unsplit::step_mom_dyn_unsplit(), and mom_thickness_diffuse::thickness_diffuse().
subroutine, public mom_diag_mediator::disable_averaging | ( | type(diag_ctrl), intent(inout) | diag_cs | ) |
Call this subroutine to avoid averaging any offered fields.
[in,out] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 1840 of file MOM_diag_mediator.F90.
Referenced by mom_forcing_type::forcing_diagnostics(), mom_forcing_type::mech_forcing_diags(), mom_main(), mom_ice_shelf::shelf_calc_flux(), mom_ice_shelf::solo_time_step(), and mom_ice_shelf_dynamics::update_ice_shelf().
|
private |
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.
locfield | Input array pointer | |
[in,out] | locfield_dsamp | Output (downsampled) array |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | dl | Level of down sampling |
[in,out] | isv | i-start index for diagnostics |
[in,out] | iev | i-end index for diagnostics |
[in,out] | jsv | j-start index for diagnostics |
[in,out] | jev | j-end index for diagnostics |
[in] | mask | If present, use this real array as the data mask. |
Definition at line 3774 of file MOM_diag_mediator.F90.
References downsample_diag_indices_get(), and mom_error_handler::mom_error().
|
private |
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.
locfield | Input array pointer | |
[in,out] | locfield_dsamp | Output (downsampled) array |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | dl | Level of down sampling |
[in,out] | isv | i-start index for diagnostics |
[in,out] | iev | i-end index for diagnostics |
[in,out] | jsv | j-start index for diagnostics |
[in,out] | jev | j-end index for diagnostics |
[in] | mask | If present, use this real array as the data mask. |
Definition at line 3733 of file MOM_diag_mediator.F90.
References downsample_diag_indices_get(), and mom_error_handler::mom_error().
|
private |
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)
[in] | fo1 | The size of the diag field in x |
[in] | fo2 | The size of the diag field in y |
[in] | dl | Integer downsample level |
[in] | diag_cs | Structure used to regulate diagnostic output |
[out] | isv | i-start index for diagnostics |
[out] | iev | i-end index for diagnostics |
[out] | jsv | j-start index for diagnostics |
[out] | jev | j-end index for diagnostics |
Definition at line 3660 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error().
Referenced by downsample_diag_field_2d(), and downsample_diag_field_3d().
|
private |
[in] | g | The ocean grid type. |
[in] | nz | The number of layers in the model's native grid. |
diag_cs | A pointer to a type with many variables used for diagnostics |
Definition at line 3601 of file MOM_diag_mediator.F90.
Referenced by diag_masks_set().
|
private |
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.
field_in | Original field to be down sampled | |
field_out | Down sampled field | |
[in] | dl | Level of down sampling |
[in] | method | Sampling method |
mask | Mask for field | |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | isv_o | Original i-start index |
[in] | jsv_o | Original j-start index |
[in] | isv_d | i-start index of down sampled data |
[in] | iev_d | i-end index of down sampled data |
[in] | jsv_d | j-start index of down sampled data |
[in] | jev_d | j-end index of down sampled data |
Definition at line 4005 of file MOM_diag_mediator.F90.
References mmp, mom_error_handler::mom_error(), mpp, msk, pmp, psp, spp, and ssp.
Referenced by post_data_2d_low().
|
private |
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 algoritm 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
field_in | Original field to be down sampled | |
field_out | down sampled field | |
[in] | dl | Level of down sampling |
[in] | method | Sampling method |
mask | Mask for field | |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | isv_o | Original i-start index |
[in] | jsv_o | Original j-start index |
[in] | isv_d | i-start index of down sampled data |
[in] | iev_d | i-end index of down sampled data |
[in] | jsv_d | j-start index of down sampled data |
[in] | jev_d | j-end index of down sampled data |
Definition at line 3849 of file MOM_diag_mediator.F90.
References mmm, mmp, mms, mom_error_handler::mom_error(), mpm, msk, pmm, pss, sps, and sss.
Referenced by post_data_3d_low().
|
private |
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)
[in] | field_in | Original field to be down sampled |
field_out | Down sampled field | |
[in] | dl | Level of down sampling |
[in] | isc_o | Original i-start index |
[in] | jsc_o | Original j-start index |
[in] | isc_d | Computational i-start index of down sampled data |
[in] | iec_d | Computational i-end index of down sampled data |
[in] | jsc_d | Computational j-start index of down sampled data |
[in] | jec_d | Computational j-end index of down sampled data |
[in] | isd_d | Computational i-start index of down sampled data |
[in] | ied_d | Computational i-end index of down sampled data |
[in] | jsd_d | Computational j-start index of down sampled data |
[in] | jed_d | Computational j-end index of down sampled data |
Definition at line 4151 of file MOM_diag_mediator.F90.
|
private |
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)
[in] | field_in | Original field to be down sampled |
field_out | down sampled field | |
[in] | dl | Level of down sampling |
[in] | isc_o | Original i-start index |
[in] | jsc_o | Original j-start index |
[in] | isc_d | Computational i-start index of down sampled data |
[in] | iec_d | Computational i-end index of down sampled data |
[in] | jsc_d | Computational j-start index of down sampled data |
[in] | jec_d | Computational j-end index of down sampled data |
[in] | isd_d | Computational i-start index of down sampled data |
[in] | ied_d | Computational i-end index of down sampled data |
[in] | jsd_d | Computational j-start index of down sampled data |
[in] | jed_d | Computational j-end index of down sampled data |
Definition at line 4186 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::enable_averages | ( | real, intent(in) | time_int, |
type(time_type), intent(in) | time_end, | ||
type(diag_ctrl), intent(inout) | diag_CS, | ||
real, intent(in), optional | T_to_s | ||
) |
Enable the accumulation of time averages over the specified time interval in time units.
[in] | time_int | The time interval over which any values that are offered are valid [T ~> s]. |
[in] | time_end | The end time of the valid interval. |
[in,out] | diag_cs | A structure that is used to regulate diagnostic output |
[in] | t_to_s | A conversion factor for time_int to [s]. |
Definition at line 1820 of file MOM_diag_mediator.F90.
Referenced by mom_forcing_type::forcing_diagnostics().
subroutine, public mom_diag_mediator::enable_averaging | ( | real, intent(in) | time_int_in, |
type(time_type), intent(in) | time_end_in, | ||
type(diag_ctrl), intent(inout) | diag_cs | ||
) |
This subroutine enables the accumulation of time averages over the specified time interval.
[in] | time_int_in | The time interval [s] over which any values that are offered are valid. |
[in] | time_end_in | The end time of the valid interval |
[in,out] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 1805 of file MOM_diag_mediator.F90.
Referenced by mom_barotropic::btstep(), mom_forcing_type::mech_forcing_diags(), mom_main(), mom_ice_shelf::shelf_calc_flux(), mom_ice_shelf::solo_time_step(), and mom_ice_shelf_dynamics::update_ice_shelf().
type(time_type) function, public mom_diag_mediator::get_diag_time_end | ( | type(diag_ctrl), intent(in) | diag_cs | ) |
This function returns the valid end time for use with diagnostics that are handled outside of the MOM6 diagnostics infrastructure.
[in] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 1863 of file MOM_diag_mediator.F90.
|
private |
Returns a new diagnostic id, it may be necessary to expand the diagnostics array.
[in,out] | diag_cs | Diagnostics control structure |
Definition at line 3377 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), and initialize_diag_type().
Referenced by add_diag_to_list(), register_scalar_field(), and register_static_field().
|
private |
Convert the first n elements (up to 3) of an integer array to an underscore delimited string.
[in] | a | The array of integers to translate |
[in] | n_in | The number of elements to translate, by default all |
Definition at line 3355 of file MOM_diag_mediator.F90.
Referenced by define_axes_group(), and define_axes_group_dsamp().
|
private |
Initializes a diag_type (used after allocating new memory)
[in,out] | diag | diag_type to be initialized |
Definition at line 3408 of file MOM_diag_mediator.F90.
Referenced by diag_mediator_init(), and get_new_diag_id().
|
private |
Log a diagnostic to the available diagnostics file.
[in] | used | Whether this diagnostic was in the diag_table or not |
[in] | module_name | Name of the diagnostic module |
[in] | field_name | Name of this diagnostic field |
[in] | cell_methods_string | The spatial component of the CF cell_methods attribute |
[in] | comment | A comment to append after [Used|Unused] |
[in] | diag_cs | The diagnotics control structure |
[in] | long_name | CF long name of diagnostic |
[in] | units | Units for diagnostic |
[in] | standard_name | CF standardized name of diagnostic |
Definition at line 3442 of file MOM_diag_mediator.F90.
References describe_option().
Referenced by register_diag_field_expand_cmor(), register_scalar_field(), and register_static_field().
|
private |
Log the diagnostic chksum to the chksum diag file.
[in] | docunit | Handle of the log file |
[in] | description | Name of the diagnostic module |
[in] | chksum | chksum of the diagnostic |
Definition at line 3475 of file MOM_diag_mediator.F90.
integer function, public mom_diag_mediator::ocean_register_diag | ( | type(vardesc), intent(in) | var_desc, |
type(ocean_grid_type), intent(in) | G, | ||
type(diag_ctrl), intent(in), target | diag_CS, | ||
type(time_type), intent(in) | 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.
[in] | var_desc | The vardesc type describing the diagnostic |
[in] | g | The ocean's grid type |
[in] | diag_cs | The diagnotic control structure |
[in] | day | The current model time |
Definition at line 2860 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error(), and register_diag_field().
|
private |
Make a real scalar diagnostic available for averaging or output.
[in] | diag_field_id | The id for an output variable returned by a previous call to register_diag_field. |
[in] | field | real value being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
Definition at line 1199 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), and id_clock_diag_mediator.
subroutine, public mom_diag_mediator::post_data_1d_k | ( | integer, intent(in) | diag_field_id, |
real, dimension(:), intent(in), target | field, | ||
type(diag_ctrl), intent(in), target | diag_cs, | ||
logical, intent(in), optional | is_static | ||
) |
Make a real 1-d array diagnostic available for averaging or output.
[in] | diag_field_id | The id for an output variable returned by a previous call to register_diag_field. |
[in] | field | 1-d array being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
Definition at line 1233 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), and id_clock_diag_mediator.
|
private |
Make a real 2-d array diagnostic available for averaging or output.
[in] | diag_field_id | The id for an output variable returned by a previous call to register_diag_field. |
[in] | field | 2-d array being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
[in] | mask | If present, use this real array as the data mask. |
Definition at line 1287 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), id_clock_diag_mediator, and post_data_2d_low().
|
private |
Make a real 2-d array diagnostic available for averaging or output using a diag_type instead of an integer id.
[in] | diag | A structure describing the diagnostic to post |
[in] | field | 2-d array being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
[in] | mask | If present, use this real array as the data mask. |
Definition at line 1314 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), downsample_field_2d(), mom_error_handler::mom_error(), and msk.
Referenced by post_data_2d().
|
private |
Make a real 3-d array diagnostic available for averaging or output.
[in] | diag_field_id | The id for an output variable returned by a previous call to register_diag_field. |
[in] | field | 3-d array being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
[in] | mask | If present, use this real array as the data mask. |
[in] | alt_h | An alternate thickness to use for vertically |
Definition at line 1458 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), id_clock_diag_mediator, id_clock_diag_remap, mom_error_handler::mom_error(), and post_data_3d_low().
|
private |
Make a real 3-d array diagnostic available for averaging or output using a diag_type instead of an integer id.
[in] | diag | A structure describing the diagnostic to post |
[in] | field | 3-d array being offered for output or averaging |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | is_static | If true, this is a static field that is always offered. |
[in] | mask | If present, use this real array as the data mask. |
Definition at line 1579 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), downsample_field_3d(), mom_error_handler::mom_error(), msk, and post_xy_average().
Referenced by post_data_3d().
|
private |
Post the horizontally area-averaged diagnostic.
[in] | diag | This diagnostic |
[in] | field | Diagnostic field |
[in] | diag_cs | Diagnostics mediator control structure |
Definition at line 1751 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), and mom_diag_remap::horizontally_average_diag_field().
Referenced by post_data_3d_low().
logical function, public mom_diag_mediator::query_averaging_enabled | ( | type(diag_ctrl), intent(in) | diag_cs, |
real, intent(out), optional | time_int, | ||
type(time_type), intent(out), optional | time_end | ||
) |
Call this subroutine to determine whether the averaging is currently enabled. .true. is returned if it is.
[in] | diag_cs | Structure used to regulate diagnostic output |
[out] | time_int | Current setting of diagtime_int [s] |
[out] | time_end | Current setting of diagtime_end |
Definition at line 1850 of file MOM_diag_mediator.F90.
Referenced by mom_lateral_mixing_coeffs::calc_resoln_function(), mom_lateral_mixing_coeffs::calc_slope_functions(), mom_lateral_mixing_coeffs::calc_visbeck_coeffs(), and mom_opacity::set_opacity().
subroutine, public mom_diag_mediator::register_cell_measure | ( | type(ocean_grid_type), intent(in) | G, |
type(diag_ctrl), intent(inout), target | diag, | ||
type(time_type), intent(in) | Time | ||
) |
Sets a handle inside diagnostics mediator to associate 3d cell measures.
[in] | g | Ocean grid structure |
[in,out] | diag | Regulates diagnostic output |
[in] | time | Model time |
Definition at line 893 of file MOM_diag_mediator.F90.
References diag_associate_volume_cell_measure(), and register_diag_field().
integer function, public mom_diag_mediator::register_diag_field | ( | character(len=*), intent(in) | module_name, |
character(len=*), intent(in) | field_name, | ||
type(axes_grp), intent(in), target | axes_in, | ||
type(time_type), intent(in) | init_time, | ||
character(len=*), intent(in), optional | long_name, | ||
character(len=*), intent(in), optional | units, | ||
real, intent(in), optional | missing_value, | ||
real, dimension(2), intent(in), optional | range, | ||
logical, intent(in), optional | mask_variant, | ||
character(len=*), intent(in), optional | standard_name, | ||
logical, intent(in), optional | verbose, | ||
logical, intent(in), optional | do_not_log, | ||
character(len=*), intent(out), optional | err_msg, | ||
character(len=*), intent(in), optional | interp_method, | ||
integer, intent(in), optional | tile_count, | ||
character(len=*), intent(in), optional | cmor_field_name, | ||
character(len=*), intent(in), optional | cmor_long_name, | ||
character(len=*), intent(in), optional | cmor_units, | ||
character(len=*), intent(in), optional | cmor_standard_name, | ||
character(len=*), intent(in), optional | cell_methods, | ||
character(len=*), intent(in), optional | x_cell_method, | ||
character(len=*), intent(in), optional | y_cell_method, | ||
character(len=*), intent(in), optional | v_cell_method, | ||
real, intent(in), optional | conversion, | ||
logical, intent(in), optional | v_extensive | ||
) |
Returns the "diag_mediator" handle for a group (native, CMOR, z-coord, ...) of diagnostics derived from one field.
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of the diagnostic field |
[in] | axes_in | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | init_time | Time at which a field is first available? |
[in] | long_name | Long name of a field. |
[in] | units | Units of a field. |
[in] | standard_name | Standardized name associated with a field |
[in] | missing_value | A value that indicates missing values. |
[in] | range | Valid range of a variable (not used in MOM?) |
[in] | mask_variant | If true a logical mask must be provided with post_data calls (not used in MOM?) |
[in] | verbose | If true, FMS is verbose (not used in MOM?) |
[in] | do_not_log | If true, do not log something (not used in MOM?) |
[out] | err_msg | String into which an error message might be placed (not used in MOM?) |
[in] | interp_method | If 'none' indicates the field should not be interpolated as a scalar |
[in] | tile_count | no clue (not used in MOM?) |
[in] | cmor_field_name | CMOR name of a field |
[in] | cmor_long_name | CMOR long name of a field |
[in] | cmor_units | CMOR units of a field |
[in] | cmor_standard_name | CMOR standardized name associated with a field |
[in] | cell_methods | 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. |
[in] | x_cell_method | Specifies the cell method for the x-direction. Use '' have no method. |
[in] | y_cell_method | Specifies the cell method for the y-direction. Use '' have no method. |
[in] | v_cell_method | Specifies the cell method for the vertical direction. Use '' have no method. |
[in] | conversion | A value to multiply data by before writing to file |
[in] | v_extensive | True for vertically extensive fields (vertically integrated). Default/absent for intensive. |
Definition at line 1878 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error(), and register_diag_field_expand_cmor().
Referenced by mom_coriolisadv::coriolisadv_init(), mom_diapyc_energy_req::diapyc_energy_req_init(), mom_int_tide_input::int_tide_input_init(), mom_cvmix_kpp::kpp_init(), ocean_register_diag(), mom_opacity::opacity_init(), register_cell_measure(), mom_offline_main::register_diags_offline_transport(), mom_set_diffusivity::set_diffusivity_init(), and mom_tracer_hor_diff::tracer_hor_diff_init().
|
private |
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.
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of the diagnostic field |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | init_time | Time at which a field is first available? |
[in] | long_name | Long name of a field. |
[in] | units | Units of a field. |
[in] | standard_name | Standardized name associated with a field |
[in] | missing_value | A value that indicates missing values. |
[in] | range | Valid range of a variable (not used in MOM?) |
[in] | mask_variant | If true a logical mask must be provided with post_data calls (not used in MOM?) |
[in] | verbose | If true, FMS is verbose (not used in MOM?) |
[in] | do_not_log | If true, do not log something (not used in MOM?) |
[out] | err_msg | String into which an error message might be placed (not used in MOM?) |
[in] | interp_method | If 'none' indicates the field should not be interpolated as a scalar |
[in] | tile_count | no clue (not used in MOM?) |
Definition at line 2286 of file MOM_diag_mediator.F90.
Referenced by register_diag_field_expand_cmor().
|
private |
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.
[in,out] | dm_id | The diag_mediator ID for this diagnostic group |
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of the diagnostic field |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | init_time | Time at which a field is first available? |
[in] | long_name | Long name of a field. |
[in] | units | Units of a field. |
[in] | standard_name | Standardized name associated with a field |
[in] | missing_value | A value that indicates missing values. |
[in] | range | Valid range of a variable (not used in MOM?) |
[in] | mask_variant | If true a logical mask must be provided with post_data calls (not used in MOM?) |
[in] | verbose | If true, FMS is verbose (not used in MOM?) |
[in] | do_not_log | If true, do not log something (not used in MOM?) |
[out] | err_msg | String into which an error message might be placed (not used in MOM?) |
[in] | interp_method | If 'none' indicates the field should not be interpolated as a scalar |
[in] | tile_count | no clue (not used in MOM?) |
[in] | cmor_field_name | CMOR name of a field |
[in] | cmor_long_name | CMOR long name of a field |
[in] | cmor_units | CMOR units of a field |
[in] | cmor_standard_name | CMOR standardized name associated with a field |
[in] | cell_methods | 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. |
[in] | x_cell_method | Specifies the cell method for the x-direction. Use '' have no method. |
[in] | y_cell_method | Specifies the cell method for the y-direction. Use '' have no method. |
[in] | v_cell_method | Specifies the cell method for the vertical direction. Use '' have no method. |
[in] | conversion | A value to multiply data by before writing to file |
[in] | v_extensive | True for vertically extensive fields (vertically integrated). Default/absent for intensive. |
Definition at line 2121 of file MOM_diag_mediator.F90.
References add_diag_to_list(), add_xyz_method(), attach_cell_methods(), mom_error_handler::is_root_pe(), log_available_diag(), and register_diag_field_expand_axes().
Referenced by register_diag_field().
integer function, public mom_diag_mediator::register_scalar_field | ( | character(len=*), intent(in) | module_name, |
character(len=*), intent(in) | field_name, | ||
type(time_type), intent(in) | init_time, | ||
type(diag_ctrl), intent(inout) | diag_cs, | ||
character(len=*), intent(in), optional | long_name, | ||
character(len=*), intent(in), optional | units, | ||
real, intent(in), optional | missing_value, | ||
real, dimension(2), intent(in), optional | range, | ||
character(len=*), intent(in), optional | standard_name, | ||
logical, intent(in), optional | do_not_log, | ||
character(len=*), intent(out), optional | err_msg, | ||
character(len=*), intent(in), optional | interp_method, | ||
character(len=*), intent(in), optional | cmor_field_name, | ||
character(len=*), intent(in), optional | cmor_long_name, | ||
character(len=*), intent(in), optional | cmor_units, | ||
character(len=*), intent(in), optional | cmor_standard_name | ||
) |
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of the diagnostic field |
[in] | init_time | Time at which a field is first available? |
[in,out] | diag_cs | Structure used to regulate diagnostic output |
[in] | long_name | Long name of a field. |
[in] | units | Units of a field. |
[in] | standard_name | Standardized name associated with a field |
[in] | missing_value | A value that indicates missing values. |
[in] | range | Valid range of a variable (not used in MOM?) |
[in] | do_not_log | If true, do not log something (not used in MOM?) |
[out] | err_msg | String into which an error message might be placed (not used in MOM?) |
[in] | interp_method | If 'none' indicates the field should not be interpolated as a scalar |
[in] | cmor_field_name | CMOR name of a field |
[in] | cmor_long_name | CMOR long name of a field |
[in] | cmor_units | CMOR units of a field |
[in] | cmor_standard_name | CMOR standardized name associated with a field |
Definition at line 2596 of file MOM_diag_mediator.F90.
References alloc_diag_with_id(), mom_error_handler::assert(), get_new_diag_id(), mom_error_handler::is_root_pe(), and log_available_diag().
integer function, public mom_diag_mediator::register_static_field | ( | character(len=*), intent(in) | module_name, |
character(len=*), intent(in) | field_name, | ||
type(axes_grp), intent(in), target | axes, | ||
character(len=*), intent(in), optional | long_name, | ||
character(len=*), intent(in), optional | units, | ||
real, intent(in), optional | missing_value, | ||
real, dimension(2), intent(in), optional | range, | ||
logical, intent(in), optional | mask_variant, | ||
character(len=*), intent(in), optional | standard_name, | ||
logical, intent(in), optional | do_not_log, | ||
character(len=*), intent(in), optional | interp_method, | ||
integer, intent(in), optional | tile_count, | ||
character(len=*), intent(in), optional | cmor_field_name, | ||
character(len=*), intent(in), optional | cmor_long_name, | ||
character(len=*), intent(in), optional | cmor_units, | ||
character(len=*), intent(in), optional | cmor_standard_name, | ||
integer, intent(in), optional | area, | ||
character(len=*), intent(in), optional | x_cell_method, | ||
character(len=*), intent(in), optional | y_cell_method, | ||
character(len=*), intent(in), optional | area_cell_method, | ||
real, intent(in), optional | conversion | ||
) |
Registers a static diagnostic, returning an integer handle.
[in] | module_name | Name of this module, usually "ocean_model" or "ice_shelf_model" |
[in] | field_name | Name of the diagnostic field |
[in] | axes | Container w/ up to 3 integer handles that indicates axes for this field |
[in] | long_name | Long name of a field. |
[in] | units | Units of a field. |
[in] | standard_name | Standardized name associated with a field |
[in] | missing_value | A value that indicates missing values. |
[in] | range | Valid range of a variable (not used in MOM?) |
[in] | mask_variant | If true a logical mask must be provided with post_data calls (not used in MOM?) |
[in] | do_not_log | If true, do not log something (not used in MOM?) |
[in] | interp_method | If 'none' indicates the field should not be interpolated as a scalar |
[in] | tile_count | no clue (not used in MOM?) |
[in] | cmor_field_name | CMOR name of a field |
[in] | cmor_long_name | CMOR long name of a field |
[in] | cmor_units | CMOR units of a field |
[in] | cmor_standard_name | CMOR standardized name associated with a field |
[in] | area | fms_id for area_t |
[in] | x_cell_method | Specifies the cell method for the x-direction. |
[in] | y_cell_method | Specifies the cell method for the y-direction. |
[in] | area_cell_method | Specifies the cell method for area |
[in] | conversion | A value to multiply data by before writing to file |
Definition at line 2700 of file MOM_diag_mediator.F90.
References alloc_diag_with_id(), mom_error_handler::assert(), get_new_diag_id(), mom_error_handler::is_root_pe(), and log_available_diag().
Referenced by mom_geothermal::geothermal_init().
subroutine, public mom_diag_mediator::set_axes_info | ( | type(ocean_grid_type), intent(inout) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout) | diag_cs, | ||
logical, intent(in), optional | set_vertical | ||
) |
Sets up diagnostics axes.
[in,out] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | Diagnostics control structure |
[in] | set_vertical | If true or missing, set up vertical axes |
Definition at line 344 of file MOM_diag_mediator.F90.
References define_axes_group(), diag_grid_storage_init(), and set_axes_info_dsamp().
Referenced by mom_oda_driver_mod::init_oda().
|
private |
[in] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | Diagnostics control structure |
[in] | id_zl_native | ID of native layers |
[in] | id_zi_native | ID of native interfaces |
Definition at line 533 of file MOM_diag_mediator.F90.
References define_axes_group_dsamp(), and mom_error_handler::mom_error().
Referenced by set_axes_info().
subroutine, public mom_diag_mediator::set_diag_mediator_grid | ( | type(ocean_grid_type), intent(inout) | G, |
type(diag_ctrl), intent(inout) | diag_cs | ||
) |
Set up the array extents for doing diagnostics.
[in,out] | g | The ocean's grid structure |
[in,out] | diag_cs | Structure used to regulate diagnostic output |
Definition at line 1187 of file MOM_diag_mediator.F90.
subroutine, public mom_diag_mediator::set_masks_for_axes | ( | type(ocean_grid_type), intent(in), target | G, |
type(diag_ctrl), pointer | 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()
[in] | g | The ocean grid type. |
diag_cs | A pointer to a type with many variables used for diagnostics |
Definition at line 706 of file MOM_diag_mediator.F90.
References mom_error_handler::assert(), and set_masks_for_axes_dsamp().
|
private |
[in] | g | The ocean grid type. |
diag_cs | A pointer to a type with many variables used for diagnostics |
Definition at line 804 of file MOM_diag_mediator.F90.
References mom_error_handler::mom_error().
Referenced by set_masks_for_axes().
|
private |
Sets up diagnostics axes.
[in,out] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | Diagnostics control structure |
[in] | set_vertical | If true or missing, set up vertical axes |
Definition at line 338 of file MOM_diag_mediator.F90.
Referenced by diag_mediator_init(), and diag_update_remap_grids().
integer mom_diag_mediator::id_clock_diag_mediator |
Sets up diagnostics axes.
[in,out] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | Diagnostics control structure |
[in] | set_vertical | If true or missing, set up vertical axes |
Definition at line 338 of file MOM_diag_mediator.F90.
Referenced by diag_mediator_init(), post_data_0d(), post_data_1d_k(), post_data_2d(), and post_data_3d().
|
private |
Sets up diagnostics axes.
[in,out] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | Parameter file structure |
[in,out] | diag_cs | Diagnostics control structure |
[in] | set_vertical | If true or missing, set up vertical axes |
Definition at line 338 of file MOM_diag_mediator.F90.
Referenced by diag_mediator_init(), and post_data_3d().
|
private |
x:mean,y:mean,z:mean
Definition at line 169 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:mean,y:mean,z:point
Definition at line 166 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d(), and downsample_field_3d().
|
private |
x:mean,y:mean,z:sum
Definition at line 167 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:mean,y:point,z:mean
Definition at line 165 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:mean,y:point,z:point
Definition at line 164 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d().
|
private |
Use the downsample method of a mask.
Definition at line 170 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d(), downsample_field_3d(), post_data_2d_low(), and post_data_3d_low().
|
private |
x:point,y:mean,z:mean
Definition at line 160 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:point,y:mean,z:point
Definition at line 159 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d().
|
private |
x:point,y:sum,z:mean
Definition at line 158 of file MOM_diag_mediator.F90.
integer mom_diag_mediator::psp =121 |
x:point,y:sum,z:point
Definition at line 156 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d().
|
private |
x:point,y:sum,z:point
Definition at line 157 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:sum,y:point,z:point
Definition at line 161 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d().
|
private |
x:sum,y:point,z:sum
Definition at line 162 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().
|
private |
x:sum;y:sum,z:point
Definition at line 163 of file MOM_diag_mediator.F90.
Referenced by downsample_field_2d().
|
private |
x:sum,y:sum,z:sum
Definition at line 168 of file MOM_diag_mediator.F90.
Referenced by downsample_field_3d().