IFS forecasts#

The ECMWF kindly provides their IFS forecast data on a public server. We have started to automatically download the individual GRIB data, create a unified dataset, and remap it onto the HEALPix grid. This dataset, which we call HIFS, is accessible through the internal TCO catalog and can be read and used by everyone. HIFS provides data at different initial dates (twice a day) starting in February 2024. This notebook shows the access to the data and some basic usage examples.

Tip

The access and usage of the data is the same as for HERA5, which you might want to check out too.

Loading the data from the catalog#

First, let’s import all packages that are required to run the full notebook.

import intake
import healpy as hp
import cmocean
import numpy as np
import xarray as xr

import cartopy.crs as ccrs
import cartopy.feature as cf
import matplotlib.pyplot as plt

import easygems.healpix as egh

Now we can open the catalog and select the HEALPix-ified IFS forecast HIFS.

cat = intake.open_catalog("https://tcodata.mpimet.mpg.de/internal.yaml")
ds = cat.HIFS(refdate="2024-04-01").to_dask().pipe(egh.attach_coords)
ds
/usr/share/miniconda3/envs/orcestra_book/lib/python3.12/site-packages/intake_xarray/base.py:21: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  'dims': dict(self._ds.dims),
<xarray.Dataset> Size: 7GB
Dimensions:  (time: 64, cell: 196608, level: 13)
Coordinates:
  * level    (level) int64 104B 50 100 150 200 250 300 ... 600 700 850 925 1000
  * time     (time) datetime64[ns] 512B 2024-04-01T03:00:00 ... 2024-04-11
    crs      int64 8B 0
    lat      (cell) float64 2MB 0.2984 0.5968 0.5968 ... -0.5968 -0.5968 -0.2984
    lon      (cell) float64 2MB 45.0 45.35 44.65 45.0 ... 315.4 314.6 315.0
Dimensions without coordinates: cell
Data variables: (12/39)
    100u     (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    100v     (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    10u      (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    10v      (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    2d       (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    2t       (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    ...       ...
    tp       (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    ttr      (time, cell) float32 50MB dask.array<chunksize=(6, 16384), meta=np.ndarray>
    u        (time, level, cell) float32 654MB dask.array<chunksize=(6, 1, 16384), meta=np.ndarray>
    v        (time, level, cell) float32 654MB dask.array<chunksize=(6, 1, 16384), meta=np.ndarray>
    vo       (time, level, cell) float32 654MB dask.array<chunksize=(6, 1, 16384), meta=np.ndarray>
    w        (time, level, cell) float32 654MB dask.array<chunksize=(6, 1, 16384), meta=np.ndarray>

Plotting examples#

The below plotting examples show some typical usecases and the respective healpy functions that are frequently used in the analysis.

2m temperature at the BCO#

We would like to plot the 2m air temperature at one location, the BCO.

ds = cat.HIFS(refdate="2024-04-01").to_dask().pipe(egh.attach_coords)

i_bco = hp.ang2pix(
    egh.get_nside(ds),
    -59.42875, # longitude at BCO
    13.16264, # latitude at BCO
    nest=egh.get_nest(ds),
    lonlat=True,
)

ds["2t"].sel(cell=i_bco).plot()
/usr/share/miniconda3/envs/orcestra_book/lib/python3.12/site-packages/intake_xarray/base.py:21: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  'dims': dict(self._ds.dims),
[<matplotlib.lines.Line2D at 0x7f7abc06ba40>]
_images/a6e40eaa745458e8b2284918e829b2e2b4a31de26e7a0a25c7ee4b8d14b51643.png

Select ORCESTRA region#

Plotting the forecasted total column water vapor and precipitation contours over the campaign domain.

fig, ax = plt.subplots(figsize=(10, 6), subplot_kw={"projection": ccrs.PlateCarree()})
ax.set_extent([-65, -5, -10, 25])
ax.coastlines(lw=0.8)
egh.healpix_show(
    ds["tcwv"].sel(time="2024-04-05 12:00"),
    method="linear",
    cmap="cmo.dense",
    vmin=25,
    vmax=65,
)

egh.healpix_contour(
    ds["tp"].sel(time="2024-04-05 12:00"),
    method="linear",
    cmap="cmo.rain",
    vmin=0.,
    vmax=0.15,
    levels=5,
)
<cartopy.mpl.contour.GeoContourSet at 0x7f7abc4ce6c0>
/usr/share/miniconda3/envs/orcestra_book/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_physical/ne_50m_coastline.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
_images/84f9c5bcda4a704291458ddae2c08c308cc22f5b84ab54a7e7fa97f77354f1cd.png