@@ -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.
@@ -1503,3 +1503,43 @@ add_diagnostic_variable!(
1503
1503
comments = " Energy available to a parcel lifted moist adiabatically from the surface. We assume fully reversible phase changes and no precipitation." ,
1504
1504
compute! = compute_cape!,
1505
1505
)
1506
+
1507
+ # ##
1508
+ # Rain water path (2d)
1509
+ # ##
1510
+ compute_rwp! (out, state, cache, time) =
1511
+ compute_rwp! (out, state, cache, time, cache. atmos. moisture_model)
1512
+ compute_rwp! (_, _, _, _, model:: T ) where {T} =
1513
+ error_diagnostic_variable (" rwp" , model)
1514
+
1515
+ function compute_rwp! (
1516
+ out,
1517
+ state,
1518
+ cache,
1519
+ time,
1520
+ moisture_model:: T ,
1521
+ ) where {T <: Union{EquilMoistModel, NonEquilMoistModel} }
1522
+ if isnothing (out)
1523
+ out = zeros (axes (Fields. level (state. f, half)))
1524
+ rw = cache. scratch. ᶜtemp_scalar
1525
+ @. rw = state. c. ρq_rai
1526
+ Operators. column_integral_definite! (out, rw)
1527
+ return out
1528
+ else
1529
+ rw = cache. scratch. ᶜtemp_scalar
1530
+ @. rw = state. c. ρq_rai
1531
+ Operators. column_integral_definite! (out, rw)
1532
+ end
1533
+ end
1534
+
1535
+ add_diagnostic_variable! (
1536
+ short_name = " rwp" ,
1537
+ long_name = " Rainwater Path" ,
1538
+ standard_name = " atmosphere_mass_content_of_rain_liquid_water" ,
1539
+ units = " kg m^-2" ,
1540
+ comments = """
1541
+ The total mass of liquid water in rain per unit area.
1542
+ (not just the area of the cloudy portion of the column).
1543
+ """ ,
1544
+ compute! = compute_rwp!,
1545
+ )
0 commit comments