From c2311c9998feea263816dc85fcb77c365b2dd20a Mon Sep 17 00:00:00 2001 From: Luke Conibear <106694834+luke-conibear@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:50:28 +0000 Subject: [PATCH] Make source an argument for IFS, default of aws (#169) * Make source an argument for IFS Signed-off-by: Luke Conibear * Update changelog Signed-off-by: Luke Conibear * Updating docs to point people to ecmwf docs --------- Signed-off-by: Luke Conibear Co-authored-by: Nicholas Geneva <5533524+NickGeneva@users.noreply.github.com> --- CHANGELOG.md | 1 + earth2studio/data/ifs.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23c6032b..13878c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Switched HRRR data source back to AWS grib +- Make source an argument for IFS, default of aws ### Deprecated diff --git a/earth2studio/data/ifs.py b/earth2studio/data/ifs.py index 7f22faf7..3459dafb 100644 --- a/earth2studio/data/ifs.py +++ b/earth2studio/data/ifs.py @@ -47,6 +47,9 @@ class IFS: Parameters ---------- + source : str, optional + Data source to fetch data from. For possible options refer to ECMWF's open data + Python SDK, by default "aws". cache : bool, optional Cache data source on local memory, by default True verbose : bool, optional @@ -75,7 +78,7 @@ class IFS: IFS_LAT = np.linspace(90, -90, 721) IFS_LON = np.linspace(0, 359.75, 1440) - def __init__(self, cache: bool = True, verbose: bool = True): + def __init__(self, source: str = "aws", cache: bool = True, verbose: bool = True): # Optional import not installed error if opendata is None: raise ImportError( @@ -84,7 +87,7 @@ def __init__(self, cache: bool = True, verbose: bool = True): self._cache = cache self._verbose = verbose - self.client = opendata.Client(source="azure") + self.client = opendata.Client(source=source) def __call__( self,