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

Fix tests incompatitle with L80 and restore tentative config options for SSP #6054

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

wlin7
Copy link
Contributor

@wlin7 wlin7 commented Nov 6, 2023

The PR fixes two sets of tests.

  • SSP tests with tentative fix from # 5965 stops working. The EAM%CMIP6 generic pattern match needs to be removed to have it work. This is due to the -vbs option that would be set if having the generic pattern match. The additive style of EAM configure option would then have no mechansim to disable vbs once set.
  • Update the vertical dimension for 3D variables that condidiag tests track.

[BFB] Only the above mentioned tests will diff; and the the differences for these tests
following this fix are due to #5996, and other went in on the same day.

Copy link

github-actions bot commented Nov 6, 2023

PR Preview Action v1.4.4
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6054/
on branch gh-pages at 2023-11-14 02:43 UTC

@wlin7 wlin7 requested a review from whannah1 November 6, 2023 03:36
@wlin7 wlin7 self-assigned this Nov 6, 2023
@wlin7 wlin7 added Atmosphere bug fix PR BFB PR leaves answers BFB labels Nov 6, 2023
@@ -11,3 +11,6 @@
fincl5 = 'PRECT','PRECC','TUQ','TVQ','QFLX','SHFLX','U90M','V90M'
fincl6 = 'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANTAU_ISCCP','MEANPTOP_ISCCP','MEANTB_ISCCP','CLDTOT_CAL','CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN','CLDHGH_CAL','CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN','CLDMED_CAL','CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN','CLDLOW_CAL','CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN'
fincl7 = 'O3', 'PS', 'TROP_P'

! Specify an L80 IC to override eam.i from reference case, which is still for L72
ncdata = '$DIN_LOC_ROOT/atm/cam/inic/homme/eami_mam4_Linoz_ne30np4_L80_c20231010.nc'
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better for me to generate a L80 version of the file from the reference case?
This is very easy to do, but would still be non-BFB.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was it already from a reference case for v3atm? I thought you did that. If not yet, yes, it would be nice to have. Note this is the same file you created for #5996.

Copy link
Contributor

Choose a reason for hiding this comment

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

yea, I guess it's fine to use this file. I'm just worried we will forget that this override is in place, but that's probably harmless.

Copy link
Member

Choose a reason for hiding this comment

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

If we are moving to L80, the default ncdata should work and not need special namelist overrides.

Copy link
Contributor

Choose a reason for hiding this comment

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

It sounds like this test requires a reference case (which makes sense) which is not L72. That's why the override is used. The alternative is to remap the reference case data, but then we might still need an override to make sure the correct initial condition file is used (unless we hide the L72 version where CIME won't see it).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the SSP tests are using a reference case (a restart point of a historical run). Since we don't have v3 historical with L80, and the reference case currently used is from v2, an override is needed for SSP tests to proceed in current code base. Much about the SSP tests will be dated once all are settled.

Copy link
Member

Choose a reason for hiding this comment

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

Ok reference case hasn't been made yet. Go ahead then with the override.

@@ -3,7 +3,7 @@
qoi_chkpt = 'RAD', 'PACEND','DYNEND','DEEPCU', 'STCLD',

qoi_name = 'CAPE','dCAPE'
qoi_nver = 1, 72,
qoi_nver = 1, 80,
Copy link
Contributor

@whannah1 whannah1 Nov 6, 2023

Choose a reason for hiding this comment

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

To make this more robust we should change this so that the the levels default to something like -1, and then internally make sure they get set to 1 and pver. If that's an acceptable alternative I'm happy to implement it. Same goes for the two changes below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed setting to something like -1 and inside the code to resolve it to pver would be more elegant. That said, for users who do want to use this condidiag tool, it is probably more straightforward for them to specify the actual # of model levels they run with.

Copy link
Contributor

Choose a reason for hiding this comment

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

right, but if most of the time they just want the upper and lower limit of the vertical levels then having it set internally makes sense, and the edge case where a user wants something else can be handled by editing these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @huiwanpnnl , the condidiag related tests failed at runtime for 80-level configurations. Reseting qoi_nver to 80 from 72 will allow the tests to run. Should qoi_nver value always be the same as the vertical dimension size of the corresponding diagnostic variable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @wlin7 and @whannah1, I agree it will be an improvement to let qoi_nver and metric_nver default to -1 in the source code and then, after the namelist has been read in, reset -1 to pver. Only a few lines need to be changed in components/eam/src/physics/cam/conditional_diag.F90:

After these updates, the 72 or 80 in the two usr_nl_eam files can be changed to -1.

Does this sound good to you? Hope it works. I'd be happy to let either of you implement this. Thanks!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, @huiwanpnnl . Your suggested changes are straightforward. I am going to put them in. BTW, would it be better to keep the initialization/default value (0) unchanged at line 219 and 228, as the new implementation would interpret -1 as pver. That is just to avoid confusion as the where statement has strict upper bound in the array scope.

Copy link
Contributor

Choose a reason for hiding this comment

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

@wlin7, your suggestion sounds good to me. In that scenario, -1 will be interpreted as an intentional alias for pver, while 0 will indicate an unset value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly, @huiwanpnnl, thanks.. index -1 as used in accessing the last element of an array in some languages. This is mainly for pre-defined testing cases. Users can still specify the actual number of levels in practical use, which would be equivalent. The changes are in ee14d67 and verified working well.

@wlin7
Copy link
Contributor Author

wlin7 commented Nov 7, 2023

@whannah1 , thank you for generating L80 ne120np4 IC. It is added to this PR. After this and #6053, the nightly hires test should be good then.

@wlin7 wlin7 requested a review from huiwanpnnl November 13, 2023 22:21
Copy link
Contributor

@huiwanpnnl huiwanpnnl left a comment

Choose a reason for hiding this comment

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

The changes for CondiDiag look good to me. Thanks!

Copy link
Contributor

@whannah1 whannah1 left a comment

Choose a reason for hiding this comment

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

Looks good!

wlin7 added a commit that referenced this pull request Nov 16, 2023
Fix tests incompatitle with L80 and restore tentative config options for SSP

The PR fixes two sets of tests.

. SSP tests with tentative fix from # 5965 stops working. The EAM%CMIP6
  generic pattern match needs to be removed to have it work. This is
  due to the -vbs option that would be set if having the generic pattern match.
  The additive style of EAM configure option would then have no mechansim to
  disable vbs once set.

. Update the vertical dimension for 3D variables that condidiag tests track.

[BFB] Only the above mentioned tests will diff; and the the differences for these tests
      following this fix are due to #5996, and other went in on the same day.
@wlin7
Copy link
Contributor Author

wlin7 commented Nov 16, 2023

Merged to next.

@wlin7 wlin7 merged commit d2ffe91 into master Nov 16, 2023
2 checks passed
@wlin7 wlin7 deleted the wlin/atm/fix_tests_with_L80 branch November 16, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Atmosphere BFB PR leaves answers BFB bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants