{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": "# Modify existing MOM6 grid" }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Import Modules" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%%capture\n", "\n", "from mom6_forge.grid import Grid\n", "from mom6_forge.topo import Topo" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Create a MOM6 grid object from an existing supergrid\n", "\n", "tx2_3v2 is the current MOM6-CESM workhorse grid (0.66deg, tripolar)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "grid = Grid.from_supergrid('/glade/p/cesmdata/inputdata/ocn/mom/tx2_3v2/ocean_hgrid_221123.nc')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Read the bathymetry" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "topo = Topo.from_topo_file(grid, '/glade/p/cesmdata/inputdata/ocn/mom/tx2_3v2/ocean_topog_230413.nc')" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## 4. Modify Depth" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e80c474148ed4c098408ca4032408d15", "version_major": 2, "version_minor": 0 }, "text/plain": [ "TopoEditor(children=(VBox(children=(HTML(value='