climate-ref-pmp 0.6.5__tar.gz → 0.6.6__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_pmp-0.6.5 → climate_ref_pmp-0.6.6}/PKG-INFO +1 -1
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/pyproject.toml +1 -1
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/__init__.py +29 -1
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/pmp_driver.py +0 -7
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/.gitignore +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/LICENCE +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/NOTICE +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/README.md +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/conftest.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/dataset_registry/pmp_climatology.txt +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/__init__.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/annual_cycle.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/enso.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/variability_modes.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/drivers/enso_driver.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_MoV-psl.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_MoV-ts.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_annualcycle_1-clims.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_annualcycle_2-metrics.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/py.typed +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/requirements/conda-lock.yml +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/requirements/environment.yml +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/integration/test_diagnostics.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/conftest.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/test_annual_cycle.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/test_enso.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/test_pmp_driver.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/test_provider.py +0 -0
- {climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/tests/unit/test_variability_modes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-pmp
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6
|
|
4
4
|
Summary: PMP diagnostic provider for the Rapid Evaluation Framework
|
|
5
5
|
Author-email: Jiwoo Lee <jwlee@llnl.gov>, Jared Lewis <jared.lewis@climate-resource.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -2,17 +2,45 @@
|
|
|
2
2
|
Rapid evaluating CMIP data
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
5
7
|
import importlib.metadata
|
|
8
|
+
import os
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
from loguru import logger
|
|
6
12
|
|
|
7
13
|
from climate_ref_core.dataset_registry import DATASET_URL, dataset_registry_manager
|
|
8
14
|
from climate_ref_core.providers import CondaDiagnosticProvider
|
|
9
15
|
from climate_ref_pmp.diagnostics import ENSO, AnnualCycle, ExtratropicalModesOfVariability
|
|
10
16
|
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from climate_ref.config import Config
|
|
19
|
+
|
|
11
20
|
__version__ = importlib.metadata.version("climate-ref-pmp")
|
|
12
21
|
|
|
22
|
+
|
|
13
23
|
# Create the PMP diagnostics provider
|
|
14
24
|
# PMP uses a conda environment to run the diagnostics
|
|
15
|
-
|
|
25
|
+
class PMPDiagnosticProvider(CondaDiagnosticProvider):
|
|
26
|
+
"""
|
|
27
|
+
Provider for PMP diagnostics.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def configure(self, config: Config) -> None:
|
|
31
|
+
"""Configure the provider."""
|
|
32
|
+
super().configure(config)
|
|
33
|
+
self.env_vars["PCMDI_CONDA_EXE"] = str(self.get_conda_exe())
|
|
34
|
+
# This is a workaround for a fatal error in internal_Finalize of MPICH
|
|
35
|
+
# when running in a conda environment on MacOS.
|
|
36
|
+
# It is not clear if this is a bug in MPICH or a problem with the conda environment.
|
|
37
|
+
if "FI_PROVIDER" not in os.environ: # pragma: no branch
|
|
38
|
+
logger.debug("Setting env variable 'FI_PROVIDER=tcp'")
|
|
39
|
+
self.env_vars["FI_PROVIDER"] = "tcp"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
provider = PMPDiagnosticProvider("PMP", __version__)
|
|
43
|
+
|
|
16
44
|
|
|
17
45
|
# Annual cycle diagnostics and metrics
|
|
18
46
|
provider.register(AnnualCycle())
|
|
@@ -159,13 +159,6 @@ def build_pmp_command(
|
|
|
159
159
|
# Note this uses the driver script from the REF env *not* the PMP conda env
|
|
160
160
|
_parameter_file = _get_resource("climate_ref_pmp.params", parameter_file, use_resources=True)
|
|
161
161
|
|
|
162
|
-
# This is a workaround for a fatal error in internal_Finalize of MPICH
|
|
163
|
-
# when running in a conda environment on MacOS.
|
|
164
|
-
# It is not clear if this is a bug in MPICH or a problem with the conda environment.
|
|
165
|
-
if "FI_PROVIDER" not in os.environ: # pragma: no branch
|
|
166
|
-
logger.debug("Setting env variable 'FI_PROVIDER=tcp'")
|
|
167
|
-
os.environ["FI_PROVIDER"] = "tcp"
|
|
168
|
-
|
|
169
162
|
# Run the driver script inside the PMP conda environment
|
|
170
163
|
cmd = [
|
|
171
164
|
driver_file,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/annual_cycle.py
RENAMED
|
File without changes
|
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/diagnostics/variability_modes.py
RENAMED
|
File without changes
|
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_MoV-psl.py
RENAMED
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/params/pmp_param_MoV-ts.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/requirements/conda-lock.yml
RENAMED
|
File without changes
|
{climate_ref_pmp-0.6.5 → climate_ref_pmp-0.6.6}/src/climate_ref_pmp/requirements/environment.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|