roms-tools 0.0.6__tar.gz → 0.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. roms_tools-0.20/.github/workflows/pre-commit.yaml +14 -0
  2. roms_tools-0.20/.github/workflows/sphinx.yaml +30 -0
  3. roms_tools-0.20/.github/workflows/tests.yaml +57 -0
  4. roms_tools-0.20/.readthedocs.yaml +31 -0
  5. roms_tools-0.20/PKG-INFO +90 -0
  6. roms_tools-0.20/README.md +59 -0
  7. roms_tools-0.20/ci/environment.yml +29 -0
  8. roms_tools-0.20/coverage.toml +5 -0
  9. roms_tools-0.20/docs/Makefile +23 -0
  10. roms_tools-0.20/docs/_templates/autosummary/class.rst +31 -0
  11. roms_tools-0.20/docs/api.rst +54 -0
  12. roms_tools-0.20/docs/atmospheric_forcing.ipynb +9332 -0
  13. roms_tools-0.20/docs/boundary_forcing.ipynb +7099 -0
  14. roms_tools-0.20/docs/conf.py +59 -0
  15. roms_tools-0.20/docs/forcings/bdry_forcing.nc +0 -0
  16. roms_tools-0.20/docs/grid.ipynb +2924 -0
  17. roms_tools-0.20/docs/images/Step1.png +0 -0
  18. roms_tools-0.20/docs/images/Step2.png +0 -0
  19. roms_tools-0.20/docs/images/Step3.png +0 -0
  20. roms_tools-0.20/docs/images/Step4.png +0 -0
  21. roms_tools-0.20/docs/index.rst +44 -0
  22. roms_tools-0.20/docs/initial_conditions.ipynb +4477 -0
  23. roms_tools-0.20/docs/installation.rst +78 -0
  24. roms_tools-0.20/docs/make.bat +35 -0
  25. roms_tools-0.20/docs/methods.rst +96 -0
  26. roms_tools-0.20/docs/references.bib +50 -0
  27. roms_tools-0.20/docs/references.rst +4 -0
  28. roms_tools-0.20/docs/support.rst +7 -0
  29. roms_tools-0.20/docs/tides.ipynb +2668 -0
  30. roms_tools-0.20/docs/vertical_coordinate.ipynb +2688 -0
  31. {roms-tools-0.0.6 → roms_tools-0.20}/pyproject.toml +8 -3
  32. roms_tools-0.20/roms_tools/__init__.py +17 -0
  33. {roms-tools-0.0.6 → roms_tools-0.20}/roms_tools/_version.py +1 -1
  34. roms_tools-0.20/roms_tools/setup/atmospheric_forcing.py +935 -0
  35. roms_tools-0.20/roms_tools/setup/boundary_forcing.py +711 -0
  36. roms_tools-0.20/roms_tools/setup/datasets.py +457 -0
  37. roms_tools-0.20/roms_tools/setup/fill.py +376 -0
  38. roms_tools-0.20/roms_tools/setup/grid.py +935 -0
  39. roms_tools-0.20/roms_tools/setup/initial_conditions.py +528 -0
  40. roms_tools-0.20/roms_tools/setup/plot.py +203 -0
  41. roms_tools-0.20/roms_tools/setup/tides.py +809 -0
  42. roms_tools-0.20/roms_tools/setup/topography.py +257 -0
  43. roms_tools-0.20/roms_tools/setup/utils.py +162 -0
  44. roms_tools-0.20/roms_tools/setup/vertical_coordinate.py +494 -0
  45. roms_tools-0.20/roms_tools/tests/test_atmospheric_forcing.py +1645 -0
  46. roms_tools-0.20/roms_tools/tests/test_boundary_forcing.py +332 -0
  47. roms_tools-0.20/roms_tools/tests/test_datasets.py +306 -0
  48. roms_tools-0.20/roms_tools/tests/test_grid.py +226 -0
  49. roms_tools-0.20/roms_tools/tests/test_initial_conditions.py +300 -0
  50. roms_tools-0.20/roms_tools/tests/test_tides.py +366 -0
  51. roms_tools-0.20/roms_tools/tests/test_topography.py +78 -0
  52. roms_tools-0.20/roms_tools/tests/test_vertical_coordinate.py +337 -0
  53. roms_tools-0.20/roms_tools.egg-info/PKG-INFO +90 -0
  54. roms_tools-0.20/roms_tools.egg-info/SOURCES.txt +61 -0
  55. {roms-tools-0.0.6 → roms_tools-0.20}/roms_tools.egg-info/requires.txt +4 -0
  56. {roms-tools-0.0.6 → roms_tools-0.20}/roms_tools.egg-info/top_level.txt +1 -0
  57. roms-tools-0.0.6/.github/pull_request_template.md +0 -5
  58. roms-tools-0.0.6/PKG-INFO +0 -134
  59. roms-tools-0.0.6/README.md +0 -106
  60. roms-tools-0.0.6/roms_tools/__init__.py +0 -11
  61. roms-tools-0.0.6/roms_tools/setup/grid.py +0 -650
  62. roms-tools-0.0.6/roms_tools/tests/test_setup.py +0 -54
  63. roms-tools-0.0.6/roms_tools.egg-info/PKG-INFO +0 -134
  64. roms-tools-0.0.6/roms_tools.egg-info/SOURCES.txt +0 -17
  65. {roms-tools-0.0.6 → roms_tools-0.20}/.github/workflows/pypipublish.yaml +0 -0
  66. {roms-tools-0.0.6 → roms_tools-0.20}/.gitignore +0 -0
  67. {roms-tools-0.0.6 → roms_tools-0.20}/.pre-commit-config.yaml +0 -0
  68. {roms-tools-0.0.6 → roms_tools-0.20}/LICENSE +0 -0
  69. {roms-tools-0.0.6 → roms_tools-0.20}/roms_tools/setup/__init__.py +0 -0
  70. {roms-tools-0.0.6 → roms_tools-0.20}/roms_tools.egg-info/dependency_links.txt +0 -0
  71. {roms-tools-0.0.6 → roms_tools-0.20}/setup.cfg +0 -0
