API
Types
AbstractDataset
AbstractDataset
No documentation found for public binding RapidRefreshData.AbstractDataset.
Summary
abstract type RapidRefreshData.AbstractDataset
Subtypes
RapidRefreshData.GFSDataset
RapidRefreshData.HRRRDataset
RapidRefreshData.RAPDataset
Band
Band
BandInformation about a GRIB2 band/variable from an index file.
Fields
line_number::Int: Line number in GRIB2 filebyte_offset::Int: Starting byte positiondate::String: Date string (format: d=YYYYMMDDHH)variable::String: Variable name (e.g., “TMP”, “UGRD”, “VGRD”)level::String: Level description (e.g., “10 m above ground”, “surface”)forecast_type::String: Forecast type (e.g., “anl”, “0-1 hour”)
GFSDataset
GFSDataset
GFSDataset(; date, cycle, resolution, product, forecast)NOAA Global Forecast System (GFS) dataset descriptor.
Fields
date::Date: Forecast initialization date (default: today)cycle::String: Model run time - “00”, “06”, “12”, or “18” (default: “00”)resolution::String: Grid resolution - “0p25” (0.25°), “0p50” (0.50°), or “1p00” (1.00°) (default: “0p25”)product::String: Product type - “atmos” or “wave” (default: “atmos”)forecast::String: Forecast hour - “f000” to “f384” (default: “f000”)
HRRRDataset
HRRRDataset
HRRRDataset(; date, cycle, region, product, forecast)NOAA High-Resolution Rapid Refresh (HRRR) dataset descriptor.
Fields
date::Date: Forecast initialization date (default: today)cycle::String: Model run hour - “00” to “23” (default: “00”)region::String: Geographic region - “conus” (Continental US) or “alaska” (default: “conus”)product::String: Product type - “wrfsfc” (surface), “wrfprs” (pressure), “wrfnat” (native), or “wrfsub” (subhourly) (default: “wrfsfc”)forecast::String: Forecast hour - “f00” to “f48” (default: “f00”)
RAPDataset
RAPDataset
RAPDataset(; date, cycle, grid, product, forecast)NOAA Rapid Refresh (RAP) dataset descriptor.
Fields
date::Date: Forecast initialization date (default: today)cycle::String: Model run time - “t00z”, “t06z”, “t12z”, or “t18z” (default: “t00z”)grid::String: Grid resolution - “awp130” (~13km) or “awp252” (~32km) (default: “awp130”)product::String: Data type - “pgrb” (pressure), “sfcbf” (surface), or “isobf” (isentropic) (default: “pgrb”)forecast::String: Forecast hour - “f00” to “f18” (default: “f00”)
Functions
bands
bands
bands(dset::AbstractDataset) -> Vector{Band}Fetch and parse the index file to list all available bands/variables in the dataset.
Example
dset = HRRRDataset(date=Date(2024,1,15), cycle="12")
bands_list = bands(dset)
# Find wind variables
wind_bands = filter(b -> contains(b.variable, "GRD") && contains(b.level, "10 m"), bands_list)
clear_cache!!
clear_cache!!
No documentation found for public binding RapidRefreshData.clear_cache!!.
RapidRefreshData.clear_cache!! is a Function.
# 1 method for generic function "clear_cache!!" from RapidRefreshData:
[1] clear_cache!!()
@ ~/work/RapidRefreshData.jl/RapidRefreshData.jl/src/RapidRefreshData.jl:74
datasets
datasets
datasets(::Type{T}, start::DateTime, stop::DateTime) where {T <: AbstractDataset}Return a Vector of all datasets of type T that cover the time period from start to stop.
Each dataset represents one model cycle (initialization time). The function returns all cycles whose initialization time falls within the specified range.
Examples
using Dates
# Get all HRRR datasets for a 6-hour window (hourly cycles)
datasets(HRRRDataset, DateTime(2024,1,15,0), DateTime(2024,1,15,6))
# Get all RAP datasets for a day (6-hourly cycles)
datasets(RAPDataset, DateTime(2024,1,15), DateTime(2024,1,16))
# Get all GFS datasets for a day (6-hourly cycles)
datasets(GFSDataset, DateTime(2024,1,15), DateTime(2024,1,16))
index_url
index_url
index_url(dset::AbstractDataset) -> StringGet the URL for the GRIB2 index file (.idx) corresponding to the dataset.
list
list
No documentation found for public binding RapidRefreshData.list.
RapidRefreshData.list is a Function.
# 1 method for generic function "list" from RapidRefreshData:
[1] list(::Type{T}) where T<:RapidRefreshData.AbstractDataset
@ ~/work/RapidRefreshData.jl/RapidRefreshData.jl/src/RapidRefreshData.jl:72
local_path
local_path
local_path(dset::AbstractDataset) -> StringGenerate local cache path for the dataset based on its parameters.
metadata
metadata
metadata() -> NamedTupleReturn a table of dataset types with their field options and descriptions.
Example
meta = metadata()
meta.RAPDataset # Options for RAPDataset
nextcycle
nextcycle
nextcycle(dset::RAPDataset) -> RAPDatasetReturn a new RAPDataset with the cycle incremented to the next available cycle. Cycles progress: t00z -> t06z -> t12z -> t18z -> t00z (next day).
Example
dset = RAPDataset(date=Date(2024,1,15), cycle="t12z")
next = nextcycle(dset) # Date(2024,1,15), cycle="t18z"
dset = RAPDataset(date=Date(2024,1,15), cycle="t18z")
next = nextcycle(dset) # Date(2024,1,16), cycle="t00z"nextcycle(dset::GFSDataset) -> GFSDatasetReturn a new GFSDataset with the cycle incremented to the next available cycle. Cycles progress: 00 -> 06 -> 12 -> 18 -> 00 (next day).
Example
dset = GFSDataset(date=Date(2024,1,15), cycle="12")
next = nextcycle(dset) # Date(2024,1,15), cycle="18"
dset = GFSDataset(date=Date(2024,1,15), cycle="18")
next = nextcycle(dset) # Date(2024,1,16), cycle="00"nextcycle(dset::HRRRDataset) -> HRRRDatasetReturn a new HRRRDataset with the cycle incremented to the next hour. Cycles progress: 00 -> 01 -> 02 -> … -> 23 -> 00 (next day).
Example
dset = HRRRDataset(date=Date(2024,1,15), cycle="12")
next = nextcycle(dset) # Date(2024,1,15), cycle="13"
dset = HRRRDataset(date=Date(2024,1,15), cycle="23")
next = nextcycle(dset) # Date(2024,1,16), cycle="00"
resolution_km
resolution_km
resolution_km(dset::AbstractDataset) -> Float64Return the approximate grid resolution in kilometers for the dataset.
Examples
resolution_km(RAPDataset(grid="awp130")) # 13.0
resolution_km(RAPDataset(grid="awp252")) # 32.0
resolution_km(GFSDataset(resolution="0p25")) # 28.0
resolution_km(HRRRDataset()) # 3.0
url
url
url(dset::RAPDataset) -> StringGenerate AWS S3 URL for the RAP dataset.
url(dset::GFSDataset) -> StringGenerate AWS S3 URL for the GFS dataset.
url(dset::HRRRDataset) -> StringGenerate AWS S3 URL for the HRRR dataset.