Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/integration/gfs.anemoi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ source:
- t2m
- t
- gh
- q
- prmsl

levels:
- 100
- 500
- 1000
- 875

slices:
sel:
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/gfs.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ source:
- t2m
- t
- gh
- q
- prmsl

levels:
- 100
- 500
- 1000
- 875

slices:
sel:
Expand Down
7 changes: 4 additions & 3 deletions ufs2arco/sources/noaa_grib_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,13 @@ def open_sample_dataset(
)
except:
thisvar = None
dslist.append(thisvar)
dslist = [xds for xds in dslist if xds is not None]

if thisvar is not None:
dslist.append(thisvar)
if len(dslist) == 1:
dsdict[varname] = dslist[0]
elif len(dslist) > 1:
dsdict[varname] = xr.merge(dslist)
dsdict[varname] = xr.merge(dslist)[varname]
else:
logger.warning(
f"{self.name}: Could not find {varname}, will stop reading variables for this sample\n\t" +
Expand Down
Loading