Repository navigation
Open
3 / 43 of 4 issues completedOpen
3 / 43 of 4 issues completed
Copy link
Labels
b4bbit-for-bitbit-for-bitcode healthimproving internal code structure to make easier to maintain (sustainability)improving internal code structure to make easier to maintain (sustainability)enhancementnew capability or improved behavior of existing capabilitynew capability or improved behavior of existing capabilitypriority: highHigh priority to fix/merge soon, e.g., because it is a problem in important configurationsHigh priority to fix/merge soon, e.g., because it is a problem in important configurations
Milestone
Description
In working on #2008 I'm finding that the logic to fine the finidat file is: complex, hard to understand, fragile, and will require a bunch of duplication. This is another reason for doing #585 which is the long term solution. Although there we should make sure the redesign in python has a better method of getting the finidat files.
This is similar to #549, but slightly different and focussed on just the namelist logic and the namelist default settings for: use_init_interp and init_interp_attributes. This is also related to #2149, as we need to have duplicated lnd_tuning_mode options for all the different clm physics options, as well as the cam options. Right now this is going to require a bunch of duplication.
Definition of Done:
- Improve the error message so it at least gives you a clue on what's wrong...
- Add testing for finidat files to the build-namelist unit tester
- Add a python tester to validate that the namelist_defaults files synchronize: init_interp_sim_years, use_init_interp, init_interp_attributes, and finidat
- Fix case of finidat files with do_transient_pfts=.true. (example 1979 or 2000 files) so that use_init_interp doesn't need to be true
- Reduce the required attributes to specify each file (see below)
- Implement a better solution inside of the current buildnml or build-namelist?
- Long term: Reimplement build-namelist as in Move CLMBuildNamelist.pm perl code into the python buildnml #585
Metadata
Metadata
Assignees
Labels
b4bbit-for-bitbit-for-bitcode healthimproving internal code structure to make easier to maintain (sustainability)improving internal code structure to make easier to maintain (sustainability)enhancementnew capability or improved behavior of existing capabilitynew capability or improved behavior of existing capabilitypriority: highHigh priority to fix/merge soon, e.g., because it is a problem in important configurationsHigh priority to fix/merge soon, e.g., because it is a problem in important configurations
Type
Projects
- StatusShow more project fieldsTodo
Activity
ekluzek commentedon Sep 22, 2023
What the error looks like when it happens is this:
Which just isn't helpful enough.
ekluzek commentedon Sep 22, 2023
The other error that can happen is:
use_init_interp is set BUT finidat is NOT, need to set bothwhich can happen because the user explicitly set use_init_interp and didn't set finidat on their own. Or it can happen because the default settings aren't setup correctly. This should be improved as well.
ekluzek commentedon May 11, 2024
Working on this now as part of #2501 I see some improvements that could be made:
This would reduce the number of attributes needed to specify a finidat file from 15 to 9.
Another part is to remove the duplication of the filenames in the XML and make sure that it's only the init_interp_attributes that are duplicated. In general removing duplication in the XML is a good goal and especially in duplicating the full path name to the files.
ekluzek commentedon Oct 11, 2024
Adding to this: https://github.com/ESCOMP/CTSM/pull/2821/files#r1797496942
so that 1979 and 2000 finidat files will work with do_transient_pfts=.true.
ekluzek commentedon Mar 23, 2026
One thing that's problematic with the current setup is that the following variables need to be handled together and synchronized appropriately:
A better way to handle this might be to do some checking of the namelist_default file to make sure it's constructed correctly keeping them all in sync.
Also in many cases the above items are copied and don't need to be. Also it can be constructed so that finidat files are NOT copied, and only init_interp_attributes and use_init_interp need to be copied for some cases. So that's another thing that could be checked for.
A checking script for this purpose could be implemented in python, which would make it more likely to be useful when we do move away from perl for build-namelist. It could also be run as a github action, which would catch these issues as they come in with each PR.
This helps with ESCOMP#3832 and ESCOMP#2169 by making sure more setti…
Add a subroutine setup_preliminary_use_init_interp called in the setu…
ekluzek commentedon Nov 3, 2026
#4252 is another example of a PR that was much more difficult both to create and review because of this problem.