MOM_offline_aux module reference

Contains routines related to offline transport of tracers. These routines are likely to be called from the MOM_offline_main module

Functions/Subroutines

update_h_horizontal_flux

This updates thickness based on the convergence of horizontal mass fluxes NOTE: Only used in non-ALE mode

update_h_vertical_flux

Updates layer thicknesses due to vertical mass transports NOTE: Only used in non-ALE configuration

limit_mass_flux_3d

This routine limits the mass fluxes so that the a layer cannot be completely depleted. NOTE: Only used in non-ALE mode

distribute_residual_uh_barotropic

In the case where offline advection has failed to converge, redistribute the u-flux into remainder of the water column as a barotropic equivalent

distribute_residual_vh_barotropic

Redistribute the v-flux as a barotropic equivalent

distribute_residual_uh_upwards

In the case where offline advection has failed to converge, redistribute the u-flux into layers above

distribute_residual_vh_upwards

In the case where offline advection has failed to converge, redistribute the u-flux into layers above

offline_add_diurnal_SW

add_diurnal_SW adjusts the shortwave fluxes in an forcying_type variable to add a synthetic diurnal cycle. Adapted from SIS2

update_offline_from_files

Controls the reading in 3d mass fluxes, diffusive fluxes, and other fields stored in a previous integration of the online model

update_offline_from_arrays

Fields for offline transport are copied from the stored arrays read during initialization

next_modulo_time

Calculates the next timelevel to read from the input fields. This allows the 'looping' of the fields

Functions/Subroutine Documentation

subroutine update_h_horizontal_flux(G, GV, uhtr, vhtr, h_pre, h_new)

This updates thickness based on the convergence of horizontal mass fluxes NOTE: Only used in non-ALE mode

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • uhtr [in]

    Accumulated mass flux through zonal face [H L2 ~> m3 or kg]

  • vhtr [in]

    Accumulated mass flux through meridional face [H L2 ~> m3 or kg]

  • h_pre [in]

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

  • h_new [inout]

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

Callers call graph
Callers of mom_offline_aux::update_h_horizontal_flux calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::update_h_horizontal_flux update_h_horizontal_flux mom_offline_main::offline_advection_layer offline_advection_layer mom_offline_main::offline_advection_layer->mom_offline_aux::update_h_horizontal_flux
Text view
subroutine update_h_vertical_flux(G, GV, ea, eb, h_pre, h_new)

Updates layer thicknesses due to vertical mass transports NOTE: Only used in non-ALE configuration

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • ea [in]

    Mass of fluid entrained from the layer above within this timestep [H ~> m or kg m-2]

  • eb [in]

    Mass of fluid entrained from the layer below within this timestep [H ~> m or kg m-2]

  • h_pre [in]

    Layer thicknesses at the end of the previous step [H ~> m or kg m-2]

  • h_new [inout]

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

Callers call graph
Callers of mom_offline_aux::update_h_vertical_flux calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main 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_offline_aux::update_h_vertical_flux
Text view
subroutine limit_mass_flux_3d(G, GV, uh, vh, ea, eb, h_pre)

This routine limits the mass fluxes so that the a layer cannot be completely depleted. NOTE: Only used in non-ALE mode

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • uh [inout]

    Mass flux through zonal face [H L2 ~> m3 or kg]

  • vh [inout]

    Mass flux through meridional face [H L2 ~> m3 or kg]

  • ea [inout]

    Mass of fluid entrained from the layer above within this timestep [H ~> m or kg m-2]

  • eb [inout]

    Mass of fluid entrained from the layer below within this timestep [H ~> m or kg m-2]

  • h_pre [in]

    Layer thicknesses at the end of the previous step [H ~> m or kg m-2]

Callers call graph
Callers of mom_offline_aux::limit_mass_flux_3d calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::limit_mass_flux_3d limit_mass_flux_3d mom_offline_main::offline_advection_layer offline_advection_layer mom_offline_main::offline_advection_layer->mom_offline_aux::limit_mass_flux_3d
Text view
subroutine distribute_residual_uh_barotropic(G, GV, hvol, uh)

In the case where offline advection has failed to converge, redistribute the u-flux into remainder of the water column as a barotropic equivalent

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • hvol [in]

    Mass of water in the cells at the end of the previous timestep [H L2 ~> m3 or kg]

  • uh [inout]

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

