diva.data.data_downloader_local package

Submodules

diva.data.data_downloader_local.data_retriever module

Service that retrieve and process data from cmwf

class diva.data.data_downloader_local.data_retriever.ServiceDataRetriever(params)[source]

Bases: object

combine_data()[source]

Combines downloaded data for each variable into a single file.

This function merges data files stored in subfolders corresponding to different variables (e.g., temperature, precipitation, wind, pressure). The combined data for each variable is saved as a single NetCDF file.

The function processes the following data types: - Temperature: Converted from Kelvin to Celsius. - Precipitation: Multiplied by 100 to convert to desired units. - Wind - Pressure - [NOT USED CURENTLY] Sea Surface Temperature: Converted from Kelvin to Celsius and filtered for times at 00:00 and 12:00.

The combined data is saved with a filename indicating the data type and the time period.

Returns:

None

get_data()[source]

Retrieves data from the specified dataset based on the provided parameters.

This function downloads data for the variables listed in self.__list_data over the years specified in self.__list_years. The data is fetched for the geographic area defined by self.__box_lat_lon, with a fixed resolution of 0.1 degrees. The data is stored at the path specified by self.__output_path.

The data is retrieved for: - Every hour at 00:00, 06:00, 12:00, and 18:00. - All days of the month. - All months of the year. - The specified geographic bounding box.

Returns:

None

diva.data.data_downloader_local.retrieve_data module

class diva.data.data_downloader_local.retrieve_data.GetData(params)[source]

Bases: object

download_data()[source]

Downloads the data using the specified parameters.

This method initializes the data_retriever with the provided parameters and calls its get_data() method to perform the data retrieval.

Module contents