diff --git a/pyproject.toml b/pyproject.toml index e63b684..d6ca747 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ pybdy_ncml_generator = "pybdy.pybdy_ncml_generator:main" pybdy_settings_editor = "pybdy.pybdy_settings_editor:main" [project.urls] -documentation = "https://pynemo.readthedocs.io/en/latest/" +documentation = "https://noc-msm.github.io/pyBDY/" repository = "https://github.com/NOC-MSM/pyBDY" [tool.coverage.run] diff --git a/tests/pyBDY_unit_test.ipynb b/tests/pyBDY_unit_test.ipynb deleted file mode 100644 index 34ee646..0000000 --- a/tests/pyBDY_unit_test.ipynb +++ /dev/null @@ -1,133 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "550c79a6-fc27-4d17-a21a-75dd6659da15", - "metadata": {}, - "source": [ - "## Ideas for unit testing in pyBDY" - ] - }, - { - "cell_type": "markdown", - "id": "596074da-1acc-4536-a270-6d15914d5620", - "metadata": {}, - "source": [ - "Several of these routines have been adapted from pyDOMCFG developed by Mattia Almansi, Diego Druciaferri and James Harle." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fb356b08-89a8-449a-bf3c-757e4a8c31ae", - "metadata": {}, - "outputs": [], - "source": [ - "import sys\n", - "sys.path.insert(1, '/home/joaomorado/git_repos/PyNEMO_MyFork/tests')\n", - "from bathymetry import *" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "bc2c7d6d-7799-4f8e-87ea-d8ded3921b21", - "metadata": {}, - "outputs": [], - "source": [ - "# Generate coordinates and bathymetry of parent and child - flat bottom case\n", - "ds_bathy_child = Bathymetry(0.5, 0.5, 20, 20, -10., 45., degrees=45).flat(5.0e3)\n", - "ds_bathy_parent = Bathymetry(1., 1., 30, 30, -20., 35.).flat(5.0e3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "77c163cd-95af-47a4-af2a-e59821bc76e0", - "metadata": {}, - "outputs": [], - "source": [ - "# Create some vertical grid information\n", - "z3t = xr.DataArray(np.arange(10.,2500.,20.), dims=(\"z\",))\n", - "z3w = xr.DataArray(np.arange(0.,2500.,20.), dims=(\"z\",))\n", - "e3t = xr.full_like(z3t, 20.)\n", - "e3w = xr.full_like(z3t, 20.)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "28d8bef9-0792-4250-8daa-72e0508c2d0d", - "metadata": {}, - "outputs": [], - "source": [ - "# Merge the vertical grid information with coordinates and bathymetry\n", - "ds_domcfg_parent = merge_z3_and_e3(ds_bathy_parent, z3t, z3w, e3t, e3w)\n", - "ds_domcfg_child = merge_z3_and_e3(ds_bathy_child , z3t, z3w, e3t, e3w)\n", - "\n", - "# Generate variables to use as source data\n", - "ds_var = generate_variables(ds_domcfg_parent,)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7ac7bde6-1d77-45c3-973e-925a946c8c54", - "metadata": {}, - "outputs": [], - "source": [ - "# Save to file\n", - "ds_domcfg_parent.to_netcdf('/home/joaomorado/git_repos/PyNEMO_MyFork/parent.nc')\n", - "ds_domcfg_child.to_netcdf('/home/joaomorado/git_repos/PyNEMO_MyFork/child_rot45.nc')\n", - "ds_var.to_netcdf('/home/joaomorado/git_repos/PyNEMO_MyFork/variables.nc')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "70b084d1-c28c-49ce-8a3c-d35860eefb3a", - "metadata": {}, - "outputs": [], - "source": [ - "# Does it look ok?\n", - "plt.plot(ds_bathy_child.glamt, ds_bathy_child.gphit,'go')\n", - "plt.plot(ds_bathy_parent.glamt, ds_bathy_parent.gphit,'r.')\n", - "plt.title('Parent and $45\\degree$ rotated child grid');" - ] - }, - { - "cell_type": "markdown", - "id": "81b5c6ac-7b67-48d6-99e7-03db18f640c9", - "metadata": {}, - "source": [ - "### Other setups to consider\n", - "\n", - "- [ ] flat bottom (parent) -> flat bottom (child) with and without different vertical discretisation (in z and sigma)\n", - "- [ ] realistic bathymetry (parent) -> realistic bathymetry (child) with and without different vertical discretisation (in z and sigma)\n", - "- [ ] rotation of parent or child grid or both\n", - "- [ ] uniform and realistic tracer field" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "", - "language": "python", - "name": "" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.16" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}