-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversation
|
@@ -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' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
- Replace 0 by -1 in this line and this line.
- After this
end do
, addwhere ( metric_nver(1:ncnd) == -1 ) metric_nver(1:ncnd) = pver
- Before this if-statement, add
where ( qoi_nver(1:nqoi) == -1 ) qoi_nver(1:nqoi) = pver
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!!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
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.
Merged to next. |
The PR fixes two sets of tests.
[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.