diff --git a/changelog/38.feat.md b/changelog/38.feat.md new file mode 100644 index 00000000..16da6c41 --- /dev/null +++ b/changelog/38.feat.md @@ -0,0 +1 @@ +ILAMB snc and IOMB thetao,volcello diff --git a/pyproject.toml b/pyproject.toml index a74c3f13..9269da08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,9 +3,7 @@ name = "ref-sample-data" version = "0.6.1" description = "CMIP Rapid Evaluation Framework Sample Data" readme = "README.md" -authors = [ - { name= "Jared Lewis", email="jared.lewis@climate-resource.com" } -] +authors = [{ name = "Jared Lewis", email = "jared.lewis@climate-resource.com" }] requires-python = ">=3.10" [project.license] @@ -18,7 +16,7 @@ platforms = ["osx-arm64", "linux-64", "win-64"] [tool.pixi.dependencies] python = ">=3.10" pooch = ">=1.8.2,<2" -intake-esgf = ">=2025.5.9,<2026" +intake-esgf = ">=2025.5.23,<2026" matplotlib = ">=3.10.3,<4" scipy = ">=1.15.2,<2" xarray = ">=2025.1.0,<2025.2" @@ -64,18 +62,15 @@ exclude_also = [ # Don't complain about missing type checking code: "if TYPE_CHECKING", # Exclude ... literals - "\\.\\.\\." + "\\.\\.\\.", ] [tool.jupytext] formats = "ipynb,py:percent" [tool.pytest.ini_options] -addopts = [ - "--import-mode=importlib", -] -filterwarnings = [ -] +addopts = ["--import-mode=importlib"] +filterwarnings = [] # We currently check for GPL licensed code, but this restriction may be removed [tool.liccheck] diff --git a/scripts/fetch_test_data.py b/scripts/fetch_test_data.py index 6a438d98..43e64090 100755 --- a/scripts/fetch_test_data.py +++ b/scripts/fetch_test_data.py @@ -234,7 +234,7 @@ def process_sample_data_request( facets=dict( source_id="ACCESS-ESM1-5", frequency=["fx", "mon"], - variable_id=["areacella", "sftlf", "gpp", "pr", "tas", "mrro", "mrsos", "cSoil", "lai"], + variable_id=["areacella", "sftlf", "gpp", "pr", "tas", "mrro", "mrsos", "cSoil", "lai", "snc"], experiment_id=["historical"], ), remove_ensembles=True, @@ -256,7 +256,18 @@ def process_sample_data_request( facets=dict( source_id="ACCESS-ESM1-5", frequency=["fx", "mon"], - variable_id=["areacello", "sftof", "tos", "sos", "msftmz"], + variable_id=["areacello", "sftof", "tos", "sos", "msftmz", "thetao"], + experiment_id=["historical"], + ), + remove_ensembles=True, + time_span=("2000", "2025"), + ), + # Sometimes models have time-dependent volcello + CMIP6Request( + facets=dict( + source_id="ACCESS-ESM1-5", + table_id="Ofx", + variable_id=["volcello"], experiment_id=["historical"], ), remove_ensembles=True, diff --git a/src/ref_sample_data/data_request/base.py b/src/ref_sample_data/data_request/base.py index 17e49b26..c20de7ad 100644 --- a/src/ref_sample_data/data_request/base.py +++ b/src/ref_sample_data/data_request/base.py @@ -80,7 +80,11 @@ def fetch_datasets(self) -> pd.DataFrame: """Fetch the datasets from the ESGF.""" cat = ESGFCatalog() - cat.search(**self.facets) + opts = {} + if self.time_span: + opts["file_start"] = self.time_span[0] + opts["file_end"] = self.time_span[1] + cat.search(**(opts | self.facets)) if self.remove_ensembles: cat.remove_ensembles()