@@ -0,0 +1,14 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ pre-commit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-python@v3
14
+ - uses: pre-commit/action@v3.0.1
@@ -0,0 +1,30 @@
1
+
2
+ name: Build Documentation
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "*"
7
+
8
+ jobs:
9
+ docs:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Create conda environment
14
+ uses: mamba-org/setup-micromamba@v1
15
+ with:
16
+ cache-downloads: true
17
+ cache-environment: true
18
+ micromamba-version: 'latest'
19
+ environment-file: ci/environment.yml
20
+ create-args: |
21
+ python=${{ matrix.python-version }}
22
+ - name: Install roms-tools
23
+ shell: micromamba-shell {0}
24
+ run: |
25
+ python - V
26
+ python -m pip install -e . --no-deps --force-reinstall
27
+ - name: Build Docs
28
+ shell: bash -l {0}
29
+ run: |
30
+ cd docs ; make fresh; make html
@@ -0,0 +1,57 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+
13
+ test:
14
+ name: ${{ matrix.python-version }}-build
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ python-version: ["3.10", "3.11", "3.12"]
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Create conda environment
23
+ uses: mamba-org/setup-micromamba@v1
24
+ with:
25
+ cache-downloads: true
26
+ cache-environment: true
27
+ micromamba-version: 'latest'
28
+ environment-file: ci/environment.yml
29
+ create-args: |
30
+ python=${{ matrix.python-version }}
31
+
32
+ - name: Conda info
33
+ run: conda info
34
+
35
+ - name: Install roms-tools
36
+ shell: micromamba-shell {0}
37
+ run: |
38
+ python - V
39
+ python -m pip install -e . --no-deps --force-reinstall
40
+
41
+ - name: Running Tests
42
+ shell: bash -l {0}
43
+ run: |
44
+ python -V
45
+ coverage run --rcfile=coverage.toml -m pytest --verbose roms_tools/tests/test_datasets.py roms_tools/tests/test_grid.py roms_tools/tests/test_topography.py roms_tools/tests/test_tides.py roms_tools/tests/test_atmospheric_forcing.py roms_tools/tests/test_initial_conditions.py roms_tools/tests/test_vertical_coordinate.py roms_tools/tests/test_boundary_forcing.py
46
+
47
+ - name: Get coverage report
48
+ shell: bash -l {0}
49
+ run: |
50
+ coverage report -m ; coverage xml
51
+
52
+ - name: Upload coverage reports to Codecov
53
+ uses: codecov/codecov-action@v4.0.1
54
+ with:
55
+ token: ${{ secrets.CODECOV_TOKEN }}
56
+ files: ./coverage.xml
57
+ flags: unittests # optional
@@ -0,0 +1,31 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "mambaforge-22.9"
13
+
14
+ # Build documentation in the "docs/" directory with Sphinx
15
+ sphinx:
16
+ configuration: docs/conf.py
17
+
18
+ conda:
19
+ environment: ci/environment.yml
20
+
21
+ # Optionally build your docs in additional formats such as PDF and ePub
22
+ # formats:
23
+ # - pdf
24
+ # - epub
25
+
26
+ # Optional but recommended, declare the Python requirements required
27
+ # to build your documentation
28
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29
+ # python:
30
+ # install:
31
+ # - requirements: docs/requirements.txt
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: roms-tools
3
+ Version: 0.20
4
+ Summary: Tools for running and analysing UCLA-ROMS simulations
5
+ Author-email: Nora Loose <nora.loose@gmail.com>, Thomas Nicholas <tom@cworthy.org>
6
+ License: Apache-2
7
+ Project-URL: Home, https://github.com/CWorthy-ocean/roms-tools
8
+ Project-URL: Documentation, https://roms-tools.readthedocs.io/en/latest/
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: xarray>=2022.6.0
22
+ Requires-Dist: numpy
23
+ Requires-Dist: netcdf4
24
+ Requires-Dist: pooch
25
+ Requires-Dist: matplotlib
26
+ Requires-Dist: cartopy
27
+ Requires-Dist: packaging
28
+ Requires-Dist: scipy
29
+ Requires-Dist: gcm_filters
30
+ Requires-Dist: numba
31
+
32
+ # ROMS-Tools
33
+
34
+ [![codecov](https://codecov.io/gh/CWorthy-ocean/roms-tools/graph/badge.svg?token=5S1oNu39xE)](https://codecov.io/gh/CWorthy-ocean/roms-tools)
35
+ [![Documentation Status](https://readthedocs.org/projects/roms-tools/badge/?version=latest)](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
36
+ [![PyPI version](https://badge.fury.io/py/roms-tools.svg)](https://badge.fury.io/py/roms-tools)
37
+
38
+ ## Overview
39
+
40
+ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla-roms) simulation.
41
+
42
+ ## Installation instructions
43
+
44
+ ### Installation from pip
45
+
46
+ ```bash
47
+ pip install roms-tools
48
+ ```
49
+
50
+ ### Installation from GitHub
51
+
52
+ To obtain the latest development version, clone the source repository and install it:
53
+
54
+ ```bash
55
+ git clone https://github.com/CWorthy-ocean/roms-tools.git
56
+ cd roms-tools
57
+ pip install -e .
58
+ ```
59
+
60
+
61
+ ### Run the tests
62
+
63
+ Before running the tests, you can install and activate the following conda environment:
64
+
65
+ ```bash
66
+ cd roms-tools
67
+ conda env create -f ci/environment.yml
68
+ conda activate romstools
69
+ ```
70
+
71
+ Check the installation of `ROMS-Tools` has worked by running the test suite
72
+ ```bash
73
+ pytest
74
+ ```
75
+
76
+ ## Getting Started
77
+
78
+ To learn how to use `ROMS-Tools`, check out the [documentation](https://roms-tools.readthedocs.io/en/latest/).
79
+
80
+ ## Feedback and contributions
81
+
82
+ **If you find a bug, have a feature suggestion, or any other kind of feedback, please start a Discussion.**
83
+
84
+ We also accept contributions in the form of Pull Requests.
85
+
86
+
87
+ ## See also
88
+
89
+ - [ROMS source code](https://github.com/CESR-lab/ucla-roms)
90
+ - [C-Star](https://github.com/CWorthy-ocean/C-Star)
@@ -0,0 +1,59 @@
1
+ # ROMS-Tools
2
+
3
+ [![codecov](https://codecov.io/gh/CWorthy-ocean/roms-tools/graph/badge.svg?token=5S1oNu39xE)](https://codecov.io/gh/CWorthy-ocean/roms-tools)
4
+ [![Documentation Status](https://readthedocs.org/projects/roms-tools/badge/?version=latest)](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
5
+ [![PyPI version](https://badge.fury.io/py/roms-tools.svg)](https://badge.fury.io/py/roms-tools)
6
+
7
+ ## Overview
8
+
9
+ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla-roms) simulation.
10
+
11
+ ## Installation instructions
12
+
13
+ ### Installation from pip
14
+
15
+ ```bash
16
+ pip install roms-tools
17
+ ```
18
+
19
+ ### Installation from GitHub
20
+
21
+ To obtain the latest development version, clone the source repository and install it:
22
+
23
+ ```bash
24
+ git clone https://github.com/CWorthy-ocean/roms-tools.git
25
+ cd roms-tools
26
+ pip install -e .
27
+ ```
28
+
29
+
30
+ ### Run the tests
31
+
32
+ Before running the tests, you can install and activate the following conda environment:
33
+
34
+ ```bash
35
+ cd roms-tools
36
+ conda env create -f ci/environment.yml
37
+ conda activate romstools
38
+ ```
39
+
40
+ Check the installation of `ROMS-Tools` has worked by running the test suite
41
+ ```bash
42
+ pytest
43
+ ```
44
+
45
+ ## Getting Started
46
+
47
+ To learn how to use `ROMS-Tools`, check out the [documentation](https://roms-tools.readthedocs.io/en/latest/).
48
+
49
+ ## Feedback and contributions
50
+
51
+ **If you find a bug, have a feature suggestion, or any other kind of feedback, please start a Discussion.**
52
+
53
+ We also accept contributions in the form of Pull Requests.
54
+
55
+
56
+ ## See also
57
+
58
+ - [ROMS source code](https://github.com/CESR-lab/ucla-roms)
59
+ - [C-Star](https://github.com/CWorthy-ocean/C-Star)
@@ -0,0 +1,29 @@
1
+ name: romstools
2
+ channels:
3
+ - conda-forge
4
+ - nodefaults
5
+ dependencies:
6
+ - python>=3.9
7
+ - numpy
8
+ - scipy
9
+ - matplotlib
10
+ - cartopy
11
+ - xarray
12
+ - netcdf4
13
+ - pooch
14
+ - packaging
15
+ - numba
16
+ - gcm_filters
17
+ # testing
18
+ - pytest
19
+ - flake8
20
+ - black
21
+ - pre-commit
22
+ - coverage
23
+ # docs
24
+ - sphinx
25
+ - nbsphinx
26
+ - sphinx-book-theme
27
+ - sphinxcontrib-bibtex
28
+ # for running jupyter notebooks
29
+ - ipykernel
@@ -0,0 +1,5 @@
1
+ [tool.coverage.run]
2
+ omit = [
3
+ "roms_tools/tests/*",
4
+ "**/__init__.py",
5
+ ]
@@ -0,0 +1,23 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ fresh: clean
12
+ rm -f generated/*.rst
13
+
14
+ # Put it first so that "make" without argument is like "make help".
15
+ help:
16
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17
+
18
+ .PHONY: help Makefile
19
+
20
+ # Catch-all target: route all unknown targets to Sphinx using the new
21
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
22
+ %: Makefile
23
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,31 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ objname }}
6
+ :special-members:
7
+
8
+ {% block methods %}
9
+ {% if methods %}
10
+ .. rubric:: Methods
11
+ .. autosummary::
12
+ :toctree:
13
+ {% for item in all_methods %}
14
+ {%- if not item.startswith('_') or item in ['__call__',
15
+ ] %}
16
+ {{ name }}.{{ item }}
17
+
18
+ {% endif %}
19
+ {% endfor %}
20
+ {% endif %}
21
+ {% endblock %}
22
+
23
+ {% block attributes %}
24
+ {% if attributes %}
25
+ .. rubric:: Attributes
26
+ .. autosummary::
27
+ {% for item in attributes %}
28
+ {{ name }}.{{ item }}
29
+ {% endfor %}
30
+ {% endif %}
31
+ {% endblock %}
@@ -0,0 +1,54 @@
1
+ API Reference
2
+ #############
3
+
4
+
5
+ Grid
6
+ ------------------------
7
+
8
+ .. autosummary::
9
+ :toctree: generated/
10
+
11
+ roms_tools.Grid
12
+
13
+ Vertical Coordinate
14
+ ------------------------
15
+
16
+ .. autosummary::
17
+ :toctree: generated/
18
+
19
+ roms_tools.VerticalCoordinate
20
+
21
+ Tidal Forcing
22
+ ------------------
23
+
24
+ .. autosummary::
25
+ :toctree: generated/
26
+
27
+ roms_tools.TidalForcing
28
+
29
+ Atmospheric Forcing
30
+ --------------------
31
+
32
+ .. autosummary::
33
+ :toctree: generated/
34
+
35
+ roms_tools.AtmosphericForcing
36
+ roms_tools.SWRCorrection
37
+
38
+ Initial Conditions
39
+ --------------------
40
+
41
+ .. autosummary::
42
+ :toctree: generated/
43
+
44
+ roms_tools.InitialConditions
45
+
46
+ Boundary Forcing
47
+ --------------------
48
+
49
+ .. autosummary::
50
+ :toctree: generated/
51
+
52
+ roms_tools.BoundaryForcing
53
+
54
+ =======