GEPS and REPS#

This notebook demonstrates how to access Canada’s ensemble model data with Herbie:

  • model="geps" (Global Ensemble Prediction System)

  • model="reps" (Regional Ensemble Prediction System)

These are lightweight access examples (URL discovery, source checks, and inventory).

[15]:
from herbie import Herbie
import pandas as pd

Pick a recent cycle#

GEPS and REPS are both ECCC models. We pick a recent 00/12 UTC cycle for examples.

[16]:
recent = pd.Timestamp("now", tz="UTC").floor("12h").tz_convert(None) - pd.Timedelta("12h")
recent
[16]:
Timestamp('2026-04-17 00:00:00')

GEPS example#

GEPS supports two products:

  • product="geps-prod"

  • product="geps-raw"

[17]:
H = Herbie(
    recent,
    model="geps",
    product="geps-raw",
    fxx=24,
    variable="TMP",
    level="ISBL_0850",
)
H
βœ… Found β”Š model=geps β”Š product=geps-raw β”Š 2026-Apr-17 00:00 UTC F24 β”Š GRIB2 @ local β”Š IDX @ None
[17]:
β–Œβ–ŒHerbie GEPS model geps-raw product initialized 2026-Apr-17 00:00 UTC F24 β”Š source=local
[18]:
# Candidate remote sources
H.SOURCES
[18]:
{'msc': 'https://dd.weather.gc.ca/20260417/WXO-DD/ensemble/geps/grib2/raw/00/024/CMC_geps-raw_TMP_ISBL_0850_latlon0p5x0p5_2026041700_P024_allmbrs.grib2'}
[19]:
H.PRODUCTS
[19]:
{'geps-prod': 'processed ensemble products (probabilities, means, etc.); files served from grib2/products',
 'geps-raw': 'raw ensemble member output; files served from grib2/raw'}
[20]:
# Inspect GRIB inventory (if available for the selected source)
H.xarray()
Note: Returning a list of [2] xarray.Datasets because cfgrib opened with multiple hypercubes.
/home/kps5442/mapwall_dev/herbie-dev/src/herbie/core.py:1301: UserWarning: Will not remove GRIB file because it previously existed.
  warnings.warn("Will not remove GRIB file because it previously existed.")
[20]:
[<xarray.Dataset> Size: 1MB
 Dimensions:              (latitude: 361, longitude: 720)
 Coordinates:
   * latitude             (latitude) float64 3kB -90.0 -89.5 -89.0 ... 89.5 90.0
   * longitude            (longitude) float64 6kB 0.0 0.5 1.0 ... 359.0 359.5
     number               int64 8B 0
     time                 datetime64[ns] 8B 2026-04-17
     step                 timedelta64[ns] 8B 1 days
     isobaricInhPa        float64 8B 850.0
     valid_time           datetime64[ns] 8B ...
     gribfile_projection  object 8B None
 Data variables:
     t                    (latitude, longitude) float32 1MB ...
 Attributes:
     GRIB_edition:            2
     GRIB_centre:             cwao
     GRIB_centreDescription:  Canadian Meteorological Service - Montreal
     GRIB_subCentre:          0
     Conventions:             CF-1.7
     institution:             Canadian Meteorological Service - Montreal
     model:                   geps
     product:                 geps-raw
     description:             Canada's Global Ensemble Prediction System (GEPS)
     remote_grib:             /home/meteo/kps5442/data/geps/20260417/CMC_geps-...
     local_grib:              /home/meteo/kps5442/data/geps/20260417/CMC_geps-...
     search:                  None,
 <xarray.Dataset> Size: 21MB
 Dimensions:              (number: 20, latitude: 361, longitude: 720)
 Coordinates:
   * number               (number) int64 160B 1 2 3 4 5 6 7 ... 15 16 17 18 19 20
   * latitude             (latitude) float64 3kB -90.0 -89.5 -89.0 ... 89.5 90.0
   * longitude            (longitude) float64 6kB 0.0 0.5 1.0 ... 359.0 359.5
     time                 datetime64[ns] 8B 2026-04-17
     step                 timedelta64[ns] 8B 1 days
     isobaricInhPa        float64 8B 850.0
     valid_time           datetime64[ns] 8B ...
     gribfile_projection  object 8B None
 Data variables:
     t                    (number, latitude, longitude) float32 21MB ...
 Attributes:
     GRIB_edition:            2
     GRIB_centre:             cwao
     GRIB_centreDescription:  Canadian Meteorological Service - Montreal
     GRIB_subCentre:          0
     Conventions:             CF-1.7
     institution:             Canadian Meteorological Service - Montreal
     model:                   geps
     product:                 geps-raw
     description:             Canada's Global Ensemble Prediction System (GEPS)
     remote_grib:             /home/meteo/kps5442/data/geps/20260417/CMC_geps-...
     local_grib:              /home/meteo/kps5442/data/geps/20260417/CMC_geps-...
     search:                  None]
[21]:
# View level names
H.AVAILABLE_LEVELS
[21]:
['DBLL_100',
 'DBLY_10',
 'EATM_0',
 'ISBL_1',
 'ISBL_10',
 'ISBL_100',
 'ISBL_1000',
 'ISBL_1015',
 'ISBL_150',
 'ISBL_175',
 'ISBL_20',
 'ISBL_200',
 'ISBL_225',
 'ISBL_250',
 'ISBL_275',
 'ISBL_30',
 'ISBL_300',
 'ISBL_350',
 'ISBL_400',
 'ISBL_450',
 'ISBL_5',
 'ISBL_50',
 'ISBL_500',
 'ISBL_550',
 'ISBL_600',
 'ISBL_650',
 'ISBL_700',
 'ISBL_750',
 'ISBL_800',
 'ISBL_850',
 'ISBL_875',
 'ISBL_900',
 'ISBL_925',
 'ISBL_950',
 'ISBL_970',
 'ISBL_985',
 'ISBY_1000-500',
 'MSL_0',
 'NTAT_0',
 'PVU_1',
 'PVU_1.5',
 'PVU_2',
 'SFC_0',
 'TGL_10',
 'TGL_120',
 'TGL_2',
 'TGL_40',
 'TGL_80']
[22]:
# View variable names
H.AVAILABLE_VARIABLES
[22]:
['ABSV',
 'ACPCP',
 'ALERT',
 'APCP',
 'CAPE',
 'CIN',
 'CWAT',
 'DEPR',
 'DLWRF',
 'DPT',
 'DSWRF',
 'GUST',
 'HEATX',
 'HGT',
 'HPBL',
 'KX',
 'LHTFL',
 'MU-VT-LI',
 'NLWRS',
 'NSWRS',
 'PRATE',
 'PRES',
 'PRMSL',
 'PTYPE',
 'RH',
 'SHWINX',
 'SKINT',
 'SNOD',
 'SPFH',
 'TCDC',
 'TMAX',
 'TMIN',
 'TMP',
 'UGRD',
 'ULWRF',
 'VGRD',
 'VVEL',
 'WCHIL',
 'WDIR',
 'WEAFR',
 'WEAPE',
 'WEARN',
 'WEASN',
 'WIND']

REPS example#

REPS files are organized under the 10-km product path:

  • product="10km/grib2"

[23]:
H = Herbie(
    recent,
    model="reps",
    product="10km/grib2",
    fxx=6,
    variable="ASNOW",
    level="SFC",
)
H
βœ… Found β”Š model=reps β”Š product=10km/grib2 β”Š 2026-Apr-17 00:00 UTC F06 β”Š GRIB2 @ local β”Š IDX @ None
[23]:
β–Œβ–ŒHerbie REPS model 10km/grib2 product initialized 2026-Apr-17 00:00 UTC F06 β”Š source=local
[24]:
# Candidate remote sources
H.SOURCES
[24]:
{'msc': 'https://dd.weather.gc.ca/20260417/WXO-DD/ensemble/reps/10km/grib2/00/006/20260417T00Z_MSC_REPS_ASNOW_SFC_RLatLon0.09x0.09_PT006H.grib2'}
[25]:
# The resolved remote file name from the selected model/date/fxx/variable/level
H.PRODUCTS
[25]:
{'10km/grib2': 'regional 10 km ensemble domain'}
[26]:
# Looks like you get both the ensemble members and the control run in the same file?
H.xarray()
Note: Returning a list of [2] xarray.Datasets because cfgrib opened with multiple hypercubes.
/home/kps5442/mapwall_dev/herbie-dev/src/herbie/core.py:1301: UserWarning: Will not remove GRIB file because it previously existed.
  warnings.warn("Will not remove GRIB file because it previously existed.")
[26]:
[<xarray.Dataset> Size: 17MB
 Dimensions:              (y: 960, x: 908)
 Coordinates:
     latitude             (y, x) float64 7MB ...
     longitude            (y, x) float64 7MB ...
     number               int64 8B 0
     time                 datetime64[ns] 8B 2026-04-17
     step                 timedelta64[ns] 8B 06:00:00
     surface              float64 8B 0.0
     valid_time           datetime64[ns] 8B ...
     gribfile_projection  object 8B None
 Dimensions without coordinates: y, x
 Data variables:
     tsnowp               (y, x) float32 3MB ...
 Attributes:
     GRIB_edition:            2
     GRIB_centre:             cwao
     GRIB_centreDescription:  Canadian Meteorological Service - Montreal
     GRIB_subCentre:          0
     Conventions:             CF-1.7
     institution:             Canadian Meteorological Service - Montreal
     model:                   reps
     product:                 10km/grib2
     description:             Canada's Regional Ensemble Prediction System (REPS)
     remote_grib:             /home/meteo/kps5442/data/reps/20260417/20260417T...
     local_grib:              /home/meteo/kps5442/data/reps/20260417/20260417T...
     search:                  None,
 <xarray.Dataset> Size: 84MB
 Dimensions:              (number: 20, y: 960, x: 908)
 Coordinates:
   * number               (number) int64 160B 1 2 3 4 5 6 7 ... 15 16 17 18 19 20
     latitude             (y, x) float64 7MB ...
     longitude            (y, x) float64 7MB ...
     time                 datetime64[ns] 8B 2026-04-17
     step                 timedelta64[ns] 8B 06:00:00
     surface              float64 8B 0.0
     valid_time           datetime64[ns] 8B ...
     gribfile_projection  object 8B None
 Dimensions without coordinates: y, x
 Data variables:
     tsnowp               (number, y, x) float32 70MB ...
 Attributes:
     GRIB_edition:            2
     GRIB_centre:             cwao
     GRIB_centreDescription:  Canadian Meteorological Service - Montreal
     GRIB_subCentre:          0
     Conventions:             CF-1.7
     institution:             Canadian Meteorological Service - Montreal
     model:                   reps
     product:                 10km/grib2
     description:             Canada's Regional Ensemble Prediction System (REPS)
     remote_grib:             /home/meteo/kps5442/data/reps/20260417/20260417T...
     local_grib:              /home/meteo/kps5442/data/reps/20260417/20260417T...
     search:                  None]