
Wet-Bulb Zero
wetbulb_zero.Rd
The altitude at which the wet-bulb temperature reaches 0 °C.
Arguments
- ta_s
air temperature [lon, lat, time] at 2 meter above the surface (K).
- hus_s
specific humidity [lon, lat, time] at 2 meter above the surface (kg/kg).
- zg_s
surface geopotential [lon, lat] (m^2/s^2).
- pa_s
Surface pressure [lon, lat, time] (hPa).
- ta_pl
air temperature [lon, lat, lev, time] on pressure level (K).
- hus_pl
specific humidity [lon, lat, lev, time] on pressure level (kg/kg).
- zg_pl
geopotential [lon, lat, lev, time] on pressure levels (m^2/s^2)
- pa_pl
pressure levels [lev] (hPa).
- nthreads
an integer specifying the number of threads to use for computation (OpenMP). Default is 1.
Value
the height (in meters) where the wet-bulb temperature is 0°C [lon, lat, time]. If the WBZ is not found within the input data range, returns NaN.
Examples
data("ERA5_pl")
data("ERA5_sfc")
ta_s <- ERA5_sfc$t2m
td_s <- ERA5_sfc$t2d
pa_s <- ERA5_sfc$sp / 100
hus_s <- hus_from_td(td_s, pa_s)
dim(hus_s) <- dim(ta_s)
zg_s <- ERA5_sfc$z[, , 1]
ta_pl <- ERA5_pl$ta
hus_pl <- ERA5_pl$hus
zg_pl <- ERA5_pl$z
pa_pl <- ERA5_pl$plev / 100
res <- wetbulb_zero(
ta_s, hus_s,
zg_s, pa_s,
ta_pl, hus_pl,
zg_pl, pa_pl
)