-
Notifications
You must be signed in to change notification settings - Fork 66
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
Ignore iternums which only have pickup files #81
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #81 +/- ##
========================================
- Coverage 91.89% 91.6% -0.3%
========================================
Files 4 4
Lines 629 631 +2
Branches 138 139 +1
========================================
Hits 578 578
- Misses 32 33 +1
- Partials 19 20 +1
Continue to review full report at Codecov.
|
Thanks so much for this contribution! I'm wondering if it would be possible to include a very short test for this in the test suite. Could you clarify how exactly "xmitgcm breaks" in this scenario? (i.e. Post the full error message and stack trace that you encounter.) Then we can figure out how to add a test for it. |
Hey Ryan, here is an example: My workflow is that after each MITgcm run segment (as much as the model can do in a 24-hour queue limit) I convert all the diagnostic .data files to NetCDF using xmitgcm, then put the original files in a special folder so they don't get processed again after the next run segment. But I don't move any pickup files, as sometimes I need them for the restart. Here's what happens if I point xmitgcm to a directory with some old permanent checkpoint files (eg pickup.0003682080.data) which don't correspond to any diagnostic files, which are starting at timestep 4075200. Here I'm using the commit from 6 April (commit f8ae6b3), before I made any changes. This is my code:
and here is the error:
Looks like what's happening in this case is that file prefixes are determined from the first iternum (which only has pickup files so they're ignored), and then the file prefixes from the diagnostic files don't match this (empty) list. |
I found that xmitgcm breaks if you point it to a directory where some iternums only have pickup files, and no matching diagnostic files at the same timestep. Here is a small patch to ignore those iternums.