climate-ref-esmvaltool 0.8.1__tar.gz → 0.9.0__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_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/.gitignore +10 -1
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/PKG-INFO +1 -1
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/pyproject.toml +1 -1
- climate_ref_esmvaltool-0.9.0/src/climate_ref_esmvaltool/__init__.py +81 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/recipe.py +3 -2
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/requirements/conda-lock.yml +7074 -7264
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/requirements/environment.yml +0 -1
- climate_ref_esmvaltool-0.9.0/tests/integration/test_diagnostics.py +131 -0
- climate_ref_esmvaltool-0.9.0/tests/unit/test_provider.py +95 -0
- climate_ref_esmvaltool-0.8.1/src/climate_ref_esmvaltool/__init__.py +0 -30
- climate_ref_esmvaltool-0.8.1/tests/integration/test_diagnostics.py +0 -39
- climate_ref_esmvaltool-0.8.1/tests/unit/test_provider.py +0 -20
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/LICENCE +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/NOTICE +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/README.md +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/_version.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/dataset_registry/data.txt +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/__init__.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/base.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/climate_at_global_warming_levels.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/climate_drivers_for_fire.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/cloud_radiative_effects.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/cloud_scatterplots.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/ecs.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/enso.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/example.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/regional_historical_changes.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/sea_ice_area_basic.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/sea_ice_sensitivity.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/tcr.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/tcre.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/diagnostics/zec.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/py.typed +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/recipes.txt +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/types.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_climate_at_global_warming_levels.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_climate_drivers_for_fire.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_radiative_effects.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_scatterplots_cli_ta.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_scatterplots_clivi_lwcre.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_scatterplots_clt_swcre.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_scatterplots_clwvi_pr.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_cloud_scatterplots_reference.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_enso_basic_climatology.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_enso_characteristics.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_equilibrium_climate_sensitivity.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_global_mean_timeseries.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_regional_historical_annual_cycle.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_regional_historical_timeseries.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_regional_historical_trend.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_sea_ice_area_basic.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_sea_ice_sensitivity.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_transient_climate_response.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_transient_climate_response_emissions.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/recipes/recipe_zero_emission_commitment.yml +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/test_base.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/diagnostics/test_recipes.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/test_diagnostic.py +0 -0
- {climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/tests/unit/test_recipe.py +0 -0
|
@@ -150,7 +150,7 @@ dmypy.json
|
|
|
150
150
|
|
|
151
151
|
# Generated output
|
|
152
152
|
out
|
|
153
|
-
.ref
|
|
153
|
+
.ref*
|
|
154
154
|
|
|
155
155
|
# Ignore copied LICENCE/NOTICE files
|
|
156
156
|
packages/*/LICENCE
|
|
@@ -158,3 +158,12 @@ packages/*/NOTICE
|
|
|
158
158
|
|
|
159
159
|
# Local directory for data
|
|
160
160
|
/data
|
|
161
|
+
|
|
162
|
+
# Generated SDK
|
|
163
|
+
/climate_ref_client
|
|
164
|
+
|
|
165
|
+
# User-specific catalog paths (test data)
|
|
166
|
+
*.paths.yaml
|
|
167
|
+
|
|
168
|
+
# Helm dependencies
|
|
169
|
+
helm/charts/*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-esmvaltool
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: ESMValTool diagnostic provider for the Rapid Evaluation Framework
|
|
5
5
|
Author-email: ESMValTool development team <esmvaltool-dev@listserv.dfn.de>, Jared Lewis <jared.lewis@climate-resource.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Rapid evaluating CMIP data with ESMValTool.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
import pooch
|
|
11
|
+
from loguru import logger
|
|
12
|
+
|
|
13
|
+
import climate_ref_esmvaltool.diagnostics
|
|
14
|
+
from climate_ref_core.dataset_registry import (
|
|
15
|
+
DATASET_URL,
|
|
16
|
+
dataset_registry_manager,
|
|
17
|
+
fetch_all_files,
|
|
18
|
+
validate_registry_cache,
|
|
19
|
+
)
|
|
20
|
+
from climate_ref_core.providers import CondaDiagnosticProvider
|
|
21
|
+
from climate_ref_esmvaltool._version import __version__
|
|
22
|
+
from climate_ref_esmvaltool.recipe import _ESMVALTOOL_COMMIT
|
|
23
|
+
|
|
24
|
+
if TYPE_CHECKING:
|
|
25
|
+
from climate_ref.config import Config
|
|
26
|
+
|
|
27
|
+
_REGISTRY_NAME = "esmvaltool"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ESMValToolProvider(CondaDiagnosticProvider):
|
|
31
|
+
"""Provider for ESMValTool diagnostics."""
|
|
32
|
+
|
|
33
|
+
def fetch_data(self, config: Config) -> None:
|
|
34
|
+
"""Fetch ESMValTool reference data."""
|
|
35
|
+
registry = dataset_registry_manager[_REGISTRY_NAME]
|
|
36
|
+
fetch_all_files(registry, _REGISTRY_NAME, output_dir=None)
|
|
37
|
+
|
|
38
|
+
def validate_setup(self, config: Config) -> bool:
|
|
39
|
+
"""Validate conda environment and data checksums."""
|
|
40
|
+
# First check conda environment
|
|
41
|
+
if not super().validate_setup(config):
|
|
42
|
+
return False
|
|
43
|
+
|
|
44
|
+
# Then check data checksums
|
|
45
|
+
registry = dataset_registry_manager[_REGISTRY_NAME]
|
|
46
|
+
errors = validate_registry_cache(registry, _REGISTRY_NAME)
|
|
47
|
+
if errors:
|
|
48
|
+
for error in errors:
|
|
49
|
+
logger.error(f"{self.slug} validation failed: {error}")
|
|
50
|
+
logger.error(
|
|
51
|
+
f"Data for {self.slug} is missing or corrupted. "
|
|
52
|
+
f"Please run `ref providers setup --provider {self.slug}` to fetch data."
|
|
53
|
+
)
|
|
54
|
+
return False
|
|
55
|
+
return True
|
|
56
|
+
|
|
57
|
+
def get_data_path(self) -> Path | None:
|
|
58
|
+
"""Get the path where ESMValTool data is cached."""
|
|
59
|
+
return Path(pooch.os_cache("climate_ref"))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Initialise the diagnostics manager.
|
|
63
|
+
provider = ESMValToolProvider(
|
|
64
|
+
"ESMValTool",
|
|
65
|
+
__version__,
|
|
66
|
+
repo="https://github.com/ESMValGroup/ESMValTool.git",
|
|
67
|
+
tag_or_commit=_ESMVALTOOL_COMMIT,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# Register the diagnostics.
|
|
71
|
+
for _diagnostic_cls_name in climate_ref_esmvaltool.diagnostics.__all__:
|
|
72
|
+
_diagnostic_cls = getattr(climate_ref_esmvaltool.diagnostics, _diagnostic_cls_name)
|
|
73
|
+
provider.register(_diagnostic_cls())
|
|
74
|
+
|
|
75
|
+
# Register OBS, OBS6, and raw data
|
|
76
|
+
dataset_registry_manager.register(
|
|
77
|
+
"esmvaltool",
|
|
78
|
+
base_url=DATASET_URL,
|
|
79
|
+
package="climate_ref_esmvaltool.dataset_registry",
|
|
80
|
+
resource="data.txt",
|
|
81
|
+
)
|
{climate_ref_esmvaltool-0.8.1 → climate_ref_esmvaltool-0.9.0}/src/climate_ref_esmvaltool/recipe.py
RENAMED
|
@@ -144,8 +144,9 @@ def dataframe_to_recipe(
|
|
|
144
144
|
return variables
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
_ESMVALTOOL_COMMIT = "
|
|
148
|
-
_ESMVALTOOL_VERSION = f"2.13.0.dev148+g{_ESMVALTOOL_COMMIT[:9]}"
|
|
147
|
+
_ESMVALTOOL_COMMIT = "fa3e10ed09fc34d354f179a6a71aacd032d6ea9e"
|
|
148
|
+
# _ESMVALTOOL_VERSION = f"2.13.0.dev148+g{_ESMVALTOOL_COMMIT[:9]}"
|
|
149
|
+
_ESMVALTOOL_VERSION = "2.13.0"
|
|
149
150
|
|
|
150
151
|
_RECIPES = pooch.create(
|
|
151
152
|
path=pooch.os_cache("climate_ref_esmvaltool"),
|