Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime
import json
import os
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -371,6 +372,7 @@ class AnnualCycle(CommandLineDiagnostic):
def __init__(self) -> None:
self.parameter_file_1 = "pmp_param_annualcycle_1-clims.py"
self.parameter_file_2 = "pmp_param_annualcycle_2-metrics.py"
self.parameter_file_3 = "pmp_param_monsoon.py"

def build_cmds(self, definition: ExecutionDefinition) -> list[list[str]]: # noqa: PLR0915
"""
Expand Down Expand Up @@ -499,6 +501,28 @@ def build_cmds(self, definition: ExecutionDefinition) -> list[list[str]]: # noq
)
)

# --------------------------------------------------
# PART 3: Monsoon
# --------------------------------------------------
if variable_id in ["pr"]:
params = {
"reference_dataset_path": reference_dataset_path,
"test_data_path": os.path.join(
output_directory_path,
f"{variable_id}_{data_name}_clims.198101-200512.AC.v{date_stamp}.nc",
),
"modnames": [source_id],
"result_dir": output_directory_path,
}

cmds.append(
build_pmp_command(
driver_file="monsoon_wang_driver.py",
parameter_file=self.parameter_file_3,
**params,
)
)

logger.debug("build_cmd end")
logger.debug(f"cmds: {cmds}")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# OPTIONS ARE SET BY USER IN THIS FILE AS INDICATED BELOW BY:
#
#

# LIST OF MODEL VERSIONS TO BE TESTED
modnames = ["CanCM4"]

# ROOT PATH FOR MODELS CLIMATOLOGIES
test_data_path = (
"demo_data_tmp/CMIP5_demo_clims/cmip5.historical.%(model).r1i1p1.mon.pr.198101-200512.AC.v20200426.nc"
)

# ROOT PATH FOR OBSERVATIONS
reference_data_path = "NOAA-NCEI/GPCP-2-3/mon/pr/gn/v20210727/pr_mon_GPCP-2-3_PCMDI_gn_197901-201907.nc"

# DIRECTORY WHERE TO PUT RESULTS
results_dir = "demo_output_tmp/monsoon_wang"

# Threshold
threshold = 2.5 / 86400
Loading