Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
f62a66d
starting to develop top-heaviness metric
May 21, 2021
5a58986
add top_heaviness_metric.py
May 21, 2021
b3eb059
add changes to top_heaviness_metric.py
May 21, 2021
4bb4b88
add top_heaviness_ratio; this file contains the calculation of top he…
May 21, 2021
8e99b99
add some changes to main py file
May 21, 2021
956501f
add lsm to settings
May 21, 2021
3783837
add changes to top_heaviness_ratio_calculation
May 21, 2021
a59a396
add changes to html
May 21, 2021
73d51c0
add another figure in ratio calculation
May 21, 2021
7ffdbd5
add doc figures
May 21, 2021
371e1d6
Create top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
3fdffcf
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
7c45275
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
6993f11
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
223f2a0
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
583aad8
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
41c9664
Add files via upload
jiacheng-atmos May 21, 2021
38b8f0d
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
93a52fd
Add files via upload
jiacheng-atmos May 21, 2021
9486fd7
Delete Explained_Variance_by_Q1&Q2_ERA5.pdf
jiacheng-atmos May 21, 2021
4e66ae6
Delete Long_Term_Mean_of_O1_July_ERA5.pdf
jiacheng-atmos May 21, 2021
086465c
Delete Long_Term_Mean_of_O2_July_ERA5.pdf
jiacheng-atmos May 21, 2021
8850bed
Delete Top-Heaviness_Ratio_July_ERA5.pdf
jiacheng-atmos May 21, 2021
e3b27ad
Add files via upload
jiacheng-atmos May 21, 2021
164b9ac
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
506c10f
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
c9facd5
Add files via upload
jiacheng-atmos May 21, 2021
820e607
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
389475e
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
654f970
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
099cbc8
Update top_heaviness_metric.rst
jiacheng-atmos May 21, 2021
a3c2e89
Update top_heaviness_metric.rst
jiacheng-atmos May 22, 2021
d636521
Update top_heaviness_metric.rst
jiacheng-atmos May 24, 2021
d9ddbf7
Update top_heaviness_metric.rst
jiacheng-atmos May 24, 2021
2e9c907
Update top_heaviness_metric.rst
jiacheng-atmos May 24, 2021
d84dcfe
delete lsm
May 24, 2021
18d24ec
delete settings lsm
May 24, 2021
db70129
Update top_heaviness_metric.rst
jiacheng-atmos May 25, 2021
a8936ac
del
May 26, 2021
1205878
settings.jsonc
May 26, 2021
49d206c
calculating the robustness of top-heaviness metric
May 26, 2021
dc4374f
settings.jsonc
May 26, 2021
52e6e92
calc top-heaviness ratio
May 26, 2021
5d7fd09
top-heaviness ratio calc file
May 27, 2021
5b5a81a
top-heaviness ratio robustness test file
May 27, 2021
8d9d2ed
main file
May 27, 2021
db25017
sample figures
May 27, 2021
a183682
Top-heaviness ratio robustness test file
May 27, 2021
a6f9ce1
Delete top_heaviness_ratio.py
jiacheng-atmos May 27, 2021
6f0de93
Delete Explained_Variance_by_Q1&Q2_ERA5.png
jiacheng-atmos May 27, 2021
378ea44
Delete Long_Term_Mean_of_O1_July_ERA5.png
jiacheng-atmos May 27, 2021
d7696bf
Delete Long_Term_Mean_of_O2_July_ERA5.png
jiacheng-atmos May 27, 2021
5ae9579
Delete Top-Heaviness_Ratio_July_ERA5.png
jiacheng-atmos May 27, 2021
cbc45cf
Update top_heaviness_metric.rst
jiacheng-atmos May 27, 2021
8dd7f58
Delete vertical motion from varied ratio.png
jiacheng-atmos May 27, 2021
499402d
Delete Q1&Q2.png
jiacheng-atmos May 27, 2021
203d9b6
Update top_heaviness_metric.rst
jiacheng-atmos May 27, 2021
f8b32e4
Update top_heaviness_metric.rst
jiacheng-atmos May 27, 2021
cae3e02
adding figures
May 27, 2021
36953bb
Update top_heaviness_metric.rst
jiacheng-atmos May 27, 2021
917f8a7
Delete Long term mean of O1.png
jiacheng-atmos May 27, 2021
ce6c459
Delete Long term mean of O2.png
jiacheng-atmos May 27, 2021
9288961
Delete Proportion of explained Interannual Variance.png
jiacheng-atmos May 27, 2021
eb8ca7b
Delete R2 Between Recon. Omega & Original.png
jiacheng-atmos May 27, 2021
ac574f0
Delete Top-Heaviness Ratio.png
jiacheng-atmos May 27, 2021
8fd5e2c
Update top_heaviness_ratio_calculation.py
jiacheng-atmos May 27, 2021
3a18d46
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 27, 2021
88fb6c7
Update top_heaviness_metric.rst
jiacheng-atmos May 27, 2021
306736b
Update top_heaviness_metric.html
jiacheng-atmos May 28, 2021
8dafc1d
Update top_heaviness_metric.html
jiacheng-atmos May 28, 2021
9cfc77b
Update top_heaviness_ratio_calculation.py
jiacheng-atmos May 28, 2021
d40d2f5
Update top_heaviness_metric.html
jiacheng-atmos May 28, 2021
50f27c5
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
93b018b
Update top_heaviness_ratio_calculation.py
jiacheng-atmos May 28, 2021
632494c
Update top_heaviness_ratio_calculation.py
jiacheng-atmos May 28, 2021
fda342a
Update top_heaviness_ratio_calculation.py
jiacheng-atmos May 28, 2021
f938d19
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
51e777f
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
ed836d3
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
499b1fa
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
fe5b555
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 28, 2021
fa4a5cb
Update top_heaviness_metric.rst
jiacheng-atmos May 30, 2021
fc1cb3e
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos May 30, 2021
24e89c4
Delete Proportion_of_explained_Interannual_Variance.png
jiacheng-atmos May 30, 2021
548af55
Update top_heaviness_metric.html
jiacheng-atmos May 30, 2021
4da932b
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos Jun 3, 2021
69d4bac
Update top_heaviness_metric.py
jiacheng-atmos Jun 29, 2021
2ffbc77
Update top_heaviness_metric.py
jiacheng-atmos Jun 29, 2021
b82ba7e
Update top_heaviness_metric.py
jiacheng-atmos Jun 29, 2021
33bf3c1
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
789923d
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
251fa78
Delete Q1&Q2_R.png
jiacheng-atmos Jun 29, 2021
d2e5c08
Add files via upload
jiacheng-atmos Jun 29, 2021
a72a294
Delete Q1&Q2_R.png
jiacheng-atmos Jun 29, 2021
9d2bccf
Add files via upload
jiacheng-atmos Jun 29, 2021
4e3d00f
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
f7bf483
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
9f845cd
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
b3c2332
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
4a5faf2
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
dbee5eb
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
1c6b723
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
cd8da17
Update top_heaviness_ratio_calculation.py
jiacheng-atmos Jun 29, 2021
49db686
Update top_heaviness_ratio_calculation.py
jiacheng-atmos Jun 29, 2021
646fd49
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos Jun 29, 2021
42295f7
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos Jun 29, 2021
05d5230
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos Jun 29, 2021
ebfdf85
Update top_heaviness_ratio_robustness_calc.py
jiacheng-atmos Jun 29, 2021
33eb14e
Update top_heaviness_ratio_calculation.py
jiacheng-atmos Jun 29, 2021
5b68fdd
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
7f5dcdb
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
119eec0
Update top_heaviness_metric.rst
jiacheng-atmos Jun 29, 2021
68ac672
Update settings.jsonc
jiacheng-atmos Jun 29, 2021
c4c7ba8
Update settings.jsonc
jiacheng-atmos Jun 29, 2021
50389a0
Merge branch 'NOAA-GFDL:main' into feature/add_top_heaviness_metric
jiacheng-atmos Jul 9, 2021
9ab7505
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
b4fe903
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
0dbf05a
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
3c14938
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
8c7d942
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
f8afede
Update top_heaviness_metric.rst
zwang-ui Jul 12, 2021
3c09931
Merge branch 'NOAA-GFDL:main' into feature/add_top_heaviness_metric
jiacheng-atmos Mar 7, 2022
5321f13
Update settings.jsonc
jiacheng-atmos Mar 21, 2022
4e20af8
Update settings.jsonc
jiacheng-atmos Mar 21, 2022
ae27931
Update settings.jsonc
jiacheng-atmos Mar 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions diagnostics/top_heaviness_metric/doc/top_heaviness_metric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Top-Heaviness Metric Diagnostic Documentation
================================

