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

Sorting out check_nml_error calls #213

Merged
merged 16 commits into from
Jun 28, 2021
Merged

Sorting out check_nml_error calls #213

merged 16 commits into from
Jun 28, 2021

Conversation

sit23
Copy link
Contributor

@sit23 sit23 commented Jun 25, 2021

Many of the fortran modules in Isca rely on reading namelists to set their parameters. The FMS upon which Isca is built has a built-in-method (check_nml_error) to make sure that the namelists are read in properly. This is to prevent problems such as when a namelist parameter is put in the namelist for a module that doesn't exist in that module. When this happens and check_nml_error is not called, the reading of the namelist for that module fails, but the user is given no warning. The module in question then runs with its default values for all namelist parameters. This is clearly a bad thing, as you want to know when the namelist is not being read. On the other hand, when check_nml_error is run and it finds a problem as just descried, the model throws a fatal error.

As described in issue #48, not all of Isca's modules do this error checking. This P/R aims to add namelist error checking to all remaining fortran files that include namelists. I first wrote a python script to find all of Isca's fortran files, and then find those that do error checking, and those that do not. I then manually went through and added the checks to all the modules it brought up. This should mean that namelist error checking is done my every module that requires it.

The trip tests have been performed for these files, and they pass:

Results for all of the test cases ran comparing 2b603fa and 3b170ce are as follows...
axisymmetric : pass
bucket_model : pass
frierson : pass
giant_planet : pass
held_suarez : pass
MiMA : pass
realistic_continents_fixed_sst : pass
realistic_continents_variable_qflux : pass
socrates_aquaplanet : pass
top_down_test : pass
variable_co2_grey : pass
variable_co2_rrtm : pass
ape_aquaplanet : pass
Congratulations, all tests have passed

@sit23 sit23 added io Input/output (including fieldnames) priority:high High-priority task trip tests passing priority:medium Medium-piority task and removed priority:high High-priority task labels Jun 25, 2021
@sit23 sit23 linked an issue Jun 25, 2021 that may be closed by this pull request
@sit23 sit23 requested a review from penmaher June 25, 2021 17:11
Copy link
Contributor

@penmaher penmaher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Stephen. No changes requested from me. Clear PR purpose, the changes are helpful, changes are straightforward and pass the trip tests. All good to merge in.

@sit23
Copy link
Contributor Author

sit23 commented Jun 28, 2021

Thanks @penmaher. Merging now...

@sit23 sit23 merged commit d18aaa5 into ExeClim:master Jun 28, 2021
@sit23 sit23 deleted the check_nml branch June 28, 2021 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io Input/output (including fieldnames) priority:medium Medium-piority task trip tests passing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error checking of namelists
2 participants