Byrne 2021
get_delta_temp_quant_theory(temp_mean_land, sphum_mean_land, temp_quant_land_x, temp_quant_ocean_p, sphum_quant_land_x, sphum_quant_ocean_p, quant_use, px, pressure_surface, const_rh=False)
Computes the theoretical temperature difference between simulations of neighbouring optical depth values for each percentile, \(\delta T_L^x\), according to equation 5 in Byrne 2021:
If data from n_exp
optical depth values provided, n_exp-1
theoretical temperature differences will be returned
for each percentile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_mean_land
|
ndarray
|
|
required |
sphum_mean_land
|
ndarray
|
|
required |
temp_quant_land_x
|
ndarray
|
|
required |
temp_quant_ocean_p
|
ndarray
|
|
required |
sphum_quant_land_x
|
ndarray
|
|
required |
sphum_quant_ocean_p
|
ndarray
|
|
required |
quant_use
|
ndarray
|
|
required |
px
|
ndarray
|
|
required |
pressure_surface
|
float
|
Near surface pressure level. Units: Pa. |
required |
const_rh
|
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
ndarray
|
|
Source code in isca_tools/papers/byrne_2021.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 |
|
get_gamma(temp_mean_land, temp_quant_land_x, temp_quant_ocean_p, sphum_quant_land_x, sphum_quant_ocean_p, quant_use, px, pressure_surface)
This function returns the sensitivity parameters in the theory. One for changes in ocean temperature, \(\delta T_O\), and one for ocean relative humidity, \(\delta r_O\):
Two more parameters are also returned:
These can then be combined to give the sensitivity parameter to a 1% change in mean land relative humidity, \(\delta \overline{r_L}\):
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temp_mean_land
|
ndarray
|
|
required |
temp_quant_land_x
|
ndarray
|
|
required |
temp_quant_ocean_p
|
ndarray
|
|
required |
sphum_quant_land_x
|
ndarray
|
|
required |
sphum_quant_ocean_p
|
ndarray
|
|
required |
quant_use
|
ndarray
|
|
required |
px
|
ndarray
|
|
required |
pressure_surface
|
float
|
Near surface pressure level. Units: Pa. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
|
ndarray
|
|
ndarray
|
|
ndarray
|
|
Source code in isca_tools/papers/byrne_2021.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
get_px(ds, mse_quant_x, quant_use, as_int=False)
Returns the percentile of Moist Static Energy corresponding to the MSE averaged over all days exceeding a given percentile of temperature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ds
|
List[Dataset]
|
|
required |
mse_quant_x
|
ndarray
|
|
required |
quant_use
|
ndarray
|
|
required |
as_int
|
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
ndarray
|
|
Source code in isca_tools/papers/byrne_2021.py
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 |
|
get_quant_ind(var, percentile, range_below=0, range_above=np.inf, av_dim=None, return_mask=False)
This functions returns the indices of all occurrences whereby the value of var
is between the
percentile-range_below
and percentile+range_above
percentile.
By default, range_below=0
and range_above=inf
so it just returns all indices above the given percentile
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
var
|
Union[DataArray, ndarray]
|
|
required |
percentile
|
int
|
The percentile around which, you want to find the indices. |
required |
range_below
|
float
|
All indices will |
0
|
range_above
|
float
|
All indices will |
inf
|
av_dim
|
Optional[Union[List, str, int]]
|
Dimension to find quantile over, should be string if |
None
|
return_mask
|
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
ndarray
|
|
Source code in isca_tools/papers/byrne_2021.py
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 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|