Callees call graph
Callees of mom_offline_aux::distribute_residual_uh_barotropic calls cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux mom_error_handler::mom_error MOM_error mom_offline_aux::distribute_residual_uh_barotropic distribute_residual_uh_barotropic mom_offline_aux::distribute_residual_uh_barotropic->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_offline_aux::distribute_residual_uh_barotropic calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::distribute_residual_uh_barotropic distribute_residual_uh_barotropic mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_uh_barotropic
Text view
subroutine distribute_residual_vh_barotropic(G, GV, hvol, vh)

Redistribute the v-flux as a barotropic equivalent

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • hvol [in]

    Mass of water in the cells at the end of the previous timestep [H L2 ~> m3 or kg]

  • vh [inout]

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

Callees call graph
Callees of mom_offline_aux::distribute_residual_vh_barotropic calls cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux mom_error_handler::mom_error MOM_error mom_offline_aux::distribute_residual_vh_barotropic distribute_residual_vh_barotropic mom_offline_aux::distribute_residual_vh_barotropic->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_offline_aux::distribute_residual_vh_barotropic calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::distribute_residual_vh_barotropic distribute_residual_vh_barotropic mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_vh_barotropic
Text view
subroutine distribute_residual_uh_upwards(G, GV, hvol, uh)

In the case where offline advection has failed to converge, redistribute the u-flux into layers above

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • hvol [in]

    Mass of water in the cells at the end of the previous timestep [H L2 ~> m3 or kg]

  • uh [inout]

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

Callees call graph
Callees of mom_offline_aux::distribute_residual_uh_upwards calls cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux mom_error_handler::mom_error MOM_error mom_offline_aux::distribute_residual_uh_upwards distribute_residual_uh_upwards mom_offline_aux::distribute_residual_uh_upwards->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_offline_aux::distribute_residual_uh_upwards calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::distribute_residual_uh_upwards distribute_residual_uh_upwards mom_offline_main::offline_redistribute_residual offline_redistribute_residual mom_offline_main::offline_redistribute_residual->mom_offline_aux::distribute_residual_uh_upwards
Text view
subroutine distribute_residual_vh_upwards(G, GV, hvol, vh)

In the case where offline advection has failed to converge, redistribute the u-flux into layers above

Parameters
  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • hvol [in]

    Mass of water in the cells at the end of the previous timestep [H L2 ~> m3 or kg]

  • vh [inout]

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

Callees call graph
Callees of mom_offline_aux::distribute_residual_vh_upwards calls cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux mom_error_handler::mom_error MOM_error mom_offline_aux::distribute_residual_vh_upwards distribute_residual_vh_upwards mom_offline_aux::distribute_residual_vh_upwards->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_offline_aux::distribute_residual_vh_upwards calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main 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_offline_aux::distribute_residual_vh_upwards
Text view
subroutine offline_add_diurnal_SW(fluxes, G, Time_start, Time_end)

add_diurnal_SW adjusts the shortwave fluxes in an forcying_type variable to add a synthetic diurnal cycle. Adapted from SIS2

Parameters
  • fluxes [inout]

    The type with atmospheric fluxes to be adjusted.

  • G [in]

    The ocean lateral grid type.

  • Time_start [in]

    The start time for this step.

  • Time_end [in]

    The ending time for this step.

Callers call graph
Callers of mom_offline_aux::offline_add_diurnal_sw calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main 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_offline_aux::offline_add_diurnal_sw
Text view

External calls

astronomy_mod
  • daily_mean_solar (astronomy_mod::daily_mean_solar)

  • diurnal_solar (astronomy_mod::diurnal_solar)

  • orbital_time (astronomy_mod::orbital_time)

subroutine update_offline_from_files(G, GV, US, nk_input, mean_file, sum_file, snap_file, surf_file, h_end, uhtr, vhtr, temp_mean, salt_mean, mld, Kd, fluxes, ridx_sum, ridx_snap, read_mld, mld_var_name, read_sw, read_ts_uvh, do_ale_in)

Controls the reading in 3d mass fluxes, diffusive fluxes, and other fields stored in a previous integration of the online model

