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, node_column: str = 'node', lat_column: str = 'lat', lon_column: str = 'lon', id_reference: str = 'Default')[source]#
Bases:
objectArguments defining weather request space and time scope.
- class emodpy_malaria.weather.weather_request.RequestReport[source]#
Bases:
objectSpecifies an object containing weather request operational reports.
- class emodpy_malaria.weather.weather_request.DataSource(name: str = 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, data_source: str = None, is_staging: bool = None)[source]#
Bases:
objectFunctionality 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, force: bool = False) WeatherRequest | None[source]#
Submits the weather request and when data is ready sets the data_id property.
- Args:
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, local_dir: str | Path = None, force: bool = False) WeatherRequest[source]#
Downloads weather files.
- Args:
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).