Skip to content

Commit

Permalink
Refactor area_mean_time_series set
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Dec 28, 2023
1 parent 56c7ffe commit e16e655
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/test_refactor/diags.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sets = ["area_mean_time_series"]
case_id = "GPCP_v3.2"
variables = ["PRECT"]
ref_name = "GPCP_v3.2"
reference_name = "GPCP v3.2"
seasons = ["ANN"]
regions = ["global"]
42 changes: 42 additions & 0 deletions examples/test_refactor/run_area_mean_time_series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os
import sys

from e3sm_diags.parameter.core_parameter import CoreParameter
from e3sm_diags.run import runner

param = CoreParameter()

# Location of the data.
param.reference_data_path = (
"/global/cfs/cdirs/e3sm/e3sm_diags/obs_for_e3sm_diags/climatology/"
)
param.test_data_path = (
"/global/cfs/cdirs/e3sm/e3sm_diags/postprocessed_e3sm_v2_data_for_e3sm_diags/20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis/climatology/rgr"
)
# Name of the test model data, used to find the climo files.
param.test_name = "20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis"
# An optional, shorter name to be used instead of the test_name.
param.short_test_name = "v2rc3e"

# What plotsets to run the diags on.
#param.sets = ["lat_lon"]
# Name of the folder where the results are stored.
# Change `prefix` to use your directory.
prefix = "/global/cfs/cdirs/e3sm/www/forsyth/test_e3sm_refactor"
param.results_dir = os.path.join(prefix, "test_662")

# Below are more optional arguments.

# Title of the difference plots.
param.diff_title = "Model - Obs."
# Save the netcdf files for each of the ref, test, and diff plot.
param.save_netcdf = True
# For running with multiprocessing.
# param.multiprocessing = True
# param.num_workers = 32
# Use the specified `.cfg` file for debugging
CFG_PATH = "examples/test_refactor/diags.cfg"
sys.argv.extend(["-d", CFG_PATH])

runner.sets_to_run = ["zonal_mean_xy"]
runner.run_diags([param])

0 comments on commit e16e655

Please sign in to comment.