CTSM5.4.048 Fix problems encountered with running PLUMBER2 sites#4092
CTSM5.4.048 Fix problems encountered with running PLUMBER2 sites#4092olyson wants to merge 36 commits into
Conversation
|
I see that there are some python errors in the automated testing, I'll address those next week once I figure out what they are about. Although my code was rated 9.99/10, ha ha. |
|
Ok, I've fixed all of the python-lint-and-black errors. |
|
@samsrabin can you review this. Keith's done functional tests to check this works, but would like a review on the python. We can also discuss testing (which may be outside the scope of this PR)? |
|
Can do, sure. What sort of timeline were y'all hoping for? |
Maybe by the end of next week? |
|
Per discussion at CTSM software meeting, I'm going to expand this PR to include other fixes to problems I've encountered with running PLUMBER2 sites. |
|
@samsrabin , I think this is ready for review now, whenever you have time... |
|
@samsrabin this is ready for review |
samsrabin
left a comment
There was a problem hiding this comment.
Nice work! I've left some comments in the diffs.
Remaining work
(In addition to resolving comments)
Things you already noted:
- Needs CDEPS update(s) before merging
- New input data needs to be copied into inputdata and
rimported - Test all sites after making those changes
Additional:
- Please check the docs to see if there are any required updates.
| """hist_fincl1 = 'TOTECOSYSC', 'TOTECOSYSN', 'TOTSOMC', 'TOTSOMN', 'TOTVEGC', | ||
| 'TOTVEGN', 'TLAI', 'GPP', 'CPOOL', 'NPP', 'TWS', 'H2OSNO'""", |
There was a problem hiding this comment.
It looks like the hist_fincl1 line is new. What's the deal with that?
There was a problem hiding this comment.
The list for spinup history fields in AD mode is handled automatically by namelist_defaults_ctsm.xml when clm_accelerated_spinup = on. But not handled for postad runs. So I've added the same fields explicitly here. Specifying the other items (hist_mfilt, hist_nhtfrq, hist_empty_tapes) without requesting any history fields results in an error (#4105).
However, I'm now wondering if the PLUMBER run_tower has ever been tested for SP mode. E.g., these fields wouldn't work for SP mode. I can work on SP but I think I'd like to make that a separate project/PR, in the interest of getting these changes to main soon. But happy to discuss, @wwieder , @samsrabin .
There was a problem hiding this comment.
Yes, that being a separate effort sounds good to me.
| # PLUMBER cases all start in different years, but not expected to cause issues. | ||
| # PLUMBER cases have specific start dates for each site that are set in | ||
| # shell_commands | ||
| # DOES THIS NEED TO BE SET DIFFERENTLY FOR PLUMBER2 SPINUP? |
There was a problem hiding this comment.
This question should be resolved.
There was a problem hiding this comment.
This does not need to be set differently for PLUMBER2, so I'll remove the comment. However, I'm not sure RUN_REFDATE should be set at all for run_type=ad for NEON either. It will be ignored since CLM_FORCE_COLDSTART=on, in that block of code. @wwieder , do you remember why it is set here?
There was a problem hiding this comment.
I can't comment on the correctness of this script because I don't know NCL. For what it's worth, Copilot seems to think it's okay.
There was a problem hiding this comment.
Thanks for checking.
…PLUMBERwetland
Description of changes
This PR fixes failures in running PLUMBER2 sites. There are four categories of failures.
Specific notes
The fixes for these issues are:
Here, tower_sites.py is modified so that for wetland sites, the parameter file for the base case is queried (regardless if it is wetland or not), and then the parameter file is replaced with a modified parameter file with baseflow_scalar=0 for any requested wetland sites in the run_tower submission.
The baseflow_scalar namelist change request was deleted from the wetland sites shell commands by running tools/site_and_regional/plumber2_usermods. These modified shell commands are part of this commit.
Per conversation with @wwieder , this PR turns off HumanIndexMod for all the PLUMBER2 sites for now, to avoid the negative relative humidity error check. This is accomplished in cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_clm.
For the sites failing with the calendar error during spinup, these are the xml variables that need to be changed on a site by site basis for spinup:
RUN_STARTDATE
CALENDAR
DATM_YR_START
DATM_YR_END
DATM_YR_ALIGN
START_TOD (may already be set correctly though)
My run tower script (/glade/work/oleson/release-clm5.0.34/tools/PTCLM/run_clmtowers_plumber2.csh) handled this complexity, but this was not implemented in the run_tower infrastructure for PLUMBER2.
I've combined the new spinup variables into create_PLUMBER2_sites_csv.ncl -> PLUMBER2_sites.csv and modified the code to read these new variables in and generate the required shell commands.
A one line change to plumber2_usermods.py was also required to get these sites to run. This line had been commented out pending a CDEPS mod, which appears to have been implemented.
Contributors other than yourself, if any: @wwieder (python help)
CTSM issues resolved or otherwise addressed, if any:
Resolves #4023
Resolves #4081
Resolves #4105
If answers are expected to change, describe (delete this line otherwise): The sites listed above will now run to completion. Sites that had run successfully prior to these changes may not have run correctly, so answers will likely change for those sites.
Any user interface changes (namelist or namelist defaults changes)? None to the defaults namelist. For wetlands, we only create a temporary modified parameter file for the requested run(s) and point to it in the run directory. Other changes here are accomplished by the PLUMBER2 shell commands.
Testing planned or performed, if any:
I've tested all of the sites with various submissions of the type:
./run_tower --plumber-sites {XX-XXX} --run-type ad --xmlchange STOP_OPTION=nyears,STOP_N=100,RESUBMIT=2,JOB_WALLCLOCK_TIME=06:00:00,PROJECT=P93300041 --overwrite.
I also tested a NEON site (ABBY) to make sure I didn't break that configuration.
Requirements before merge: