pycequeau.meteo.meteo_netcdf module

class pycequeau.meteo.meteo_netcdf.NetCDFGridConfig(time_name: str = 'time', lat_name: str = 'lat', lon_name: str = 'lon', ce_index_offset: int = 10)[source]

Bases: object

Configuration for the NetCDF-to-CEQUEAU workflow.

ce_index_offset: int = 10
lat_name: str = 'lat'
lon_name: str = 'lon'
time_name: str = 'time'
class pycequeau.meteo.meteo_netcdf.NetCDFMeteo(basin_struct: Basin, ds: Dataset, config: NetCDFGridConfig | None = None, schema: MeteoSchema | None = None)[source]

Bases: Meteo

Meteorological workflow for gridded NetCDF datasets.

classmethod from_dataset(basin_struct: Basin, ds: Dataset, config: NetCDFGridConfig | None = None, schema: MeteoSchema | None = None) NetCDFMeteo[source]

Build a NetCDFMeteo instance from an in-memory dataset.

interpolation(method: str = 'nearest', name_meteo_grid_file: str = 'meteo_grid_points.shp') Dataset[source]

Interpolate the input dataset over the CE grid.

classmethod load_from_netcdf(basin_struct: Basin, vars_path: str, config: NetCDFGridConfig | None = None, schema: MeteoSchema | None = None) NetCDFMeteo[source]

Load prepared meteorological NetCDF files from a folder.

classmethod load_netcdf_dataset(vars_path: str, *, schema: MeteoSchema | None = None, export_names: bool = True) Dataset[source]

Load and merge all supported NetCDF meteorological files in a folder.

classmethod prepare_dataset(ds: Dataset, *, schema: MeteoSchema | None = None, file_label: str | None = None, export_names: bool = False) Dataset[source]

Normalize a meteorological dataset to the internal NetCDFMeteo contract.

stations_table(name_meteo_grid_file: str = 'meteo_grid_points.shp', export: bool = True) DataFrame[source]

Build the station table used for raster interpolation.

to_cequeau_grid(ds: Dataset | None = None) Dataset[source]

Export an interpolated dataset to the CEQUEAU meteorological layout.