Skip to content

Commit 4e4077e

Browse files
committed
Boop
1 parent cce2dd7 commit 4e4077e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

visualCaseGen/custom_widget_types/case_creator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def create_case(self, do_exec):
134134
if self._assign_grids_through_ccs_config:
135135
resolution = Path(cvars["CUSTOM_GRID_PATH"].value).name
136136
else:
137-
resolution = "visualCaseGen_Custom" # Set to a default visualCaseGen Resolution since grids are changed through xml changes
137+
resolution = "inputdir" # Set to a default visualCaseGen Resolution since grids are changed through xml changes
138138
else:
139139
raise RuntimeError(f"Unknown grid mode: {cvars['GRID_MODE'].value}")
140140

@@ -151,7 +151,7 @@ def create_case(self, do_exec):
151151

152152
# If we don't pick the grids through ccs_config, use xml changes
153153
if not self._assign_grids_through_ccs_config:
154-
self._update_grids()
154+
self._update_grids(do_exec)
155155

156156
# Navigate to the case directory:
157157
with self._out:
@@ -833,10 +833,10 @@ def _update_grids(self, do_exec):
833833
if ocn_grid is None:
834834
raise RuntimeError("No ocean grid specified.")
835835

836-
self._update_component_grids(custom_grid_path, ocn_grid, ocn_grid_mode, do_exec)
836+
self._update_component_grids_xml(custom_grid_path, ocn_grid, ocn_grid_mode, do_exec)
837837

838838

839-
def _update_component_grids(
839+
def _update_component_grids_xml(
840840
self, custom_grid_path, ocn_grid, ocn_grid_mode, do_exec
841841
):
842842
"""Update the component_grids xml file with custom ocnice grid information.
@@ -891,7 +891,7 @@ def _update_component_grids(
891891

892892
xmlchange("LND_DOMAIN_MESH", (self._cime.domains["lnd"][cvars["CUSTOM_LND_GRID"].value].mesh).replace("$DIN_LOC_ROOT",self._cime.din_loc_root), do_exec, self._is_non_local(), self._out)
893893

894-
if cvars["CUSTOM_ROF_GRID"].value is not None:
894+
if cvars["CUSTOM_ROF_GRID"].value is not None and cvars["CUSTOM_ROF_GRID"].value != "" and cvars["CUSTOM_ROF_GRID"].value != "null":
895895
xmlchange("ROF_GRID", cvars["CUSTOM_ROF_GRID"].value, do_exec, self._is_non_local(), self._out)
896896
xmlchange("ROF_DOMAIN_MESH", (self._cime.domains["rof"][cvars["CUSTOM_ROF_GRID"].value].mesh).replace("$DIN_LOC_ROOT",self._cime.din_loc_root), do_exec, self._is_non_local(), self._out)
897897

0 commit comments

Comments
 (0)