Fix stale 'ocnice' grid directory references in case creation - #45
Open
manishvenu wants to merge 3 commits into
Open
Fix stale 'ocnice' grid directory references in case creation#45manishvenu wants to merge 3 commits into
manishvenu wants to merge 3 commits into
Conversation
CrocoDash's Case creation writes MOM6/CICE/WW3 grid files into separate ocean/sea_ice/wave subdirectories, but several call sites here still looked for a single combined "ocnice" directory that no longer exists. This made _update_component_grids_xml's ocn_dir existence assertion fail unconditionally for every custom-grid case, which was silently swallowed by CrocoDash's Case.__init__ -- case.setup never ran, and MOM6's grid namelist section (NIGLOBAL, GRID_CONFIG, ...) never got written to user_nl_mom, only surfacing as a KeyError at build time. get_custom_ocn_grid_path() now points at "ocean"; new get_custom_ice_grid_path()/get_custom_wave_grid_path() cover CICE's grid file and WW3's *.inp files, which live in their own subdirectories.
Needed by CrocoDash's process_cice_forcing (extract_forcings/cice.py), which calls supergrid.expand(n_halo_cells) to grow the CICE grid by a halo before regridding -- the previously-pinned commit predates that method entirely. Points at NCAR/mom6_forge#122 (still open upstream; rebase onto its merge commit once that lands).
manishvenu
added a commit
to CROCODILE-CESM/CrocoDash
that referenced
this pull request
Aug 7, 2026
visualCaseGen previously looked for a single combined "ocnice" grid directory that no longer exists (CrocoDash's Case creation writes ocean/sea_ice/wave separately), which silently broke case.setup for every custom-grid case -- see ESMCI/visualCaseGen#45. Its embedded external/mom6_forge was also several months stale and missing SupergridBase.expand(), needed by process_cice_forcing.
Picks up NCAR/mom6_forge#112 (calendar-arg-chl), merged with the existing expand() bump. interpolate_and_fill_seawifs() now accepts a calendar kwarg, matching what CrocoDash's process_chl() has been passing since CrocoDash#220.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Casecreation writes MOM6/CICE/WW3 grid files into separateocean/sea_ice/wavesubdirectories, but several call sites here still looked for a single combinedocnicedirectory that no longer exists on disk._update_component_grids_xml'socn_direxistence assertion fail unconditionally for every custom-grid case created throughCaseCreator(add_grids_to_ccs_config=Falsepath). TheAssertionErrorwas silently swallowed by the caller's broadexcept Exception, socase.setupnever actually ran and the MOM6 grid namelist section (NIGLOBAL,GRID_CONFIG,GRID_FILE, ...) never got written touser_nl_mom-- the case looked like it was created successfully, but only surfaced as aKeyError: 'NIGLOBAL'much later, atcase.buildtime.get_custom_ocn_grid_path()now points at"ocean"(matching where MOM6's supergrid/topo/vgrid/scrip/ESMF-mesh files actually live). Added two new sibling methods,get_custom_ice_grid_path()(->"sea_ice") andget_custom_wave_grid_path()(->"wave"), since CICE's grid file and WW3's.inpfiles live in their own subdirectories, not alongside the ocean grid files.Test plan