Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of three commits that eliminate 46 instances where there was a need to multiply by
US%L_to_Z
during run-time. There are 9 instances where there are compensating additions of factors ofUS%L_to_Z
toscale
orconversion
arguments that are used during model initialization.The first commit introduces a newly rescaled version of the gravitational acceleration,
GV%g_Earth_Z_T2
, to theverticalGrid_type
as a copy ofGV%g_Earth
that uses dimensional rescaling of[Z T-2 ~> m s-2]
instead of[L2 Z-1 T-2 ~> m s-2]
.GV%g_Earth_Z_T2
is more convenient for single-column energy calculations (for which horizontal scales should be irrelevant), but the two variables will only differ by an integer power of two when dimensional rescaling is applied. This new version of the gravitational acceleration is used in 15 files.Another
US%L_to_Z**2
rescaling factor was eliminated from the code inePBL_column()
by folding it intoMKE_to_TKE_effic
.The second commit revises the internal rescaling of turbulent kinetic energies in
MOM_bulk_mixed_layer
to work in units of[H Z2 T-2]
instead of[H L2 T-2]
, for greater consistency with the rescaling of TKE elsewhere. These changes included usingGV%g_Earth_Z_T2
instead ofGV%g_Earth
in 16 places that contribute to potential energy calculations. In 5 lines, the unit scaling factors were eliminated, while in 2 others the rescaling factors were revised. In addition, the rescaling factors to go from the units of mean kinetic energy to those of turbulent kinetic energy were folded into the internal representation of the bulk Richardson numbers. The units in comments describing 58 variables and the conversion arguments for 10 diagnostics were updated accordingly.The third commit rescales the internal representation of the
FGNV_STRAT_FLOOR
variable andthickness_diffuse%N2_floor
inMOM_mixedlayer_restrat
to include appropriate factors ofUS%Z_to_L
to reflect the scaling of aspect ratios. This leads to the elimination of one rescaling factor inthickness_diffuse_full()
and its replacement by another in a scale factor for aget_param()
call.All answers and output are bitwise identical, but there is a new element in a transparent type. The specific commits in this PR include: