Skip to content

Commit 18771b7

Browse files
committed
add skeleton for a the new lat_lon_native set
1 parent 38bb489 commit 18771b7

File tree

9 files changed

+1423
-0
lines changed

9 files changed

+1423
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import uxarray as ux
2+
import matplotlib.pyplot as pl
3+
import cartopy.crs as ccrs
4+
import cartopy.feature as cfeature
5+
6+
base_path = "/Users/zhang40/Documents/ACME_simulations/E3SM_v2/native_grid_data/"
7+
grid_info = "ne30pg2"
8+
grid_path = base_path + f"{grid_info}.nc"
9+
data_path = base_path + f"PRECC.{grid_info}.nc"
10+
11+
uxds = ux.open_dataset(grid_path, data_path)
12+
13+
pc = uxds["PRECT"].to_polycollection()
14+
#pc = uxds["PRECT"].to_polycollection(periodic_elements="split")
15+
16+
# disables grid lines
17+
pc.set_antialiased(False)
18+
19+
pc.set_cmap("plasma")
20+
21+
fig, ax = plt.subplots(
22+
1,
23+
1,
24+
figsize=(10, 5),
25+
facecolor="w",
26+
constrained_layout=True,
27+
subplot_kw=dict(projection=ccrs.PlateCarree()),
28+
)
29+
30+
ax.add_feature(cfeature.COASTLINE)
31+
ax.add_feature(cfeature.BORDERS)
32+
33+
ax.add_collection(pc)
34+
ax.set_global()
35+
plt.title("PolyCollection Plot with Projection & Features")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[#]
2+
sets = ["lat_lon_native"]
3+
case_id = "model_vs_model"
4+
variables = ["PRECT"]
5+
seasons = ["ANN", "DJF", "MAM", "JJA", "SON"]
6+
regions = ["global"]
7+
test_colormap = "WhiteBlueGreenYellowRed.rgb"
8+
reference_colormap = "WhiteBlueGreenYellowRed.rgb"
9+
diff_colormap = "BrBG"
10+
contour_levels = [0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16]
11+
diff_levels = [-2.5, -2, -1.5, -1, -0.5, -0.25, 0.25, 0.5, 1, 1.5, 2, 2.5]
12+
13+
# Run type for model vs model
14+
run_type = "model_vs_model"
15+
16+
# Native grid settings
17+
grid_file = ""
18+
split_periodic_elements = True
19+
antialiased = False
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[#]
2+
sets = ["lat_lon_native"]
3+
case_id = "model_vs_obs"
4+
variables = ["PRECT"]
5+
seasons = ["ANN", "DJF", "MAM", "JJA", "SON"]
6+
regions = ["global"]
7+
test_colormap = "WhiteBlueGreenYellowRed.rgb"
8+
reference_colormap = "WhiteBlueGreenYellowRed.rgb"
9+
diff_colormap = "BrBG"
10+
contour_levels = [0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16]
11+
diff_levels = [-2.5, -2, -1.5, -1, -0.5, -0.25, 0.25, 0.5, 1, 1.5, 2, 2.5]
12+
13+
# Native grid settings
14+
grid_file = ""
15+
split_periodic_elements = True
16+
antialiased = False

0 commit comments

Comments
 (0)