coord_slight module reference

Regrid columns for the SLight coordinate.

More…

Data Types

slight_cs

Control structure containing required parameters for the SLight coordinate.

Functions/Subroutines

init_coord_slight()

Initialise a slight_CS with pointers to parameters.

end_coord_slight()

This subroutine deallocates memory in the control structure for the coord_slight() module.

set_slight_params()

This subroutine can be used to set the parameters for the coord_slight() module.

build_slight_column()

Build a SLight coordinate column.

rho_interfaces_col()

Finds the new interface locations in a column of water that match the prescribed target densities.

Detailed Description

Regrid columns for the SLight coordinate.

Type Documentation

type coord_slight/slight_cs

Control structure containing required parameters for the SLight coordinate.

Type fields
  • % nk [integer] :: Number of layers/levels.

  • % min_thickness [real] :: Minimum thickness allowed when building the new grid through regridding [H ~> m or kg m-2].

  • % ref_pressure [real] :: Reference pressure for potential density calculations [R L2 T-2 ~> Pa].

  • % compressibility_fraction [real] :: Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions. [nondim].

  • % rho_ml_avg_depth [real] :: Depth over which to average to determine the mixed layer potential density [H ~> m or kg m-2].

  • % nlay_ml_offset [real] :: Number of layers to offset the mixed layer density to find resolved stratification [nondim].

  • % nz_fixed_surface [integer] :: The number of fixed-thickness layers at the top of the model.

  • % dz_ml_min [real] :: The fixed resolution in the topmost SLight_nkml_min layers [H ~> m or kg m-2].

  • % fix_haloclines [logical] :: If true, detect regions with much weaker stratification in the coordinate than based on in-situ density, and use a stretched coordinate there.

  • % halocline_filter_length [real] :: A length scale over which to filter T & S when looking for spuriously unstable water mass profiles [H ~> m or kg m-2].

  • % halocline_strat_tol [real] :: A value of the stratification ratio that defines a problematic halocline region [nondim].

  • % target_density [real(:),allocatable] :: Nominal density of interfaces [R ~> kg m-3].

  • % max_interface_depths [real(:),allocatable] :: Maximum depths of interfaces [H ~> m or kg m-2].

  • % max_layer_thickness [real(:),allocatable] :: Maximum thicknesses of layers [H ~> m or kg m-2].

  • % interp_cs [type(interp_cs_type)] :: Interpolation control structure.

Function/Subroutine Documentation

subroutine coord_slight/init_coord_slight(CS, nk, ref_pressure, target_density, interp_CS, m_to_H)

Initialise a slight_CS with pointers to parameters.

Parameters
  • cs :: Unassociated pointer to hold the control structure

  • nk :: [in] Number of layers in the grid

  • ref_pressure :: [in] Coordinate reference pressure [R L2 T-2 ~> Pa]

  • target_density :: [in] Nominal density of interfaces [R ~> kg m-3]

  • interp_cs :: [in] Controls for interpolation

  • m_to_h :: [in] A conversion factor from m to the units of thicknesses

Call to

mom_error_handler::mom_error

Called from

mom_regridding::initcoord

subroutine coord_slight/end_coord_slight(CS)

This subroutine deallocates memory in the control structure for the coord_slight() module. module.

Parameters

cs :: Coordinate control structure

Called from

mom_regridding::end_regridding

subroutine coord_slight/set_slight_params(CS, max_interface_depths, max_layer_thickness, min_thickness, compressibility_fraction, dz_ml_min, nz_fixed_surface, Rho_ML_avg_depth, nlay_ML_offset, fix_haloclines, halocline_filter_length, halocline_strat_tol, interp_CS)

This subroutine can be used to set the parameters for the coord_slight() module. module.

