Skip to content

Commit

Permalink
apply black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk committed Jan 6, 2023
1 parent ed2fc11 commit e7eb30a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions herbie/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def wgrib2_idx(grib2filepath):
else:
raise RuntimeError("wgrib2 command was not found.")


class Herbie:
"""
Locate GRIB2 file at one of the archive sources.
Expand Down
7 changes: 5 additions & 2 deletions tests/test_hrrr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
yesterday_str = yesterday.strftime("%Y-%m-%d %H:%M")
save_dir = Path("$TMPDIR/Herbie-Tests/").expand()


def test_hrrr_aws1():
# Test HRRR with datetime.datetime date
H = Herbie(
Expand All @@ -29,16 +30,18 @@ def test_hrrr_aws1():
H.xarray("TMP:2 m", remove_grib=False)
assert H.get_localFilePath("TMP:2 m").exists()


def test_hrrr_to_netcdf():
"""Check that a xarray Dataset can be written to a NetCDF file."""
H = Herbie(
'2022-01-01 06:00',
"2022-01-01 06:00",
model="hrrr",
product="sfc",
save_dir=save_dir,
)
ds = H.xarray("TMP:2 m", remove_grib=False)
ds.to_netcdf(save_dir/"test_hrrr_to_netcdf.nc")
ds.to_netcdf(save_dir / "test_hrrr_to_netcdf.nc")


def test_hrrr_aws2():

Expand Down

0 comments on commit e7eb30a

Please sign in to comment.