Last update: 5/30/2021

The vertical profiles of diabatic heating have important implications for large-scale dynamics, especially for the coupling between the large-scale atmospheric circulation and precipitation processes. We adopt an objective approach to examine the top-heaviness of vertical motion (Back et al. 2017), which is closely related to the heating profiles and a commonly available model output variable. The diagnostic metric can also be used to evaluate the diabatic heating profile.

Version & Contact info
----------------------

.. '-' starts items in a bulleted list:
https://docutils.sourceforge.io/docs/user/rst/quickref.html#bullet-lists

- Version/revision information: version 1.0 (6/28/2021)
- Developer/point of contact (Jiacheng Ye, jye18@illinois.edu, DAS UIUC; Zhuo Wang, zhuowang@illinois.edu, DAS UIUC)

.. Underline with '^'s to make a third-level heading.

Open source copyright agreement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The MDTF framework is distributed under the LGPLv3 license (see LICENSE.txt).

Functionality
-------------

The current package consists of following functionalities:

(1) Calculation of the fractional variance of vertical velocity at each grid point explained by two base functions, Q1 (~idealized deep convection profile) and Q2 (~idealized deep stratiform profile)

(2) Calculation of the top-heaviness ratio (O2/O1)

As a module of the MDTF code package, all scripts of this package can be found under
``mdtf/MDTF_$ver/diagnostics/top_heaviness_ratio``