Parameters
  • G [inout]

    Horizontal grid type

  • GV [in]

    Vertical grid type

  • US [in]

    A dimensional unit scaling type

  • nk_input [in]

    Number of levels in input file

  • mean_file [in]

    Name of file with averages fields

  • sum_file [in]

    Name of file with summed fields

  • snap_file [in]

    Name of file with snapshot fields

  • surf_file [in]

    Name of file with surface fields

  • h_end [inout]

    End of timestep layer thickness [H ~> m or kg m-2]

  • uhtr [inout]

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

  • vhtr [inout]

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

  • temp_mean [inout]

    Averaged temperature [C ~> degC]

  • salt_mean [inout]

    Averaged salinity [S ~> ppt]

  • mld [inout]

    Averaged mixed layer depth [Z ~> m]

  • Kd [inout]

    Diapycnal diffusivities at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • fluxes [inout]

    Fields with surface fluxes

  • ridx_sum [in]

    Read index for sum, mean, and surf files

  • ridx_snap [in]

    Read index for snapshot file

  • read_mld [in]

    True if reading in MLD

  • mld_var_name [in]

    Name of the mixed layer depth variable to read from a file.

  • read_sw [in]

    True if reading in radiative fluxes

  • read_ts_uvh [in]

    True if reading in uh, vh, and h

  • do_ale_in [in]

    True if using ALE algorithms

Callees call graph
Callees of mom_offline_aux::update_offline_from_files calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_io MOM_io cluster_mom_offline_aux MOM_offline_aux mom_domain_infra::interface::pass_var pass_var (interface) mom_io::interface::mom_read_data MOM_read_data (interface) mom_io::interface::mom_read_vector MOM_read_vector (interface) mom_offline_aux::update_offline_from_files update_offline_from_files mom_offline_aux::update_offline_from_files->mom_domain_infra::interface::pass_var mom_offline_aux::update_offline_from_files->mom_io::interface::mom_read_data mom_offline_aux::update_offline_from_files->mom_io::interface::mom_read_vector
Text view
Callers call graph
Callers of mom_offline_aux::update_offline_from_files calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main 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_offline_aux::update_offline_from_files
Text view
subroutine update_offline_from_arrays(G, GV, nk_input, ridx_sum, mean_file, sum_file, snap_file, uhtr, vhtr, hend, uhtr_all, vhtr_all, hend_all, temp, salt, temp_all, salt_all)

Fields for offline transport are copied from the stored arrays read during initialization

Parameters
  • G [inout]

    Horizontal grid type

  • GV [in]

    Vertical grid type

  • nk_input [in]

    Number of levels in input file

  • ridx_sum [in]

    Index to read from

  • mean_file [in]

    Name of file with averages fields

  • sum_file [in]

    Name of file with summed fields

  • snap_file [in]

    Name of file with snapshot fields

  • uhtr [inout]

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

  • vhtr [inout]

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

  • hend [inout]

    End of timestep layer thickness [H ~> m or kg m-2]

  • uhtr_all [inout]

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

  • vhtr_all [inout]

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

  • hend_all [inout]

    End of timestep layer thickness [H ~> m or kg m-2]

  • temp [inout]

    Temperature array [C ~> degC]

  • salt [inout]

    Salinity array [S ~> ppt]

  • temp_all [inout]

    Temperature array [C ~> degC]

  • salt_all [inout]

    Salinity array [S ~> ppt]

Callees call graph
Callees of mom_offline_aux::update_offline_from_arrays calls cluster_mom_error_handler MOM_error_handler cluster_mom_offline_aux MOM_offline_aux mom_error_handler::mom_error MOM_error mom_offline_aux::update_offline_from_arrays update_offline_from_arrays mom_offline_aux::update_offline_from_arrays->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_offline_aux::update_offline_from_arrays calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main mom_offline_aux::update_offline_from_arrays update_offline_from_arrays mom_offline_main::update_offline_fields update_offline_fields mom_offline_main::update_offline_fields->mom_offline_aux::update_offline_from_arrays
Text view
function next_modulo_time(inidx, numtime)

Calculates the next timelevel to read from the input fields. This allows the 'looping' of the fields

Callers call graph
Callers of mom_offline_aux::next_modulo_time calls cluster_mom_offline_aux MOM_offline_aux cluster_mom_offline_main MOM_offline_main 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_offline_aux::next_modulo_time mom_offline_main::update_offline_fields update_offline_fields mom_offline_main::update_offline_fields->mom_offline_aux::next_modulo_time
Text view
API generated with Flint · Rendered from reStructuredText