Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #527
This will add 2D lons and lats if you are outputting on the native tripolar grid. (assuming the lons/lats in the grid are correct, but that is another issue being worked on, they should be good for at least MOM5, MOM6 maybe not until we do a little more work). This only addresses the requests in the issue Yuri opened.
In addition it restores the functionality that you can specify the vertical metadata even if not selecting a subset of levels or vertically regridding as the old History/CFIO could do.
This is bit a of a kluge, but then the behaivor in the old CFIO layer was just as klugy.
Basically when creating the file vertical information you pass the levels. It was assuming that if you passed levels, but no vertical variable for interpolation you wanted to select levels. Of course this breaks the cases they were using in the tripolar output of passing in a file that has the level metadata.
In the old CFIO layer the Kluge was, if the values were negative the level array, don't use that as an index to do level selection.
The new kluge is this. If you just pass levels assume at first we want to select levels, that is the existing behaivour. However after we parse the bundle and if we find that the number of levels in the bundle fields matches the input level variable, don't do try to do level subsetting with the passed in level variable because why would you be trying to select levels if the number of levels passed in matches the size of the variable, makes no sense. Since at this point the levels have been written to the metadata we can obliterate them and go back to the no special vertical handling behavior and output all the levels.
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: