MOM_offline_main module reference

The routines here implement the offline tracer algorithm used in MOM6. These are called from step_offline Some routines called here can be found in the MOM_offline_aux module.

Data Types

offline_transport_CS

The control structure for the offline transport module

Functions/Subroutines

offline_advection_ale

3D advection is done by doing flux-limited nonlinear horizontal advection interspersed with an ALE regridding/remapping step. The loop in this routine is exited if remaining residual transports are below a runtime-specified value or a maximum number of iterations is reached.

offline_redistribute_residual

In the case where the main advection routine did not converge, something needs to be done with the remaining transport. Two different ways are offered, 'barotropic' means that the residual is distributed equally throughout the water column. 'upwards' attempts to redistribute the transport in the layers above and will eventually work down the entire water column

remaining_transport_sum

Returns the sums of any non-negligible remaining transport [H L2 ~> m3 or kg] to check for advection convergence

offline_diabatic_ale

The vertical/diabatic driver for offline tracers. First the eatr/ebtr associated with the interpolated vertical diffusivities are calculated and then any tracer column functions are done which can include vertical diffuvities and source/sink terms.

offline_fw_fluxes_into_ocean

Apply positive freshwater fluxes (into the ocean) and update netMassOut with only the negative (out of the ocean) fluxes

offline_fw_fluxes_out_ocean

Apply negative freshwater fluxes (out of the ocean)

offline_advection_layer

When in layer mode, 3D horizontal advection using stored mass fluxes must be used. Horizontal advection is done via tracer_advect, whereas the vertical component is actually handled by vertdiff in tracer_column_fns

update_offline_fields

Update fields used in this round of offline transport. First fields are updated from files or from arrays read during initialization. Then if in an ALE-dependent coordinate, regrid/remap fields.

register_diags_offline_transport

Initialize additional diagnostics required for offline tracer transport

post_offline_convergence_diags

Posts diagnostics related to offline convergence diagnostics

extract_offline_main

Extracts members of the offline main control structure. All arguments are optional except the control structure itself

insert_offline_main

Inserts (assigns values to) members of the offline main control structure. All arguments are optional except for the CS itself

offline_transport_init

Initializes the control structure for offline transport and reads in some of the

read_all_input

Coordinates the allocation and reading in all time levels of uh, vh, hend, temp, and salt from files. Used when read_all_ts_uvh

offline_transport_end

Deallocates (if necessary) arrays within the offline control structure

Detailed Description

Offline Tracer Transport in MOM6

'Offline tracer modeling' uses physical fields (e.g. mass transports and layer thicknesses) saved from a previous integration of the physical model to transport passive tracers. These fields are accumulated or averaged over a period of time (in this test case, 1 day) and used to integrate portions of the MOM6 code base that handle the 3d advection and diffusion of passive tracers.

The distribution of tracers in the ocean modeled offline should not be expected to match an online simulation. Accumulating transports over more than one online model timestep implicitly assumes homogeneity over that time period and essentially aliases over processes that occur with higher frequency. For example, consider the case of a surface boundary layer with a strong diurnal cycle. An offline simulation with a 1 day timestep, captures the net transport into or out of that layer, but not the exact cycling. This effective aliasing may also complicate online model configurations which strongly-eddying regions. In this case, the offline model timestep must be limited to some fraction of the eddy correlation timescale. Lastly, the nonlinear advection scheme which applies limited mass-transports over a sequence of iterations means that tracers are not transported along exactly the same path as they are in the online model.

This capability has currently targeted the Baltic_ALE_z test case, though some work has also been done with the OM4 1/2 degree configuration. Work is ongoing to develop recommendations and best practices for investigators seeking to use MOM6 for offline tracer modeling.

Implementation of offline routine in MOM6

The subroutine step_tracers that coordinates this can be found in MOM.F90 and is only called using the solo ocean driver. This is to avoid issues with coupling to other climate components that may be relying on fluxes from the ocean to be coupled more often than the offline time step. Other routines related to offline tracer modeling can be found in tracers/MOM_offline_control.F90

As can also be seen in the comments for the step_tracers subroutine, an offline time step comprises the following steps: -# Using the layer thicknesses and tracer concentrations from the previous timestep, half of the accumulated vertical mixing (eatr and ebtr) is applied in the call to tracer_column_fns. For tracers whose source/sink terms need dt, this value is set to 1/2 dt_offline -# Half of the accumulated surface freshwater fluxes are applied START ITERATION -# Accumulated mass fluxes are used to do horizontal transport. The number of iterations used in advect_tracer is limited to 2 (e.g x->y->x->y). The remaining mass fluxes are stored for later use and resulting layer thicknesses fed into the next step -# Tracers and the h-grid are regridded and remapped in a call to ALE. This allows for layers which might 'vanish' because of horizontal mass transport to be 'reinflated' and essentially allows for the vertical transport of tracers -# Check that transport is done if the remaining mass fluxes equals 0 or if the max number of iterations has been reached END ITERATION -# Repeat steps 1 and 2 -# Redistribute any residual mass fluxes that remain after the advection iterations in a barotropic manner, progressively upward through the water column. -# Force a remapping to the stored layer thicknesses that correspond to the snapshot of the online model at the end of an accumulation interval -# Reset T/S and h to their stored snapshotted values to prevent model drift

Evaluating the utility of an offline tracer model

How well an offline tracer model can be used as an alternative to integrating tracers online with the prognostic model must be evaluated for each application. This efficacy may be related to the native coordinate of the online model, to the length of the offline timestep, and to the behavior of the tracer itself.

A framework for formally regression testing the offline capability still needs to be developed. However, as a simple way of testing whether the offline model is nominally behaving as expected, the total inventory of the advection test tracers (tr1, tr2, etc.) should be conserved between time steps except for the last 4 decimal places. As a general guideline, an offline timestep of 5 days or less.

Runtime parameters for offline tracers

  • OFFLINEDIR: Input directory where the offline fields can be found

  • OFF_SUM_FILE: Filename where the accumulated fields can be found (e.g. horizontal mass transports)

  • OFF_SNAP_FILE: Filename where snapshot fields can be found (e.g. end of timestep layer thickness)

  • START_INDEX: Which timelevel of the input files to read first

  • NUMTIME: How many timelevels to read before 'looping' back to 1

  • FIELDS_ARE_OFFSET: True if the time-averaged fields and snapshot fields are offset by one time level, probably not needed -NUM_OFF_ITER: Maximum number of iterations to do for the nonlinear advection scheme -REDISTRIBUTE_METHOD: Redistributes any remaining horizontal fluxes throughout the rest of water column. Options are 'barotropic' which "evenly distributes flux throughout the entire water column,'upwards' which adds the maximum of the remaining flux in each layer above, and 'none' which does no redistribution"

Type Documentation

type, public :: offline_transport_CS

The control structure for the offline transport module