Parameters
  • cs :: Coordinate control structure

  • max_interface_depths :: [in] Maximum depths of interfaces [H ~> m or kg m-2]

  • max_layer_thickness :: [in] Maximum thicknesses of layers [H ~> m or kg m-2]

  • min_thickness :: [in] Minimum thickness allowed when building the new grid through regridding [H ~> m or kg m-2]

  • compressibility_fraction :: [in] Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions. [nondim]

  • dz_ml_min :: [in] The fixed resolution in the topmost SLight_nkml_min layers [H ~> m or kg m-2]

  • nz_fixed_surface :: [in] The number of fixed-thickness layers at the top of the model

  • rho_ml_avg_depth :: [in] Depth over which to average to determine the mixed layer potential density [H ~> m or kg m-2]

  • nlay_ml_offset :: [in] Number of layers to offset the mixed layer density to find resolved stratification [nondim]

  • fix_haloclines :: [in] If true, detect regions with much weaker than based on in-situ density, and use a stretched coordinate there.

  • halocline_filter_length :: [in] A length scale over which to filter T & S when looking for spuriously unstable water mass profiles [H ~> m or kg m-2].

  • halocline_strat_tol :: [in] A value of the stratification ratio that defines a problematic halocline region [nondim].

  • interp_cs :: [in] Controls for interpolation

Call to

mom_error_handler::mom_error

Called from

mom_regridding::set_regrid_max_depths mom_regridding::set_regrid_max_thickness mom_regridding::set_regrid_params

subroutine coord_slight/build_slight_column(CS, eqn_of_state, H_to_pres, H_subroundoff, nz, depth, h_col, T_col, S_col, p_col, z_col, z_col_new, h_neglect, h_neglect_edge)

Build a SLight coordinate column.

Parameters
  • cs :: [in] Coordinate control structure

  • eqn_of_state :: Equation of state structure

  • h_to_pres :: [in] A conversion factor from thicknesses to scaled pressure [R L2 T-2 H-1 ~> Pa m-1 or Pa m2 kg-1]

  • h_subroundoff :: [in] GVH_subroundoff

  • nz :: [in] Number of levels

  • depth :: [in] Depth of ocean bottom (positive [H ~> m or kg m-2])

  • t_col :: [in] T for column

  • s_col :: [in] S for column

  • h_col :: [in] Layer thicknesses [H ~> m or kg m-2]

  • p_col :: [in] Layer center pressure [R L2 T-2 ~> Pa]

  • z_col :: [in] Interface positions relative to the surface [H ~> m or kg m-2]

  • z_col_new :: [inout] Absolute positions of interfaces [H ~> m or kg m-2]

  • h_neglect :: [in] A negligibly small width for the purpose of cell reconstructions [H ~> m or kg m-2].

  • h_neglect_edge :: [in] A negligibly small width for the purpose of edge value calculations [H ~> m or kg m-2].

Call to

mom_error_handler::mom_error rho_interfaces_col

Called from

mom_regridding::build_grid_slight

subroutine coord_slight/rho_interfaces_col(rho_col, h_col, z_col, rho_tgt, nz, z_col_new, CS, reliable, debug, h_neglect, h_neglect_edge)

Finds the new interface locations in a column of water that match the prescribed target densities.

Parameters
  • nz :: [in] Number of layers

  • rho_col :: [in] Initial layer reference densities [R ~> kg m-3].

  • h_col :: [in] Initial layer thicknesses [H ~> m or kg m-2].

  • z_col :: [in] Initial interface heights [H ~> m or kg m-2].

  • rho_tgt :: [in] Interface target densities.

  • z_col_new :: [inout] New interface heights [H ~> m or kg m-2].

  • cs :: [in] Coordinate control structure

  • reliable :: [inout] If true, the interface positions are well defined from a stable region.

  • debug :: [in] If present and true, do debugging checks.

  • h_neglect :: [in] A negligibly small width for the purpose of cell reconstructions [H ~> m or kg m-2]

  • h_neglect_edge :: [in] A negligibly small width for the purpose of edge value calculations [H ~> m or kg m-2]

Call to

mom_error_handler::mom_error regrid_interp::nr_iterations regrid_interp::nr_tolerance

Called from

build_slight_column