From d13f338b030f2374caef8bc1e18ff78a48f880a8 Mon Sep 17 00:00:00 2001 From: collijk Date: Mon, 13 May 2024 11:12:18 -0700 Subject: [PATCH] Add stubs for other extractions --- src/climate_downscale/data.py | 10 +++++++-- src/climate_downscale/extract/__init__.py | 22 ++++++++++++++----- .../extract/rub_local_climate_zones.py | 15 +++++++++++++ .../extract/srtm_elevation.py | 15 +++++++++++++ 4 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 src/climate_downscale/extract/rub_local_climate_zones.py create mode 100644 src/climate_downscale/extract/srtm_elevation.py diff --git a/src/climate_downscale/data.py b/src/climate_downscale/data.py index d797a27..0db349d 100644 --- a/src/climate_downscale/data.py +++ b/src/climate_downscale/data.py @@ -1,11 +1,9 @@ from pathlib import Path - DEFAULT_ROOT = "/mnt/share/erf/ERA5/" class ClimateDownscaleData: - def __init__(self, root: str | Path) -> None: self._root = Path(root) self._credentials_root = self._root / ".credentials" @@ -29,3 +27,11 @@ def era5(self) -> Path: @property def ncei_climate_stations(self) -> Path: return self.extracted_data / "ncei_climate_stations" + + @property + def srtm_elevation(self) -> Path: + return self.extracted_data / "srtm_elevation" + + @property + def rub_local_climate_zones(self) -> Path: + return self.extracted_data / "rub_local_climate_zones" diff --git a/src/climate_downscale/extract/__init__.py b/src/climate_downscale/extract/__init__.py index 3538593..968e490 100644 --- a/src/climate_downscale/extract/__init__.py +++ b/src/climate_downscale/extract/__init__.py @@ -1,17 +1,29 @@ -from climate_downscale.extract.ncei_climate_stations import ( - extract_ncei_climate_stations, -) from climate_downscale.extract.era5 import ( extract_era5, extract_era5_task, ) +from climate_downscale.extract.ncei_climate_stations import ( + extract_ncei_climate_stations, +) +from climate_downscale.extract.rub_local_climate_zones import ( + extract_rub_local_climate_zones, + extract_rub_local_climate_zones_task, +) +from climate_downscale.extract.srtm_elevation import ( + extract_srtm_elevation, + extract_srtm_elevation_task, +) RUNNERS = { - 'ncei': extract_ncei_climate_stations, + "ncei": extract_ncei_climate_stations, "era5": extract_era5, + "lcz": extract_rub_local_climate_zones, + "elevation": extract_srtm_elevation, } TASK_RUNNERS = { - 'ncei': extract_ncei_climate_stations, + "ncei": extract_ncei_climate_stations, "era5": extract_era5_task, + "lcz": extract_rub_local_climate_zones_task, + "elevation": extract_srtm_elevation_task, } diff --git a/src/climate_downscale/extract/rub_local_climate_zones.py b/src/climate_downscale/extract/rub_local_climate_zones.py new file mode 100644 index 0000000..e6798b5 --- /dev/null +++ b/src/climate_downscale/extract/rub_local_climate_zones.py @@ -0,0 +1,15 @@ +import click + + +def extract_rub_local_climate_zones_main() -> None: + pass + + +@click.command() +def extract_rub_local_climate_zones_task() -> None: + raise NotImplementedError + + +@click.command() +def extract_rub_local_climate_zones() -> None: + raise NotImplementedError diff --git a/src/climate_downscale/extract/srtm_elevation.py b/src/climate_downscale/extract/srtm_elevation.py new file mode 100644 index 0000000..cee18ab --- /dev/null +++ b/src/climate_downscale/extract/srtm_elevation.py @@ -0,0 +1,15 @@ +import click + + +def extract_srtm_elevation_main() -> None: + pass + + +@click.command() +def extract_srtm_elevation_task() -> None: + raise NotImplementedError + + +@click.command() +def extract_srtm_elevation() -> None: + raise NotImplementedError