From 20d072bcbfe151cf1ec04abded7e2c646ed829da Mon Sep 17 00:00:00 2001 From: Coat Date: Thu, 18 Jul 2024 10:59:14 +0200 Subject: [PATCH 1/4] fix ftpprd path --- herbie/models/gfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/herbie/models/gfs.py b/herbie/models/gfs.py index 0c448ddd..001cfeff 100644 --- a/herbie/models/gfs.py +++ b/herbie/models/gfs.py @@ -89,7 +89,7 @@ def template(self): } self.SOURCES = { "aws": f"https://noaa-gfs-bdp-pds.s3.amazonaws.com/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", - "ftpprd": f"https://ftpprd.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.{self.date:%Y%m%d/%H}/wave/gridder/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + "ftpprd": f"https://ftpprd.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", "nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", "google": f"https://storage.googleapis.com/global-forecast-system/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", "azure": f"https://noaahrrr.blob.core.windows.net/gfs/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", From d2db3f195402aebb37736bba2b1726bd4a761759 Mon Sep 17 00:00:00 2001 From: Coat Date: Thu, 18 Jul 2024 11:00:09 +0200 Subject: [PATCH 2/4] add gdas_wave --- herbie/models/gfs.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/herbie/models/gfs.py b/herbie/models/gfs.py index 001cfeff..710f6614 100644 --- a/herbie/models/gfs.py +++ b/herbie/models/gfs.py @@ -71,7 +71,6 @@ def template(self): self.IDX_SUFFIX = [".idx"] self.LOCALFILE = f"{self.get_remoteFileName}" - class gfs_wave: def template(self): self.DESCRIPTION = "Global Forecast System - Wave Products" @@ -95,3 +94,27 @@ def template(self): "azure": f"https://noaahrrr.blob.core.windows.net/gfs/gfs.{self.date:%Y%m%d/%H}/wave/gridded/gfswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", } self.LOCALFILE = f"{self.get_remoteFileName}" + +class gdas_wave: + def template(self): + self.DESCRIPTION = "Global Data Assimilation System - Wave Products" + self.DETAILS = { + "nomads product description": "https://www.nco.ncep.noaa.gov/pmb/products/gfs/#GFSwave", + } + self.PRODUCTS = { + "arctic.9km": "Arctic; 9-km resolution", + "atlocn.0p16": "North Atlantic 0.16 deg resolution", + "epacif.0p16": "Eastern Pacific; .16 deg resolution", + "global.0p16": "Global; 0.16 deg resolution", + "global.0p25": "Global; 0.25 deg resolution", + "gsouth.0p25": "Global South; 0.25 deg resolution", + "wcoast.0p16": "West Coast; 0.16 deg resolution", + } + self.SOURCES = { + "aws": f"https://noaa-gfs-bdp-pds.s3.amazonaws.com/gdas.{self.date:%Y%m%d/%H}/wave/gridded/gdaswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + "ftpprd": f"https://ftpprd.ncep.noaa.gov/data/nccf/com/gfs/prod/gdas.{self.date:%Y%m%d/%H}/wave/gridded/gdaswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + "nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gdas.{self.date:%Y%m%d/%H}/wave/gridded/gdaswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + "google": f"https://storage.googleapis.com/global-forecast-system/gdas.{self.date:%Y%m%d/%H}/wave/gridded/gdaswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + "azure": f"https://noaahrrr.blob.core.windows.net/gfs/gdas.{self.date:%Y%m%d/%H}/wave/gridded/gdaswave.t{self.date:%H}z.{self.product}.f{self.fxx:03d}.grib2", + } + self.LOCALFILE = f"{self.get_remoteFileName}" From fdd89d888df16aa3e7d77df25e87276f9f390eae Mon Sep 17 00:00:00 2001 From: Alain Coat <97431609+alcoat@users.noreply.github.com> Date: Mon, 22 Jul 2024 01:08:32 +0200 Subject: [PATCH 3/4] Update test_latest.py --- tests/test_latest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_latest.py b/tests/test_latest.py index f160e000..80509f03 100644 --- a/tests/test_latest.py +++ b/tests/test_latest.py @@ -6,6 +6,6 @@ def test_HerbieWait(): - run = pd.Timestamp("now", tz="utc").replace(tzinfo=None).floor("1h") + run = pd.Timestamp("now", tz="utc").replace(tzinfo=None).ceil("1h") with pytest.raises(TimeoutError): H = HerbieWait(run, model="hrrr", wait_for="5s", check_interval="1s", fxx=0) From 372b7b5d5f412761c7a6642e3e0f9e736af2a90a Mon Sep 17 00:00:00 2001 From: Alain Coat <97431609+alcoat@users.noreply.github.com> Date: Mon, 22 Jul 2024 01:12:30 +0200 Subject: [PATCH 4/4] Update test_latest.py --- tests/test_latest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_latest.py b/tests/test_latest.py index 80509f03..f160e000 100644 --- a/tests/test_latest.py +++ b/tests/test_latest.py @@ -6,6 +6,6 @@ def test_HerbieWait(): - run = pd.Timestamp("now", tz="utc").replace(tzinfo=None).ceil("1h") + run = pd.Timestamp("now", tz="utc").replace(tzinfo=None).floor("1h") with pytest.raises(TimeoutError): H = HerbieWait(run, model="hrrr", wait_for="5s", check_interval="1s", fxx=0)