trunx.datasets namespace

Submodules

trunx.datasets.era5_icp_weather module

Prepare monthly ERA5 weather time-series for ICP plot locations.

Unit conversions applied

  • Temperature : ERA5 t2m (K) -> °C by subtracting 273.15

  • Precipitation: ERA5 tp (m) -> mm by multiplying by 1 000

  • Solar rad. : ERA5 ssrd (J m⁻²) -> MJ m⁻² day⁻¹ by dividing by 1 000 000

trunx.datasets.era5_icp_weather.build_icp_era5_mapping(icp_locations: DataFrame, era5_locations: DataFrame) DataFrame[source]

Find the nearest ERA5 grid point for each ICP plot.

trunx.datasets.era5_icp_weather.get_plot_weather(plot_id: str, weather_df: DataFrame) tuple[list, DataFrame][source]

Extract ERA5 monthly weather for one ICP plot.

trunx.datasets.era5_icp_weather.prepare_era5_weather(output_path: str | None = None) DataFrame[source]

Build and save monthly ERA5 weather for all ICP plot locations.