Skip to content

Commit 8133144

Browse files
committed
Add more detailed comments about equation derivation
1 parent cf5ce82 commit 8133144

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/dynamics/mpas/dyn_coupling.F90

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,15 @@ pure elemental function t_of_theta_rhod_qv(theta, rhod, qv) result(t)
599599
! described herein:
600600
! The paragraph below equation 2.7 in doi:10.5065/1DFH-6P97.
601601
! The paragraph below equation 2 in doi:10.1175/MWR-D-11-00215.1.
602+
!
603+
! In short, solve the below equation set for $T$ in terms of $\theta$, $\rho_d$ and $q_v$:
604+
! \begin{equation*}
605+
! \begin{cases}
606+
! \theta &= T (\frac{P_0}{P})^{\frac{R_d}{C_p}} \\
607+
! P &= \rho_d R_d T_m \\
608+
! T_m &= T (1 + \frac{R_v}{R_d} q_v)
609+
! \end{cases}
610+
! \end{equation*}
602611
t = (theta ** (constant_cpd / constant_cvd)) * &
603612
(((rhod * constant_rd * (1.0_kind_r8 + constant_rv / constant_rd * qv)) / constant_p0) ** &
604613
(constant_rd / constant_cvd))
@@ -624,6 +633,15 @@ pure elemental function theta_of_t_rhod_qv(t, rhod, qv) result(theta)
624633
! described herein:
625634
! The paragraph below equation 2.7 in doi:10.5065/1DFH-6P97.
626635
! The paragraph below equation 2 in doi:10.1175/MWR-D-11-00215.1.
636+
!
637+
! In short, solve the below equation set for $\theta$ in terms of $T$, $\rho_d$ and $q_v$:
638+
! \begin{equation*}
639+
! \begin{cases}
640+
! \theta &= T (\frac{P_0}{P})^{\frac{R_d}{C_p}} \\
641+
! P &= \rho_d R_d T_m \\
642+
! T_m &= T (1 + \frac{R_v}{R_d} q_v)
643+
! \end{cases}
644+
! \end{equation*}
627645
theta = (t ** (constant_cvd / constant_cpd)) * &
628646
((constant_p0 / (rhod * constant_rd * (1.0_kind_r8 + constant_rv / constant_rd * qv))) ** &
629647
(constant_rd / constant_cpd))

0 commit comments

Comments
 (0)