Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/38.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ILAMB snc and IOMB thetao,volcello
15 changes: 5 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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"
Expand Down Expand Up @@ -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]
Expand Down
15 changes: 13 additions & 2 deletions scripts/fetch_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion src/ref_sample_data/data_request/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Loading