E3SM-Project / zppy

E3SM post-processing toolchain
BSD 3-Clause "New" or "Revised" License
6 stars 15 forks source link

Workflow for ZPPY- PCMDI for E3SM diagnostics #624

Closed zhangshixuan1987 closed 3 weeks ago

zhangshixuan1987 commented 2 months ago

Issue resolution

Select one: This pull request is...

1. Does this do what we want it to do?

Objectives:

Required:

If applicable:

2. Are the implementation details accurate & efficient?

Required:

If applicable:

3. Is this well documented?

Required:

4. Is this code clean?

Required:

If applicable:

forsyth2 commented 2 months ago

Thanks @zhangshixuan1987 for working on this! Let me know when it's ready for me to review. On my review, I can:

zhangshixuan1987 commented 2 months ago

@forsyth2 : Hi Ryan, based on what you mentioned above, I would like to ask you to review this commit first. This pull request have already included the key part for the workflow:

  1. the control script for job dependency: pcmdi_diags.py
  2. the control template for the main calculation of pcmdi metrics: pcmdi_diags.bash
  3. the parameter files needed for certain process (template/pcmdi_diags/)

I think that it would be better for you to provide some high-level comments on the overall structure and the coding style which should be first fulfilled to meet the requirment by Zppy.

Thank you!

With best wishes,

Shixuan

chengzhuzhang commented 1 month ago

@zhangshixuan1987 and @forsyth2 I will begin reviewing this PR later next week. Shixuan, thank you for your hard work putting together this PR!

zhangshixuan1987 commented 1 month ago

Hi @forsyth2 and @chengzhuzhang : I am not sure if it is properate, but I want to share the sample .cfg files and the run output examples I created for the PCMDI here:

In addition, I also tested the workflow with AMIP and piControl simulations, which can work reasonably as well. I need to further work on following things:

  1. verify the "model vs model" function
  2. discuss with you and Ryan for a. final www directory structure, and b. the viewer page.
zhangshixuan1987 commented 1 month ago

@chengzhuzhang : Hi Jill, if you check my comments https://github.com/E3SM-Project/zppy/pull/624#issuecomment-2392406822. You will find the e3sm diag cfg file that I shared for you and Ryan to test. please take a look and let me know if you have any questions.

chengzhuzhang commented 3 weeks ago

Hi @forsyth2 and @chengzhuzhang : I am not sure if it is properate, but I want to share the sample .cfg files and the run output examples I created for the PCMDI here:

* [ cfg file for v3.LR.hisotical simulation](https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.szhang/e3sm-pcmdi/post.v3.LR.historical.cfg), which is adapted from Jill's cfg file

* [sample output from the pcmdi](https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.szhang/e3sm-pcmdi/v3.LR.historical_0051/pcmdi_diags/), which is applied to the v3.LR.historical simulations during 1985-2014 period.

In addition, I also tested the workflow with AMIP and piControl simulations, which can work reasonably as well. I need to further work on following things:

1. verify the "model vs model" function

2. discuss with you and Ryan for a. final www directory structure, and b. the viewer page.

When reviewing the results, in the parallel coordinate figure: example. The prw, rldscs, sfcWind show large bias between v3, and CMIP MME, I think the legend might be mixed? Red line should be MME and black for v3?

When going over the results, I agree strongly that it would be much easier to navigate the results with a viewer page! @mingxuanwupnnl

chengzhuzhang commented 3 weeks ago

The *.py files under template/pcmdi_diags are not installed correctly. Example: `jinja2.exceptions.TemplateNotFound: pcmdi_diags/generate_sftlf.py

I think it is due to the constraint in setup:

https://github.com/E3SM-Project/zppy/blob/408e9ade87db8d0d5322c01186564df1392282be/setup.py#L20-L21

By adding "py" to the extensions list, the installation works.

zhangshixuan1987 commented 3 weeks ago

Hi @forsyth2 and @chengzhuzhang : I am not sure if it is properate, but I want to share the sample .cfg files and the run output examples I created for the PCMDI here:

* [ cfg file for v3.LR.hisotical simulation](https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.szhang/e3sm-pcmdi/post.v3.LR.historical.cfg), which is adapted from Jill's cfg file

* [sample output from the pcmdi](https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.szhang/e3sm-pcmdi/v3.LR.historical_0051/pcmdi_diags/), which is applied to the v3.LR.historical simulations during 1985-2014 period.

In addition, I also tested the workflow with AMIP and piControl simulations, which can work reasonably as well. I need to further work on following things:

1. verify the "model vs model" function

2. discuss with you and Ryan for a. final www directory structure, and b. the viewer page.

When reviewing the results, in the parallel coordinate figure: example. The prw, rldscs, sfcWind show large bias between v3, and CMIP MME, I think the legend might be mixed? Red line should be MME and black for v3?

When going over the results, I agree strongly that it would be much easier to navigate the results with a viewer page! @mingxuanwupnnl

Hi @chengzhuzhang : I did not notice this message as you may @ the wrong people. As for your questions here:

  1. Yes, the legend for CMIP MME and v3 in parallel coordinate plots was wrong, the fixed code with improvements in the mean climate metrics plots has been merged to my github branch.
  2. As for the issues for prw, rldscs, sfcWind, this is partly related to the issues in the CMIP6 reference datasets. Jiwoo and I are working together to check the consistency of the units between two datasets, and will update this part.
chengzhuzhang commented 3 weeks ago

I accidentally tagged @mingxuanwupnnl, Sorry!

@zhangshixuan1987 sounds good, I will try test the new PR for now.