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 healpix 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(datetime="2024-04-01").to_dask().pipe(egh.attach_coords)
ds
<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#

2m temperature at the BCO#

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

ds = cat.HIFS(datetime="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()
[<matplotlib.lines.Line2D at 0x7f188c2ad7f0>]
_images/7f83710b734dbb2cb46d52fdd59b6fbdef1e005c515e4b6a8d468e276b2f04a4.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 0x7f188c126fc0>
_images/024eeaa2b6eba4e42b2615ba11d3706fa5fd8a8e45b01070b1b2a9419e91ee9a.png