Weather

The vibe_core.data.weather data module defines data types related to weather information and forecasts. It provides classes for representing weather data and Global Forecast System (GFS) forecasts, making it easier to work with weather-related data in various agricultural and environmental analysis scenarios.

Hierarchy

BaseVibe
DataVibe
Raster
GfsForecast
Grib
WeatherVibe

Documentation

Weather data types and function definitions.

class vibe_core.data.weather.GfsForecast(id, time_range, geometry, assets, publish_time)

Bases: DataVibe

Represent a Global Forecast System (GFS) forecast.

publish_time: str

The publication time of the forecast in ISO format.

class vibe_core.data.weather.Grib(id, time_range, geometry, assets, bands, meta=<factory>)

Bases: Raster

Represent a Grib file.

meta: Dict[str, str]

Metadata as key-value pair. For example, lead-time.

class vibe_core.data.weather.WeatherVibe(id, time_range, geometry, assets)

Bases: DataVibe

Represent weather data.

vibe_core.data.weather.gen_forecast_time_hash_id(name, geometry, publish_time, time_range)

Generate a SHA-256 hash ID for a forecast time, based on the input parameters.

Parameters:
  • name (str) – The name of the forecast.

  • geometry (Dict[str, Any]) – The geometry associated with the forecast, as a dictionary.

  • publish_time (str | datetime) – The time when the forecast was published, as a string or a datetime object.

  • time_range (Tuple[datetime, datetime]) – The time range of the forecast, as a tuple of two datetime objects.

Returns:

The SHA-256 hash ID of the forecast time.