Skip to content

Commit 05e2202

Browse files
committed
Update documentation for gravity wave diagnostics
Correct typo in `diagnostics.md` and add detailed explanation of `eps` parameter usage in `gravity_wave.md`.
1 parent 3389143 commit 05e2202

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/src/diagnostics.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ were computed differently for `EquilMoistModel` and `NonEquilMoistModel`.
209209
In `ClimaAtmos`, we define some helper functions to produce error messages, so
210210
the above code can be written as
211211
```julia
212-
compute_relative_humidity!(out, state, cache, time) =
213-
compute_relative_humidity!(out, state, cache, time, cache.atmos.moisture_model)
214-
compute_relative_humidity!(_, _, _, _, model::T) where {T} =
215-
error_diagnostic_variable("relative_humidity", model)
216212

217213
function compute_relative_humidity!(
218214
out,
@@ -228,6 +224,11 @@ function compute_relative_humidity!(
228224
out .= TD.relative_humidity.(thermo_params, cache.ᶜts)
229225
end
230226
end
227+
228+
compute_relative_humidity!(out, state, cache, time) =
229+
compute_relative_humidity!(out, state, cache, time, cache.atmos.moisture_model)
230+
compute_relative_humidity!(_, _, _, _, model::T) where {T} =
231+
error_diagnostic_variable("relative_humidity", model)
231232
```
232233

233234
### The `ClimaAtmos` `DiagnosticVariable`s

docs/src/gravity_wave.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ Similar to the base flux calculation but for the 3D fields, we computed ``N`` an
165165
^f N[k]^2 = \frac{g}{^f T[k]} * ( ^f \overline{\frac{dT}{dz}}[k] + \frac{g}{cp}),
166166
```
167167
```math
168-
^f V_{\tau}[k] = \max(\epsilon_0, - V[k] \cdot \frac{\tau}{|\tau|}).
168+
^f V_{\tau}[k] = \max(\epsilon_0, - V[k] \cdot \frac{\tau}{|\tau|}),
169169
```
170+
where where ``\epsilon_0`` denotes a measure of floating-point precision.
170171

171172
Let ``L_1 = L_0 * \max(0.5, \min(2.0, 1.0-samp*V_\tau*d^2V_{\tau}/N^2))`` where ``samp=1.0`` is the correction for coarse sampling of ``d^2V/dz^2``, and
172173
```math

0 commit comments

Comments
 (0)