eoio.readers.sentinel2.aux_vars.meteo module

Contents

eoio.readers.sentinel2.aux_vars.meteo module#

eoio.readers.sentinel2.aux_vars.meteo - meteo data reading functions

eoio.readers.sentinel2.aux_vars.meteo.add_meteo(*, ds: Dataset, var_names: list[str], layout: S2Layout, config: Any) → Dataset[source]#

Add requested meteorological / atmospheric auxiliary variables from Sentinel-2 AUX_DATA GRIB products (ECMWF/CAMS) into ds (no regridding performed).

Parameters:
  • ds – Input xarray Dataset to which auxiliary variables will be added. This dataset is not modified in-place; a new dataset is returned.

  • var_names – List of auxiliary variable names to extract and attach. These must correspond to variables available in the Sentinel-2 ECMWF or CAMS auxiliary GRIB products (e.g. tcwv, tco3, msl, u10, v10, r).

  • layout – S2Layout instance describing the Sentinel-2 SAFE product layout. Used to locate the granule directory and associated AUX_DATA products.

  • config – Reader or processor configuration object. Currently unused, but included for API consistency and future extensibility.

Returns:

A new xarray Dataset containing the original data and any of the requested auxiliary variables that could be read. If the ECMWF or CAMS GRIB product fails to open (missing/corrupt file, unsupported GRIB message, etc.), that source is skipped with a warning rather than raising – variables that depend on it are simply left out of the returned dataset, but variables from the other source (and the original ds) are unaffected.