emodpy_malaria.weather.weather_request module#
Weather service methods for submitting and working with weather data requests.
- class emodpy_malaria.weather.weather_request.WeatherArgs(site_file: str | Path, start_date: int | str | datetime, end_date: int | str | datetime | None = None, node_column: str = 'node', lat_column: str = 'lat', lon_column: str = 'lon', id_reference: str = 'Default')[source]#
Bases:
object
Arguments defining weather request space and time scope.
- class emodpy_malaria.weather.weather_request.RequestReport[source]#
Bases:
object
Specifies an object containing weather request operational reports.
- class emodpy_malaria.weather.weather_request.DataSource(name: str | None = None)[source]#
Bases:
object
- property weather_variables: List[WeatherVariable]#
List of weather variables supported by the current data source.
- class emodpy_malaria.weather.weather_request.WeatherRequest(platform: str | COMPSPlatform, local_dir: str | None = None, data_source: str | None = None, is_staging: bool | None = None)[source]#
Bases:
object
Functionality for requesting and downloading weather files. Leverages idmtools API for COMPS SSMT.
- property report: RequestReport#
Returns report object.
- generate(weather_args: WeatherArgs, request_name: str | None = None, force: bool = False) WeatherRequest | None [source]#
Submits the weather request and when data is ready sets the data_id property.
- Parameters:
weather_args – Arguments defining space and time scope and weather files’ id reference.
request_name – (Optional) Name to be used for the weather SSMT work item.
force – (Optional) Force the download, even if target weather files already exist in the local dir.
- Returns:
Returns this WeatherRequest object (to support method chaining).
- download(data_id: str | None = None, local_dir: str | Path | None = None, force: bool = False) WeatherRequest [source]#
Downloads weather files.
- Parameters:
data_id – (Optional) Asset collection ID to be downloaded, even if not generated by this request.
local_dir – (Optional) Local dir where files will be downloaded. If not specified a temp dir is created.
force – (Optional) Force the download, even if target weather files already exist in the local dir.
- Returns:
Returns this WeatherRequest object (to support method chaining).