Required programming language and libraries
-------------------------------------------

Python3 packages: "netCDF4", "xarray", "numpy", "scipy", "matplotlib", "cartopy"

Required model output variables
-------------------------------

1) wap (plev x lat x lon) : Vertical Velocity [Pa/s], which can be either the monthly mean for a certain year or the long-term monthly/season mean.

References
----------

.. :

Back, L. E., Hansen, Z., & Handlos, Z. (2017). Estimating vertical motion profile top-heaviness: Reanalysis compared to satellite-based observations and stratiform rain fraction. Journal of the Atmospheric Sciences, 74(3), 855-864. https://doi.org/10.1175/JAS-D-16-0062.1

Jiacheng and Zhuo's paper is in preparation.

More about this diagnostic
--------------------------

Q1 and Q2 (Figure 1a) are two prescribed base functions. Following Back et al. (2017), Q1 as a half sine function, and Q2 as a full sine function, which represent the idealized deep convection profile and the idealized stratiform profile, respectively. The vertical velocity can be approximated by Q1 and Q2:

ω'(x,y,p) = O1(x,y) * Q1(p) + O2(x,y)*Q2(p)


where O1 and O2 are the coefficients of Q1 and Q2, respectively. Back et al. (2017) showed that Q1 and Q2 resemble the first two EOF modes of vertical velocity profile variability. Then O1 and O2 can be approximately regarded as the corresponding principal component time series.

For O1>0, ω' transitions from a bottom-heavy profile to a top-heavy profile when the ratio of r=O2/O1 increases from -1 to 1 (Figure 1b). The ratio r is thus defined as the top-heaviness ratio.

To assess how well ω' approximates ω, the fractional variance is calculated over each grid point. The fractional variance is defined as the square of the pearson correlation between ω' and ω. As shown in Figure 2, ω' explains more than 80% of the vertical variance over most tropical/subtropical oceanic grid points.

