Skip to content

Implementation of the UCI vertical interpolation and forcing for Linoz - #5860

Merged
wlin7 merged 15 commits into
masterfrom
jinboxie/rebase_master/eam/master_MAM5_wetaero_chemdyg_add_linoz_new
Sep 13, 2023
Merged

Implementation of the UCI vertical interpolation and forcing for Linoz#5860
wlin7 merged 15 commits into
masterfrom
jinboxie/rebase_master/eam/master_MAM5_wetaero_chemdyg_add_linoz_new

Conversation

@jinboxie

@jinboxie jinboxie commented Aug 8, 2023

Copy link
Copy Markdown
Contributor

Implement the UCI vertical interpolation and forcing to Linoz. The rationale behind it is that the linoz in e3sm currently use the linear interpolation that does not conserve mass. The UCI interpolation is implemented to remedy this problem and the associated forcing is also implemented.

Also change linoz_data_file in several use cases from 2015_2010JPL_cmip6_historical_10deg_58km_c20210625.nc to
2017_CMIP6_Hist_10deg_58km_c20230705.nc

Allow output of surface level of 7 tracers (o3, n2o, noy, ch4, h2o, t, o3col).

[CC]
[NML]


This includes 3 commits, and basically on the UCI interpolation algorithm change & the i/o structure (commit 1), adding global average ch4 input (commit 2), and other compsets change for forcing files (commit 3).

Commit 1

  1. The UCI vint is added to the tracer_data.F90 and switched to tracers for linoz to use.
  2. The i/o for surface level of 7 tracers (o3, n2o, noy, ch4, h2o, t, o3col) is implemented for separate treatment in lin_strat_chem.F90.

Commit 2

  1. The times series of global surface ch4 "ch4_avg_srf" is added as a one dimensional variable for global time-varying surface ch4 feature.

Commit 3

  1. The forcing files in the namelist for 5 compsets are updated for the linoz forcing
    a. 1850_eam_CMIP6_chemUCI-Linoz-mam5-vbs.xml
    b. 2010_eam_CMIP6_chemUCI-Linoz-mam5-vbs.xml
    c. 20TR_eam_CMIP6_chemUCI-Linoz-mam5-vbs.xml
    d. scm_arm97_chemUCI-Linoz-mam5-vbs.xml
    e. scm_generic_chemUCI-Linoz-mam5-vbs.xml

Figures and diagnostics
The diagnostic package of the results is tested against alpha01 master results of Golaz, the link for our results is summarized in here. Due to a new bug fix, the latest fixed results are updated here.


Related-PRs
This PR concerns two PR in v3atm and one PR in master shown below:
E3SM-Project/v3atm#62
E3SM-Project/v3atm#64.
#5831

@jinboxie
jinboxie requested a review from tangq August 8, 2023 18:45
@jinboxie jinboxie changed the title linoz_v3 from jinboxie/v3atm/eam/master_MAM5_wetaero_chemdyg_add_linoz_new rebased to master linoz_v3 update from jinboxie/v3atm/eam/master_MAM5_wetaero_chemdyg_add_linoz_new rebased to master Aug 8, 2023
Comment thread components/eam/src/chemistry/mozart/lin_strat_chem.F90 Outdated
Comment thread components/eam/src/chemistry/mozart/lin_strat_chem.F90 Outdated
@jinboxie jinboxie changed the title linoz_v3 update from jinboxie/v3atm/eam/master_MAM5_wetaero_chemdyg_add_linoz_new rebased to master Add UCI vertical interpolation and new linoz forcing for v3atm/eam/master_mam5_wetaero_chemdyg and rebase with master Aug 8, 2023

@rljacob rljacob left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fix the PR title and description.

