Skip to content

Commit

Permalink
Merge pull request #216 from CliMA/ncc/docs-rendering
Browse files Browse the repository at this point in the history
Better docs rendering/code alignment
  • Loading branch information
charleskawczynski authored Sep 6, 2024
2 parents ffbbe72 + 132968e commit 4c1fe6c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Users are encouraged to first establish a thermodynamic state with one of our
a moist thermodynamic state using

```julia
ts = PhaseEquil_ρeq(param_set, ρ, e_int, q_tot);
ts = PhaseEquil_ρeq(param_set, ρ, e_int, q_tot)
```

here, `ρ` is the density of the moist air, and the internal energy `e_int =
Expand All @@ -72,8 +72,8 @@ we've established a thermodynamic state, we can call [Thermodynamic state
methods](@ref) that support thermodynamic states:

```julia
T = air_temperature(param_set, ts);
q = PhasePartition(param_set, ts);
T = air_temperature(param_set, ts)
q = PhasePartition(param_set, ts)
```

No changes to the "right-hand sides" of the dynamical equations are needed
Expand All @@ -84,15 +84,15 @@ Schematically, the workflow in such a core would look as follows:
```julia
# initialize
geopotential = grav * z
q_tot = ...
q_tot = ...
ρ = ...

(u, v, w) = ...
e_kin = 0.5 * (u^2 + v^2 + w^2)
e_kin = 0.5 * (u^2 + v^2 + w^2)

e_tot = total_energy(param_set, e_kin, geopotential, T, q_tot)

do timestep # timestepping loop
do timestep # timestepping loop

# advance dynamical variables by a timestep (temperature typically
# appears in terms on the rhs, such as radiative transfer)
Expand All @@ -102,10 +102,10 @@ do timestep # timestepping loop
e_int = e_tot - 0.5 * (u^2 + v^2 + w^2) - geopotential

# compute temperature, pressure and condensate specific humidities,
ts = PhaseEquil_ρeq(param_set, ρ, e_int, q_tot);
T = air_temperature(param_set, ts);
q = PhasePartition(param_set, ts);
p = air_pressure(param_set, ts);
ts = PhaseEquil_ρeq(param_set, ρ, e_int, q_tot)
T = air_temperature(param_set, ts)
q = PhasePartition(param_set, ts)
p = air_pressure(param_set, ts)

end
```
Expand All @@ -118,7 +118,7 @@ non-equilibrium moist thermodynamic state:

```julia
q_tot, q_liq, q_ice = ...
ts = PhaseNonEquil(param_set, e_int, ρ, PhasePartition(q_tot, q_liq, q_ice));
T = air_temperature(param_set, ts);
p = air_pressure(param_set, ts);
ts = PhaseNonEquil(param_set, e_int, ρ, PhasePartition(q_tot, q_liq, q_ice))
T = air_temperature(param_set, ts)
p = air_pressure(param_set, ts)
```

0 comments on commit 4c1fe6c

Please sign in to comment.