The top-heaviness ratio (r) is presented in Figure 3. The Western Pacific is dominated by more top-heavy vertical profiles while the Eastern Pacific and Atlantic are characterized by more bottom-heavy profiles, exhibiting a great contrast.



.. figure:: Q1&Q2_R.png
:align: center
:width: 100 %

Figure 1. (a) Q1 and Q2; (b) Vertical velocity profiles constructed from the varying top-heaviness ratio (r; r=-1: dark blue, r=1: dark red).


.. figure:: R2_Between_Recon_Omega&Original.png
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you comment more generally somewhere in this documentation about potential uses of this diagnostic for model development? For example, the relatively lower r^2 values over land suggest to me that this diagnostic should only be looked at over oceanic regions. Is that true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 1) We will add more discussion on explaining R2.
For 2) Yes, what you think is correct. Approximating the vertical motion field with Q1 and Q2 is only valid over the ocean. The situation over the land is more complex.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About "If applicable, I've added a .yml file to src/conda, and my environment builds with conda_env_setup.sh", may I ask how to check my environment?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should values over land be masked out?

Regarding the conda environment: @wrongkindofdoctor or @tsjackson-noaa, can you provide some guidance?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiacheng-atmos Do you mean verify that your environment was installed after running conda_env_setup.sh? If yes, then conda env list will show the environments. conda list will show the packages+versions in the active environment.

:align: center
:width: 100 %

Figure 2. The fractional variance of ω explained by ω'.


.. figure:: Top_Heaviness_Ratio.png
:align: center
:width: 100 %

Figure 3. Long-term mean Top-Heaviness Ratio in July (2000-2019). The ratio is presented only for the grid points with O1 no less than 0.01.
34 changes: 34 additions & 0 deletions diagnostics/top_heaviness_metric/settings.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"settings": {
"driver": "top_heaviness_metric.py",
"long_name": "Top Heaviness Metric Diagnostic",
"realm": "atmos",
"description": "The vertical profiles of diabatic heating have important implications for large-scale dynamics, especially for the coupling between the large-scale atmospheric circulation and precipitation processes. We adopt an objective approach to examine the top-heaviness of vertical motion, which is closely related to the heating profiles and a commonly available model output variable. The diagnostic/metric can also be used to evaluate the top-heaviness of diabatic heating.",
"runtime_requirements": {
"python3": ["netCDF4", "xarray", "numpy", "scipy", "matplotlib", "cartopy"]
}
},
"dimensions": {
"lat": {
"standard_name": "latitude"
},
"lon": {
"standard_name": "longitude"
},
"lev": {
"standard_name": "air_pressure",
"units": "hPa",
"positive": "down",
"axis": "Z"
}
},
"varlist": {
"omega": {
"standard_name": "lagrangian_tendency_of_air_pressure",
"path_variable": "PR_FILE",
"units": "Pa s-1",
"dimensions": ["lev", "lat", "lon"]
}
}
}

