Skip to content

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
timothyas:bugfix/combining-noaa-grib-dataarrays
Open

Bugfix for NOAA Grib Data: Convert to DataArray before merging data from two files#146
timothyas wants to merge 3 commits intoNOAA-PSL:mainfrom
timothyas:bugfix/combining-noaa-grib-dataarrays

Conversation

@timothyas
Copy link
Member

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.Dataset rather than an xarray.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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant