Bugfix for NOAA Grib Data: Convert to DataArray before merging data from two files#146
Open
timothyas wants to merge 3 commits intoNOAA-PSL:mainfrom
Open
Bugfix for NOAA Grib Data: Convert to DataArray before merging data from two files#146timothyas wants to merge 3 commits intoNOAA-PSL:mainfrom
timothyas wants to merge 3 commits intoNOAA-PSL:mainfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
NOAA data for the same variable and timestamp is unfortunately spread between multiple grib files. This is especially (annoyingly) true for GFS data. ufs2arco loops through each of the file suffixes necessary for each variable, and then merges the result. However, this was being kept as a
xarray.Datasetrather than anxarray.DataArray. As a result, when the final dictionary of DataArrays (each associated with a different variable) were being transformed into a Dataset, an error would show up, saying hey we can't do this when one of your dict values is a Dataset.This PR makes that simple fix, and adds a pressure level to the GFS test so that this case gets picked up in the test suite. Note that to do this I had to take humidity out, since there are no "secondary" vertical levels for specific humidity ...