@jinboxie jinboxie changed the title Add UCI vertical interpolation and new linoz forcing for v3atm/eam/master_mam5_wetaero_chemdyg and rebase with master Implementation of the UCI interpolation and forcing for Linoz-v3 in master Aug 9, 2023
@jinboxie jinboxie changed the title Implementation of the UCI interpolation and forcing for Linoz-v3 in master Implementation of the UCI vertical interpolation and forcing for Linoz-v3 in master Aug 9, 2023
@jinboxie jinboxie changed the title Implementation of the UCI vertical interpolation and forcing for Linoz-v3 in master Implementation of the UCI vertical interpolation and forcing for Linoz in master Aug 9, 2023
@jinboxie

jinboxie commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

Fix the PR title and description.

Hi @rljacob Rob, I've made a fix. Please let me know if there are other suggestions. Thank you!

Comment thread components/eam/cime_config/config_compsets.xml Outdated
Comment thread components/eam/src/chemistry/mozart/lin_strat_chem.F90 Outdated
Comment thread components/eam/src/chemistry/mozart/lin_strat_chem.F90 Outdated
Comment thread components/eam/src/chemistry/mozart/lin_strat_chem.F90
Comment thread components/eam/src/chemistry/mozart/linoz_data.F90 Outdated
Comment thread components/eam/src/chemistry/mozart/linoz_data.F90 Outdated
@mahf708

mahf708 commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

Do you know why the CircleCI check is failing? Did the logs become harder to read of late? Never mind, here it is:

none -O   -ffree-form -DUSE_CONTIGUOUS=  -c /home/circleci/project/components/eam/src/chemistry/utils/tracer_data.F90 -o CMakeFiles/atm.dir/__/__/eam/src/chemistry/utils/tracer_data.F90.o
/home/circleci/project/components/eam/src/chemistry/utils/tracer_data.F90:1278:44:

              if (file%linoz_v3.eq..true..or.file%linoz_v2.eq..true.) then
                                            1
Error: Logicals at (1) must be compared with .eqv. instead of .eq.
Target CMakeFiles/atm.dir/__/__/eam/src/chemistry/utils/tracer_data.F90.o built in 0.463191 seconds
cmake/atm/CMakeFiles/atm.dir/build.make:2099: recipe for target 'cmake/atm/CMakeFiles/atm.dir/__/__/eam/src/chemistry/utils/tracer_data.F90.o' failed
make[2]: *** [cmake/atm/CMakeFiles/atm.dir/__/__/eam/src/chemistry/utils/tracer_data.F90.o] Error 1
make[2]: Leaving directory '/home/circleci/projects/e3sm/scratch/master.WCYCL1850.ne4_oQU240.baseline/bld/cmake-bld'
CMakeFiles/Makefile2:504: recipe for target 'cmake/atm/CMakeFiles/atm.dir/all' failed
make[1]: *** [cmake/atm/CMakeFiles/atm.dir/all] Error 2

You can test fixing this locally by using the gnu compiler

@tangq tangq left a comment

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.

Need to repeat the test runs to confirm the results are reasonable and clean up the code a bit as suggested above. The code changes look good to me.

Comment thread components/eam/src/chemistry/utils/tracer_data.F90 Outdated
Comment thread components/eam/src/chemistry/utils/tracer_data.F90 Outdated
mahf708
mahf708 previously requested changes Aug 9, 2023

@mahf708 mahf708 left a comment

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.

I checked the internal docs on this PR. The intended behavior is climate changing.

  1. I cannot tell if that there is way to turn these changes on/off because some xml files are edited in place. Could you explain how one would turn this on/off?
  2. RESTOM changes by 0.20 W/m2 in the AMIP runs. Can we account for this? I could guess it is the O3 changes (for the better, right?) but it would be good to rigorously do this. Would you be able to assess the direct and indirect O3--radiation interactions before this PR is merged? Same for other fields. It would be good to account for the radiative changes carefully.

@mahf708 mahf708 left a comment

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.

Status update. Based on the new simulations of the before- and after-fixes implemented by Wuyin, the fixes are climate changing and therefore I can no longer stand by my earlier assessment about this PR. In particular, RESTOM changes are on the order of 0.20 W/m2 in the F2010 tests, which I usually consider well above the threshold of noise and roundoff. In fact, that change (0.20) is about the same as the change introduced by this PR to begin with, which we have labeled CC. I don't think it is reasonable to ask for more simulations on this PR (given a lot of simulations have already been done, sadly to apparent waste due to the complex ozone--climate interactions). Instead, we may have to consider lumping the three prominent climate changing PRs for v3alpha03. I will defer to the coupled team to assess and make a decision.

