Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Grids (Horizontal · Vertical)

The first step of any CrocoDash workflow is defining the spatial domain: a horizontal grid (Grid) and a vertical grid (VGrid). Bathymetry (Topo), which sits between the two, has its own notebook: see Bathymetry.

CrocoDash re-exports these objects from mom6_forge with no modifications, the full API (class methods, creation patterns, file formats) lives in the mom6_forge documentation. This notebook is the CrocoDash-flavored on-ramp; follow the links in each section for the deeper narrative tutorials and interactive widgets.

This notebook covers:

  • Section 1: build a horizontal grid from scratch

  • Section 2: build a vertical grid

  • Section 3: load a pre-existing grid, or subset a global one

  • Section 4: Arctic/Antarctic polar-projected grids

📖 CrocoDash grids docs · 📖 mom6_forge docs

Section 1: Horizontal Grid, from Scratch

Section 2: Vertical Grid

The vertical grid needs a maximum depth, normally this comes from your finished Topo object’s topo.max_depth (see Bathymetry). Here we use a representative depth directly so this section runs on its own.

Section 3: Pre-Generated or Subset Grids

Two ways to use a pre-existing horizontal grid instead of generating one from scratch:

  • Section 3.1: load a supergrid directly from a file.

  • Section 3.2: extract a regional sub-grid from a global supergrid by lat/lon bounds.

(Loading or building the matching Topo/VGrid for either of these follows exactly the same pattern shown in Bathymetry and Section 2 above, just swap in the grid object from here.)

Section 3.1: Load Pre-Generated Grid Files

Use this when you already have a MOM6 supergrid (ocean_hgrid.nc), e.g. from a previous run or a shared community grid like NWA12.

Section 3.2: Subset a Global Supergrid

Use this when you have a global or basin-scale supergrid and want to extract a regional sub-domain by specifying lower-left and upper-right corner coordinates, via subgrid_from_supergrid:

Section 4: Polar-Projected Grids (Arctic & Antarctic)

Standard lat/lon grids degrade at high latitudes, cell aspect ratios become extreme, and the MOM6 timestep constraint can become prohibitively tight near the poles. For Arctic or Antarctic domains, mom6_forge can build a grid in a projected coordinate system (e.g. polar stereographic) and reproject it to the geographic coordinates MOM6 expects.

Two approaches are shown here:

  1. Interactive: use the GridCreator widget and select From Projection mode.

  2. Programmatic: call Grid.from_projection() directly.

Approach 1: Interactive GridCreator Widget

Launch the widget, choose From Projection in the method dropdown, select Arctic Polar Stereographic (EPSG:3995) or Antarctic Polar Stereographic (EPSG:3031) from the CRS dropdown, set a resolution, then drag a rectangle on the polar map to define the domain. The widget calls Grid.from_projection() under the hood and saves the result to GridLibrary/.

Approach 2: Programmatic: Grid.from_projection()

Pass a pyproj CRS (as an EPSG string or integer) along with the domain extents in metres in the native projection. The method reprojects to geographic coordinates and computes grid metrics using exact great-circle geometry.

CRSRegion
"EPSG:3995"Arctic Polar Stereographic
"EPSG:3031"Antarctic Polar Stereographic

Arctic domain (EPSG:3995)

EPSG:3995 is centred at the North Pole. Extents are in metres from the pole. The example below creates a 2000 km × 2000 km domain at 50 km resolution.

Antarctic domain (EPSG:3031)

EPSG:3031 is centred at the South Pole. The example below creates a 3000 km × 3000 km domain (covering most of Antarctica) at 25 km resolution.

Next steps

Once you have a Grid and VGrid, build a matching Topo. See Bathymetry , then pass all three to Case: see Case Setup.