Skip to content

Commit

Permalink
+Add H_to_RZ and RZ_to_H to the verticalGrid_type
Browse files Browse the repository at this point in the history
  Added two new dimensional conversion factors, H_to_RZ and RZ_to_H, to the
MOM6 vertical grid, in preparation for adding testing of dimensional rescaling
of density to the MOM6 code.  All answers are bitwise identical, but a
transparent type has two new elements.
  • Loading branch information
Hallberg-NOAA committed Sep 12, 2019
1 parent 3704a66 commit 5274403
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/MOM_verticalGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ module MOM_verticalGrid
real :: H_to_Pa !< A constant that translates the units of thickness to pressure [Pa].
real :: H_to_Z !< A constant that translates thickness units to the units of depth.
real :: Z_to_H !< A constant that translates depth units to thickness units.
real :: H_to_RZ !< A constant that translates thickness units to the units of mass per unit area.
real :: RZ_to_H !< A constant that translates mass per unit area units to thickness units.

real :: m_to_H_restart = 0.0 !< A copy of the m_to_H that is used in restart files.
end type verticalGrid_type
Expand Down Expand Up @@ -156,6 +158,9 @@ subroutine verticalGridInit( param_file, GV, US )
GV%Z_to_H = US%Z_to_m * GV%m_to_H
GV%Angstrom_Z = US%m_to_Z * GV%Angstrom_m

GV%H_to_RZ = GV%H_to_kg_m2 * US%kg_m3_to_R * US%m_to_Z
GV%RZ_to_H = GV%kg_m2_to_H * US%R_to_kg_m3 * US%Z_to_m

! Log derivative values.
call log_param(param_file, mdl, "M to THICKNESS", GV%m_to_H*H_rescale_factor)
call log_param(param_file, mdl, "M to THICKNESS rescaled by 2^-n", GV%m_to_H)
Expand Down

0 comments on commit 5274403

Please sign in to comment.