Base
convection_neutral_profile(temp_start, p_start, temp_lcl, p_levels)
This returns the temperature of an air parcel at the given pressure levels, assuming it follows the
dry_profile
up until the lcl_temp
has been reached, followed by the moist_profile
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_start
|
float
|
Starting temperature of parcel. Units: Kelvin. |
required |
p_start
|
float
|
Starting pressure of parcel. Units: Pa. |
required |
temp_lcl
|
float
|
Temperature of LCL in K. |
required |
p_levels
|
ndarray
|
|
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
Source code in isca_tools/convection/base.py
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|
dry_profile_pressure(temp_start, p_start, temp_levels)
Given a series of temp_levels
, this function returns the pressure corresponding to each temperature, assuming
it follows a dry adiabat.
Can also use the pressure of the LCL if the LCL temperature is given as temp_levels
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_start
|
float
|
Starting temperature of parcel. Units: Kelvin. |
required |
p_start
|
float
|
Starting pressure of parcel. Units: Pa. |
required |
temp_levels
|
Union[float, ndarray]
|
|
required |
Returns:
Type | Description |
---|---|
Union[float, ndarray]
|
|
Source code in isca_tools/convection/base.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
dry_profile_temp(temp_start, p_start, p_levels)
Returns the temperature of an air parcel at the given pressure levels, assuming it follows the dry adiabat.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_start
|
float
|
Starting temperature of parcel. Units: Kelvin. |
required |
p_start
|
float
|
Starting pressure of parcel. Units: Pa. |
required |
p_levels
|
ndarray
|
|
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
Source code in isca_tools/convection/base.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
equivalent_potential_temp(temp, pressure, sphum=None, p_ref=100000.0)
Returns the virtual potential temperature using equation 9.40 of Holton 2004 textbook.
For a saturated parcel, this is \(\theta_e = \theta \exp (L_v q_s/c_pT)\).
For an unsaturated parcel (used if sphum
given), it is \(\theta_e = \theta \exp (L_v q/c_pT_{LCL})\).
where \(q\) (\(q_s\)) is the (saturation) mixing ratio, \(T_{LCL}\) is the lifting condensation level temperature (using equation 10 from Bolton 1980) and \(\theta\) is the potential temperature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp
|
Union[float, ndarray]
|
|
required |
pressure
|
Union[float, ndarray]
|
|
required |
sphum
|
Optional[float]
|
|
None
|
p_ref
|
float
|
Reference pressure in Pa used to compute the potential temperature |
100000.0
|
Returns:
Type | Description |
---|---|
Union[float, ndarray]
|
|
Source code in isca_tools/convection/base.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
lapse_moist(temp, total_pressure, pressure_coords=False)
Returns the saturated moist adiabatic lapse rate, \(\Gamma_s = -dT/dz\), at a given temperature.
Comes from equation D.10 in Holton 2004.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp
|
Union[float, ndarray]
|
Temperature to compute lapse rate at. Units: Kelvin. |
required |
total_pressure
|
Union[float, ndarray]
|
Atmospheric pressure at altitude considered, \(p\), in Pa. |
required |
pressure_coords
|
bool
|
If |
False
|
Returns: Saturated moist adiabatic lapse rate. Units: \(Km^{-1}\).
Source code in isca_tools/convection/base.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
lcl_metpy(temp_2m, sphum_2m, pressure_surf)
Returns the pressure and temperature of the lifting condensation level, LCL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_2m
|
Union[float, ndarray, DataArray]
|
Near-surface (2m) air temperature in Kelvin. |
required |
sphum_2m
|
Union[float, ndarray, DataArray]
|
Near-surface (2m) specific humidity in kg/kg. |
required |
pressure_surf
|
Union[float, ndarray, DataArray]
|
Surface pressure in Pa. |
required |
Returns:
Name | Type | Description |
---|---|---|
p_lcl |
Union[float, ndarray, DataArray]
|
LCL pressure in Pa. |
temp_lcl |
Union[float, ndarray, DataArray]
|
LCL temperature in Kelvin. |
Source code in isca_tools/convection/base.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
lcl_temp_bolton(temp_surf, rh_surf)
Returns the temperature of the lifting condensation level, LCL, given the surface temperature and relative humidity.
Equation comes from Equation 22 in Bolton 1980.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_surf
|
ndarray
|
Surface temperature in Kelvin. |
required |
rh_surf
|
ndarray
|
Percentage surface relative humidity (\(0 < rh < 100\)). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Temperature of LCL in Kelvin. |
Source code in isca_tools/convection/base.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
moist_profile(temp_start, p_start, p_levels)
Returns the temperature of an air parcel at the given pressure levels, assuming it follows the saturated moist adiabat.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_start
|
float
|
Starting temperature of parcel. Units: Kelvin. |
required |
p_start
|
float
|
Starting pressure of parcel. Units: Pa. |
required |
p_levels
|
ndarray
|
|
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
ndarray
|
Temperature at each pressure level indicated by |
Source code in isca_tools/convection/base.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
potential_temp(temp, pressure, p_ref=100000.0)
Returns the potential temperature: \(\theta = T\left(\frac{p_{ref}}{p}\right)^{\kappa}\)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp
|
Union[float, ndarray]
|
|
required |
pressure
|
Union[float, ndarray]
|
|
required |
p_ref
|
float
|
Reference pressure in Pa used to compute the potential temperature |
100000.0
|
Returns:
Type | Description |
---|---|
Union[float, ndarray]
|
|
Source code in isca_tools/convection/base.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
|