Skip to content

Commit 5c3a5c8

Browse files
committed
add testing script and cfg file
1 parent 60f1084 commit 5c3a5c8

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[#]
2+
sets = ["lat_lon_native"]
3+
case_id = "model_vs_model"
4+
variables = ["TGCLDLWP"]
5+
seasons = ["ANN", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "DJF", "MAM", "JJA", "SON"]
6+
regions = ["global", "30S30N-150E90W"]
7+
#test_colormap = "Blues"
8+
#reference_colormap = "Blues"
9+
diff_colormap = "RdBu"
10+
#contour_levels = [ 1.25892541, 2.26754313, 4.08423865, 7.35642254, 13.25019355, 23.86589787, 42.98662347, 77.42636827, 139.45832492, 251.18864315]
11+
diff_levels = [-35, -30, -25, -20, -15, -10, -5, 5, 10, 15, 20, 25, 30, 35]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env python3
2+
"""
3+
This script runs e3sm_diags with the lat_lon_native set to visualize native grid data.
4+
"""
5+
6+
import os
7+
8+
from e3sm_diags.parameter.lat_lon_native_parameter import LatLonNativeParameter
9+
from e3sm_diags.run import runner
10+
11+
# Create parameter object
12+
param = LatLonNativeParameter()
13+
14+
# Basic parameters
15+
param.results_dir = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.zhang40/tests/lat_lon_native_file"
16+
# Create results directory if it doesn't exist
17+
if not os.path.exists(param.results_dir):
18+
os.makedirs(param.results_dir)
19+
20+
21+
# Model data
22+
23+
##(1)
24+
#param.test_data_path = "/home/ac.zhang40/test"
25+
#param.test_name = "v3.LR.amip_0101"
26+
#param.short_test_name = "v3.LR.amip_0101"
27+
#param.reference_data_path = "/home/ac.zhang40/test"
28+
#param.ref_name = "v3.HR.test4"
29+
#param.short_ref_name = "v3.HR.test4"
30+
#param.seasons = ["DJF"]
31+
32+
33+
##(2)
34+
#param.test_data_path = "/home/ac.zhang40/test"
35+
#param.test_file = "v3.LR.amip_0101_DJF_climo.nc"
36+
#param.short_test_name = "v3.LR.amip_0101"
37+
#param.reference_data_path = "/home/ac.zhang40/test"
38+
#param.ref_file = "v3.HR.test4_DJF_climo.nc"
39+
#param.short_ref_name = "v3.HR.test4"
40+
#param.seasons = ["DJF"]
41+
##(3)
42+
param.test_data_path = "/lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051/archive/atm/hist"
43+
param.test_file = "v3.LR.historical_0051.eam.h0.1989-12.nc"
44+
#param.short_test_name = "v3.LR.amip_0101"
45+
param.reference_data_path = "/lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051/archive/atm/hist"
46+
param.ref_file = "v3.LR.historical_0051.eam.h0.1989-12.nc"
47+
#param.reference_data_path = "/lcrc/group/e3sm2/ac.jwolfe/E3SMv3_dev/20250404.wcycl1850.ne120pg2_r025_RRSwISC6to18E3r5.test4.chrysalis/archive/atm/hist/"
48+
#param.ref_file = "20250404.wcycl1850.ne120pg2_r025_RRSwISC6to18E3r5.test4.chrysalis.eam.h0.0018-12.nc"
49+
param.short_ref_name = "v3.HR.test4"
50+
#param.seasons = ["DJF"]
51+
param.time_slices=["0"]
52+
53+
54+
param.case_id = "model_vs_model"
55+
56+
57+
# Native grid settings
58+
param.test_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne30pg2.nc"
59+
param.ref_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne30pg2.nc"
60+
#param.ref_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne120pg2.nc"
61+
62+
param.split_periodic_elements = True
63+
param.antialiased = False
64+
65+
# param.model_only = True
66+
param.run_type = "model_vs_model"
67+
68+
# Run the diagnostic
69+
runner.sets_to_run = ["lat_lon_native"]
70+
runner.run_diags([param])

0 commit comments

Comments
 (0)