Fix bug in comparebfb.csh when restart data is missing in both test and base directories#311
Conversation
apcraig
left a comment
There was a problem hiding this comment.
Interesting. I had to google nonomatch. So, with that variable set, the foreach loop is entered with no arguments and then test_data=" "? Or is the foreach loop just skipped with no error? If the former, then I think we'll get a reasonable result (missing data). If the latter, then we won't get a reasonable result as far as I can tell. So it must be doing the former?
I think this is fine. In some ways, my preference is to check whether a valid file exists and to abort if it doesn't. But this is a reasonable workaround.
We can merge the PR.
|
Sorry Tony for not responding earlier, I was on vacation last week. Before this PR, the foreach loop was simply skipped with the csh error "foreach: No match.". With my modifications the foreach loop is entered, the paths are correctly formed and "missing data" is reported as expected. Thanks for merging. |
If no restart files are present in neither
base_dirnortest_dir, the scriptcomparebfb.cshwould simply exit with the errorwith error code 1 (csh default I guess) and so the script
cice.testwould reportwhich is incorrect. I just added
set nonomatchbefore the foreach so that if no restart files are present the script does not error but correctly reports :Developer(s): Philippe Blain
Please suggest code Pull Request reviewers in the column at right. @apcraig
Are the code changes bit for bit, different at roundoff level, or more substantial? BFB
Please include the link to test results or paste the summary block from the bottom of the testing output below.
No tests
Does this PR create or have dependencies on Icepack or any other models?
No
Is the documentation being updated with this PR? (Y/N) No
If not, does the documentation need to be updated separately at a later time? (Y/N) No
Note: "Documentation" includes information on the wiki and .rst files in doc/source/,
which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.
I stumbled upon that bug because I was running the model for just 3 time steps with a custom test suite and had forgotten to set the
dump_lastnamelist variable to true, which caused no restart files to be written since I was running for less than a day.