⚠️ Regarding ERFaer, it's very hard to make an assessment without seeing PI experiments, so if explicit ERFaer assessment is needed, we will need corresponding F2010 PI runs, which I will be happy to look at as soon as they're available for further assessment.

@susburrows

Copy link
Copy Markdown
Contributor

All, should this PR be tagged as a bug fix?

@jinboxie

jinboxie commented Sep 2, 2023

Copy link
Copy Markdown
Contributor Author

Status update in this PR. Before the merging, a bug that affects the surface boundary for Linoz tracers is detected. A bug was found during our discussion with Wuyin. A fix is now in the PR to incorporate the fix. Simulation using the latest commit has shown a RESTOM of -0.03 W/m2 as compared to the -0.04 W/m2 in the pre-bug fix simulation. Decomposition of the radiation effect following the above analysis show similar results, including minor aerosol effect. Inspection of the results in other variables also show similar effect, indicating the minor impact of this bug and the previous documented results shown in this PR and on confluence are overall applicable. The latest simulation results are documented here.

@mahf708 mahf708 left a comment

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.

Approving based on the results based on pre-v3a3 branch by Wuyin. The combined results show minimal effects on aerosol forcing. After the fix by Wuyin and the additional fix by Jinbo, I think this PR is close to climatological equivalence before/after. That is, the CC label may not be necessary, but I would keep it on just in case as my testing isn't thorough; the RP is definitely NBFB though. At any rate, this PR should be safe for merging from the standpoint of aerosol forcing. Thanks @wlin7 and @jinboxie; let me know if you'd like any additional tests from me.

@rljacob rljacob modified the milestones: v3.0alpha, v3.0alpha03 Sep 7, 2023
@susburrows

Copy link
Copy Markdown
Contributor

@wlin7 : should this be tagged as a bugfix PR?

@mahf708

mahf708 commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

If you're referring to the fixes within the PR by Wuyin and Jinbo, I don't believe these commits count as bug fixes because the respective bugs were caught and corrected before merging, thus they're just part of the PR process. In totality, I don't believe this PR merits a bug fix label, but I could be wrong. I believe this is the main summary (as well as the main description):

components/eam/src/chemistry/utils/tracer_data.F90
 
@@ -5,6 +5,12 @@ module tracer_data
! Created by: Francis Vitt -- 2 May 2006
! Modified by : Jim Edwards -- 10 March 2009
! Modified by : Cheryl Craig and Chih-Chieh (Jack) Chen  -- February 2010
! Modified by : Jinbo Xie --March 2023
!               Added a new option in interpolate_trcdata to work on linoz
!               inputdata. A new UCI interpolation that better conserves
!               mass in implemented and added a new function. It is called
!               when linoz data are used in interpolate_trcdata.
!

@rljacob

rljacob commented Sep 8, 2023

Copy link
Copy Markdown
Member

Its only a bugfix if the bug is on master.

wlin7 added a commit that referenced this pull request Sep 11, 2023
…add_linoz_new' into next (PR #5860)

Implementation of the UCI vertical interpolation and forcing for Linoz

Implement the UCI vertical interpolation and forcing to Linoz. The rationale
behind it is that the linoz in e3sm currently use the linear interpolation
that does not conserve mass. The UCI interpolation is implemented to remedy
this problem and the associated forcing is also implemented.

[CC]
[NML]
@wlin7

wlin7 commented Sep 11, 2023

Copy link
Copy Markdown
Contributor

Merged to next.

deallocate(wrksrf)
else
!!padding for derivative terms
wrksrf=0.0_r8

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.

@jinboxie , look like there is no need of this (padding for derivative).
wrksrf in the else block is never allocated. While runs with intel compiler didn't complain, all gnu tests failed due to invalid memory reference.

