varunayan package¶
Subpackages¶
- varunayan.download package
- varunayan.processing package
- varunayan.search_and_desc package
- varunayan.util package
Submodules¶
- varunayan.cli module
- varunayan.config module
- varunayan.core module
ProcessingParamsProcessingParams.request_idProcessingParams.variablesProcessingParams.start_dateProcessingParams.end_dateProcessingParams.frequencyProcessingParams.resolutionProcessingParams.dataset_typeProcessingParams.pressure_levelsProcessingParams.northProcessingParams.southProcessingParams.eastProcessingParams.westProcessingParams.geojson_fileProcessingParams.geojson_dataProcessingParams.dist_featuresProcessingParams.__init__()
set_verbosity()download_with_retry()process_time_chunks()process_era5_data()aggregate_and_save()adjust_sum_variables()save_results()process_era5()print_processing_header()validate_inputs()load_and_validate_geojson()print_bounding_box()print_processing_strategy()calculate_map_dimensions()draw_geojson_ascii()print_processing_footer()era5ify_geojson()era5ify_bbox()era5ify_point()parse_date()cleanup_temp_files()
Module contents¶
- varunayan.era5ify_geojson(request_id: str, variables: List[str], start_date: str, end_date: str, json_file: str, dist_features: List[str] | None = None, dataset_type: str = 'single', pressure_levels: List[str] | None = None, frequency: str = 'hourly', resolution: float = 0.25, verbosity: int = 0, save_raw: bool = True) DataFrame[source]¶
Public function for querying data for a GeoJSON.
- Parameters:
request_id (str) – Unique identifier for the request.
variables (List[str]) – List of variables to download.
start_date (str) – Start date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
end_date (str) – End date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
json_file (str) – Path to the GeoJSON file.
dist_features (List[str] | None, optional) – List of feature properties to distinguish different areas in the GeoJSON. Defaults to None.
dataset_type (str, optional) – Type of dataset. Either ‘single’ (single level) or ‘pressure’ (pressure level). Defaults to ‘single’.
pressure_levels (List[str] | None, optional) – List of pressure levels to download (e.g., [“1000”, “925”, “850”]). Defaults to None.
frequency (str, optional) – Frequency of the data (‘hourly’, ‘daily’, ‘weekly’, ‘monthly’, ‘yearly’). Defaults to ‘hourly’.
resolution (float, optional) – Spatial resolution in degrees (0.25, 0.1, 0.5, etc.). Defaults to 0.25, minimum is 0.1.
verbosity (int, optional) – Verbosity level (0 for no output, 1 for info output, 2 for debug/complete output). Defaults to 0.
save_raw (bool, optional) – Whether to save the raw data. Defaults to True.
- Returns:
A DataFrame containing the processed data for the region described by GeoJSON.
- Return type:
DataFrame
- varunayan.era5ify_bbox(request_id: str, variables: List[str], start_date: str, end_date: str, north: float, south: float, east: float, west: float, dataset_type: str = 'single', pressure_levels: List[str] | None = None, frequency: str = 'hourly', resolution: float = 0.25, verbosity: int = 0, save_raw: bool = True) DataFrame[source]¶
Public function for querying data for a defined bounding box (north, south, east, west bounds).
- Parameters:
request_id (str) – Unique identifier for the request.
variables (List[str]) – List of variables to download.
start_date (str) – Start date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
end_date (str) – End date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
north (float) – Northern bound of the bounding box.
south (float) – Southern bound of the bounding box.
east (float) – Eastern bound of the bounding box.
west (float) – Western bound of the bounding box.
dataset_type (str, optional) – Type of dataset. Either ‘single’ (single level) or ‘pressure’ (pressure level). Defaults to ‘single’.
pressure_levels (List[str] | None, optional) – List of pressure levels to download (e.g., [“1000”, “925”, “850”]). Defaults to None.
frequency (str, optional) – Frequency of the data (‘hourly’, ‘daily’, ‘weekly’, ‘monthly’, ‘yearly’). Defaults to ‘hourly’.
resolution (float, optional) – Spatial resolution in degrees (0.25, 0.1, 0.5, etc.). Defaults to 0.25, minimum is 0.1.
verbosity (int, optional) – Verbosity level (0 for no output, 1 for info output, 2 for debug/complete output). Defaults to 0.
save_raw (bool, optional) – Whether to save the raw data. Defaults to True.
- Returns:
A DataFrame containing the processed data for the specified bbox.
- Return type:
DataFrame
- varunayan.era5ify_point(request_id: str, variables: List[str], start_date: str, end_date: str, latitude: float, longitude: float, dataset_type: str = 'single', pressure_levels: List[str] | None = None, frequency: str = 'hourly', verbosity: int = 0, save_raw: bool = True) DataFrame[source]¶
Public function for querying data for a single geographical point (latitude, longitude).
- Parameters:
request_id (str) – Unique identifier for the request.
variables (List[str]) – List of variables to download.
start_date (str) – Start date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
end_date (str) – End date of the data in ‘YYYY-M-D’ or ‘YYYY-MM-DD’ format.
latitude (float) – Latitude of the point of interest.
longitude (float) – Longitude of the point of interest.
dataset_type (str, optional) – Type of dataset. Either ‘single’ (single level) or ‘pressure’ (pressure level). Defaults to ‘single’.
pressure_levels (List[str] | None, optional) – List of pressure levels to download (e.g., [“1000”, “925”, “850”]). Defaults to None.
frequency (str, optional) – Frequency of the data (‘hourly’, ‘daily’, ‘weekly’, ‘monthly’, ‘yearly’). Defaults to ‘hourly’.
verbosity (int, optional) – Verbosity level (0 for no output, 1 for info output, 2 for debug/complete output). Defaults to 0.
save_raw (bool, optional) – Whether to save the raw data. Defaults to True.
- Returns:
A DataFrame containing the processed data for the specified point.
- Return type:
DataFrame
- varunayan.describe_variables(variable_names: List[str], dataset_type: str) Dict[str, str][source]¶
Get descriptions for specific variables