climate-ref-ilamb 0.5.0__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/.gitignore +0 -1
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/PKG-INFO +2 -2
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/pyproject.toml +2 -5
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/__init__.py +1 -1
- climate_ref_ilamb-0.5.2/src/climate_ref_ilamb/configure/ilamb.yaml +45 -0
- climate_ref_ilamb-0.5.2/src/climate_ref_ilamb/configure/iomb.yaml +27 -0
- climate_ref_ilamb-0.5.2/src/climate_ref_ilamb/dataset_registry/ilamb.txt +11 -0
- climate_ref_ilamb-0.5.2/src/climate_ref_ilamb/dataset_registry/iomb.txt +3 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/standard.py +2 -2
- climate_ref_ilamb-0.5.2/tests/integration/test_diagnostics.py +15 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/tests/unit/test_standard_metrics.py +6 -6
- climate_ref_ilamb-0.5.0/src/climate_ref_ilamb/configure/ilamb.yaml +0 -14
- climate_ref_ilamb-0.5.0/src/climate_ref_ilamb/configure/iomb.yaml +0 -13
- climate_ref_ilamb-0.5.0/src/climate_ref_ilamb/dataset_registry/ilamb.txt +0 -19
- climate_ref_ilamb-0.5.0/src/climate_ref_ilamb/dataset_registry/iomb.txt +0 -2
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/LICENCE +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/NOTICE +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/README.md +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/dataset_registry/test.txt +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/datasets.py +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/py.typed +0 -0
- {climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/tests/unit/test_provider.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-ilamb
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: ILAMB diagnostic provider for the Rapid Evaluation Framework
|
|
5
5
|
Author-email: Nathan Collier <nathaniel.collier@gmail.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
18
18
|
Classifier: Topic :: Scientific/Engineering
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
20
|
Requires-Dist: climate-ref-core
|
|
21
|
-
Requires-Dist: ilamb3
|
|
21
|
+
Requires-Dist: ilamb3>=2025.4.28
|
|
22
22
|
Requires-Dist: types-pyyaml>=6.0.12.20241230
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "climate-ref-ilamb"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "ILAMB diagnostic provider for the Rapid Evaluation Framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Nathan Collier", email = "nathaniel.collier@gmail.com" }]
|
|
@@ -19,13 +19,10 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
21
|
"climate-ref-core",
|
|
22
|
-
"ilamb3",
|
|
22
|
+
"ilamb3>=2025.4.28",
|
|
23
23
|
"types-pyyaml>=6.0.12.20241230",
|
|
24
24
|
]
|
|
25
25
|
|
|
26
|
-
[tool.uv.sources]
|
|
27
|
-
ilamb3 = { git = "https://github.com/rubisco-sfa/ilamb3", rev = "7c64e37ebda04b6902b39ef30db96f4bcabba472" }
|
|
28
|
-
|
|
29
26
|
[project.license]
|
|
30
27
|
text = "Apache-2.0"
|
|
31
28
|
|
|
@@ -38,7 +38,7 @@ dataset_registry_manager.register(
|
|
|
38
38
|
)
|
|
39
39
|
dataset_registry_manager.register(
|
|
40
40
|
"iomb",
|
|
41
|
-
base_url="https://www.ilamb.org/
|
|
41
|
+
base_url="https://www.ilamb.org/ilamb3-data/",
|
|
42
42
|
package="climate_ref_ilamb.dataset_registry",
|
|
43
43
|
resource="iomb.txt",
|
|
44
44
|
cache_name="ilamb3",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
registry: ilamb
|
|
2
|
+
|
|
3
|
+
gpp-WECANN:
|
|
4
|
+
sources:
|
|
5
|
+
gpp: gpp/WECANN/gpp.nc
|
|
6
|
+
relationships:
|
|
7
|
+
pr: pr/GPCPv2.3/pr.nc
|
|
8
|
+
tas: tas/CRU4.02/tas.nc
|
|
9
|
+
variable_cmap: Greens
|
|
10
|
+
|
|
11
|
+
gpp-FLUXNET2015:
|
|
12
|
+
sources:
|
|
13
|
+
gpp: gpp/FLUXNET2015/gpp.nc
|
|
14
|
+
variable_cmap: Greens
|
|
15
|
+
|
|
16
|
+
mrro-LORA:
|
|
17
|
+
sources:
|
|
18
|
+
mrro: mrro/LORA/LORA.nc
|
|
19
|
+
variable_cmap: Blues
|
|
20
|
+
|
|
21
|
+
mrsos-WangMao:
|
|
22
|
+
sources:
|
|
23
|
+
mrsol: mrsol/WangMao/mrsol_olc.nc
|
|
24
|
+
alternate_vars:
|
|
25
|
+
- mrsos
|
|
26
|
+
depth: 0.0
|
|
27
|
+
transform:
|
|
28
|
+
- soil_moisture_to_vol_fraction
|
|
29
|
+
variable_cmap: Blues
|
|
30
|
+
|
|
31
|
+
cSoil-HWSD2:
|
|
32
|
+
sources:
|
|
33
|
+
cSoil: cSoil/HWSD2/hwsd2_cSoil.nc
|
|
34
|
+
variable_cmap: viridis
|
|
35
|
+
|
|
36
|
+
lai-AVH15C1:
|
|
37
|
+
sources:
|
|
38
|
+
lai: lai/AVH15C1/lai.nc
|
|
39
|
+
variable_cmap: Greens
|
|
40
|
+
|
|
41
|
+
nbp-Hoffman:
|
|
42
|
+
analyses:
|
|
43
|
+
- nbp
|
|
44
|
+
sources:
|
|
45
|
+
nbp: nbp/HOFFMAN/nbp_1850-2010.nc
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
registry: iomb
|
|
2
|
+
|
|
3
|
+
thetao-WOA2023-surface:
|
|
4
|
+
sources:
|
|
5
|
+
thetao: WOA/thetao_mon_WOA_A5B4_gn_200501-201412.nc
|
|
6
|
+
variable_cmap: Reds
|
|
7
|
+
depth: 0.0
|
|
8
|
+
alternate_vars:
|
|
9
|
+
- tos
|
|
10
|
+
|
|
11
|
+
so-WOA2023-surface:
|
|
12
|
+
sources:
|
|
13
|
+
so: WOA/so_mon_WOA_A5B4_gn_200501-201412.nc
|
|
14
|
+
variable_cmap: YlGn
|
|
15
|
+
depth: 0.0
|
|
16
|
+
alternate_vars:
|
|
17
|
+
- sos
|
|
18
|
+
|
|
19
|
+
amoc-RAPID:
|
|
20
|
+
analyses:
|
|
21
|
+
- timeseries
|
|
22
|
+
alternate_vars:
|
|
23
|
+
- msftmz
|
|
24
|
+
transform:
|
|
25
|
+
- msftmz_to_rapid
|
|
26
|
+
sources:
|
|
27
|
+
amoc: RAPID/amoc_mon_RAPID_BE_NA_200404-202302.nc
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
cSoil/HWSD2/hwsd2_cSoil.nc sha1:9a6377e4c5ff457c08c194d2c376c46e003a4f84
|
|
2
|
+
gpp/FLUXNET2015/gpp.nc sha1:16fd177e007caef2565687e2cd32884e20ef16e5
|
|
3
|
+
gpp/WECANN/gpp.nc sha1:6e864a6ae201195cdf995a3a81720188af441e13
|
|
4
|
+
lai/AVH15C1/lai.nc sha1:ccace4f84912d63acbb9ee09ee7b743412207a0d
|
|
5
|
+
mrro/LORA/LORA.nc sha1:72bb16787877591d0c54a36d74697d0d208f985a
|
|
6
|
+
mrsol/WangMao/mrsol_olc.nc sha1:24cbc9df69569bed3a39c20e499cfe4f911bd30e
|
|
7
|
+
regions/GlobalLand.nc sha1:2f987d44fdba6ad0e72d14d6a2fecb7e8df2a9c5
|
|
8
|
+
regions/Koppen_coarse.nc sha1:e464030db49f0295a6a22a81ca602b0f3c499b72
|
|
9
|
+
pr/GPCPv2.3/pr.nc sha1:e1b942863ec76a75aa972b6d75e2e08646741259
|
|
10
|
+
tas/CRU4.02/tas.nc sha1:2674da18a1a93483b50b1626e7a7ab741bf53d09
|
|
11
|
+
nbp/HOFFMAN/nbp_1850-2010.nc sha1:8350af00614d6afc6b70ad314aa499a9ece80ec2
|
|
@@ -112,7 +112,6 @@ def _load_csv_and_merge(output_directory: Path) -> pd.DataFrame:
|
|
|
112
112
|
df = pd.concat(
|
|
113
113
|
[pd.read_csv(f, keep_default_na=False, na_values=["NaN"]) for f in output_directory.glob("*.csv")]
|
|
114
114
|
).drop_duplicates(subset=["source", "region", "analysis", "name"])
|
|
115
|
-
df["name"] = df["name"] + " [" + df["units"] + "]"
|
|
116
115
|
return df
|
|
117
116
|
|
|
118
117
|
|
|
@@ -150,6 +149,7 @@ class ILAMBStandard(Diagnostic):
|
|
|
150
149
|
"variable_id": (
|
|
151
150
|
self.variable_id,
|
|
152
151
|
*ilamb_kwargs.get("relationships", {}).keys(),
|
|
152
|
+
*ilamb_kwargs.get("alternate_vars", []),
|
|
153
153
|
*_measure_facets(registry_file),
|
|
154
154
|
)
|
|
155
155
|
}
|
|
@@ -160,7 +160,7 @@ class ILAMBStandard(Diagnostic):
|
|
|
160
160
|
group_by=("experiment_id",),
|
|
161
161
|
),
|
|
162
162
|
)
|
|
163
|
-
self.facets = ("region", "model", "metric")
|
|
163
|
+
self.facets = ("region", "model", "metric", "statistic")
|
|
164
164
|
|
|
165
165
|
# Setup ILAMB data and options
|
|
166
166
|
self.registry_file = registry_file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from climate_ref_ilamb import provider as ilamb_provider
|
|
3
|
+
|
|
4
|
+
from climate_ref_core.diagnostics import Diagnostic
|
|
5
|
+
|
|
6
|
+
diagnostics = [pytest.param(diagnostic, id=diagnostic.slug) for diagnostic in ilamb_provider.diagnostics()]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@pytest.mark.slow
|
|
10
|
+
@pytest.mark.parametrize("diagnostic", diagnostics)
|
|
11
|
+
def test_diagnostics(diagnostic: Diagnostic, diagnostic_validation):
|
|
12
|
+
if diagnostic.slug.startswith("thetao"):
|
|
13
|
+
pytest.xfail("Missing data for thetao diagnostics")
|
|
14
|
+
|
|
15
|
+
diagnostic_validation(diagnostic)
|
|
@@ -7,7 +7,7 @@ from climate_ref_core.datasets import DatasetCollection
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def test_standard_site(cmip6_data_catalog, definition_factory):
|
|
10
|
-
|
|
10
|
+
diagnostic = ILAMBStandard(
|
|
11
11
|
registry_file="ilamb-test", metric_name="test-site-tas", sources={"tas": "test/Site/tas.nc"}
|
|
12
12
|
)
|
|
13
13
|
ds = (
|
|
@@ -19,10 +19,10 @@ def test_standard_site(cmip6_data_catalog, definition_factory):
|
|
|
19
19
|
.first()
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
-
definition = definition_factory(cmip6=DatasetCollection(ds, "instance_id"))
|
|
22
|
+
definition = definition_factory(diagnostic=diagnostic, cmip6=DatasetCollection(ds, "instance_id"))
|
|
23
23
|
definition.output_directory.mkdir(parents=True, exist_ok=True)
|
|
24
24
|
|
|
25
|
-
result =
|
|
25
|
+
result = diagnostic.run(definition)
|
|
26
26
|
|
|
27
27
|
assert str(result.output_bundle_filename) == "output.json"
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ def test_standard_site(cmip6_data_catalog, definition_factory):
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def test_standard_grid(cmip6_data_catalog, definition_factory):
|
|
45
|
-
|
|
45
|
+
diagnostic = ILAMBStandard(
|
|
46
46
|
registry_file="ilamb-test",
|
|
47
47
|
metric_name="test-grid-gpp",
|
|
48
48
|
sources={"gpp": "test/Grid/gpp.nc"},
|
|
@@ -54,10 +54,10 @@ def test_standard_grid(cmip6_data_catalog, definition_factory):
|
|
|
54
54
|
].groupby(["source_id", "member_id", "grid_label"])
|
|
55
55
|
_, ds = next(iter(grp))
|
|
56
56
|
|
|
57
|
-
definition = definition_factory(cmip6=DatasetCollection(ds, "instance_id"))
|
|
57
|
+
definition = definition_factory(diagnostic=diagnostic, cmip6=DatasetCollection(ds, "instance_id"))
|
|
58
58
|
definition.output_directory.mkdir(parents=True, exist_ok=True)
|
|
59
59
|
|
|
60
|
-
result =
|
|
60
|
+
result = diagnostic.run(definition)
|
|
61
61
|
|
|
62
62
|
assert str(result.output_bundle_filename) == "output.json"
|
|
63
63
|
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
cSoil/HWSD2/hwsd2_cSoil.nc sha1:9a6377e4c5ff457c08c194d2c376c46e003a4f84
|
|
2
|
-
cSoil/NCSCDV22/soilc_0.5x0.5.nc sha1:605efa69f547277309eca87cb581374dd3a76000
|
|
3
|
-
gpp/FLUXNET2015/gpp.nc sha1:16fd177e007caef2565687e2cd32884e20ef16e5
|
|
4
|
-
gpp/WECANN/gpp.nc sha1:6e864a6ae201195cdf995a3a81720188af441e13
|
|
5
|
-
gpp/FLUXCOM/gpp.nc sha1:f661eb295adf9f7ad0f0531dad26c702a7988339
|
|
6
|
-
lai/GIMMS_LAI4g/cao2023_lai.nc sha1:63f54dde4158afb176175eaf054923bdbfb6240b
|
|
7
|
-
lai/AVH15C1/lai.nc sha1:ccace4f84912d63acbb9ee09ee7b743412207a0d
|
|
8
|
-
lai/MODIS/lai_0.5x0.5.nc sha1:77c198e1b6fc768deb374a90611726ff87f398b1
|
|
9
|
-
lai/AVHRR/lai_0.5x0.5.nc sha1:8b2bdece87b97c3cef8533bbcf34d9d1d7a28fbd
|
|
10
|
-
mrro/Dai/runoff.nc sha1:08a23c5ea69fa439f296a6e6119598851453b3dd
|
|
11
|
-
mrro/Dai/basins_0.5x0.5.nc sha1:172ff6f92a4036c186a6e2ecb66a678c578d0672
|
|
12
|
-
mrro/LORA/LORA.nc sha1:72bb16787877591d0c54a36d74697d0d208f985a
|
|
13
|
-
mrro/CLASS/mrro.nc sha1:5283142fcb2eea1e9c5dbc9d324c62496b0d6fa7
|
|
14
|
-
mrsos/WangMao/mrsos_olc.nc sha1:23082e5776ffd3a7d6d00e160dc9d91d06321c13
|
|
15
|
-
nee/FLUXNET2015/nee.nc sha1:1dc03453cb7f58e45c3f93a2a48dd8c133c63eda
|
|
16
|
-
regions/GlobalLand.nc sha1:2f987d44fdba6ad0e72d14d6a2fecb7e8df2a9c5
|
|
17
|
-
regions/Koppen_coarse.nc sha1:e464030db49f0295a6a22a81ca602b0f3c499b72
|
|
18
|
-
pr/GPCPv2.3/pr.nc sha1:e1b942863ec76a75aa972b6d75e2e08646741259
|
|
19
|
-
tas/CRU4.02/tas.nc sha1:2674da18a1a93483b50b1626e7a7ab741bf53d09
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_ilamb-0.5.0 → climate_ref_ilamb-0.5.2}/src/climate_ref_ilamb/dataset_registry/test.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|