Skip to content
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

Add error checking for control options that work together in the CESM coupling buildnml #424

Open
ekluzek opened this issue Aug 17, 2023 · 1 comment
Labels
cesm-coupling For cesm coupling enhancement Improving usability, performance or other types of enhancements

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Aug 17, 2023

We should add error checking for the control options that work together in the control files in the buildnml when coupled to CESM. This would be checking that options are compatible with each other.

So for example I brought this up in this comment that lake is NOT compatible with rout_opt==0

#421 (comment)

Other options should be examined and make sure they work with each other. Options that don't flagged as not working the buildnml will die when it's tried.

This is helpful to have the model die before it's even put in the queue by making sure options are compatible. This provides the quickest information to the user that something should not be done. There might also be options that give a warning, or that you have to set a warning flag to use. Then of course all of the options that DO work together you want to work. So you need to do some testing to get this all setup correctly.

@ekluzek ekluzek added enhancement Improving usability, performance or other types of enhancements cesm-coupling For cesm coupling labels Aug 17, 2023
@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 17, 2023

I propose a way to do this would be to add a:

<ignore_warnings>      T      ! Ignore warnings for incompatible options in the control file, only die for errors

If this is set to "F" the buildnml would die with warning about the incompatibility, as well as telling the user how to set this flag so that those options can be allowed. When set to true it still sends a warning message about the issue, but allow the namelist to be built and the simulation to continue.

Doing this sort of thing is helpful to new and non-expert users to figure out what options are allowed, while also allowing experts to work on options that they want to eventually get working. Then there are some things that are just a contradiction and should never be done. So it helps all users. This can also be used if an option won't make a difference in a simulation -- it'll let you know that option isn't connected and won't affect simulations. This prevents the user from running long simulations only to realize something wasn't working or didn't make a difference.

This is roughly how we have it setup in CTSM. Incompatible options will die, while others die and send the following message:

-- Add -ignore_warnings option to CLM_BLDNML_OPTS to ignore this warning

This turns off all warnings, but it still prints a message about them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cesm-coupling For cesm coupling enhancement Improving usability, performance or other types of enhancements
Projects
None yet
Development

No branches or pull requests

1 participant