-
Notifications
You must be signed in to change notification settings - Fork 19
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
Improve missing file error handling for untemplated filenames #1377
Improve missing file error handling for untemplated filenames #1377
Conversation
@lizziel I would do this check here in the block of code at line 2084:
If the file template has no token it by definition has zero frequency, so I would just assert here after the inquire that the file was found rather than where you did it. |
@bena-nasa, if |
Actually Matt and I were looking at this and that is still the wrong place, if you look up above, this only protects if the field is 3d, 2d fields are not caught here. It actually should be here after line 1935 as if there are no tokens either the file exists or it doesn't and you can check here. Matt is testing this. so quoting line 1929 on
|
@lizziel yes, matt just confirmed my previous suggestion worked. So that is where the missing file check should go in createTimeInterval, after line 1935:
|
Yeah. I was going insane until Ben figured it out. I mean, I met all the logic (I thought) and yet the _ASSERT was never triggered. He finally realized only 3d files would ever get there. 😄 |
Great, thanks for looking at this so closely. I'll re-submit tomorrow. |
@lizziel Note that MAPL My hope is maybe you can do something simple on your side and all is well. You luckily are editing a file that I think is unaffected by our current work. (Well, the changelog will probably go conflict-nuts, but changelogs always do that.) |
4a7eb24
to
563169f
Compare
@mathomp4 Thanks for the heads up on that. I force-pushed the accepted solution, but it is still on develop as of 2/16. Let me know when things settle and I'll rebase as needed. |
@lizziel Okay. All the develop and MAPL3 stuff is done. Try updating branch or whatever your github fork says to do (not sure myself). |
563169f
to
50ea94c
Compare
All set. Not sure if how I do it is the best way, but I just locally saved the old branch with a different name, moved this branch's HEAD way back, pulled in latest develop, cherry-picked the update, then force-pushed. I'm generally wary of force pushing but for short-lived branches used only for PRs I make an exception. |
It's failing the CI during build. I'll take care of it. |
50ea94c
to
5adc011
Compare
Should be all set. Could you trigger the CI? |
@lizziel It seems to be working all fine right now. Most likely will pass! |
@lizziel Your PR found some bugs in GEOS and @bena-nasa might have a fix for your fix so that things are done more logically. We are working on a fix now. |
While looking at GEOS-ESM#1377 by @lizziel, it was found that her check was a bit too powerful for GEOS in that we have some bugs in our ExtData files. But, @bena-nasa looked at the code and found that we were doing `CreateTimeInterval` at the wrong time. Previously, we were doing it during the phase of ExtData when the *entire* `ExtData.rc` file is processed. Instead, we move the call to the loop where ExtData works on the actual Imports it will be handling.
@lizziel Okay. I have a PR into your branch here: Please test it and if it works for you, then you pull into your branch and then we get it here! |
Move call to CreateTimeInterval
Thanks to @lizziel pulling in my PR, I think this is now safe. I'll do one more GEOS run and if so, we can pull it in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This passes all my tests I think
Description
This update adds an additional case for handling files not found in ExtData. If a file is not found and its filename does not include the template token
%
then an error will be thrown without additional testing.Related Issue
geoschem/GCHP#176
Motivation and Context
This update solves the following problem reported by Sebastian Eastham (@sdeastham):
How Has This Been Tested?
Not tested.
Types of changes
Checklist: