User configurability of switches in CMake#12
Draft
anton-seaice wants to merge 6 commits intodev/2025.08from
Draft
User configurability of switches in CMake#12anton-seaice wants to merge 6 commits intodev/2025.08from
anton-seaice wants to merge 6 commits intodev/2025.08from
Conversation
anton-seaice
commented
Feb 4, 2026
| #prefix; default value | ||
| "PR;PR1" # Propogation scheme | ||
| "FLX;FLX4" # Flux computation | ||
| "LN;LN1" # Linear Input |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| "LN;LN1" # Linear Input | |
| "LN|SEED;LN1" # Linear Input |
(or however it works in regex)
Selection of linear input:
ln0 No linear input.
seed Spectral seeding of Eq. (3.70).
ln1 Cavaleri and Malanotte-Rizzoli with filter.
lnx Experimental (user supplied).
anton-seaice
commented
Feb 4, 2026
| endforeach() | ||
|
|
||
| # Infrastructure switches, unlikely to change | ||
| list(APPEND WW3_SWITCHES "${UserSwitches}" "CESMCOUPLED" "DIST" "MPI" "NOGRB") |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| list(APPEND WW3_SWITCHES "${UserSwitches}" "CESMCOUPLED" "DIST" "MPI" "NOGRB") | |
| list(APPEND WW3_SWITCHES "CESMCOUPLED" "DIST" "MPI" "NOGRB") |
Collaborator
Author
|
The mixture of some hard coded and some configurable switches is potentially confusing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11
This is a draft of allowing users to set the configuration switches through spack.
No defaults are changed,
So, for example, if a user sets IC3 then IC3 is used, otherwise, CMake will apply the current setting (IC4).
There would be a spack variant "switches", which is a string of switches the user would like to set. Defaults are applied for all switch terms which are not provided.
e.g.
I might set switches="IC4", which then it passed through to CMake and use, but no other switches are changed.
Does this look useful @ezhilsabareesh8 ? Does it make sense for the Output swtiches or some other switches to also be configurable ?
@dougiesquire FYI / for a pre-review