Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add H2OLNZ in zonal mean 2d stratosphere #868

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

chengzhuzhang
Copy link
Contributor

Description

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

@chengzhuzhang
Copy link
Contributor Author

@tangq This PR add H2OLNZ to pressure latitude plots focusing stratosphere. Here is an example testing with v3_historical_0051. Let me know if you'd like further change.

Copy link

@tangq tangq left a comment

Choose a reason for hiding this comment

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

@chengzhuzhang , the changes look good to me. The contour intervals can be tricky. It is good enough for the quick check purpose as it is.

It won't be available in E3SM Unified until the next version. Is there a way to quickly generate these plots? The EAMv3 overview paper has a tight timeline and it would be helpful to look at these plots. Thanks.

@chengzhuzhang
Copy link
Contributor Author

chengzhuzhang commented Oct 14, 2024

@tangq Thank you for reviewing. For quickly check other v3.historical runs. You could try source my build of e3sm_diags on LCRC with the command:

source /home/ac.zhang40/y/etc/profile.d/conda.sh; conda activate edv290

The command to generate the H2OLNZ plots is:

e3sm_diags zonal_mean_2d_stratosphere --no_viewer --reference_data_path '/lcrc/group/e3sm/diagnostics/observations/Atm/climatology' --test_data_path '/lcrc/group/e3sm2/ac.zhang40/E3SMv3/v3.LR.historical_0618/post/atm/180x360_aave/clim/30yr' --results_dir '/lcrc/group/acme/public_html/diagnostic_output/zhang40/h2olnz_only_1' --case_id 'ERA5' --run_type 'model_vs_obs' --sets 'zonal_mean_2d_stratosphere' --variables 'H2OLNZ' --seasons 'ANN' --regions 'global' --regrid_tool 'esmf' --regrid_method 'conservative' --plevs '1.0' '1.6681005372000588' '2.7825594022071245' '4.641588833612778' '7.742636826811269' '12.91549665014884' '21.544346900318832' '35.93813663804626' '59.94842503189409' '100.0' --plot_log_plevs --multiprocessing --num_workers '1' --main_title 'H2OLNZ ANN' --backend 'mpl' --output_format 'png' --canvas_size_w '1212' --canvas_size_h '1628' --figsize '8.5' '11.0' --dpi '150' --arrows --contour_levels '0.001' '0.0015' '0.002' '0.0025' '0.003' '0.0035' '0.004' '0.0045' '0.005' --test_name 'v3.LR.historical_0051' --test_colormap 'cet_rainbow.rgb' --ref_name 'ERA5' --reference_name 'ERA5 Reanalysis' --reference_colormap 'cet_rainbow.rgb' --diff_title 'Model - Observations' --diff_colormap 'diverging_bwr.rgb' --diff_levels '-0.001' '-0.00075' '-0.0005' '-0.00025' '-5e-05' '5e-05' '0.00025' '0.0005' '0.00075' '0.001' --granulate 'variables' 'seasons' 'regions' --selectors 'sets' 'seasons'

Just to replace the test_data_path to where the data is stored, and the result_dir to your own path. You could adjust the contour levels to fine tune for the paper.

Alternatively, since I already have the environment set up. I can quickly generate the same set for the v3 runs of interests, just let me know.

@chengzhuzhang
Copy link
Contributor Author

The CI/CD tests passed after LCRC maintenance yesterday. Merging.

@chengzhuzhang chengzhuzhang marked this pull request as ready for review October 15, 2024 16:40
@chengzhuzhang chengzhuzhang merged commit ad1e7ce into main Oct 15, 2024
4 checks passed
@chengzhuzhang chengzhuzhang deleted the add_H2OLNZ_zonal_mean_2d_stratosphere branch October 15, 2024 16:40
@tangq
Copy link

tangq commented Oct 19, 2024

Hi @chengzhuzhang , I didn't catch this earlier. The H2OLNZ plot and the Q plot use different units. This makes it harder to compare them.

Can we change it to the same unit? I'd suggest that we change it all to match the Q plot, i.e., ppm and absolute difference. Thanks.

@chengzhuzhang
Copy link
Contributor Author

@tangq, Just to clarify for the stratosphere focused plots, you'd like to use ppm for both H2OLNZ and Q. In the codes we have:

# Note this is a special case to handle small values of stratosphere specific humidity.
# The general derived variable process converts specific humidity to units [g/kg]
# Following converts from g/kg to ppm
if (
parameter.current_set == "zonal_mean_2d_stratosphere"
and parameter.var_id == "Q"
):
mv1_p = mv1_p * 1000.0
mv1_p.units = "ppm"
mv2_p = mv2_p * 1000.0
mv2_p.units = "ppm"

If it is the case, I can add the logic to convert H2OLNZ for zonal_mean_2d_stratosphere set, in addition to Q.

@tangq
Copy link

tangq commented Oct 21, 2024

@chengzhuzhang , that's right. I suggest we use ppm by volumn for these plots.

Is my understanding correct that the code you pointed out multiplies Q (in g/kg) by 1000 to get Q in ppm? If so, it is ppm by weight. We need to add the molecular weight ratio to get the ppm by volume, which is the typical unit in this case.

If mv1_p is in g/kg, mv1_p = mv1_p * 28.97 / 18.0 * 1000.0 converts the unit to ppm by volume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: stratospheric water vapor (H2OLNZ) figure is not generated
2 participants