From c36003334a4b90db6d238525ddebf25ea7d884fc Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Thu, 22 Jun 2023 14:50:43 +1000 Subject: [PATCH] mom6_regional -> regional_mom6 --- .github/workflows/testing.yml | 4 ++-- .gitignore | 4 ++-- LICENSE | 2 +- README.md | 6 +++--- demos/model-forced.ipynb | 10 +++++----- demos/reanalysis-forced.ipynb | 8 ++++---- docs/api.rst | 2 +- docs/conf.py | 2 +- docs/contributing.md | 2 +- pyproject.toml | 6 +++--- {mom6_regional => regional_mom6}/__init__.py | 2 +- .../default_rundir/MOM_input | 0 .../default_rundir/MOM_override | 0 .../default_rundir/SIS_input | 0 .../default_rundir/config.yaml | 0 .../default_rundir/data_table | 0 .../default_rundir/diag_table | 0 .../default_rundir/env.yaml | 0 .../default_rundir/era5_surface/MOM_input | 0 .../default_rundir/era5_surface/MOM_override | 0 .../default_rundir/era5_surface/README.md | 0 .../default_rundir/era5_surface/SIS_input | 0 .../default_rundir/era5_surface/config.yaml | 0 .../default_rundir/era5_surface/data_table | 0 .../default_rundir/era5_surface/diag_table | 0 .../default_rundir/era5_surface/env.yaml | 0 .../default_rundir/era5_surface/field_table | 0 .../default_rundir/era5_surface/input.nml | 0 .../default_rundir/era5_surface/job.yaml | 0 .../default_rundir/field_table | 0 .../default_rundir/input.nml | 0 .../default_rundir/job.yaml | 0 .../default_rundir/jra_surface/MOM_input | 0 .../default_rundir/jra_surface/MOM_override | 0 .../default_rundir/jra_surface/README.md | 0 .../default_rundir/jra_surface/SIS_input | 0 .../default_rundir/jra_surface/config.yaml | 0 .../default_rundir/jra_surface/data_table | 0 .../default_rundir/jra_surface/diag_table | 0 .../default_rundir/jra_surface/env.yaml | 0 .../default_rundir/jra_surface/field_table | 0 .../default_rundir/jra_surface/input.nml | 0 .../default_rundir/jra_surface/job.yaml | 0 .../mom6_regional.py => regional_mom6/regional_mom6.py | 0 44 files changed, 24 insertions(+), 24 deletions(-) rename {mom6_regional => regional_mom6}/__init__.py (71%) rename {mom6_regional => regional_mom6}/default_rundir/MOM_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/MOM_override (100%) rename {mom6_regional => regional_mom6}/default_rundir/SIS_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/config.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/data_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/diag_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/env.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/MOM_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/MOM_override (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/README.md (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/SIS_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/config.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/data_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/diag_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/env.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/field_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/input.nml (100%) rename {mom6_regional => regional_mom6}/default_rundir/era5_surface/job.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/field_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/input.nml (100%) rename {mom6_regional => regional_mom6}/default_rundir/job.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/MOM_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/MOM_override (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/README.md (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/SIS_input (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/config.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/data_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/diag_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/env.yaml (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/field_table (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/input.nml (100%) rename {mom6_regional => regional_mom6}/default_rundir/jra_surface/job.yaml (100%) rename mom6_regional/mom6_regional.py => regional_mom6/regional_mom6.py (100%) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9021fc93..2fc5dfa5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: psf/black@stable with: - src: "./mom6_regional ./tests" + src: "./regional_mom6 ./tests" testing: needs: formatting @@ -42,7 +42,7 @@ jobs: - name: Test with pytest run: | if [[ "${{ matrix.python-version }}" == "3.10" ]]; then - python -m pytest --cov=mom6_regional --cov-report=xml tests/ + python -m pytest --cov=regional_mom6 --cov-report=xml tests/ else python -m pytest tests/ fi diff --git a/.gitignore b/.gitignore index d88ffa85..bd56f086 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ __pycache__ .ipynb_checkpoints build _build -mom6_regional/_version.py -mom6_regional.egg-info +regional_mom6/_version.py +regional_mom6.egg-info .pytest_cache env diff --git a/LICENSE b/LICENSE index f1f3cc39..0c24c783 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Angus Gibson +Copyright (c) 2023 COSIMA Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 20f8708d..9751d70b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # A regional domain generator for Modular Ocean Model 6 -[![codecov](https://codecov.io/gh/COSIMA/mom6-regional/branch/master/graph/badge.svg?token=7OEZ1UZRY4)](https://codecov.io/gh/COSIMA/mom6-regional) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Documentation Status](https://readthedocs.org/projects/mom6-regional/badge/?version=latest)](https://mom6-regional.readthedocs.io/en/latest/?badge=latest) +[![codecov](https://codecov.io/gh/COSIMA/regional-mom6/branch/master/graph/badge.svg?token=7OEZ1UZRY4)](https://codecov.io/gh/COSIMA/regional-mom6) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Documentation Status](https://readthedocs.org/projects/regional-mom6/badge/?version=latest)](https://regional-mom6.readthedocs.io/en/latest/?badge=latest) -`mom6_regional` contains functions and classes that do most of the legwork in setting up a regional domain in MOM6. -Just provide it with some information about where, when and how big, and point it in the direction of your raw input files, and it'll sort out the boring details to create MOM6-friendly input files. Check out the [demo notebook](https://nbviewer.org/github/COSIMA/mom6-regional-scripts/blob/master/demo.ipynb)! +`regional_mom6` contains functions and classes that do most of the legwork in setting up a regional domain in MOM6. +Just provide it with some information about where, when and how big, and point it in the direction of your raw input files, and it'll sort out the boring details to create MOM6-friendly input files. Check out the [demo notebook](https://nbviewer.org/github/COSIMA/regional-mom6-scripts/blob/master/demo.ipynb)! ### Python package This repository is being converted into a python package that will be distributed via `pip` and `conda`. At the moment, there are still som legacy stuff -- hold on to your chairs as we clean up the repo and the pipelines for generating regional MOM6 configurations. diff --git a/demos/model-forced.ipynb b/demos/model-forced.ipynb index 1edac114..5beedde2 100644 --- a/demos/model-forced.ipynb +++ b/demos/model-forced.ipynb @@ -453,10 +453,10 @@ "import subprocess\n", "from scipy.ndimage import binary_fill_holes\n", "from importlib import reload\n", - "# os.chdir(\"/path/to/where/you/cloned/the/mom6-regional/repository\")\n", - "os.chdir(\"/home/149/ab8992/cosima_regional/mom6-regional-scripts/mom6_regional/\")\n", + "# os.chdir(\"/path/to/where/you/cloned/the/regional-mom6/repository\")\n", + "os.chdir(\"/home/149/ab8992/cosima_regional/regional-mom6/regional_mom6/\")\n", "\n", - "import mom6_regional as ml\n", + "import regional_mom6 as ml\n", "from dask.distributed import Client\n", "client = Client()\n", "client" @@ -537,10 +537,10 @@ "yextent = [-48,-38.95] ## latitude\n", "xextent = [143,150] ## longitude\n", "\n", - "daterange = [\"1990-01-01 00:00:00\", \"1990-01-05 00:00:00\"] ## 2003 is a good compimise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n", + "daterange = [\"1990-01-01 00:00:00\", \"1990-01-05 00:00:00\"] ## 2003 is a good compromise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n", "\n", "## Place where all your input files go\n", - "inputdir = f\"{scratch}/mom6_regional_configs/{expt_name}/\"\n", + "inputdir = f\"{scratch}/regional_mom6_configs/{expt_name}/\"\n", "\n", "## Directory where you'll run the experiment from\n", "rundir = f\"{home}/mom6_rundirs/{expt_name}/\"\n", diff --git a/demos/reanalysis-forced.ipynb b/demos/reanalysis-forced.ipynb index 885bc3fd..e272d195 100644 --- a/demos/reanalysis-forced.ipynb +++ b/demos/reanalysis-forced.ipynb @@ -331,10 +331,10 @@ "import subprocess\n", "from scipy.ndimage import binary_fill_holes\n", "from importlib import reload\n", - "# os.chdir(\"/path/to/where/you/cloned/the/mom6-regional/repository\")\n", - "os.chdir(\"/home/149/ab8992/cosima_regional/mom6-regional-scripts/mom6_regional/\")\n", + "# os.chdir(\"/path/to/where/you/cloned/the/regional-mom6/repository\")\n", + "os.chdir(\"/home/149/ab8992/cosima_regional/regional-mom6/regional_mom6/\")\n", "\n", - "import mom6_regional as ml\n", + "import regional_mom6 as ml\n", "from dask.distributed import Client\n", "client = Client()\n", "client" @@ -417,7 +417,7 @@ "daterange = [\"2003-01-01 00:00:00\", \"2003-01-05 00:00:00\"] ## 2003 is a good compimise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n", "\n", "## Place where all your input files go\n", - "inputdir = f\"{scratch}/mom6_regional_configs/{expt_name}/\"\n", + "inputdir = f\"{scratch}/regional_mom6_configs/{expt_name}/\"\n", "\n", "## Directory where you'll run the experiment from\n", "rundir = f\"{home}/mom6_rundirs/{expt_name}/\"\n", diff --git a/docs/api.rst b/docs/api.rst index 49fb9c88..c80129db 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2,6 +2,6 @@ API reference =============== -.. automodule:: mom6_regional.mom6_regional +.. automodule:: regional_mom6.regional_mom6 :members: :undoc-members: diff --git a/docs/conf.py b/docs/conf.py index ef9fba53..00cc6e3a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,6 +23,6 @@ html_theme = "sphinx_book_theme" html_static_path = ["_static"] html_theme_options = { - "repository_url": "https://github.com/COSIMA/mom6-regional", + "repository_url": "https://github.com/COSIMA/regional-mom6", "use_repository_button": True, } diff --git a/docs/contributing.md b/docs/contributing.md index 254b9914..4f1b9952 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,7 +1,7 @@ Instructions for Contributors ============================= -Before you submit a [pull request](https://github.com/COSIMA/mom6-regional/pulls) it's always a +Before you submit a [pull request](https://github.com/COSIMA/regional-mom6/pulls) it's always a good idea to run the tests locally and catch any potential bugs/errors that might have been introduced. Also, sometimes it's also a good idea to build the documentation locally to see how new docstrings or any new bits of documentation that you may have added look like. diff --git a/pyproject.toml b/pyproject.toml index ac821749..21cd0e32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "mom6_regional" +name = "regional_mom6" description = "Automatic generation of regional configurations for Modular Ocean Model 6" keywords = ["mom6", "regional", "ocean modeling"] authors = [ @@ -21,7 +21,7 @@ requires = ["setuptools", "setuptools_scm[toml]"] build-backend = "setuptools.build_meta" [tool.setuptools] -packages = ["mom6_regional"] +packages = ["regional_mom6"] [tool.setuptools_scm] -write_to = "mom6_regional/_version.py" +write_to = "regional_mom6/_version.py" diff --git a/mom6_regional/__init__.py b/regional_mom6/__init__.py similarity index 71% rename from mom6_regional/__init__.py rename to regional_mom6/__init__.py index 73acc367..c0c62d8b 100644 --- a/mom6_regional/__init__.py +++ b/regional_mom6/__init__.py @@ -3,4 +3,4 @@ except ImportError: __version__ = "unknown" -from .mom6_regional import * # noqa +from .regional_mom6 import * # noqa diff --git a/mom6_regional/default_rundir/MOM_input b/regional_mom6/default_rundir/MOM_input similarity index 100% rename from mom6_regional/default_rundir/MOM_input rename to regional_mom6/default_rundir/MOM_input diff --git a/mom6_regional/default_rundir/MOM_override b/regional_mom6/default_rundir/MOM_override similarity index 100% rename from mom6_regional/default_rundir/MOM_override rename to regional_mom6/default_rundir/MOM_override diff --git a/mom6_regional/default_rundir/SIS_input b/regional_mom6/default_rundir/SIS_input similarity index 100% rename from mom6_regional/default_rundir/SIS_input rename to regional_mom6/default_rundir/SIS_input diff --git a/mom6_regional/default_rundir/config.yaml b/regional_mom6/default_rundir/config.yaml similarity index 100% rename from mom6_regional/default_rundir/config.yaml rename to regional_mom6/default_rundir/config.yaml diff --git a/mom6_regional/default_rundir/data_table b/regional_mom6/default_rundir/data_table similarity index 100% rename from mom6_regional/default_rundir/data_table rename to regional_mom6/default_rundir/data_table diff --git a/mom6_regional/default_rundir/diag_table b/regional_mom6/default_rundir/diag_table similarity index 100% rename from mom6_regional/default_rundir/diag_table rename to regional_mom6/default_rundir/diag_table diff --git a/mom6_regional/default_rundir/env.yaml b/regional_mom6/default_rundir/env.yaml similarity index 100% rename from mom6_regional/default_rundir/env.yaml rename to regional_mom6/default_rundir/env.yaml diff --git a/mom6_regional/default_rundir/era5_surface/MOM_input b/regional_mom6/default_rundir/era5_surface/MOM_input similarity index 100% rename from mom6_regional/default_rundir/era5_surface/MOM_input rename to regional_mom6/default_rundir/era5_surface/MOM_input diff --git a/mom6_regional/default_rundir/era5_surface/MOM_override b/regional_mom6/default_rundir/era5_surface/MOM_override similarity index 100% rename from mom6_regional/default_rundir/era5_surface/MOM_override rename to regional_mom6/default_rundir/era5_surface/MOM_override diff --git a/mom6_regional/default_rundir/era5_surface/README.md b/regional_mom6/default_rundir/era5_surface/README.md similarity index 100% rename from mom6_regional/default_rundir/era5_surface/README.md rename to regional_mom6/default_rundir/era5_surface/README.md diff --git a/mom6_regional/default_rundir/era5_surface/SIS_input b/regional_mom6/default_rundir/era5_surface/SIS_input similarity index 100% rename from mom6_regional/default_rundir/era5_surface/SIS_input rename to regional_mom6/default_rundir/era5_surface/SIS_input diff --git a/mom6_regional/default_rundir/era5_surface/config.yaml b/regional_mom6/default_rundir/era5_surface/config.yaml similarity index 100% rename from mom6_regional/default_rundir/era5_surface/config.yaml rename to regional_mom6/default_rundir/era5_surface/config.yaml diff --git a/mom6_regional/default_rundir/era5_surface/data_table b/regional_mom6/default_rundir/era5_surface/data_table similarity index 100% rename from mom6_regional/default_rundir/era5_surface/data_table rename to regional_mom6/default_rundir/era5_surface/data_table diff --git a/mom6_regional/default_rundir/era5_surface/diag_table b/regional_mom6/default_rundir/era5_surface/diag_table similarity index 100% rename from mom6_regional/default_rundir/era5_surface/diag_table rename to regional_mom6/default_rundir/era5_surface/diag_table diff --git a/mom6_regional/default_rundir/era5_surface/env.yaml b/regional_mom6/default_rundir/era5_surface/env.yaml similarity index 100% rename from mom6_regional/default_rundir/era5_surface/env.yaml rename to regional_mom6/default_rundir/era5_surface/env.yaml diff --git a/mom6_regional/default_rundir/era5_surface/field_table b/regional_mom6/default_rundir/era5_surface/field_table similarity index 100% rename from mom6_regional/default_rundir/era5_surface/field_table rename to regional_mom6/default_rundir/era5_surface/field_table diff --git a/mom6_regional/default_rundir/era5_surface/input.nml b/regional_mom6/default_rundir/era5_surface/input.nml similarity index 100% rename from mom6_regional/default_rundir/era5_surface/input.nml rename to regional_mom6/default_rundir/era5_surface/input.nml diff --git a/mom6_regional/default_rundir/era5_surface/job.yaml b/regional_mom6/default_rundir/era5_surface/job.yaml similarity index 100% rename from mom6_regional/default_rundir/era5_surface/job.yaml rename to regional_mom6/default_rundir/era5_surface/job.yaml diff --git a/mom6_regional/default_rundir/field_table b/regional_mom6/default_rundir/field_table similarity index 100% rename from mom6_regional/default_rundir/field_table rename to regional_mom6/default_rundir/field_table diff --git a/mom6_regional/default_rundir/input.nml b/regional_mom6/default_rundir/input.nml similarity index 100% rename from mom6_regional/default_rundir/input.nml rename to regional_mom6/default_rundir/input.nml diff --git a/mom6_regional/default_rundir/job.yaml b/regional_mom6/default_rundir/job.yaml similarity index 100% rename from mom6_regional/default_rundir/job.yaml rename to regional_mom6/default_rundir/job.yaml diff --git a/mom6_regional/default_rundir/jra_surface/MOM_input b/regional_mom6/default_rundir/jra_surface/MOM_input similarity index 100% rename from mom6_regional/default_rundir/jra_surface/MOM_input rename to regional_mom6/default_rundir/jra_surface/MOM_input diff --git a/mom6_regional/default_rundir/jra_surface/MOM_override b/regional_mom6/default_rundir/jra_surface/MOM_override similarity index 100% rename from mom6_regional/default_rundir/jra_surface/MOM_override rename to regional_mom6/default_rundir/jra_surface/MOM_override diff --git a/mom6_regional/default_rundir/jra_surface/README.md b/regional_mom6/default_rundir/jra_surface/README.md similarity index 100% rename from mom6_regional/default_rundir/jra_surface/README.md rename to regional_mom6/default_rundir/jra_surface/README.md diff --git a/mom6_regional/default_rundir/jra_surface/SIS_input b/regional_mom6/default_rundir/jra_surface/SIS_input similarity index 100% rename from mom6_regional/default_rundir/jra_surface/SIS_input rename to regional_mom6/default_rundir/jra_surface/SIS_input diff --git a/mom6_regional/default_rundir/jra_surface/config.yaml b/regional_mom6/default_rundir/jra_surface/config.yaml similarity index 100% rename from mom6_regional/default_rundir/jra_surface/config.yaml rename to regional_mom6/default_rundir/jra_surface/config.yaml diff --git a/mom6_regional/default_rundir/jra_surface/data_table b/regional_mom6/default_rundir/jra_surface/data_table similarity index 100% rename from mom6_regional/default_rundir/jra_surface/data_table rename to regional_mom6/default_rundir/jra_surface/data_table diff --git a/mom6_regional/default_rundir/jra_surface/diag_table b/regional_mom6/default_rundir/jra_surface/diag_table similarity index 100% rename from mom6_regional/default_rundir/jra_surface/diag_table rename to regional_mom6/default_rundir/jra_surface/diag_table diff --git a/mom6_regional/default_rundir/jra_surface/env.yaml b/regional_mom6/default_rundir/jra_surface/env.yaml similarity index 100% rename from mom6_regional/default_rundir/jra_surface/env.yaml rename to regional_mom6/default_rundir/jra_surface/env.yaml diff --git a/mom6_regional/default_rundir/jra_surface/field_table b/regional_mom6/default_rundir/jra_surface/field_table similarity index 100% rename from mom6_regional/default_rundir/jra_surface/field_table rename to regional_mom6/default_rundir/jra_surface/field_table diff --git a/mom6_regional/default_rundir/jra_surface/input.nml b/regional_mom6/default_rundir/jra_surface/input.nml similarity index 100% rename from mom6_regional/default_rundir/jra_surface/input.nml rename to regional_mom6/default_rundir/jra_surface/input.nml diff --git a/mom6_regional/default_rundir/jra_surface/job.yaml b/regional_mom6/default_rundir/jra_surface/job.yaml similarity index 100% rename from mom6_regional/default_rundir/jra_surface/job.yaml rename to regional_mom6/default_rundir/jra_surface/job.yaml diff --git a/mom6_regional/mom6_regional.py b/regional_mom6/regional_mom6.py similarity index 100% rename from mom6_regional/mom6_regional.py rename to regional_mom6/regional_mom6.py