forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netCDF: Better get_file_fields; hack get_file_info
Two changes, one an iterative improvement, the other a hack to get things running. 1. The get_file_fields has been rewritten to fetch both axes and fields, and there is some minimal effort to distinguish between them when sweeping through variables. The results are then populated into the linked lists of the handle. Two caveats: - it's untested, probably not even working - we don't even use this function anymore, see change #2 2. get_file_info now just returns -1 for nvars. Why? because previously FMS would initialize its nvar to -1, and if you query a newly opened file then this is what you see. That was an indicator to "recreate" the file (actually its metadata, which pulls from existing templates and now matches the opened file). To spoof this, I just always return -1 and trigger this "recreate" effect. I can do this because the file metadata is static across runs. Not robust, but it makes sense in a perverse way... I will try to make this work honestly, so that get_file_fields will return the correct content. But for now this feels sufficient.
- Loading branch information
1 parent
fd6db59
commit 636da83
Showing
2 changed files
with
83 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters