-
Notifications
You must be signed in to change notification settings - Fork 95
Add filenames to cpl.input_data_list, more error messaging, set drv_restart_pointer default to none unless needed #528
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
base: main
Are you sure you want to change the base?
Conversation
…st file to check for file existence, fixing ESCOMP#526
… allow continue_run as well), add it as a file that will be put into cpl.input_data_list for existence checking, fixing ESCOMP#525
…e drv_restart_pointer is set in that case, also move it and rundir to the default_settings group so won't be output
…utdata named none -- but when UNSET is used it doesn't add it to cpl.input_data_list and so works
|
#532 brings in some additional nice changes beyond what is in here. And after that comes in I'll update to it, and likely change a few things here that won't be needed anymore. |
|
billsacks
left a comment
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.
Thanks a lot for your work fixing this issue, @ekluzek !
I have a few questions / possible suggestions here. I'm not familiar enough with this to give a confident review, but I can try to review more carefully if needed.
| # -------------------------------- | ||
| namelist_file = os.path.join(confdir, "drv_in") | ||
| drv_namelist_groups = ["papi_inparm", "prof_inparm", "debug_inparm"] | ||
| drv_namelist_groups = ["DRIVER_attributes", "MED_attributes", "ALLCOMP_attributes", "ROF_attributes", "WAV_attributes"] |
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.
Can you explain this change - why you removed the old set and how you chose this new set of groups?
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 old ones no longer exist. And the new ones are valid namelist groups that weren't included.
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.
Checking in the latest code, papi_inparm and prof_inparm are here and in the namelist definitation -- but not references in the Fortran code. So they can be removed.
It looks like debug_inparm now has one namelist item, so should be added back in.
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.
I rechecked the others, and it looks like ROF_attributes and WAV_attributes are no longer used in the Fortran source, but the others are.
Here's an example check of namelist items that are in the namelist definition, but NOT in the Fortran source:
git grep -i WAV_attributes | more
cime_config/namelist_definition_drv.xml: <entry id="Verbosity@wav_attributes" modify_via_xml="ESMF_VERBOSITY_LEVEL">
cime_config/namelist_definition_drv.xml: <group>WAV_attributes</group>
cime_config/namelist_definition_drv.xml: <group>WAV_attributes</group>While here is what I see for something that is in the Fortran code:
cesm/driver/ensemble_driver.F90: call ReadAttributes(driver, config, "DRIVER_attributes::", rc=rc)
cesm/driver/esm.F90: call ReadAttributes(driver, config, "DRIVER_attributes::", formatprint=.true., rc=rc)
cesm/driver/esm.F90: character(len=*), parameter :: subname = '(driver_attributes_check) '
cime_config/namelist_definition_drv.xml: <entry id="Verbosity@driver_attributes" modify_via_xml="ESMF_VERBOSITY_LEVEL">
cime_config/namelist_definition_drv.xml: <group>DRIVER_attributes</group>
cime_config/namelist_definition_drv.xml: <group>DRIVER_attributes</group>
cime_config/namelist_definition_drv.xml: <group>DRIVER_attributes</group>
.
.
.
cime_config/namelist_definition_drv.xml: <group>DRIVER_attributes</group>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.
These attributes are read and used by ESMF/NUOPC
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.
So... partly for my own tracking of this... my understanding from this conversation is that some updates are still needed to drv_namelist_groups, like adding debug_inparm back in? And I'm wondering if papi_inparm and prof_inparm should either be added back here or removed from the namelist_definition?? It seems confusing to me to have buildnml be inconsistent with the namelist_definition: this seems prone to confusing someone later. But I'm not sure I'm following this conversation correctly, so am happy to be corrected on this.
| <entry id="rundir" modify_via_xml="RUNDIR"> | ||
| <type>char</type> | ||
| <category>nuopc</category> | ||
| <!-- NOTE: This won't be output only used as an attribute in this file --> | ||
| <group>default_settings</group> | ||
| <values> | ||
| <value>$RUNDIR</value> | ||
| </values> | ||
| </entry> | ||
|
|
||
| <entry id="continue_run" modify_via_xml="CONTINUE_RUN"> | ||
| <type>logical</type> | ||
| <category>nuopc</category> | ||
| <!-- NOTE: This won't be output only used as an attribute in this file --> | ||
| <group>default_settings</group> | ||
| <values> | ||
| <value>$CONTINUE_RUN</value> | ||
| </values> | ||
| </entry> |
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.
I'm not super-familiar with this, but I'm thinking that you can accomplish this by setting rundir and continue_run in the config settings in buildnml, similarly to what's currently done for many other variables in _create_drv_namelists.
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.
Ahh, I'm pretty sure you are right, and that this bit could probably be removed.
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.
Just for my own tracking of remaining to-dos... this one is still a to-do.
billsacks
left a comment
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.
Thanks a lot for these fixes, @ekluzek ! A few comments / questions below.
| # -------------------------------- | ||
| namelist_file = os.path.join(confdir, "drv_in") | ||
| drv_namelist_groups = ["papi_inparm", "prof_inparm", "debug_inparm"] | ||
| drv_namelist_groups = ["DRIVER_attributes", "MED_attributes", "ALLCOMP_attributes", "ROF_attributes", "WAV_attributes"] |
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.
So... partly for my own tracking of this... my understanding from this conversation is that some updates are still needed to drv_namelist_groups, like adding debug_inparm back in? And I'm wondering if papi_inparm and prof_inparm should either be added back here or removed from the namelist_definition?? It seems confusing to me to have buildnml be inconsistent with the namelist_definition: this seems prone to confusing someone later. But I'm not sure I'm following this conversation correctly, so am happy to be corrected on this.
| <values> | ||
| <value>rpointer.cpl.${RUN_STARTDATE}-${RUN_REFTOD}</value> | ||
| </values> |
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.
This setting of the value seems redundant with the default_value above. Do you actually need both?
| <entry id="rundir" modify_via_xml="RUNDIR"> | ||
| <type>char</type> | ||
| <category>nuopc</category> | ||
| <!-- NOTE: This won't be output only used as an attribute in this file --> | ||
| <group>default_settings</group> | ||
| <values> | ||
| <value>$RUNDIR</value> | ||
| </values> | ||
| </entry> | ||
|
|
||
| <entry id="continue_run" modify_via_xml="CONTINUE_RUN"> | ||
| <type>logical</type> | ||
| <category>nuopc</category> | ||
| <!-- NOTE: This won't be output only used as an attribute in this file --> | ||
| <group>default_settings</group> | ||
| <values> | ||
| <value>$CONTINUE_RUN</value> | ||
| </values> | ||
| </entry> |
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.
Just for my own tracking of remaining to-dos... this one is still a to-do.
| <entry id="drv_restart_pointer" modify_via_xml="DRV_RESTART_POINTER"> | ||
| <type>char</type> | ||
| <category>expdef</category> | ||
| <default_value>UNSET</default_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.
This default_value seems redundant with the value settings below and can probably be removed.
Description of changes
Correct the input groups with filenames to be added to cpl.input_data_list. Add more error messaging to the log files around rpointer errors. Set the drv_restart_pointer by default to none, unless it's needed, and make it a relative path to RUNDIR so will be added to cpl.input_data_list and checked that it exists.
Specific notes
Contributors other than yourself, if any:
CMEPS Issues Fixed (include github issue #):
Fixes #524
Fixes #525
Fixes #526
Are changes expected to change answers? bfb
Any User Interface Changes (namelist or namelist defaults changes)? yes
drv_restart_pointer gets set to "none" except for cases that need it like branch
Testing performed.
currently only tested with ctsm5.3.020 which uses: ccs_config_cesm1.0.16, and cime from ESMCI/cime#4739
and for a simple case with a startup and branch type
will do more testing, and will update the PR and report about what's done.
Plan to run aux_clm testlist as well as aux_cmeps.