wavespectra.read_era5#

wavespectra.read_era5(filename_or_fileglob, chunks={}, freqs=None, dirs=None)[source]#

Read Spectra from ECMWF ERA5 netCDF format.

Args:
  • filename_or_fileglob (str, list, filelike): filename, fileglob specifying multiple files, or filelike object to read.

  • chunks (dict): chunk sizes for dimensions in dataset. By default dataset is loaded using single chunk for all dimensions (see xr.open_mfdataset documentation).

  • freqs (list): list of frequencies. By default use all 30 ERA5 frequencies.

  • dirs (list): list of directions. By default use all 24 ERA5 directions.

Returns:
  • dset (SpecDataset): spectra dataset object read from netcdf file.

Note:
  • If file is large to fit in memory, consider specifying chunks for ‘time’ and/or ‘station’ dims.