wavespectra.read_era5#
- wavespectra.read_era5(filename_or_fileglob, chunks={}, f0=0.03453, df=1.1, as_site=False)[source]#
Read Spectra from ECMWF ERA5 netCDF format.
- Parameters:
filename_or_fileglob (-) – filename, fileglob specifying multiple files, or filelike object to read.
chunks (-) – chunk sizes for dimensions in dataset. By default dataset is loaded using single chunk for all dimensions (see xr.open_mfdataset documentation).
f0 (-) – First frequency value in Hz (e.g., 0.03453)
df (-) – Multiplicative increment between frequencies.
as_site (-) – If True locations are defined by 1D site dimension.
- Returns:
spectra dataset object read from netcdf file.
- Return type:
dset (SpecDataset)
Note
This reader also supports ECMWF spectra from the operational forecast.
Documentation describing how to construct the spectral grid can be found at https://www.ecmwf.int/en/forecasts/documentation-and-support/2d-wave-spectra.
If file is large to fit in memory, consider specifying chunks for ‘time’ and/or ‘latitude/longitude’ dims.