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.

More…

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.

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.

Detailed Description

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

Function/Subroutine Documentation

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • uhtr :: [in] Accumulated mass flux through zonal face [kg]

  • vhtr :: [in] Accumulated mass flux through meridional face [kg]

  • h_pre :: [in] Previous layer thicknesses [kg m-2].

  • h_new :: [inout] Updated layer thicknesses [kg m-2].

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • ea :: [in] Mass of fluid entrained from the layer

  • eb :: [in] Mass of fluid entrained from the layer

  • h_pre :: [in] Layer thicknesses at the end of the previous

  • h_new :: [inout] Updated layer thicknesses [kg m-2].

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • uh :: [inout] Mass flux through zonal face [kg]

  • vh :: [inout] Mass flux through meridional face [kg]

  • ea :: [inout] Mass of fluid entrained from the layer

  • eb :: [inout] Mass of fluid entrained from the layer

  • h_pre :: [in] Layer thicknesses at the end of the previous

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • hvol :: [in] Mass of water in the cells at the end

  • uh :: [inout] Zonal mass transport within a timestep [kg]

Call to

mom_error_handler::mom_error

subroutine mom_offline_aux/distribute_residual_vh_barotropic(G, GV, hvol, vh)

Redistribute the v-flux as a barotropic equivalent.

Parameters
  • g :: ocean grid structure

  • gv :: ocean vertical grid structure

  • hvol :: [in] Mass of water in the cells at the end

  • vh :: [inout] Meridional mass transport within a timestep [kg]

Call to

mom_error_handler::mom_error

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • hvol :: [in] Mass of water in the cells at the end

  • uh :: [inout] Zonal mass transport within a timestep [kg]

Call to

mom_error_handler::mom_error

Called from

mom_offline_main::offline_redistribute_residual

subroutine mom_offline_aux/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 :: ocean grid structure

  • gv :: ocean vertical grid structure

  • hvol :: [in] Mass of water in the cells at the end

  • vh :: [inout] Meridional mass transport within a timestep [kg]

Call to

mom_error_handler::mom_error

Called from

mom_offline_main::offline_redistribute_residual

subroutine mom_offline_aux/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.

subroutine mom_offline_aux/update_offline_from_files(G, GV, 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, 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

  • 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

  • uhtr :: [inout] Zonal mass fluxes [kg]

  • vhtr :: [inout] Meridional mass fluxes [kg]

  • h_end :: [inout] End of timestep layer thickness

  • temp_mean :: [inout] Averaged temperature

  • salt_mean :: [inout] Averaged salinity

  • mld :: [inout] Averaged mixed layer depth

  • kd :: [inout] Diapycnal diffusivities at interfaces

  • 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

  • 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

subroutine mom_offline_aux/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 [kg]

  • vhtr :: [inout] Meridional mass fluxes [kg]

  • hend :: [inout] End of timestep layer thickness [kg m-2]

  • uhtr_all :: [inout] Zonal mass fluxes [kg]

  • vhtr_all :: [inout] Meridional mass fluxes [kg]

  • hend_all :: [inout] End of timestep layer thickness [kg m-2]

  • temp :: [inout] Temperature array

  • salt :: [inout] Salinity array

  • temp_all :: [inout] Temperature array

  • salt_all :: [inout] Salinity array

Call to

mom_error_handler::mom_error

function mom_offline_aux/next_modulo_time(inidx, numtime) [integer]

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