From 91d4d325f469994aa9fb0f0904b9ed1673d1f7f4 Mon Sep 17 00:00:00 2001 From: Manish Venumuddula <80477243+manishvenu@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:28:59 -0700 Subject: [PATCH] Fix Demo Bugs (#43) * Bathy Bug * Remove tides from pytet demo * Try adding ipykernel --- demos/reanalysis-forced.ipynb | 5 ++++- docs/requirements.txt | 1 + regional_mom6/regional_mom6.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/demos/reanalysis-forced.ipynb b/demos/reanalysis-forced.ipynb index d25e9dc0..be88ec6a 100644 --- a/demos/reanalysis-forced.ipynb +++ b/demos/reanalysis-forced.ipynb @@ -355,6 +355,8 @@ "metadata": {}, "outputs": [], "source": [ + "# NBVAL_SKIP\n", + "# Tidal files are not available in the repository, and must be requested from the TPXO website\n", "expt.setup_boundary_tides(\n", " tide_h_path,\n", " tide_u_path,\n", @@ -440,7 +442,8 @@ "metadata": {}, "outputs": [], "source": [ - "expt.setup_run_directory(surface_forcing = \"era5\", with_tides = True)" + "expt.setup_run_directory(surface_forcing = \"era5\", with_tides = False)\n", + "# When tides files are found, run the previous command with parameter with_tides = True" ] }, { diff --git a/docs/requirements.txt b/docs/requirements.txt index 5dc24ef8..d53d2f05 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,3 +2,4 @@ myst-parser sphinx-book-theme nbsphinx IPython +ipykernel \ No newline at end of file diff --git a/regional_mom6/regional_mom6.py b/regional_mom6/regional_mom6.py index 17738838..347b71d2 100644 --- a/regional_mom6/regional_mom6.py +++ b/regional_mom6/regional_mom6.py @@ -2022,8 +2022,8 @@ def tidy_bathymetry( bathymetry = xr.Dataset( {"depth": (["ny", "nx"], bathymetry[vertical_coordinate_name].values)}, coords={ - "lon": (["nx", "ny"], bathymetry[longitude_coordinate_name].values), - "lat": (["nx", "ny"], bathymetry[latitude_coordinate_name].values), + "lon": (["ny", "nx"], bathymetry[longitude_coordinate_name].values), + "lat": (["ny", "nx"], bathymetry[latitude_coordinate_name].values), }, ) bathymetry.attrs["depth"] = "meters"