Parameters
  • ALE_CSp

    A pointer to the ALE control structure

  • diabatic_CSp

    A pointer to the diabatic control structure

  • diag

    Structure that regulates diagnostic output

  • OBC

    A pointer to the open boundary condition control structure

  • tracer_adv_CSp

    A pointer to the tracer advection control structure

  • opacity_CSp

    A pointer to the opacity control structure

  • tracer_flow_CSp

    A pointer to control structure that orchestrates the calling of tracer packages

  • tracer_Reg

    A pointer to the tracer registry

  • tv

    A structure pointing to various thermodynamic variables

  • optics

    Pointer to the optical properties type

  • diabatic_aux_CSp

    Pointer to the diabatic_aux control structure

    Variables related to reading in fields from online run

  • start_index

    Timelevel to start

  • iter_no

    Timelevel to start

  • numtime

    How many timelevels in the input fields

  • accumulated_time

    Length of time accumulated in the current offline interval

  • vertical_time

    The next value of accumulate_time at which to apply vertical processes

  • ridx_sum

    Read index offset of the summed variables

  • ridx_snap

    Read index offset of the snapshot variables

  • nk_input

    Number of input levels in the input fields

  • offlinedir

    Directory where offline fields are stored

  • surf_file

    Contains surface fields (2d arrays)

  • snap_file

    Snapshotted fields (layer thicknesses)

  • sum_file

    Fields which are accumulated over time

  • mean_file

    Fields averaged over time

  • redistribute_method

    'barotropic' if evenly distributing extra flow throughout entire watercolumn, 'upwards', if trying to do it just in the layers above 'both' if both methods are used

  • mld_var_name

    Name of the mixed layer depth variable to use

  • fields_are_offset

    True if the time-averaged fields and snapshot fields are offset by one time level

  • x_before_y

    Which horizontal direction is advected first

  • print_adv_offline

    Prints out some updates each advection sub interation

  • skip_diffusion

    Skips horizontal diffusion of tracers

  • read_sw

    Read in averaged values for shortwave radiation

  • read_mld

    Check to see whether mixed layer depths should be read in

  • Hmix_fixed

    A fixed mixed layer depth to use when read_mld is false [Z ~> m]

  • diurnal_sw

    Adds a synthetic diurnal cycle on shortwave radiation

  • debug

    If true, write verbose debugging messages

  • redistribute_barotropic

    Redistributes column-summed residual transports throughout a column weighted by thickness

  • redistribute_upwards

    Redistributes remaining fluxes only in layers above the current one based as the max allowable transport in that cell

  • read_all_ts_uvh

    If true, then all timelevels of temperature, salinity, mass transports, and Layer thicknesses are read during initialization Variables controlling some of the numerical considerations of offline transport

  • num_off_iter

    Number of advection iterations per offline step

  • num_vert_iter

    Number of vertical iterations per offline step

  • off_ale_mod

    Sets how frequently the ALE step is done during the advection

  • dt_offline

    Timestep used for offline tracers [T ~> s]

  • dt_offline_vertical

    Timestep used for calls to tracer vertical physics [T ~> s]

  • evap_CFL_limit

    Limit on the fraction of the water that can be fluxed out of the top layer in a timestep [nondim]. This is Copied from diabatic_CS controlling how tracers follow freshwater fluxes

  • minimum_forcing_depth

    The smallest depth over which fluxes can be applied [H ~> m or kg m-2]. This is copied from diabatic_CS controlling how tracers follow freshwater fluxes

  • Kd_max

    Runtime parameter specifying the maximum value of vertical diffusivity [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • id_uhr

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_vhr

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_hr

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_hdiff

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_uhr_redist

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_vhr_redist

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_uhr_end

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_vhr_end

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_eta_pre_distribute

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_eta_post_distribute

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_h_redist

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_eta_diff_end

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_uhtr_regrid

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_vhtr_regrid

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_temp_regrid

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_salt_regrid

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_h_regrid

    Diagnostic manager IDs for some fields that may be of interest when doing offline transport

  • id_clock_read_fields

    A CPU time clock

  • id_clock_offline_diabatic

    A CPU time clock

  • id_clock_offline_adv

    A CPU time clock

  • id_clock_redistribute

    A CPU time clock

    Zonal transport that may need to be stored between calls to step_MOM [H L2 ~> m3 or kg]

  • uhtr

    Meridional transport that may need to be stored between calls to step_MOM [H L2 ~> m3 or kg]

  • eatr

    Amount of fluid entrained from the layer above within one time step [H ~> m or kg m-2]

  • ebtr

    Amount of fluid entrained from the layer below within one time step [H ~> m or kg m-2]

  • Kd

    Vertical diffusivity [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • h_end

    Thicknesses at the end of offline timestep [H ~> m or kg m-2]

  • mld

    Mixed layer depths at thickness points [Z ~> m]

  • uhtr_all

    Entire field of zonal transport [H L2 ~> m3 or kg]

  • vhtr_all

    Entire field of meridional transport [H L2 ~> m3 or kg]

  • hend_all

    Entire field of layer thicknesses [H ~> m or kg m-2]

  • temp_all

    Entire field of temperatures [C ~> degC]

  • salt_all

    Entire field of salinities [S ~> ppt]

Functions/Subroutine Documentation

subroutine offline_advection_ale(fluxes, Time_start, time_interval, G, GV, US, CS, id_clock_ale, h_pre, uhtr, vhtr, converged)

3D advection is done by doing flux-limited nonlinear horizontal advection interspersed with an ALE regridding/remapping step. The loop in this routine is exited if remaining residual transports are below a runtime-specified value or a maximum number of iterations is reached.

Parameters
  • fluxes [inout]

    pointers to forcing fields

  • Time_start [in]

    starting time of a segment, as a time type

  • time_interval [in]

    time interval covered by this call [T ~> s]

  • G [inout]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • CS

    control structure for offline module

  • id_clock_ALE [in]

    Clock for ALE routines

  • h_pre [inout]

    layer thicknesses before advection [H ~> m or kg m-2]

  • uhtr [inout]

    Zonal mass transport [H L2 ~> m3 or kg]

  • vhtr [inout]

    Meridional mass transport [H L2 ~> m3 or kg]

  • converged [out]

    True if the iterations have converged

Callees call graph
Callees of mom_offline_main::offline_advection_ale calls cluster_mom_ale MOM_ALE cluster_mom_checksums MOM_checksums cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_advect MOM_tracer_advect cluster_mom_tracer_registry MOM_tracer_registry mom_ale::ale_regrid ALE_regrid mom_ale::ale_remap_tracers ALE_remap_tracers mom_ale::ale_update_regrid_weights ALE_update_regrid_weights mom_ale::pre_ale_adjustments pre_ALE_adjustments mom_checksums::interface::hchksum hchksum (interface) mom_checksums::interface::uvchksum uvchksum (interface) mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::mom_mesg MOM_mesg mom_offline_main::offline_advection_ale offline_advection_ale mom_offline_main::offline_advection_ale->mom_ale::ale_regrid mom_offline_main::offline_advection_ale->mom_ale::ale_remap_tracers mom_offline_main::offline_advection_ale->mom_ale::ale_update_regrid_weights mom_offline_main::offline_advection_ale->mom_ale::pre_ale_adjustments mom_offline_main::offline_advection_ale->mom_checksums::interface::hchksum mom_offline_main::offline_advection_ale->mom_checksums::interface::uvchksum mom_offline_main::offline_advection_ale->mom_cpu_clock_infra::cpu_clock_begin mom_offline_main::offline_advection_ale->mom_cpu_clock_infra::cpu_clock_end mom_offline_main::offline_advection_ale->mom_domain_infra::interface::pass_var mom_offline_main::offline_advection_ale->mom_domain_infra::interface::pass_vector mom_offline_main::offline_advection_ale->mom_error_handler::mom_mesg mom_offline_main::remaining_transport_sum remaining_transport_sum [private/internal] mom_offline_main::offline_advection_ale->mom_offline_main::remaining_transport_sum mom_tracer_advect::advect_tracer advect_tracer mom_offline_main::offline_advection_ale->mom_tracer_advect::advect_tracer mom_tracer_registry::interface::mom_tracer_chkinv MOM_tracer_chkinv (interface) mom_offline_main::offline_advection_ale->mom_tracer_registry::interface::mom_tracer_chkinv
Text view
Callers call graph
Callers of mom_offline_main::offline_advection_ale calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_advection_ale offline_advection_ale mom::step_offline->mom_offline_main::offline_advection_ale
Text view
subroutine offline_redistribute_residual(CS, G, GV, US, h_pre, uhtr, vhtr, converged)

In the case where the main advection routine did not converge, something needs to be done with the remaining transport. Two different ways are offered, 'barotropic' means that the residual is distributed equally throughout the water column. 'upwards' attempts to redistribute the transport in the layers above and will eventually work down the entire water column

Parameters
  • CS

    control structure from initialize_MOM

  • G [inout]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h_pre [inout]

    layer thicknesses before advection [H ~> m or kg m-2]

  • uhtr [inout]

    Zonal mass transport [H L2 ~> m3 or kg]

  • vhtr [inout]

    Meridional mass transport [H L2 ~> m3 or kg]

  • converged [in]

    True if the iterations have converged

  • uhr

    Remaining zonal mass transport [H L2 ~> m3 or kg]

  • vhr

    Remaining meridional mass transport [H L2 ~> m3 or kg]

Callees call graph
Callees of mom_offline_main::offline_redistribute_residual calls cluster_mom_checksums MOM_checksums cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_advect MOM_tracer_advect cluster_mom_tracer_registry MOM_tracer_registry mom_checksums::interface::hchksum hchksum (interface) mom_checksums::interface::uvchksum uvchksum (interface) mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_diag_mediator::interface::post_data post_data (interface) mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::mom_mesg MOM_mesg mom_offline_aux::distribute_residual_uh_barotropic distribute_residual_uh_barotropic mom_offline_aux::distribute_residual_uh_upwards distribute_residual_uh_upwards mom_offline_aux::distribute_residual_vh_barotropic distribute_residual_vh_barotropic mom_offline_aux::distribute_residual_vh_upwards distribute_residual_vh_upwards mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom_offline_main::offline_redistribute_residual->mom_checksums::interface::hchksum mom_offline_main::offline_redistribute_residual->mom_checksums::interface::uvchksum mom_offline_main::offline_redistribute_residual->mom_cpu_clock_infra::cpu_clock_begin mom_offline_main::offline_redistribute_residual->mom_cpu_clock_infra::cpu_clock_end mom_offline_main::offline_redistribute_residual->mom_diag_mediator::interface::post_data mom_offline_main::offline_redistribute_residual->mom_domain_infra::interface::pass_var mom_offline_main::offline_redistribute_residual->mom_domain_infra::interface::pass_vector mom_offline_main::offline_redistribute_residual->mom_error_handler::mom_mesg mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_uh_barotropic mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_uh_upwards mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_vh_barotropic mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_vh_upwards mom_offline_main::remaining_transport_sum remaining_transport_sum [private/internal] mom_offline_main::offline_redistribute_residual->mom_offline_main::remaining_transport_sum mom_tracer_advect::advect_tracer advect_tracer mom_offline_main::offline_redistribute_residual->mom_tracer_advect::advect_tracer mom_tracer_registry::interface::mom_tracer_chkinv MOM_tracer_chkinv (interface) mom_offline_main::offline_redistribute_residual->mom_tracer_registry::interface::mom_tracer_chkinv mom_tracer_registry::interface::mom_tracer_chksum MOM_tracer_chksum (interface) mom_offline_main::offline_redistribute_residual->mom_tracer_registry::interface::mom_tracer_chksum
Text view
Callers call graph
Callers of mom_offline_main::offline_redistribute_residual calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom::step_offline->mom_offline_main::offline_redistribute_residual
Text view
real function remaining_transport_sum(G, GV, US, uhtr, vhtr, h_new)

Returns the sums of any non-negligible remaining transport [H L2 ~> m3 or kg] to check for advection convergence

Parameters
  • G [in]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • uhtr [in]

    Zonal mass transport [H L2 ~> m3 or kg]

  • vhtr [in]

    Meridional mass transport [H L2 ~> m3 or kg]

  • h_new [in]

    Layer thicknesses [H ~> m or kg m-2]

  • trans_rem_col

    The vertical sum of the absolute value of transports through the faces of a column [R Z L2 ~> kg].

  • trans_cell

    The sum of the absolute value of the remaining transports through the faces of a tracer cell [H L2 ~> m3 or kg]

Callees call graph
Callees of mom_offline_main::remaining_transport_sum calls cluster_mom_coms MOM_coms cluster_mom_offline_main MOM_offline_main mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_offline_main::remaining_transport_sum remaining_transport_sum [private/internal] mom_offline_main::remaining_transport_sum->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_offline_main::remaining_transport_sum calls cluster_mom_offline_main MOM_offline_main mom_offline_main::offline_advection_ale offline_advection_ale mom_offline_main::remaining_transport_sum remaining_transport_sum [private/internal] mom_offline_main::offline_advection_ale->mom_offline_main::remaining_transport_sum mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom_offline_main::offline_redistribute_residual->mom_offline_main::remaining_transport_sum
Text view
subroutine offline_diabatic_ale(fluxes, Time_start, Time_end, G, GV, US, CS, h_pre, tv, eatr, ebtr)

The vertical/diabatic driver for offline tracers. First the eatr/ebtr associated with the interpolated vertical diffusivities are calculated and then any tracer column functions are done which can include vertical diffuvities and source/sink terms.

Parameters
  • fluxes [inout]

    pointers to forcing fields

  • Time_start [in]

    starting time of a segment, as a time type

  • Time_end [in]

    ending time of a segment, as a time type

  • G [in]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • CS

    control structure from initialize_MOM

  • h_pre [inout]

    layer thicknesses before advection [H ~> m or kg m-2]

  • tv [in]

    A structure pointing to various thermodynamic variables

  • eatr [inout]

    Entrainment from layer above [H ~> m or kg m-2]

  • ebtr [inout]

    Entrainment from layer below [H ~> m or kg m-2]

  • sw

    Save old values of shortwave radiation [Q R Z T-1 ~> W m-2]

  • sw_vis

    Save old values of shortwave radiation [Q R Z T-1 ~> W m-2]

  • sw_nir

    Save old values of shortwave radiation [Q R Z T-1 ~> W m-2]

Callees call graph
Callees of mom_offline_main::offline_diabatic_ale calls cluster_mom_checksums MOM_checksums cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_error_handler MOM_error_handler cluster_mom_interface_heights MOM_interface_heights cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_flow_control MOM_tracer_flow_control cluster_mom_tracer_registry MOM_tracer_registry mom_checksums::interface::hchksum hchksum (interface) mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_diabatic_aux::set_pen_shortwave set_pen_shortwave mom_error_handler::mom_mesg MOM_mesg mom_interface_heights::interface::thickness_to_dz thickness_to_dz (interface) mom_offline_aux::offline_add_diurnal_sw offline_add_diurnal_SW mom_offline_main::offline_diabatic_ale offline_diabatic_ale mom_offline_main::offline_diabatic_ale->mom_checksums::interface::hchksum mom_offline_main::offline_diabatic_ale->mom_cpu_clock_infra::cpu_clock_begin mom_offline_main::offline_diabatic_ale->mom_cpu_clock_infra::cpu_clock_end mom_offline_main::offline_diabatic_ale->mom_diabatic_aux::set_pen_shortwave mom_offline_main::offline_diabatic_ale->mom_error_handler::mom_mesg mom_offline_main::offline_diabatic_ale->mom_interface_heights::interface::thickness_to_dz mom_offline_main::offline_diabatic_ale->mom_offline_aux::offline_add_diurnal_sw mom_tracer_flow_control::call_tracer_column_fns call_tracer_column_fns mom_offline_main::offline_diabatic_ale->mom_tracer_flow_control::call_tracer_column_fns mom_tracer_registry::interface::mom_tracer_chkinv MOM_tracer_chkinv (interface) mom_offline_main::offline_diabatic_ale->mom_tracer_registry::interface::mom_tracer_chkinv
Text view
Callers call graph
Callers of mom_offline_main::offline_diabatic_ale calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_diabatic_ale offline_diabatic_ale mom::step_offline->mom_offline_main::offline_diabatic_ale
Text view
subroutine offline_fw_fluxes_into_ocean(G, GV, CS, fluxes, h, in_flux_optional)

Apply positive freshwater fluxes (into the ocean) and update netMassOut with only the negative (out of the ocean) fluxes

Parameters
  • CS [inout]

    Offline control structure

  • G [in]

    Grid structure

  • GV [in]

    ocean vertical grid structure

  • fluxes [inout]

    Surface fluxes container

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • in_flux_optional [in]

    The total time-integrated amount of tracer that leaves with freshwater [CU H ~> Conc m or Conc kg m-2]

  • negative_fw

    store all negative fluxes [H ~> m or kg m-2]

  • update_h

    Flag for whether h should be updated

Callees call graph
Callees of mom_offline_main::offline_fw_fluxes_into_ocean calls cluster_mom_checksums MOM_checksums cluster_mom_error_handler MOM_error_handler cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_diabatic MOM_tracer_diabatic cluster_mom_tracer_registry MOM_tracer_registry mom_checksums::interface::hchksum hchksum (interface) mom_error_handler::mom_error MOM_error mom_offline_main::offline_fw_fluxes_into_ocean offline_fw_fluxes_into_ocean mom_offline_main::offline_fw_fluxes_into_ocean->mom_checksums::interface::hchksum mom_offline_main::offline_fw_fluxes_into_ocean->mom_error_handler::mom_error mom_tracer_diabatic::applytracerboundaryfluxesinout applyTracerBoundaryFluxesInOut mom_offline_main::offline_fw_fluxes_into_ocean->mom_tracer_diabatic::applytracerboundaryfluxesinout mom_tracer_registry::interface::mom_tracer_chkinv MOM_tracer_chkinv (interface) mom_offline_main::offline_fw_fluxes_into_ocean->mom_tracer_registry::interface::mom_tracer_chkinv
Text view
Callers call graph
Callers of mom_offline_main::offline_fw_fluxes_into_ocean calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_fw_fluxes_into_ocean offline_fw_fluxes_into_ocean mom::step_offline->mom_offline_main::offline_fw_fluxes_into_ocean
Text view
subroutine offline_fw_fluxes_out_ocean(G, GV, CS, fluxes, h, out_flux_optional)

Apply negative freshwater fluxes (out of the ocean)

Parameters
  • CS [inout]

    Offline control structure

  • G [in]

    Grid structure

  • GV [in]

    ocean vertical grid structure

  • fluxes [inout]

    Surface fluxes container

  • h [inout]

    Layer thickness [H ~> m or kg m-2]

  • out_flux_optional [in]

    The total time-integrated amount of tracer that leaves with freshwater [CU H ~> Conc m or Conc kg m-2]

  • update_h

    Flag for whether h should be updated

Callees call graph
Callees of mom_offline_main::offline_fw_fluxes_out_ocean calls cluster_mom_checksums MOM_checksums cluster_mom_error_handler MOM_error_handler cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_diabatic MOM_tracer_diabatic cluster_mom_tracer_registry MOM_tracer_registry mom_checksums::interface::hchksum hchksum (interface) mom_error_handler::mom_error MOM_error mom_offline_main::offline_fw_fluxes_out_ocean offline_fw_fluxes_out_ocean mom_offline_main::offline_fw_fluxes_out_ocean->mom_checksums::interface::hchksum mom_offline_main::offline_fw_fluxes_out_ocean->mom_error_handler::mom_error mom_tracer_diabatic::applytracerboundaryfluxesinout applyTracerBoundaryFluxesInOut mom_offline_main::offline_fw_fluxes_out_ocean->mom_tracer_diabatic::applytracerboundaryfluxesinout mom_tracer_registry::interface::mom_tracer_chkinv MOM_tracer_chkinv (interface) mom_offline_main::offline_fw_fluxes_out_ocean->mom_tracer_registry::interface::mom_tracer_chkinv
Text view
Callers call graph
Callers of mom_offline_main::offline_fw_fluxes_out_ocean calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_fw_fluxes_out_ocean offline_fw_fluxes_out_ocean mom::step_offline->mom_offline_main::offline_fw_fluxes_out_ocean
Text view
subroutine offline_advection_layer(fluxes, Time_start, time_interval, G, GV, US, CS, h_pre, eatr, ebtr, uhtr, vhtr)

When in layer mode, 3D horizontal advection using stored mass fluxes must be used. Horizontal advection is done via tracer_advect, whereas the vertical component is actually handled by vertdiff in tracer_column_fns

Parameters
  • fluxes [inout]

    pointers to forcing fields

  • Time_start [in]

    starting time of a segment, as a time type

  • time_interval [in]

    Offline transport time interval [T ~> s]

  • G [inout]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • CS

    Control structure for offline module

  • h_pre [inout]

    layer thicknesses before advection [H ~> m or kg m-2]

  • eatr [inout]

    Entrainment from layer above [H ~> m or kg m-2]

  • ebtr [inout]

    Entrainment from layer below [H ~> m or kg m-2]

  • uhtr [inout]

    Zonal mass transport [H L2 ~> m3 or kg]

  • vhtr [inout]

    Meridional mass transport [H L2 ~> m3 or kg]

Callees call graph
Callees of mom_offline_main::offline_advection_layer calls cluster_mom_coms MOM_coms cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main cluster_mom_tracer_advect MOM_tracer_advect cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::mom_mesg MOM_mesg mom_offline_aux::limit_mass_flux_3d limit_mass_flux_3d mom_offline_aux::update_h_horizontal_flux update_h_horizontal_flux mom_offline_aux::update_h_vertical_flux update_h_vertical_flux mom_offline_main::offline_advection_layer offline_advection_layer mom_offline_main::offline_advection_layer->mom_coms::interface::reproducing_sum mom_offline_main::offline_advection_layer->mom_domain_infra::interface::pass_var mom_offline_main::offline_advection_layer->mom_domain_infra::interface::pass_vector mom_offline_main::offline_advection_layer->mom_error_handler::mom_mesg mom_offline_main::offline_advection_layer->mom_offline_aux::limit_mass_flux_3d mom_offline_main::offline_advection_layer->mom_offline_aux::update_h_horizontal_flux mom_offline_main::offline_advection_layer->mom_offline_aux::update_h_vertical_flux mom_tracer_advect::advect_tracer advect_tracer mom_offline_main::offline_advection_layer->mom_tracer_advect::advect_tracer mom_tracer_flow_control::call_tracer_column_fns call_tracer_column_fns mom_offline_main::offline_advection_layer->mom_tracer_flow_control::call_tracer_column_fns
Text view
Callers call graph
Callers of mom_offline_main::offline_advection_layer calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::offline_advection_layer offline_advection_layer mom::step_offline->mom_offline_main::offline_advection_layer
Text view
subroutine update_offline_fields(CS, G, GV, US, h, fluxes, do_ale)

Update fields used in this round of offline transport. First fields are updated from files or from arrays read during initialization. Then if in an ALE-dependent coordinate, regrid/remap fields.

Parameters
  • CS

    Control structure for offline module

  • G [inout]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

    The regridded layer thicknesses [H ~> m or kg m-2]

  • fluxes [inout]

    Pointers to forcing fields

  • do_ale [in]

    True if using ALE

Callees call graph
Callees of mom_offline_main::update_offline_fields calls cluster_mom_ale MOM_ALE cluster_mom_checksums MOM_checksums cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_interface_heights MOM_interface_heights cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_ale::ale_offline_inputs ALE_offline_inputs mom_checksums::interface::hchksum hchksum (interface) mom_checksums::interface::uvchksum uvchksum (interface) mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_diag_mediator::interface::post_data post_data (interface) mom_domain_infra::interface::pass_var pass_var (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_interface_heights::calc_derived_thermo calc_derived_thermo mom_offline_aux::next_modulo_time next_modulo_time mom_offline_aux::update_offline_from_arrays update_offline_from_arrays mom_offline_aux::update_offline_from_files update_offline_from_files mom_offline_main::update_offline_fields update_offline_fields mom_offline_main::update_offline_fields->mom_ale::ale_offline_inputs mom_offline_main::update_offline_fields->mom_checksums::interface::hchksum mom_offline_main::update_offline_fields->mom_checksums::interface::uvchksum mom_offline_main::update_offline_fields->mom_cpu_clock_infra::cpu_clock_begin mom_offline_main::update_offline_fields->mom_cpu_clock_infra::cpu_clock_end mom_offline_main::update_offline_fields->mom_diag_mediator::interface::post_data mom_offline_main::update_offline_fields->mom_domain_infra::interface::pass_var mom_offline_main::update_offline_fields->mom_error_handler::calltree_enter mom_offline_main::update_offline_fields->mom_error_handler::calltree_leave mom_offline_main::update_offline_fields->mom_interface_heights::calc_derived_thermo mom_offline_main::update_offline_fields->mom_offline_aux::next_modulo_time mom_offline_main::update_offline_fields->mom_offline_aux::update_offline_from_arrays mom_offline_main::update_offline_fields->mom_offline_aux::update_offline_from_files
Text view
Callers call graph
Callers of mom_offline_main::update_offline_fields calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::update_offline_fields update_offline_fields mom::step_offline->mom_offline_main::update_offline_fields
Text view
subroutine register_diags_offline_transport(Time, diag, CS, GV, US)

Initialize additional diagnostics required for offline tracer transport

Parameters
  • CS

    Control structure for offline module

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • Time [in]

    current model time

  • diag [in]

    Structure that regulates diagnostic output

Callees call graph
Callees of mom_offline_main::register_diags_offline_transport calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_offline_main MOM_offline_main cluster_mom_verticalgrid MOM_verticalGrid mom_diag_mediator::register_diag_field register_diag_field mom_offline_main::register_diags_offline_transport register_diags_offline_transport mom_offline_main::register_diags_offline_transport->mom_diag_mediator::register_diag_field mom_verticalgrid::get_thickness_units get_thickness_units mom_offline_main::register_diags_offline_transport->mom_verticalgrid::get_thickness_units
Text view
Callers call graph
Callers of mom_offline_main::register_diags_offline_transport calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::initialize_mom initialize_MOM mom_offline_main::register_diags_offline_transport register_diags_offline_transport mom::initialize_mom->mom_offline_main::register_diags_offline_transport
Text view
subroutine post_offline_convergence_diags(G, GV, CS, h_off, h_end, uhtr, vhtr)

Posts diagnostics related to offline convergence diagnostics

Parameters
  • G [in]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • CS [in]

    Offline control structure

  • h_off [inout]

    Thicknesses at end of offline step [H ~> m or kg m-2]

  • h_end [inout]

    Stored thicknesses [H ~> m or kg m-2]

  • uhtr [inout]

    Remaining zonal mass transport [H L2 ~> m3 or kg]

  • vhtr [inout]

    Remaining meridional mass transport [H L2 ~> m3 or kg]

Callees call graph
Callees of mom_offline_main::post_offline_convergence_diags calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_offline_main MOM_offline_main mom_diag_mediator::interface::post_data post_data (interface) mom_offline_main::post_offline_convergence_diags post_offline_convergence_diags mom_offline_main::post_offline_convergence_diags->mom_diag_mediator::interface::post_data
Text view
Callers call graph
Callers of mom_offline_main::post_offline_convergence_diags calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::post_offline_convergence_diags post_offline_convergence_diags mom::step_offline->mom_offline_main::post_offline_convergence_diags
Text view
subroutine extract_offline_main(CS, uhtr, vhtr, eatr, ebtr, h_end, accumulated_time, vertical_time, dt_offline, dt_offline_vertical, skip_diffusion)

Extracts members of the offline main control structure. All arguments are optional except the control structure itself

Parameters
  • CS [in]

    Offline control structure

  • uhtr

    Remaining zonal mass transport [H L2 ~> m3 or kg]

  • vhtr

    Remaining meridional mass transport [H L2 ~> m3 or kg]

  • eatr

    Amount of fluid entrained from the layer above within one time step [H ~> m or kg m-2]

  • ebtr

    Amount of fluid entrained from the layer below within one time step [H ~> m or kg m-2]

  • h_end

    Thicknesses at the end of offline timestep [H ~> m or kg m-2]

  • accumulated_time

    Length of time accumulated in the current offline interval

  • vertical_time

    The next value of accumulate_time at which to vertical processes

  • dt_offline [out]

    Timestep used for offline tracers [T ~> s]

  • dt_offline_vertical [out]

    Timestep used for calls to tracer vertical physics [T ~> s]

  • skip_diffusion [out]

    Skips horizontal diffusion of tracers

Callers call graph
Callers of mom_offline_main::extract_offline_main calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::step_offline step_offline mom_offline_main::extract_offline_main extract_offline_main mom::step_offline->mom_offline_main::extract_offline_main
Text view
subroutine insert_offline_main(CS, ALE_CSp, diabatic_CSp, diag, OBC, tracer_adv_CSp, tracer_flow_CSp, tracer_Reg, tv, x_before_y, debug)

Inserts (assigns values to) members of the offline main control structure. All arguments are optional except for the CS itself

Parameters
  • CS [inout]

    Offline control structure

  • ALE_CSp [in]

    A pointer to the ALE control structure

  • diabatic_CSp [in]

    A pointer to the diabatic control structure

  • diag [in]

    A pointer to the structure that regulates diagnostic output

  • OBC [in]

    A pointer to the open boundary condition control structure

  • tracer_adv_CSp [in]

    A pointer to the tracer advection control structure

  • tracer_flow_CSp [in]

    A pointer to the tracer flow control control structure

  • tracer_Reg [in]

    A pointer to the tracer registry

  • tv [in]

    A structure pointing to various thermodynamic variables

  • x_before_y [in]

    Indicates which horizontal direction is advected first

  • debug [in]

    If true, write verbose debugging messages

Callers call graph
Callers of mom_offline_main::insert_offline_main calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::initialize_mom initialize_MOM mom_offline_main::insert_offline_main insert_offline_main mom::initialize_mom->mom_offline_main::insert_offline_main
Text view
subroutine offline_transport_init(param_file, CS, diabatic_CSp, G, GV, US)

Initializes the control structure for offline transport and reads in some of the

Parameters
  • param_file [in]

    A structure to parse for run-time parameters

  • CS

    Offline control structure

  • diabatic_CSp [in]

    The diabatic control structure

  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_offline_main::offline_transport_init calls cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main cluster_mom_time_manager MOM_time_manager mom_cpu_clock_infra::cpu_clock_id cpu_clock_id mom_diabatic_driver::extract_diabatic_member extract_diabatic_member mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_offline_aux::next_modulo_time next_modulo_time mom_offline_main::offline_transport_init offline_transport_init mom_offline_main::offline_transport_init->mom_cpu_clock_infra::cpu_clock_id mom_offline_main::offline_transport_init->mom_diabatic_driver::extract_diabatic_member mom_offline_main::offline_transport_init->mom_error_handler::calltree_enter mom_offline_main::offline_transport_init->mom_error_handler::calltree_leave mom_offline_main::offline_transport_init->mom_error_handler::mom_error mom_offline_main::offline_transport_init->mom_file_parser::interface::get_param mom_offline_main::offline_transport_init->mom_file_parser::interface::log_version mom_offline_main::offline_transport_init->mom_offline_aux::next_modulo_time mom_offline_main::read_all_input read_all_input [private/internal] mom_offline_main::offline_transport_init->mom_offline_main::read_all_input mom_time_manager::real_to_time real_to_time mom_offline_main::offline_transport_init->mom_time_manager::real_to_time
Text view
Callers call graph
Callers of mom_offline_main::offline_transport_init calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::initialize_mom initialize_MOM mom_offline_main::offline_transport_init offline_transport_init mom::initialize_mom->mom_offline_main::offline_transport_init
Text view
subroutine read_all_input(CS, G, GV, US)

Coordinates the allocation and reading in all time levels of uh, vh, hend, temp, and salt from files. Used when read_all_ts_uvh

Parameters
  • CS [inout]

    Control structure for offline module

  • G [in]

    Ocean grid structure

  • GV [in]

    Vertical grid structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_offline_main::read_all_input calls cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_offline_main MOM_offline_main mom_error_handler::mom_error MOM_error mom_error_handler::mom_mesg MOM_mesg mom_io::interface::mom_read_data MOM_read_data (interface) mom_io::interface::mom_read_vector MOM_read_vector (interface) mom_offline_main::read_all_input read_all_input [private/internal] mom_offline_main::read_all_input->mom_error_handler::mom_error mom_offline_main::read_all_input->mom_error_handler::mom_mesg mom_offline_main::read_all_input->mom_io::interface::mom_read_data mom_offline_main::read_all_input->mom_io::interface::mom_read_vector
Text view
Callers call graph
Callers of mom_offline_main::read_all_input calls cluster_mom_offline_main MOM_offline_main mom_offline_main::offline_transport_init offline_transport_init mom_offline_main::read_all_input read_all_input [private/internal] mom_offline_main::offline_transport_init->mom_offline_main::read_all_input
Text view
subroutine offline_transport_end(CS)

Deallocates (if necessary) arrays within the offline control structure

Parameters
  • CS

    Control structure for offline module

Callers call graph
Callers of mom_offline_main::offline_transport_end calls cluster_mom MOM cluster_mom_offline_main MOM_offline_main mom::mom_end MOM_end mom_offline_main::offline_transport_end offline_transport_end mom::mom_end->mom_offline_main::offline_transport_end
Text view
API generated with Flint · Rendered from reStructuredText