30 changes: 30 additions & 0 deletions diagnostics/top_heaviness_metric/top_heaviness_metric.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<title>MDTF example diagnostic</title>
<!--HTML for top_heaviness_ratio_diag-->
<img src="../mdtf_diag_banner.png">
<h3>Top-Heaviness Metric Diagnostics </h3>
<p>
The vertical profiles of diabatic heating have important implications for large-scale dynamics,
especially for the coupling between the large-scale atmospheric circulation and precipitation
processes. We adopt an objective approach to examine the top-heaviness of vertical motion, which
is closely related to the heating profiles and a commonly available model output variable.
The diagnostic/metric can also be used to evaluate the top-heaviness of diabatic heating.
</p>
<TABLE>
<TR>
<TH ALIGN=LEFT>Top-Heaviness Ratio
<TH ALIGN=CENTER><A HREF=model/{{CASENAME}}_Top_Heaviness_Ratio.png>plot</A>
<TH ALIGN=CENTER><A HREF=obs/ERA5_Top_Heaviness_Ratio_2000_2019_July.png>plot</A>
<TR>
<TH ALIGN=LEFT>O1
<TH ALIGN=CENTER><A HREF=model/{{CASENAME}}_O1.png>plot</A>
<TH ALIGN=CENTER><A HREF=obs/ERA5_O1_2000_2019_July.png>plot</A>
<TR>
<TH ALIGN=LEFT>O2
<TH ALIGN=CENTER><A HREF=model/{{CASENAME}}_O2.png>plot</A>
<TH ALIGN=CENTER><A HREF=obs/ERA5_O2_2000_2019_July.png>plot</A>
<TR>
<TH ALIGN=LEFT>R2
<TH ALIGN=CENTER><A HREF=model/{{CASENAME}}_R2.png>plot</A>
<TH ALIGN=CENTER><A HREF=obs/ERA5_R2_Between_Recon_Omega&Original_2000_2019_July.png>plot</A>
<TR>
</TABLE>
75 changes: 75 additions & 0 deletions diagnostics/top_heaviness_metric/top_heaviness_metric.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 28 June top_heaviness_metric.py
# Top-Heaviness Metric
#
# ================================================================================
#
# Last update: 20 May, 2021
# Contributors: Jiacheng Ye (jye18@illinois.edu; UIUC), Zhuo Wang (zhuowang@illinois.edu; UIUC)
#
# Evaluate model performance for the representation of vertical motion (omega) profile;
# The diabatic heating profile is closely related to vertical motion profile. Thus, diagnosing omega vertical structure
# would help us to better understand the coupling between large-scale circulation and precipitation process
#
# Version and contact info
#
# - Version: 1.0
# - Contact info: Jiacheng Ye (jye18@illinois.edu) and
# Zhuo Wang (zhuowang@illinois.edu)
#
# ================================================================================
# Functionality
# 1) calculate the coefficient of Q1 and Q2 (Q1 ~= idealized deep convection profile; Q2 ~= idealized deep stratiform profile);
# 2) calculate top-heaviness ratio (defined as O2/O1)
#
# ================================================================================
#
# All scripts of this package can be found under: /diagnostics/top_heaviness_metric
# & observational data under: /obs_data/top_heaviness_metric
#
# Monthly 3-D (time-lat-lon) vertical motion (wap) fields are required;
#
# Required programming language and libraries: Tested in the Python 3.7 environment;
# Required Python libraries: Numpy, Scipy
#
# ================================================================================
# Reference:
# 1) Back, L. E., Hansen, Z., & Handlos, Z. (2017). Estimating vertical motion profile top-heaviness:
# Reanalysis compared to satellite-based observations and stratiform rain fraction.
# Journal of the Atmospheric Sciences, 74(3), 855-864.
# 2) Our paper which focuses on GEFS v12 diagnostics is under progress...
#

# driver file
import os
import glob

missing_file=0
if len(glob.glob(os.environ["OMEGA_FILE"]))==0:
print("Required OMEGA data missing!")
missing_file=1

if missing_file==1:
print("Top-heaviness metric diagnostics Package will NOT be executed!")
else:
try:
os.system("python3 "+os.environ["POD_HOME"]+"/"+"top_heaviness_ratio_calculation.py")
except OSError as e:
print('WARNING',e.errno,e.strerror)
print("**************************************************")
print("Top-Heaviness Metric Diagnostics (top_heaviness_ratio_calculation.py) is NOT Executed as Expected!")
print("**************************************************")
# if the user only focuses on calculating top-heaviess ratio instead of applying some tests on
# ratio robustness, the user can choose not to run the following python file.
try:
os.system("python3 "+os.environ["POD_HOME"]+"/"+"top_heaviness_ratio_robustness_calc.py")
except OSError as e:
print('WARNING',e.errno,e.strerror)
print("**************************************************")
print("Top-Heaviness Metric Diagnostics (top_heaviness_ratio_robustness_calc.py) is NOT Executed as Expected!")
print("**************************************************")

print("**************************************************")
print("Top-Heaviness Metric Diagnostics Executed!")
print("**************************************************")


Loading