Homepage
Download location: Copernicus
Download procedure (info; YouTube video series):
Request fields, region, and timespan at download location
Download locally, or use CDSAPI, python-based approach.
Use online selection tool at download location to check variable names, as well as header info and product type for specific dataset.
Option to download GRIB file and convert to NetCDF (how to; simplest approach is using
cdo) OR download directly as netcdf (preferred)A downloadable grid file is not available for ERA5. See here for information about the grid. Code to evaluate area for a regular lat/lon grid is available in my
utilspackage here (in thegeomodule).
Notes¶
Differing timestamps across variables¶
Downloading ERA5 monthly data, heat fluxes from the ocean surface have a timestamp at 0600 whereas state variables like air and surface have a timestamp at 0000. A preprocess step using the floor category of the datetime accessor in xarray allows them to be loaded together:
import xarray as xr
basedir = '/gws/nopw/j04/co2clim/datasets/ERA5/monthly/'
filename = 'era5.1x1.monthly.*.*.nc'
def preprocess(ds):
time = ds.valid_time.dt.floor("D")
return ds.assign_coords(valid_time=time)
ds = xr.open_mfdataset(basedir+filename,preprocess=preprocess)