From 61aa8f16d3225ba0276377d15073fd54167884df Mon Sep 17 00:00:00 2001 From: Ashley Barnes <53282288+ashjbarnes@users.noreply.github.com> Date: Tue, 23 Apr 2024 08:39:34 +0200 Subject: [PATCH 1/2] fix typo (#161) --- regional_mom6/regional_mom6.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regional_mom6/regional_mom6.py b/regional_mom6/regional_mom6.py index 02fecafe..83fa9c68 100644 --- a/regional_mom6/regional_mom6.py +++ b/regional_mom6/regional_mom6.py @@ -925,8 +925,8 @@ def setup_bathymetry( self, *, bathymetry_path, - longitude_coordinate_name="lat", - latitude_coordinate_name="lon", + longitude_coordinate_name="lon", + latitude_coordinate_name="lat", vertical_coordinate_name="elevation", fill_channels=False, minimum_layers=3, From 102c5f93fb55d20791a27de97ffc4aee3a5be093 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 23 Apr 2024 09:51:49 +0300 Subject: [PATCH 2/2] few notebook fixes (#159) --- demos/access_om2-forced.ipynb | 21 ++++++--------------- demos/reanalysis-forced.ipynb | 5 +++-- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/demos/access_om2-forced.ipynb b/demos/access_om2-forced.ipynb index 1dd3297b..ec05dba1 100644 --- a/demos/access_om2-forced.ipynb +++ b/demos/access_om2-forced.ipynb @@ -22,26 +22,17 @@ "Additionally, you'll need access to `/g/data/x77/` if you want to use the same executable using the latest FMS build (a good idea for troubleshooting)." ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To use your own version of regional_mom6 package, clone the entire github repository\n", - "on your machine and set the regional-mom6 path using the `os` library, like shown below:" - ] - }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ - "import os\n", - "os.chdir(\"/g/data/v45/nc3020/dhruvs-regional-mom6/\")\n", - "\n", "import regional_mom6 as rmom6\n", + "\n", + "import os\n", "import xarray as xr\n", "from pathlib import Path\n", "from dask.distributed import Client" @@ -526,7 +517,7 @@ "\n", "Setting up a regional model in MOM6 can be a pain. The goal of this package is that users should spend their debugging time fixing a model that's running and doing weird things, rather than puzzling over a model that won't even start.\n", "\n", - "In running this notebook, you'll hopefully have a running MOM6 regional model. There will still be a lot of fiddling to do with the MOM_input file to make sure that the parameters are set up right for your domain, and you might want to manually edit some of the input files. *But*, this package should help you bypass most of the woes of regridding, encoding and understanding the arcane arts of the MOM6 boundary segment files. " + "In running this notebook, you'll hopefully have a running MOM6 regional model. There will still be a lot of fiddling to do with the `MOM_input` file to make sure that the parameters are set up right for your domain, and you might want to manually edit some of the input files. *But*, this package should help you bypass most of the woes of regridding, encoding and understanding the arcane arts of the MOM6 boundary segment files. " ] }, { @@ -590,8 +581,8 @@ "source": [ "expt_name = \"tassie-glorys\"\n", "\n", - "latitude_extent = [-48, -38.95]\n", - "longitude_extent = [143, 150]\n", + "latitude_extent = (-48, -38.95)\n", + "longitude_extent = (143, 150)\n", "\n", "date_range = [\"2003-01-01 00:00:00\", \"2003-01-05 00:00:00\"]\n", "\n", diff --git a/demos/reanalysis-forced.ipynb b/demos/reanalysis-forced.ipynb index ee4252d7..eb49a220 100644 --- a/demos/reanalysis-forced.ipynb +++ b/demos/reanalysis-forced.ipynb @@ -33,8 +33,9 @@ "metadata": {}, "outputs": [], "source": [ - "import os\n", "import regional_mom6 as rmom6\n", + "\n", + "import os\n", "from pathlib import Path\n", "from dask.distributed import Client" ] @@ -381,7 +382,7 @@ "\n", "Ideally, MOM6 runs. If not, the first thing you should try is reducing the timestep. You can do this by adding `#override DT=XXXX` to your `MOM_override` file. \n", "\n", - "If there's strange behaviour on your boundaries, you could play around with the `nudging timescale` (an example is already included in the `MOM_override` file). Sometimes, if your boundary has a lot going on (like all of the eddies spinning off the ACC), it can be hard to avoid these edge effects. This is because the chaotic, submesoscale structures developed within the regional domain won't match the flow at the boundary. \n", + "If there's strange behaviour on your boundaries, you could play around with the `nudging timescale` (an example is already included in the `MOM_override` file). Sometimes, if your boundary has a lot going on (like all of the eddies spinning off the western boundary currents or off the Antarctic Circumpolar current), it can be hard to avoid these edge effects. This is because the chaotic, submesoscale structures developed within the regional domain won't match the flow at the boundary. \n", "\n", "Another thing that can go wrong is little bays that create non-advective cells at your boundaries. Keep an eye out for tiny bays where one side is taken up by a boundary segment. You can either fill them in manually, or move your boundary slightly to avoid them" ]