@@ -1026,7 +1026,7 @@ add_diagnostic_variable!(
1026
1026
short_name = " clwvi" ,
1027
1027
long_name = " Condensed Water Path" ,
1028
1028
standard_name = " atmosphere_mass_content_of_cloud_condensed_water" ,
1029
- units = " kg m-2" ,
1029
+ units = " kg m^ -2" ,
1030
1030
comments = """
1031
1031
Mass of condensed (liquid + ice) water in the column divided by the area of the column
1032
1032
(not just the area of the cloudy portion of the column). It doesn't include precipitating hydrometeors.
@@ -1066,7 +1066,7 @@ add_diagnostic_variable!(
1066
1066
short_name = " lwp" ,
1067
1067
long_name = " Liquid Water Path" ,
1068
1068
standard_name = " atmosphere_mass_content_of_cloud_liquid_water" ,
1069
- units = " kg m-2" ,
1069
+ units = " kg m^ -2" ,
1070
1070
comments = """
1071
1071
The total mass of liquid water in cloud per unit area.
1072
1072
(not just the area of the cloudy portion of the column). It doesn't include precipitating hydrometeors.
@@ -1106,7 +1106,7 @@ add_diagnostic_variable!(
1106
1106
short_name = " clivi" ,
1107
1107
long_name = " Ice Water Path" ,
1108
1108
standard_name = " atmosphere_mass_content_of_cloud_ice" ,
1109
- units = " kg m-2" ,
1109
+ units = " kg m^ -2" ,
1110
1110
comments = """
1111
1111
The total mass of ice in cloud per unit area.
1112
1112
(not just the area of the cloudy portion of the column). It doesn't include precipitating hydrometeors.
@@ -1504,6 +1504,9 @@ add_diagnostic_variable!(
1504
1504
compute! = compute_cape!,
1505
1505
)
1506
1506
1507
+ # ##
1508
+ # Mean sea level pressure (2d)
1509
+ # ##
1507
1510
function compute_mslp! (out, state, cache, time)
1508
1511
thermo_params = CAP. thermodynamics_params (cache. params)
1509
1512
g = TD. Parameters. grav (thermo_params)
@@ -1536,3 +1539,43 @@ add_diagnostic_variable!(
1536
1539
comments = " Mean sea level pressure computed from the hypsometric equation" ,
1537
1540
compute! = compute_mslp!,
1538
1541
)
1542
+
1543
+ # ##
1544
+ # Rainwater path (2d)
1545
+ # ##
1546
+ compute_rwp! (out, state, cache, time) =
1547
+ compute_rwp! (out, state, cache, time, cache. atmos. microphysics_model)
1548
+ compute_rwp! (_, _, _, _, model:: T ) where {T} =
1549
+ error_diagnostic_variable (" rwp" , model)
1550
+
1551
+ function compute_rwp! (
1552
+ out,
1553
+ state,
1554
+ cache,
1555
+ time,
1556
+ moisture_model:: T ,
1557
+ ) where {T <: Union{Microphysics1Moment, Microphysics2Moment} }
1558
+ if isnothing (out)
1559
+ out = zeros (axes (Fields. level (state. f, half)))
1560
+ rw = cache. scratch. ᶜtemp_scalar
1561
+ @. rw = state. c. ρq_rai
1562
+ Operators. column_integral_definite! (out, rw)
1563
+ return out
1564
+ else
1565
+ rw = cache. scratch. ᶜtemp_scalar
1566
+ @. rw = state. c. ρq_rai
1567
+ Operators. column_integral_definite! (out, rw)
1568
+ end
1569
+ end
1570
+
1571
+ add_diagnostic_variable! (
1572
+ short_name = " rwp" ,
1573
+ long_name = " Rainwater Path" ,
1574
+ standard_name = " atmosphere_mass_content_of_rainwater" ,
1575
+ units = " kg m^-2" ,
1576
+ comments = """
1577
+ The total mass of rainwater per unit area.
1578
+ (not just the area of the cloudy portion of the column).
1579
+ """ ,
1580
+ compute! = compute_rwp!,
1581
+ )
0 commit comments