Mod Parcel Theory
get_scale_factor_theory(temp_surf_ref, temp_surf_quant, rh_ref, rh_quant, temp_ft_quant, p_ft, p_surf_ref, p_surf_quant=None, lapse_D_quant=None, lapse_M_quant=None, sCAPE_quant=None, temp_surf_lcl_calc=300)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_surf_ref
|
ndarray
|
|
required |
temp_surf_quant
|
ndarray
|
|
required |
rh_ref
|
float
|
|
required |
rh_quant
|
ndarray
|
|
required |
temp_ft_quant
|
ndarray
|
|
required |
p_ft
|
float
|
|
required |
p_surf_ref
|
float
|
|
required |
p_surf_quant
|
Optional[ndarray]
|
|
None
|
lapse_D_quant
|
Optional[ndarray]
|
|
None
|
lapse_M_quant
|
Optional[ndarray]
|
|
None
|
sCAPE_quant
|
Optional[ndarray]
|
|
None
|
temp_surf_lcl_calc
|
float
|
|
300
|
Returns:
Source code in isca_tools/thesis/mod_parcel_theory.py
796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 | |
get_scale_factor_theory_numerical(temp_surf_ref, temp_surf_quant, r_ref, r_quant, temp_ft_quant, lapse_mod_D_quant, lapse_mod_M_quant, p_ft_ref, p_surf_ref, p_surf_quant=None, lapse_mod_D_ref=None, lapse_mod_M_ref=None, temp_surf_lcl_calc=300, guess_lapse=lapse_dry, valid_range=100, lapse_coords='z')
Recommended to use get_scale_factor_theory_numerical2 instead
Calculates the theoretical near-surface temperature change for percentile \(x\), \(\delta \hat{T}_s(x)\), relative to the reference temperature change, \(\delta \tilde{T}_s\). The theoretical scale factor is given by the linear sum of mechanisms assumed independent: either anomalous values in current climate, \(\Delta\), or due to the variation in that parameter with warming, \(\delta\).
Reference Quantities
The reference quantities, \(\tilde{\chi}\) are free to be chosen by the user. For ease of interpretation, I propose the following, where \(\overline{\chi}\) is the mean value of \(\chi\) across all days:
- \(\tilde{T}_s = \overline{T_s}; \delta \tilde{T}_s = \delta \overline{T_s}\)
- \(\tilde{r}_s = \overline{r_s}; \delta \tilde{r}_s = 0\)
- \(\tilde{p}_s = \overline{p_s}; \delta \tilde{p}_s = 0\)
- \(\tilde{\eta_D} = 0; \delta \tilde{\eta_D} = 0\)
- \(\tilde{\eta_M} = 0; \delta \tilde{\eta_M} = 0\)
Given the choice of these five reference variables and their changes with warming, the reference free troposphere temperature, \(\tilde{T}_{FT}\), can be computed according to the definition of \(\tilde{h}^{\dagger}\):
\(\tilde{h}^{\dagger} = (c_p - R^{\dagger})\tilde{T}_{sP} + L_v \tilde{q}_s = (c_p + R^{\dagger}) \tilde{T}_{FT} + L_v q^*(\tilde{T}_{FTP}, p_{FT})\)
Poor choice of reference quantities may cause the theoretical scale factor to be a bad approximation. If this
is the case, get_approx_terms can be used to investigate what is causing the theory to break down.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_surf_ref
|
ndarray
|
|
required |
temp_surf_quant
|
ndarray
|
|
required |
r_ref
|
ndarray
|
|
required |
r_quant
|
ndarray
|
|
required |
temp_ft_quant
|
ndarray
|
|
required |
lapse_mod_D_quant
|
ndarray
|
|
required |
lapse_mod_M_quant
|
ndarray
|
|
required |
p_ft_ref
|
float
|
Pressure at free troposphere level for reference day, \(p_{FT}\), in Pa. |
required |
p_surf_ref
|
ndarray
|
Pressure at near-surface for reference day, \(p_s\), in Pa. |
required |
p_surf_quant
|
Optional[ndarray]
|
|
None
|
lapse_mod_D_ref
|
Optional[ndarray]
|
|
None
|
lapse_mod_M_ref
|
Optional[ndarray]
|
|
None
|
temp_surf_lcl_calc
|
float
|
Surface temperature to use when computing \(\sigma_{LCL}\). If |
300
|
guess_lapse
|
float
|
Initial guess for parcel temperature will be found assuming this bulk lapse rate
from |
lapse_dry
|
valid_range
|
float
|
Valid temperature range in Kelvin for temperature. Allow +/- this much from the initial guess. |
100
|
lapse_coords
|
Literal['z', 'lnp']
|
The coordinate system used for |
'z'
|
Returns:
| Name | Type | Description |
|---|---|---|
scale_factor |
ndarray
|
|
scale_factor_linear |
ndarray
|
|
info_cont |
dict
|
Dictionary containing a contribution from each mechanism. This gives the contribution from each physical mechanism to the overall scale factor. |
Source code in isca_tools/thesis/mod_parcel_theory.py
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 244 245 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 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | |
get_scale_factor_theory_numerical2(temp_surf_ref, temp_surf_quant, rh_ref, rh_quant, temp_ft_quant, p_ft, p_surf_ref, p_surf_quant=None, lapse_D_quant=None, lapse_M_quant=None, sCAPE_quant=None, temp_surf_lcl_calc=300, guess_lapse=lapse_dry, valid_range=100, lapse_coords='z')
Recommended over get_scale_factor_theory_numerical. Also allows for old sCAPE framework.
Calculates the theoretical near-surface temperature change for percentile \(x\), \(\delta \hat{T}_s(x)\), relative to the reference temperature change, \(\delta \tilde{T}_s\). The theoretical scale factor is given by the linear sum of mechanisms assumed independent: either anomalous values in current climate, \(\Delta\), or due to the variation in that parameter with warming, \(\delta\). Then we also includes a non linear contribution from all combinations of two mechanisms.
Can give a theoretical scale factor for either the modParcel framework involving lapse_D and lapse_M
or simple CAPE framework involving sCAPE.
Numerical estimate found from equating two equations for modified MSE, \(h^{\dagger} = f_1(T_{FT}, p_s, sCAPE) = f_2(T_s, r_s, p_s)\) So if you know all variables but \(T_s\), can invert to compute \(T_s\). Compute for each climate and take the difference to compute \(\delta T_s\). To isolate effect of each mechanism, keep all variables at the reference value, and set that one variable to the actual value.
List of mechanisms - keys in info_dict
The list of mechanisms considered for differential warming, acting independently are:
temp_ft_change: Change in free tropospheric temperaturerh_change: Change in surface relative humidityp_surf_change: Change in surface pressuretemp_surf_anom: Surface temperature anomaly in current climaterh_anom: Surface relative humidity anomaly in current climatep_surf_anom: Surface pressure anomaly in current climate
If provide lapse_D_quant and lapse_M_quant, will also include:
lapse_D_change: Change in boundary layer modified lapse rate parameter, \(\eta_D\)lapse_M_change: Change in aloft modified lapse rate parameter, \(\eta_M\)lapse_D_anom: \(\eta_D\) anomaly in current climatelapse_M_anom: \(\eta_M\) anomaly in current climate
If provide sCAPE_quant, will also include:
sCAPE_change: Change in simple CAPE proxy, sCAPEsCAPE_anom: sCAPE anomaly in current climate
In info_dict, there is a key for each of these, as well as nl_{key1}_{key2} for the non linear conbinations
of two mechanisms.
Reference Quantities
The reference quantities are constrained to obey the following, where \(\overline{\chi}\) is the mean value of \(\chi\) across all days:
- \(\tilde{T}_s = \overline{T_s}; \delta \tilde{T}_s = \delta \overline{T_s}\)
- \(\tilde{r}_s = \overline{r_s}; \delta \tilde{r}_s = 0\)
- \(\tilde{p}_s = \overline{p_s}; \delta \tilde{p}_s = 0\)
- \(\tilde{\eta_D} = 0; \delta \tilde{\eta_D} = 0\)
- \(\tilde{\eta_M} = 0; \delta \tilde{\eta_M} = 0\)
Given the choice of these five reference variables and their changes with warming, the reference free troposphere temperature, \(\tilde{T}_{FT}\), can be computed according to the definition of \(\tilde{h}^{\dagger}\):
\(\tilde{h}^{\dagger} = (c_p - R^{\dagger})\tilde{T}_{sP} + L_v \tilde{q}_s = (c_p + R^{\dagger}) \tilde{T}_{FT} + L_v q^*(\tilde{T}_{FTP}, p_{FT})\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_surf_ref
|
ndarray
|
|
required |
temp_surf_quant
|
ndarray
|
|
required |
rh_ref
|
float
|
|
required |
rh_quant
|
ndarray
|
|
required |
temp_ft_quant
|
ndarray
|
|
required |
p_ft
|
float
|
Pressure at free troposphere level, \(p_{FT}\), in Pa. |
required |
p_surf_ref
|
float
|
Pressure at near-surface for reference day in colder simulation, \(p_s\), in Pa.
|
required |
p_surf_quant
|
Optional[ndarray]
|
|
None
|
lapse_D_quant
|
Optional[ndarray]
|
|
None
|
lapse_M_quant
|
Optional[ndarray]
|
|
None
|
sCAPE_quant
|
Optional[ndarray]
|
|
None
|
temp_surf_lcl_calc
|
float
|
Surface temperature to use when computing \(\sigma_{LCL}\). If |
300
|
guess_lapse
|
float
|
Initial guess for parcel temperature will be found assuming this bulk lapse rate
from |
lapse_dry
|
valid_range
|
float
|
Valid temperature range in Kelvin for temperature. Allow +/- this much from the initial guess. |
100
|
lapse_coords
|
Literal['z', 'lnp']
|
The coordinate system used for |
'z'
|
Returns:
| Name | Type | Description |
|---|---|---|
scale_factor |
ndarray
|
|
scale_factor_non_linear |
ndarray
|
|
scale_factor_linear |
ndarray
|
|
info_cont |
dict
|
Dictionary containing a contribution from each mechanism. This gives the contribution from each physical mechanism to the overall scale factor. |
Source code in isca_tools/thesis/mod_parcel_theory.py
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | |
get_sensitivity_factors(temp_surf, rh_surf, pressure_surf, pressure_ft, temp_surf_lcl_calc=300)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_surf
|
float
|
|
required |
rh_surf
|
float
|
|
required |
pressure_surf
|
float
|
|
required |
pressure_ft
|
float
|
|
required |
temp_surf_lcl_calc
|
float
|
|
300
|
Returns:
Source code in isca_tools/thesis/mod_parcel_theory.py
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 | |
get_temp_mod_parcel(rh_surf, p_surf, p_ft, lapse_mod_D=0, lapse_mod_M=0, temp_surf=None, temp_ft=None, temp_surf_lcl_calc=300, guess_lapse=lapse_dry, valid_range=100, lapse_coords='z', method='add')
This returns the free tropospheric (or surface) temperature \(T_{FT}\) (\(T_s\)), such that the parcel modified MSE, \(h_{\mathrm{p}}^{\dagger}\) is equal at the surface and free troposphere.
The parcel temperature can be obtained with both lapse_mod_D and lapse_mod_M set to zero.
If any variable given is a numpy array, the returned value will be a numpy array of the same shape. If more than one variable is a numpy array, they must be the same shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rh_surf
|
float
|
Environmental pseudo relative humidity, \(q_s/q^*(T_s, p_s)\) at |
required |
p_surf
|
float
|
Pressure at near-surface, \(p_s\), in Pa. Either a single value or one for each temperature. |
required |
p_ft
|
float
|
Pressure at free troposphere level, \(p_{FT}\), in Pa. Either a single value or one for each temperature. |
required |
lapse_mod_D
|
float
|
The quantity \(\eta_D\) such that the lapse rate between \(p_s\) and LCL is \(\Gamma_D + \eta_D\) with \(\Gamma_D\) being the dry adiabatic lapse rate. Either a single value or one for each temperature. Units: K/m |
0
|
lapse_mod_M
|
float
|
The quantity \(\eta_M\) such that the lapse rate above the LCL is \(\Gamma_M(p) + \eta_M\) with
\(\Gamma_M(p)\) being the moist adiabatic lapse rate at pressure \(p\).
Either a single value or one for each temperature.
Units: K/m
If |
0
|
temp_surf
|
Optional[float]
|
Environmental temperature at |
None
|
temp_ft
|
Optional[float]
|
Environmental temperature at |
None
|
temp_surf_lcl_calc
|
Optional[float]
|
Surface temperature to use when computing \(\sigma_{LCL}\). If |
300
|
guess_lapse
|
float
|
Initial guess for temperature will be found assuming this bulk lapse rate
from |
lapse_dry
|
valid_range
|
float
|
Valid temperature range in Kelvin for temperature. Allow +/- this much from the initial guess. |
100
|
lapse_coords
|
Literal['z', 'lnp']
|
The coordinate system used for |
'z'
|
method
|
Literal['add', 'multiply']
|
How to modify moist adiabat lapse rate using |
'add'
|
Returns:
| Name | Type | Description |
|---|---|---|
temp |
Union[float, ndarray]
|
Environmental temperature in Kelvin at the pressure level |
Source code in isca_tools/thesis/mod_parcel_theory.py
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 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 | |
temp_mod_parcel_fit_func(temp_ft, temp_surf, rh_surf, p_surf, p_ft, lapse_mod_D=0, lapse_mod_M=0, temp_surf_lcl_calc=300, lapse_coords='z', method='add')
In the modified parcel framework, equating surface and free tropospheric moist static energy leads to the exact vertical coupling equation:
where \(R^{\dagger} = R\ln(p_s/p_{FT})/2\) and the parcel temperatures are related to the environmental temperatures by:
- \(T_{\mathrm{sp}} = \sigma_{LCL}^{R\eta_D/g} T_s\)
- \(T_{\mathrm{FTp}} = (\sigma_{LCL} / \sigma_{FT})^{R\eta_M/g} T_{FT}\)
And an approximate formula derived from Bolton 1980 is used to relate \(\sigma_{LCL}\) to surface relative humidity.
Note that in this definition of parcel, we neglect the error in relating \(z\) to temperature.
This function returns the RHS minus the LHS of this equation to then give to scipy.optimize.fsolve to find
\(T_{\mathrm{FTp}}\) or \(T_{\mathrm{sp}}\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_ft
|
float
|
float
Environmental temperature at |
required |
temp_surf
|
float
|
Environmental temperature at |
required |
rh_surf
|
float
|
Environmental pseudo relative humidity, \(q_s/q^*(T_s, p_s)\) at |
required |
p_surf
|
float
|
Pressure at near-surface, \(p_s\), in Pa. |
required |
p_ft
|
float
|
Pressure at free troposphere level, \(p_{FT}\), in Pa. |
required |
lapse_mod_D
|
float
|
The quantity \(\eta_D\) such that the lapse rate between \(p_s\) and LCL is \(\Gamma_D + \eta_D\) with \(\Gamma_D\) being the dry adiabatic lapse rate. Units: K/m |
0
|
lapse_mod_M
|
float
|
The quantity \(\eta_M\) such that the lapse rate above the LCL is \(\Gamma_M(p) + \eta_M\) with
\(\Gamma_M(p)\) being the moist adiabatic lapse rate at pressure \(p\).
Units: K/m
If |
0
|
temp_surf_lcl_calc
|
Optional[float]
|
Surface temperature to use when computing \(\sigma_{LCL}\). If |
300
|
lapse_coords
|
Literal['z', 'lnp']
|
The coordinate system used for |
'z'
|
method
|
Literal['add', 'multiply']
|
How to modify moist adiabat lapse rate using |
'add'
|
Returns:
| Name | Type | Description |
|---|---|---|
modMSE_diff |
float
|
difference between parcel surface and free troposphere saturated modified MSE. |
Source code in isca_tools/thesis/mod_parcel_theory.py
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 90 91 92 | |