Skip to content

Commit 8673437

Browse files
committed
Try This
1 parent 84d899c commit 8673437

File tree

2 files changed

+2
-50
lines changed

2 files changed

+2
-50
lines changed

visualCaseGen/custom_widget_types/case_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ def _update_component_grids(
235235

236236
xmlchange("LND_GRID", cvars["CUSTOM_LND_GRID"].value, do_exec, self._is_non_local(), self._out)
237237

238-
xmlchange("ATM_DOMAIN_MESH", cvars["CUSTOM_ATM_DOMAIN_MESH"].value, do_exec, self._is_non_local(), self._out)
238+
xmlchange("ATM_DOMAIN_MESH", os.path.expandvars(self._cime.domains["atm"][cvars["CUSTOM_ATM_GRID"].value].mesh), do_exec, self._is_non_local(), self._out)
239239

240-
xmlchange("LND_DOMAIN_MESH", cvars["CUSTOM_LND_DOMAIN_MESH"].value, do_exec, self._is_non_local(), self._out)
240+
xmlchange("LND_DOMAIN_MESH", os.path.expandvars(self._cime.domains["lnd"][cvars["CUSTOM_LND_GRID"].value].mesh), do_exec, self._is_non_local(), self._out)
241241

242242

243243
lnd_grid_mode = cvars["LND_GRID_MODE"].value

visualCaseGen/specs/grid_options.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -125,27 +125,6 @@ def custom_atm_grid_options_func(comp_atm, grid_mode):
125125
func=custom_atm_grid_options_func, args=(cvars["COMP_ATM"], cvars["GRID_MODE"])
126126
)
127127

128-
# CUSTOM_ATM_DOMAIN_MESH options
129-
def custom_atm_domain_mesh_options_func(comp_atm, grid_mode):
130-
"""Return the options and descriptions for the custom ATM grid variable."""
131-
compset_lname = cvars["COMPSET_LNAME"].value
132-
compatible_atm_grids = []
133-
descriptions = []
134-
meshes = []
135-
for atm_grid in cime.domains["atm"].values():
136-
if check_comp_grid("ATM", atm_grid, compset_lname) is False:
137-
continue
138-
compatible_atm_grids.append(atm_grid.mesh)
139-
descriptions.append(atm_grid.desc)
140-
meshes.append(atm_grid.mesh)
141-
return meshes, descriptions
142-
143-
cv_custom_atm_domain_mesh = cvars["CUSTOM_ATM_DOMAIN_MESH"]
144-
cv_custom_atm_domain_mesh.options_spec = OptionsSpec(
145-
func=custom_atm_domain_mesh_options_func, args=(cvars["COMP_ATM"], cvars["GRID_MODE"])
146-
)
147-
148-
149128
def set_custom_ocn_grid_options(cime):
150129
"""Set the options and options specs for the custom OCN grid variables.
151130
This function is called at initialization."""
@@ -243,33 +222,6 @@ def custom_lnd_grid_options_func(comp_lnd, custom_atm_grid, lnd_grid_mode):
243222
args=(cvars["COMP_LND"], cvars["CUSTOM_ATM_GRID"], cvars["LND_GRID_MODE"]),
244223
)
245224

246-
247-
# CUSTOM_LND_DOMAIN_MESH options
248-
def custom_lnd_domain_mesh_options_func(comp_lnd, custom_atm_grid, lnd_grid_mode):
249-
"""Return the options and descriptions for the custom LND grid variable."""
250-
if comp_lnd != "clm":
251-
return [custom_atm_grid], [
252-
"(When CLM is not selected, custom LND grid is automatically set to ATM grid.)"
253-
]
254-
else:
255-
compset_lname = cvars["COMPSET_LNAME"].value
256-
compatible_lnd_grids = []
257-
descriptions = []
258-
meshes = []
259-
for lnd_grid in cime.domains["lnd"].values():
260-
if check_comp_grid("LND", lnd_grid, compset_lname) is False:
261-
continue
262-
compatible_lnd_grids.append(lnd_grid.name)
263-
descriptions.append(lnd_grid.desc)
264-
meshes.append(lnd_grid.mesh)
265-
return meshes, descriptions
266-
267-
cv_custom_lnd_domain_mesh = cvars["CUSTOM_LND_DOMAIN_MESH"]
268-
cv_custom_lnd_domain_mesh.options_spec = OptionsSpec(
269-
func=custom_lnd_domain_mesh_options_func,
270-
args=(cvars["COMP_LND"], cvars["CUSTOM_ATM_GRID"], cvars["LND_GRID_MODE"]),
271-
)
272-
273225
cv_fsurdat_idealized = cvars["FSURDAT_IDEALIZED"]
274226
cv_fsurdat_idealized.options = ["True", "False"]
275227

0 commit comments

Comments
 (0)