mom_unit_scaling module reference

Provides a transparent unit rescaling type to facilitate dimensional consistency testing.

More…

Data Types

unit_scale_type

Describes various unit conversion factors.

Functions/Subroutines

unit_scaling_init()

Allocates and initializes the ocean model unit scaling type.

unit_no_scaling_init()

Allocates and initializes the ocean model unit scaling type to unscaled values.

set_unit_scaling_combos()

This subroutine sets useful combinations of the fundamental scale conversion factors in the unit scaling type.

fix_restart_unit_scaling()

Set the unit scaling factors for output to restart files to the unit scaling factors for this run.

unit_scaling_end()

Deallocates a unit scaling structure.

Detailed Description

Provides a transparent unit rescaling type to facilitate dimensional consistency testing.

Type Documentation

type mom_unit_scaling/unit_scale_type

Describes various unit conversion factors.

Type fields:
  • % m_to_z [real] :: A constant that translates distances in meters to the units of depth [Z m-1 ~> 1].

  • % z_to_m [real] :: A constant that translates distances in the units of depth to meters [m Z-1 ~> 1].

  • % m_to_l [real] :: A constant that translates lengths in meters to the units of horizontal lengths [L m-1 ~> 1].

  • % l_to_m [real] :: A constant that translates lengths in the units of horizontal lengths to meters [m L-1 ~> 1].

  • % s_to_t [real] :: A constant that translates time intervals in seconds to the units of time [T s-1 ~> 1].

  • % t_to_s [real] :: A constant that translates the units of time to seconds [s T-1 ~> 1].

  • % r_to_kg_m3 [real] :: A constant that translates the units of density to kilograms per meter cubed [kg m-3 R-1 ~> 1].

  • % kg_m3_to_r [real] :: A constant that translates kilograms per meter cubed to the units of density [R m3 kg-1 ~> 1].

  • % q_to_j_kg [real] :: A constant that translates the units of enthalpy to Joules per kilogram [J kg-1 Q-1 ~> 1].

  • % j_kg_to_q [real] :: A constant that translates Joules per kilogram to the units of enthalpy [Q kg J-1 ~> 1].

  • % c_to_degc [real] :: A constant that translates the units of temperature to degrees Celsius [degC C-1 ~> 1].

  • % degc_to_c [real] :: A constant that translates degrees Celsius to the units of temperature [C degC-1 ~> 1].

  • % s_to_ppt [real] :: A constant that translates the units of salinity to parts per thousand [ppt S-1 ~> 1].

  • % ppt_to_s [real] :: A constant that translates parts per thousand to the units of salinity [S ppt-1 ~> 1].

  • % z_to_l [real] :: Convert vertical distances to lateral lengths [L Z-1 ~> 1].

  • % l_to_z [real] :: Convert lateral lengths to vertical distances [Z L-1 ~> 1].

  • % l_t_to_m_s [real] :: Convert lateral velocities from L T-1 to m s-1 [T m L-1 s-1 ~> 1].

  • % m_s_to_l_t [real] :: Convert lateral velocities from m s-1 to L T-1 [L s T-1 m-1 ~> 1].

  • % l_t2_to_m_s2 [real] :: Convert lateral accelerations from L T-2 to m s-2 [L s2 T-2 m-1 ~> 1].

  • % z2_t_to_m2_s [real] :: Convert vertical diffusivities from Z2 T-1 to m2 s-1 [T m2 Z-2 s-1 ~> 1].

  • % m2_s_to_z2_t [real] :: Convert vertical diffusivities from m2 s-1 to Z2 T-1 [Z2 s T-1 m-2 ~> 1].

  • % w_m2_to_qrz_t [real] :: Convert heat fluxes from W m-2 to Q R Z T-1 [Q R Z m2 T-1 W-1 ~> 1].

  • % qrz_t_to_w_m2 [real] :: Convert heat fluxes from Q R Z T-1 to W m-2 [W T Q-1 R-1 Z-1 m-2 ~> 1].

  • % rz_to_kg_m2 [real] :: Convert mass loads from R Z to kg m-2 [kg R-1 Z-1 m-2 ~> 1].

  • % kg_m2s_to_rz_t [real] :: Convert mass fluxes from kg m-2 s-1 to R Z T-1 [R Z m2 s T-1 kg-1 ~> 1].

  • % rz_t_to_kg_m2s [real] :: Convert mass fluxes from R Z T-1 to kg m-2 s-1 [T kg R-1 Z-1 m-2 s-1 ~> 1].

  • % rz3_t3_to_w_m2 [real] :: Convert turbulent kinetic energy fluxes from R Z3 T-3 to W m-2 [W T3 R-1 Z-3 m-2 ~> 1].

  • % w_m2_to_rz3_t3 [real] :: Convert turbulent kinetic energy fluxes from W m-2 to R Z3 T-3 [R Z3 m2 T-3 W-1 ~> 1].

  • % rl2_t2_to_pa [real] :: Convert pressures from R L2 T-2 to Pa [Pa T2 R-1 L-2 ~> 1].

  • % rlz_t2_to_pa [real] :: Convert wind stresses from R L Z T-2 to Pa [Pa T2 R-1 L-1 Z-1 ~> 1].

  • % pa_to_rl2_t2 [real] :: Convert pressures from Pa to R L2 T-2 [R L2 T-2 Pa-1 ~> 1].

  • % pa_to_rlz_t2 [real] :: Convert wind stresses from Pa to R L Z T-2 [R L Z T-2 Pa-1 ~> 1].

  • % m_to_z_restart [real] :: A copy of the m_to_Z that is used in restart files.

  • % m_to_l_restart [real] :: A copy of the m_to_L that is used in restart files.

  • % s_to_t_restart [real] :: A copy of the s_to_T that is used in restart files.

  • % kg_m3_to_r_restart [real] :: A copy of the kg_m3_to_R that is used in restart files.

  • % j_kg_to_q_restart [real] :: A copy of the J_kg_to_Q that is used in restart files.

Function/Subroutine Documentation

subroutine mom_unit_scaling/unit_scaling_init(param_file, US)

Allocates and initializes the ocean model unit scaling type.

Parameters:
  • param_file :: [in] Parameter file handle/type

  • us :: A dimensional unit scaling type

Call to:

mom_error_handler::mom_error set_unit_scaling_combos

Called from:

mom_oda_driver_mod::init_oda mom_ice_shelf::initialize_ice_shelf mom::initialize_mom

subroutine mom_unit_scaling/unit_no_scaling_init(US)

Allocates and initializes the ocean model unit scaling type to unscaled values.

Parameters:

us :: A dimensional unit scaling type

Call to:

mom_error_handler::mom_error set_unit_scaling_combos

subroutine mom_unit_scaling/set_unit_scaling_combos(US)

This subroutine sets useful combinations of the fundamental scale conversion factors in the unit scaling type.

Parameters:

us :: [inout] A dimensional unit scaling type

Called from:

unit_no_scaling_init unit_scaling_init

subroutine mom_unit_scaling/fix_restart_unit_scaling(US, unscaled)

Set the unit scaling factors for output to restart files to the unit scaling factors for this run.

Parameters:
  • us :: [inout] A dimensional unit scaling type

  • unscaled :: [in] If true, set the restart factors as though the model would be unscaled, which is appropriate if the scaling is undone when writing a restart file.

Called from:

mom_ice_shelf::initialize_ice_shelf

subroutine mom_unit_scaling/unit_scaling_end(US)

Deallocates a unit scaling structure.

Parameters:

us :: A dimensional unit scaling type

Called from:

mom::mom_end