@mahf708 mahf708 Sep 12, 2023

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.

Hi Jinbo, I used the following to test my PRs with gnu:

./create_test e3sm_developer --compiler=gnu -p e3sm --machine=chrysalis --baseline-root=/lcrc/group/e3sm/baselines/chrys/gnu -c -b 82c581e

Note that I generated baselines for 82c581e as part of my testing, so the command above will both run the tests and compare them against baselines. You could also change e3sm_developer with e3sm_integration for a more expansive test suite

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.

You likely shouldn't run the comparison since this PR is CC/NBFB. So take out -c -b 82c581e from my line above

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.

Verified: Commenting out lines 1723-1725 allows gnu tests to run, while having no impact on intel tests.

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.

Ok, thank you guys!

wlin7 added a commit that referenced this pull request Sep 12, 2023
…add_linoz_new' into next (PR #5860)

Implementation of the UCI vertical interpolation and forcing for Linoz

Implement the UCI vertical interpolation and forcing to Linoz. The rationale behind
it is that the linoz in e3sm currently use the linear interpolation that does not
conserve mass. The UCI interpolation is implemented to remedy this problem and the
associated forcing is also implemented.

Remerged after a fix.

[CC]
[NML]
@wlin7

wlin7 commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

Remerged to next after the fix commit 51dd660


<compset>
<alias>FSSP585</alias>
<lname>SSP585_eam_EAM%CMIP6_ELM%SPBC_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_SWAV</lname>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does the "eam" do in this longname? I didn't think that was allowed in CIME.

@jinboxie jinboxie Sep 13, 2023

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.

Hi Rob @rljacob , it was used as the F for SSP585 compset when we were testing using the original alpha01 version. It is used to test the linoz-v2 configuration for future compset. Under this compset, we used several future scenario forcings as like done before. In the naming convention of correspondent files in use_cases of eam namelist_files, there was one with SSP585_cam5_CMIP6_bgc.xml, so I named it with eam to discriminate between the two.

@rljacob

rljacob commented Sep 12, 2023

Copy link
Copy Markdown
Member

The PR description was missing important content (above the line) so I added it.

wlin7 added a commit that referenced this pull request Sep 13, 2023
…add_linoz_new' into next (PR #5860)

Implementation of the UCI vertical interpolation and forcing for Linoz

Implement the UCI vertical interpolation and forcing to Linoz. The rationale behind
it is that the linoz in e3sm currently use the linear interpolation that does not
conserve mass. The UCI interpolation is implemented to remedy this problem and the
associated forcing is also implemented.

Remerged after a fix.

[CC]
[NML]
@wlin7
wlin7 merged commit 6e74648 into master Sep 13, 2023
@wlin7
wlin7 deleted the jinboxie/rebase_master/eam/master_MAM5_wetaero_chemdyg_add_linoz_new branch September 13, 2023 22:29
@wlin7

wlin7 commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

Merged to master.

wlin7 added a commit that referenced this pull request Sep 14, 2023
Fix linoz data file for 1pctCO2 use_case

PR #5860 updated linoz data files for use cases. But the PR did not involve
the use_case file for WCYCL1850-1pctCO2 as it was introduced at a later time.

This fixes WCYCL1850-1pctCO2 tests, though some machines were able to run with the old file.

[non-BFB] only for compy and anvil prod tests that were able to run with the old file.
wlin7 added a commit that referenced this pull request Sep 14, 2023
Fix linoz data file for 1pctCO2 use_case

PR #5860 updated linoz data files for use cases. But the PR did not
involve the use_case file for WCYCL1850-1pctCO2 as it was introduced at a later time.

This fixes WCYCL1850-1pctCO2 tests, though some machines were able to run with the old file.

[non-BFB] only for compy and anvil prod tests that were able to run with the old file
@jinboxie
jinboxie restored the jinboxie/rebase_master/eam/master_MAM5_wetaero_chemdyg_add_linoz_new branch September 14, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants