RRFS π ±#
BETA
The Rapid Refresh Forecast System (RRFS) is undergoing rapid development. There are some prototype products and forecasts available on the cloud on AWS. Some files have an index file, others do not.
[1]:
from herbie import Herbie
from herbie.toolbox import EasyMap, pc
from herbie import paint
import matplotlib.pyplot as plt
[2]:
H = Herbie(
"2024-06-22 12:00",
model="rrfs",
fxx=1,
member="control",
domain="conus",
# product="testbed",
)
β
Found β model=rrfs β product=prslev β 2024-Jun-22 12:00 UTC F01 β GRIB2 @ aws β IDX @ aws
[3]:
H.help()
ββ Herbie ββββββββββββββββββββββββββββββββ
β Help for model='rrfs'
β
β Rapid Refresh Forecast System (RRFS) Ensemble
β aws product description: https://registry.opendata.aws/noaa-rrfs/
β
β Herbie(date, model='rrfs', ...)
β
β fxx : int
β product : {"prs", "nat", "testbed", "ififip"}
β member : {"control", int}
β domain : {"conus", "alaska", "hawaii", "puerto rico", None}
β
β If product="natlev', then domain must be None
β
β°βββββββββββββββββββββββββββββββββββββββββ
[4]:
H.SOURCES
[4]:
{'aws': 'https://noaa-rrfs-pds.s3.amazonaws.com/rrfs_a/rrfs_a.20240622/12/control/rrfs.t12z.prslev.f001.conus.grib2'}
[5]:
H.PRODUCTS
[5]:
{'prslev': '', 'natlev': '', 'testbed': '', 'ififip': ''}
[6]:
ds = H.xarray("TMP:2 m above ground")
ds
[6]:
<xarray.Dataset> Size: 38MB
Dimensions: (y: 1059, x: 1799)
Coordinates:
time datetime64[ns] 8B 2024-06-22T12:00:00
step timedelta64[ns] 8B 01:00:00
heightAboveGround float64 8B 2.0
latitude (y, x) float64 15MB 21.14 21.15 21.15 ... 47.85 47.84
longitude (y, x) float64 15MB 237.3 237.3 237.3 ... 299.0 299.1
valid_time datetime64[ns] 8B 2024-06-22T13:00:00
gribfile_projection object 8B None
Dimensions without coordinates: y, x
Data variables:
t2m (y, x) float32 8MB 293.4 293.3 293.3 ... 284.6 284.5
Attributes:
GRIB_edition: 2
GRIB_centre: kwbc
GRIB_centreDescription: US National Weather Service - NCEP
GRIB_subCentre: 0
Conventions: CF-1.7
institution: US National Weather Service - NCEP
model: rrfs
product: prslev
description: Rapid Refresh Forecast System (RRFS) Ensemble
remote_grib: https://noaa-rrfs-pds.s3.amazonaws.com/rrfs_a/rr...
local_grib: /home/blaylock/data/rrfs/20240622/control/subset...
search: TMP:2 m above ground[7]:
ax = EasyMap("50m", crs=ds.herbie.crs, figsize=[10, 8]).STATES().ax
p = ax.pcolormesh(
ds.longitude,
ds.latitude,
ds.t2m - 273.15,
transform=pc,
**paint.NWSTemperature.kwargs2,
)
plt.colorbar(
p, ax=ax, orientation="horizontal", pad=0.05, **paint.NWSTemperature.cbar_kwargs2
)
ax.set_title(
f"{ds.t2m.GRIB_name}\n{ds.time.dt.strftime('%H:%M UTC %d %b %Y').item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}",
loc="right",
)
ax.set_title(
f"{H.model.upper()}: member={H.member} {H.product_description}", loc="left"
)
[7]:
Text(0.0, 1.0, 'RRFS: member=control ')
Other products#
Reading natlev data into xarray causes my kernel to crash
[8]:
H = Herbie("2024-06-22", model="rrfs", product="natlev", member="control", domain=None)
H
β
Found β model=rrfs β product=natlev β 2024-Jun-22 00:00 UTC F00 β GRIB2 @ aws β IDX @ aws
[8]:
ββHerbie RRFS model natlev product initialized 2024-Jun-22 00:00 UTC F00 β source=aws
[9]:
H.inventory("TMP:5 hybrid")
[9]:
| grib_message | start_byte | end_byte | range | reference_time | valid_time | variable | level | forecast_time | ? | ?? | search_this | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 91 | 92 | 467606623 | 478003639.0 | 467606623-478003639 | 2024-06-22 | 2024-06-22 | TMP | 5 hybrid level | anl | NaN | NaN | :TMP:5 hybrid level:anl:nan |
[10]:
H.download("TMP:5 hybrid")
[10]:
PosixPath('/home/blaylock/data/rrfs/20240622/control/subset_6defb585__rrfs.t00z.natlev.f000.grib2')
[11]:
ds = H.xarray("TMP:5 hybrid")
ds
/home/blaylock/GITHUB/Herbie/herbie/core.py:1097: UserWarning: Will not remove GRIB file because it previously existed.
warnings.warn("Will not remove GRIB file because it previously existed.")
[11]:
<xarray.Dataset> Size: 289MB
Dimensions: (y: 2961, x: 4881)
Coordinates:
time datetime64[ns] 8B 2024-06-22
step timedelta64[ns] 8B 00:00:00
hybrid float64 8B 5.0
latitude (y, x) float64 116MB ...
longitude (y, x) float64 116MB ...
valid_time datetime64[ns] 8B ...
gribfile_projection object 8B None
Dimensions without coordinates: y, x
Data variables:
t (y, x) float32 58MB ...
Attributes:
GRIB_edition: 2
GRIB_centre: kwbc
GRIB_centreDescription: US National Weather Service - NCEP
GRIB_subCentre: 0
Conventions: CF-1.7
institution: US National Weather Service - NCEP
model: rrfs
product: natlev
description: Rapid Refresh Forecast System (RRFS) Ensemble
remote_grib: https://noaa-rrfs-pds.s3.amazonaws.com/rrfs_a/rr...
local_grib: /home/blaylock/data/rrfs/20240622/control/subset...
search: TMP:5 hybrid
The Kernel crashed while executing code in the current cell or a previous cell.
Please review the code in the cell(s) to identify a possible cause of the failure.
Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info.
View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details.
[12]:
ds.t.plot()
[12]:
<matplotlib.collections.QuadMesh at 0x7feb3dbfe510>
[ ]:
ax = EasyMap("50m", crs=ds.herbie.crs, figsize=[10, 8]).STATES().ax
p = ax.pcolormesh(
ds.longitude,
ds.latitude,
ds.t - 273.15,
transform=pc,
**paint.NWSTemperature.kwargs2,
)
plt.colorbar(
p, ax=ax, orientation="horizontal", pad=0.05, **paint.NWSTemperature.cbar_kwargs2
)
ax.set_title(
f"{ds.t.GRIB_name}\n{ds.time.dt.strftime('%H:%M UTC %d %b %Y').item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}",
loc="right",
)
ax.set_title(
f"{H.model.upper()}: member={H.member} {H.product_description}", loc="left"
)
The Kernel crashed while executing code in the current cell or a previous cell.
Please review the code in the cell(s) to identify a possible cause of the failure.
Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info.
View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details.