MOM6
|
provides runtime remapping of diagnostics to z star, sigma and rho vertical coordinates.
The diag_remap_ctrl type represents a remapping of diagnostics to a particular vertical coordinate. The module is used by the diag mediator module in the following way:
Data Types | |
type | diag_remap_ctrl |
Represents remapping of diagnostics to a particular vertical coordinate. More... | |
Functions/Subroutines | |
subroutine, public | diag_remap_init (remap_cs, coord_tuple) |
Initialize a diagnostic remapping type with the given vertical coordinate. More... | |
subroutine, public | diag_remap_end (remap_cs) |
De-init a diagnostic remapping type. Free allocated memory. More... | |
subroutine, public | diag_remap_diag_registration_closed (remap_cs) |
Inform that all diagnostics have been registered. If _set_active() has not been called on the remapping control structure will be disabled. This saves time in the case that a vertical coordinate was configured but no diagnostics which use the coordinate appeared in the diag_table. More... | |
subroutine, public | diag_remap_set_active (remap_cs) |
Indicate that this remapping type is actually used by the diag manager. If this is never called then the type will be disabled to save time. See further explanation with diag_remap_registration_closed. More... | |
subroutine, public | diag_remap_configure_axes (remap_cs, GV, US, param_file) |
Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation. More... | |
subroutine, public | diag_remap_get_axes_info (remap_cs, nz, id_layer, id_interface) |
Get layer and interface axes ids for this coordinate Needed when defining axes groups. More... | |
logical function, public | diag_remap_axes_configured (remap_cs) |
Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when diag_remap_configure_axes() has been successfully called. More... | |
subroutine, public | diag_remap_update (remap_cs, G, GV, US, h, T, S, eqn_of_state) |
Build/update target vertical grids for diagnostic remapping. More... | |
subroutine, public | diag_remap_do_remap (remap_cs, G, GV, h, staggered_in_x, staggered_in_y, mask, missing_value, field, remapped_field) |
Remap diagnostic field to alternative vertical grid. More... | |
subroutine, public | diag_remap_calc_hmask (remap_cs, G, mask) |
Calculate masks for target grid. More... | |
subroutine, public | vertically_reintegrate_diag_field (remap_cs, G, h, staggered_in_x, staggered_in_y, mask, missing_value, field, reintegrated_field) |
Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid. More... | |
subroutine, public | vertically_interpolate_diag_field (remap_cs, G, h, staggered_in_x, staggered_in_y, mask, missing_value, field, interpolated_field) |
Vertically interpolate diagnostic field to alternative vertical grid. More... | |
subroutine, public | horizontally_average_diag_field (G, GV, h, staggered_in_x, staggered_in_y, is_layer, is_extensive, missing_value, field, averaged_field, averaged_mask) |
Horizontally average field. More... | |
logical function, public mom_diag_remap::diag_remap_axes_configured | ( | type(diag_remap_ctrl), intent(in) | remap_cs | ) |
Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when diag_remap_configure_axes() has been successfully called.
[in] | remap_cs | Diagnostic coordinate control structure |
Definition at line 255 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_calc_hmask | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(out) | mask | ||
) |
Calculate masks for target grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[out] | mask | h-point mask for target grid |
Definition at line 435 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and regrid_consts::coordinatemode().
subroutine, public mom_diag_remap::diag_remap_configure_axes | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file | ||
) |
Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation.
[in,out] | remap_cs | Diag remap control structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | Parameter file structure |
Definition at line 180 of file MOM_diag_remap.F90.
References regrid_consts::coordinatemode(), and mom_string_functions::lowercase().
subroutine, public mom_diag_remap::diag_remap_diag_registration_closed | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
Inform that all diagnostics have been registered. If _set_active() has not been called on the remapping control structure will be disabled. This saves time in the case that a vertical coordinate was configured but no diagnostics which use the coordinate appeared in the diag_table.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 159 of file MOM_diag_remap.F90.
References diag_remap_end().
subroutine, public mom_diag_remap::diag_remap_do_remap | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | remapped_field | ||
) |
Remap diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | remapped_field | Field remapped to new coordinate |
Definition at line 340 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and mom_remapping::remapping_core_h().
subroutine, public mom_diag_remap::diag_remap_end | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
De-init a diagnostic remapping type. Free allocated memory.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 142 of file MOM_diag_remap.F90.
Referenced by diag_remap_diag_registration_closed().
subroutine, public mom_diag_remap::diag_remap_get_axes_info | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
integer, intent(out) | nz, | ||
integer, intent(out) | id_layer, | ||
integer, intent(out) | id_interface | ||
) |
Get layer and interface axes ids for this coordinate Needed when defining axes groups.
[in] | remap_cs | Diagnostic coordinate control structure |
[out] | nz | Number of vertical levels for the coordinate |
[out] | id_layer | 1D-axes id for layer points |
[out] | id_interface | 1D-axes id for interface points |
Definition at line 239 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_init | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
character(len=*), intent(in) | coord_tuple | ||
) |
Initialize a diagnostic remapping type with the given vertical coordinate.
[in,out] | remap_cs | Diag remapping control structure |
[in] | coord_tuple | A string in form of MODULE_SUFFIX PARAMETER_SUFFIX COORDINATE_NAME |
Definition at line 124 of file MOM_diag_remap.F90.
References regrid_consts::coordinatemode(), and mom_string_functions::extractword().
subroutine, public mom_diag_remap::diag_remap_set_active | ( | type(diag_remap_ctrl), intent(inout) | remap_cs | ) |
Indicate that this remapping type is actually used by the diag manager. If this is never called then the type will be disabled to save time. See further explanation with diag_remap_registration_closed.
[in,out] | remap_cs | Diag remapping control structure |
Definition at line 171 of file MOM_diag_remap.F90.
subroutine, public mom_diag_remap::diag_remap_update | ( | type(diag_remap_ctrl), intent(inout) | remap_cs, |
type(ocean_grid_type), pointer | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
real, dimension(:, :, :), intent(in) | h, | ||
real, dimension(:, :, :), intent(in) | T, | ||
real, dimension(:, :, :), intent(in) | S, | ||
type(eos_type), pointer | eqn_of_state | ||
) |
Build/update target vertical grids for diagnostic remapping.
[in,out] | remap_cs | Diagnostic coordinate control structure |
g | The ocean's grid type | |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | h | New thickness |
[in] | t | New T |
[in] | s | New S |
eqn_of_state | A pointer to the equation of state |
Definition at line 268 of file MOM_diag_remap.F90.
References coord_rho::build_rho_column(), coord_sigma::build_sigma_column(), coord_zlike::build_zstar_column(), regrid_consts::coordinatemode(), mom_regridding::get_rho_cs(), mom_regridding::get_sigma_cs(), mom_regridding::get_zlike_cs(), and mom_error_handler::mom_error().
subroutine, public mom_diag_remap::horizontally_average_diag_field | ( | type(ocean_grid_type), intent(in) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
logical, intent(in) | is_layer, | ||
logical, intent(in) | is_extensive, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:), intent(inout) | averaged_field, | ||
logical, dimension(:), intent(inout) | averaged_mask | ||
) |
Horizontally average field.
[in] | g | Ocean grid structure |
[in] | gv | The ocean vertical grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True if the x-axis location is at u or q points |
[in] | staggered_in_y | True if the y-axis location is at v or q points |
[in] | is_layer | True if the z-axis location is at h points |
[in] | is_extensive | True if the z-direction is spatially integrated (over layers) |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | averaged_field | Field argument horizontally averaged |
[in,out] | averaged_mask | Mask for horizontally averaged field |
Definition at line 644 of file MOM_diag_remap.F90.
References mom_error_handler::assert().
Referenced by mom_diag_mediator::post_xy_average().
subroutine, public mom_diag_remap::vertically_interpolate_diag_field | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | interpolated_field | ||
) |
Vertically interpolate diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | interpolated_field | Field argument remapped to alternative coordinate |
Definition at line 560 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and mom_diag_vkernels::interpolate_column().
subroutine, public mom_diag_remap::vertically_reintegrate_diag_field | ( | type(diag_remap_ctrl), intent(in) | remap_cs, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension(:,:,:), intent(in) | h, | ||
logical, intent(in) | staggered_in_x, | ||
logical, intent(in) | staggered_in_y, | ||
real, dimension(:,:,:), pointer | mask, | ||
real, intent(in) | missing_value, | ||
real, dimension(:,:,:), intent(in) | field, | ||
real, dimension(:,:,:), intent(inout) | reintegrated_field | ||
) |
Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.
[in] | remap_cs | Diagnostic coodinate control structure |
[in] | g | Ocean grid structure |
[in] | h | The current thicknesses |
[in] | staggered_in_x | True is the x-axis location is at u or q points |
[in] | staggered_in_y | True is the y-axis location is at v or q points |
mask | A mask for the field | |
[in] | missing_value | A missing_value to assign land/vanished points |
[in] | field | The diagnostic field to be remapped |
[in,out] | reintegrated_field | Field argument remapped to alternative coordinate |
Definition at line 479 of file MOM_diag_remap.F90.
References mom_error_handler::assert(), and mom_diag_vkernels::reintegrate_column().