MOM_unit_scaling module reference

Provides a transparent unit rescaling type to facilitate dimensional consistency testing

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.

Type Documentation

type, public :: unit_scale_type

Describes various unit conversion factors

Parameters
  • m_to_Z

    A constant that translates distances in meters to the units of depth [Z m-1 ~> 1]

  • Z_to_m

    A constant that translates distances in the units of depth to meters [m Z-1 ~> 1]

  • m_to_L

    A constant that translates lengths in meters to the units of horizontal lengths [L m-1 ~> 1]

  • L_to_m

    A constant that translates lengths in the units of horizontal lengths to meters [m L-1 ~> 1]

  • s_to_T

    A constant that translates time intervals in seconds to the units of time [T s-1 ~> 1]

  • T_to_s

    A constant that translates the units of time to seconds [s T-1 ~> 1]

  • R_to_kg_m3

    A constant that translates the units of density to kilograms per meter cubed [kg m-3 R-1 ~> 1]

  • kg_m3_to_R

    A constant that translates kilograms per meter cubed to the units of density [R m3 kg-1 ~> 1]

  • Q_to_J_kg

    A constant that translates the units of enthalpy to Joules per kilogram [J kg-1 Q-1 ~> 1]

  • J_kg_to_Q

    A constant that translates Joules per kilogram to the units of enthalpy [Q kg J-1 ~> 1]

  • C_to_degC

    A constant that translates the units of temperature to degrees Celsius [degC C-1 ~> 1]

  • degC_to_C

    A constant that translates degrees Celsius to the units of temperature [C degC-1 ~> 1]

  • S_to_ppt

    A constant that translates the units of salinity to parts per thousand [ppt S-1 ~> 1]

  • ppt_to_S

    A constant that translates parts per thousand to the units of salinity [S ppt-1 ~> 1]

  • Z_to_L

    Convert vertical distances to lateral lengths [L Z-1 ~> 1]

  • L_to_Z

    Convert lateral lengths to vertical distances [Z L-1 ~> 1]

  • L_T_to_m_s

    Convert lateral velocities from L T-1 to m s-1 [T m L-1 s-1 ~> 1]

  • m_s_to_L_T

    Convert lateral velocities from m s-1 to L T-1 [L s T-1 m-1 ~> 1]

  • L_T2_to_m_s2

    Convert lateral accelerations from L T-2 to m s-2 [L s2 T-2 m-1 ~> 1]

  • Z2_T_to_m2_s

    Convert vertical diffusivities from Z2 T-1 to m2 s-1 [T m2 Z-2 s-1 ~> 1]

  • m2_s_to_Z2_T

    Convert vertical diffusivities from m2 s-1 to Z2 T-1 [Z2 s T-1 m-2 ~> 1]

  • W_m2_to_QRZ_T

    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

    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

    Convert mass loads from R Z to kg m-2 [kg R-1 Z-1 m-2 ~> 1]

  • RZL2_to_kg

    Convert masses from R Z L2 to kg [kg R-1 Z-1 L-2 ~> 1]

  • kg_m2s_to_RZ_T

    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

    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

    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

    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

    Convert pressures from R L2 T-2 to Pa [Pa T2 R-1 L-2 ~> 1]

  • RLZ_T2_to_Pa

    Convert wind stresses from R L Z T-2 to Pa [Pa T2 R-1 L-1 Z-1 ~> 1]

  • Pa_to_RL2_T2

    Convert pressures from Pa to R L2 T-2 [R L2 T-2 Pa-1 ~> 1]

  • Pa_to_RLZ_T2

    Convert wind stresses from Pa to R L Z T-2 [R L Z T-2 Pa-1 ~> 1]

  • m_to_Z_restart

    A copy of the m_to_Z that is used in restart files.

  • m_to_L_restart

    A copy of the m_to_L that is used in restart files.

  • s_to_T_restart

    A copy of the s_to_T that is used in restart files.

  • kg_m3_to_R_restart

    A copy of the kg_m3_to_R that is used in restart files.

  • J_kg_to_Q_restart

    A copy of the J_kg_to_Q that is used in restart files.

Functions/Subroutine Documentation

subroutine 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

Callees call graph
Callees of mom_unit_scaling::unit_scaling_init calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_unit_scaling MOM_unit_scaling 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_unit_scaling::set_unit_scaling_combos set_unit_scaling_combos [private/internal] mom_unit_scaling::unit_scaling_init unit_scaling_init mom_unit_scaling::unit_scaling_init->mom_error_handler::mom_error mom_unit_scaling::unit_scaling_init->mom_file_parser::interface::get_param mom_unit_scaling::unit_scaling_init->mom_file_parser::interface::log_version mom_unit_scaling::unit_scaling_init->mom_unit_scaling::set_unit_scaling_combos
Text view
Callers call graph
Callers of mom_unit_scaling::unit_scaling_init calls cluster_mom MOM cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_unit_scaling MOM_unit_scaling mom::initialize_mom initialize_MOM mom_unit_scaling::unit_scaling_init unit_scaling_init mom::initialize_mom->mom_unit_scaling::unit_scaling_init mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_ice_shelf::initialize_ice_shelf->mom_unit_scaling::unit_scaling_init mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_unit_scaling::unit_scaling_init
Text view
subroutine unit_no_scaling_init(US)

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

Parameters
  • US

    A dimensional unit scaling type

Callees call graph
Callees of mom_unit_scaling::unit_no_scaling_init calls cluster_mom_error_handler MOM_error_handler cluster_mom_unit_scaling MOM_unit_scaling mom_error_handler::mom_error MOM_error mom_unit_scaling::set_unit_scaling_combos set_unit_scaling_combos [private/internal] mom_unit_scaling::unit_no_scaling_init unit_no_scaling_init mom_unit_scaling::unit_no_scaling_init->mom_error_handler::mom_error mom_unit_scaling::unit_no_scaling_init->mom_unit_scaling::set_unit_scaling_combos
Text view
subroutine 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

Callers call graph
Callers of mom_unit_scaling::set_unit_scaling_combos calls cluster_mom_unit_scaling MOM_unit_scaling mom_unit_scaling::set_unit_scaling_combos set_unit_scaling_combos [private/internal] mom_unit_scaling::unit_no_scaling_init unit_no_scaling_init mom_unit_scaling::unit_no_scaling_init->mom_unit_scaling::set_unit_scaling_combos mom_unit_scaling::unit_scaling_init unit_scaling_init mom_unit_scaling::unit_scaling_init->mom_unit_scaling::set_unit_scaling_combos
Text view
subroutine 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.

Callers call graph
Callers of mom_unit_scaling::fix_restart_unit_scaling calls cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_unit_scaling MOM_unit_scaling mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_unit_scaling::fix_restart_unit_scaling fix_restart_unit_scaling mom_ice_shelf::initialize_ice_shelf->mom_unit_scaling::fix_restart_unit_scaling
Text view
subroutine unit_scaling_end(US)

Deallocates a unit scaling structure.

Parameters
  • US

    A dimensional unit scaling type

Callers call graph
Callers of mom_unit_scaling::unit_scaling_end calls cluster_mom MOM cluster_mom_unit_scaling MOM_unit_scaling mom::mom_end MOM_end mom_unit_scaling::unit_scaling_end unit_scaling_end mom::mom_end->mom_unit_scaling::unit_scaling_end
Text view
API generated with Flint · Rendered from reStructuredText