Lapse Theory
get_bulk_lapse_rate(temp1, temp2, p1, p2)
Compute the bulk environmental lapse rate, \(\Gamma\), between pressure p1
at environmental temperature temp1
and p2
at environmental temperature temp2
:
This equation assumes hydrostatic equilibrium, ideal gas equation of state and that \(\Gamma\) is constant
between p1
and p2
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp1
|
DataArray
|
Temperature at pressure |
required |
temp2
|
DataArray
|
Temperature at pressure |
required |
p1
|
Union[DataArray, float]
|
Pressure at environmental temperature |
required |
p2
|
Union[DataArray, float]
|
Pressure at environmental temperature |
required |
Returns:
Type | Description |
---|---|
Bulk environmental lapse rate, positive if |
Source code in isca_tools/thesis/lapse_theory.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
interp_var_at_pressure(var, p_desired, p_surf, hyam, hybm, p0, plev_step=1000, extrapolate=False)
Function to get the value of variable var
at the pressure p_desired
, where p_desired
is expected to
be a different value at each lat and lon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
var
|
Union[DataArray, Dataset]
|
Variable to do interpolation of. Should have |
required |
p_desired
|
DataArray
|
Desired pressure to find |
required |
p_surf
|
DataArray
|
Surface pressure.
Should have same dimension as |
required |
hyam
|
DataArray
|
Hybrid a coefficients. Should have dimension of |
required |
hybm
|
DataArray
|
Hybrid b coefficients. Should have dimension of |
required |
p0
|
float
|
Reference pressure. Units: Pa. |
required |
plev_step
|
float
|
Will find var at value closest to |
1000
|
extrapolate
|
bool
|
If True, below ground extrapolation for variable will be done, otherwise will return nan. |
False
|
Returns:
Type | Description |
---|---|
Dataset
|
Dataset with |
Source code in isca_tools/thesis/lapse_theory.py
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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
reconstruct_temp(temp3, p1, p2, p3, lapse_12, lapse_23)
The temperature, \(T_1\), at \(p_1\) can be reconstructed from the lapse rate, \(\Gamma_{12}\), between \(p_1\) and \(p_2\); the lapse rate \(\Gamma_{23}\), between \(p_2\) and \(p_3\); and the temperature at \(p_3\), \(T_3\):
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp3
|
DataArray
|
Temperature at pressure |
required |
p1
|
Union[DataArray, float]
|
Pressure at level to reconstruct |
required |
p2
|
Union[DataArray, float]
|
Pressure at environmental temperature |
required |
p3
|
Union[DataArray, float]
|
Pressure at environmental temperature |
required |
lapse_12
|
DataArray
|
Bulk environmental lapse rate between |
required |
lapse_23
|
DataArray
|
Bulk environmental lapse rate between |
required |
Returns:
Name | Type | Description |
---|---|---|
temp1 |
Temperature at pressure |
Source code in isca_tools/thesis/lapse_theory.py
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 |
|