roms-tools 0.0.2__tar.gz → 0.1.0__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 (54) hide show
  1. roms_tools-0.1.0/.github/workflows/pre-commit.yaml +14 -0
  2. {roms-tools-0.0.2 → roms_tools-0.1.0}/.github/workflows/pypipublish.yaml +5 -5
  3. roms_tools-0.1.0/.github/workflows/sphinx.yaml +29 -0
  4. roms_tools-0.1.0/.github/workflows/tests.yaml +46 -0
  5. roms_tools-0.1.0/.readthedocs.yaml +31 -0
  6. roms_tools-0.1.0/PKG-INFO +89 -0
  7. roms_tools-0.1.0/README.md +58 -0
  8. roms_tools-0.1.0/ci/environment.yml +28 -0
  9. roms_tools-0.1.0/docs/Makefile +23 -0
  10. roms_tools-0.1.0/docs/_templates/autosummary/class.rst +31 -0
  11. roms_tools-0.1.0/docs/api.rst +30 -0
  12. roms_tools-0.1.0/docs/atmospheric_forcing.ipynb +6698 -0
  13. roms_tools-0.1.0/docs/conf.py +59 -0
  14. roms_tools-0.1.0/docs/grid.ipynb +2162 -0
  15. roms_tools-0.1.0/docs/images/Step1.png +0 -0
  16. roms_tools-0.1.0/docs/images/Step2.png +0 -0
  17. roms_tools-0.1.0/docs/images/Step3.png +0 -0
  18. roms_tools-0.1.0/docs/images/Step4.png +0 -0
  19. roms_tools-0.1.0/docs/index.rst +41 -0
  20. roms_tools-0.1.0/docs/installation.rst +78 -0
  21. roms_tools-0.1.0/docs/make.bat +35 -0
  22. roms_tools-0.1.0/docs/methods.rst +96 -0
  23. roms_tools-0.1.0/docs/references.bib +33 -0
  24. roms_tools-0.1.0/docs/references.rst +4 -0
  25. roms_tools-0.1.0/docs/support.rst +7 -0
  26. roms_tools-0.1.0/docs/tides.ipynb +1485 -0
  27. {roms-tools-0.0.2 → roms_tools-0.1.0}/pyproject.toml +8 -3
  28. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools/__init__.py +3 -0
  29. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools/_version.py +1 -1
  30. roms_tools-0.1.0/roms_tools/setup/atmospheric_forcing.py +993 -0
  31. roms_tools-0.1.0/roms_tools/setup/datasets.py +48 -0
  32. roms_tools-0.1.0/roms_tools/setup/fill.py +263 -0
  33. roms_tools-0.1.0/roms_tools/setup/grid.py +809 -0
  34. roms_tools-0.1.0/roms_tools/setup/plot.py +58 -0
  35. roms_tools-0.1.0/roms_tools/setup/tides.py +676 -0
  36. roms_tools-0.1.0/roms_tools/setup/topography.py +242 -0
  37. roms_tools-0.1.0/roms_tools/tests/test_setup.py +181 -0
  38. roms_tools-0.1.0/roms_tools.egg-info/PKG-INFO +89 -0
  39. roms_tools-0.1.0/roms_tools.egg-info/SOURCES.txt +45 -0
  40. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools.egg-info/requires.txt +4 -0
  41. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools.egg-info/top_level.txt +1 -0
  42. roms-tools-0.0.2/PKG-INFO +0 -134
  43. roms-tools-0.0.2/README.md +0 -106
  44. roms-tools-0.0.2/roms_tools/setup/grid.py +0 -650
  45. roms-tools-0.0.2/roms_tools/setup/old_grid_script.py +0 -438
  46. roms-tools-0.0.2/roms_tools/tests/test_setup.py +0 -54
  47. roms-tools-0.0.2/roms_tools.egg-info/PKG-INFO +0 -134
  48. roms-tools-0.0.2/roms_tools.egg-info/SOURCES.txt +0 -17
  49. {roms-tools-0.0.2 → roms_tools-0.1.0}/.gitignore +0 -0
  50. {roms-tools-0.0.2 → roms_tools-0.1.0}/.pre-commit-config.yaml +0 -0
  51. {roms-tools-0.0.2 → roms_tools-0.1.0}/LICENSE +0 -0
  52. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools/setup/__init__.py +0 -0
  53. {roms-tools-0.0.2 → roms_tools-0.1.0}/roms_tools.egg-info/dependency_links.txt +0 -0
  54. {roms-tools-0.0.2 → roms_tools-0.1.0}/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
@@ -17,7 +17,7 @@ concurrency:
17
17
  jobs:
18
18
  build-artifacts:
19
19
  runs-on: ubuntu-latest
20
- if: github.repository == 'CWorthy-ocean/roms_tools'
20
+ if: github.repository == 'CWorthy-ocean/roms-tools'
21
21
  steps:
22
22
  - uses: actions/checkout@v4
23
23
  with:
@@ -64,7 +64,7 @@ jobs:
64
64
  run: |
65
65
  python -m pip install --upgrade pip
66
66
  python -m pip install dist/roms_tools*.whl
67
- python -c "import datatree; print(roms_tools.__version__)"
67
+ python -c "import roms_tools; print(roms_tools.__version__)"
68
68
 
69
69
  upload-to-pypi:
70
70
  needs: test-built-dist
@@ -78,6 +78,6 @@ jobs:
78
78
  - name: Publish package to PyPI
79
79
  uses: pypa/gh-action-pypi-publish@v1.8.10
80
80
  with:
81
- user: ${{ secrets.PYPI_USERNAME }}
82
- password: ${{ secrets.PYPI_PASSWORD }}
83
- verbose: true
81
+ username: "__token__"
82
+ password: ${{ secrets.PYPI_API_TOKEN }}
83
+ verbose: true
@@ -0,0 +1,29 @@
1
+
2
+ name: Build Documentation
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "*"
7
+
8
+ jobs:
9
+ docs:
10
+ runs-on: ubuntu-latest
11
+ defaults:
12
+ run:
13
+ shell: bash -l {0}
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Create conda environment
17
+ uses: mamba-org/provision-with-micromamba@main
18
+ with:
19
+ cache-downloads: true
20
+ micromamba-version: 'latest'
21
+ environment-file: ci/environment.yml
22
+ extra-specs: |
23
+ python=${{ matrix.python-version }}
24
+ - name: Install roms-tools
25
+ run: |
26
+ python -m pip install -e . --no-deps --force-reinstall
27
+ - name: Build Docs
28
+ run: |
29
+ cd docs ; make fresh; make html
@@ -0,0 +1,46 @@
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
+ defaults:
17
+ run:
18
+ shell: bash -l {0}
19
+ strategy:
20
+ matrix:
21
+ python-version: ["3.10", "3.11", "3.12"]
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Create conda environment
26
+ uses: mamba-org/provision-with-micromamba@main
27
+ with:
28
+ cache-downloads: true
29
+ micromamba-version: 'latest'
30
+ environment-file: ci/environment.yml
31
+ extra-specs: |
32
+ python=${{ matrix.python-version }}
33
+
34
+ - name: Conda info
35
+ run: conda info
36
+
37
+ - name: Install roms-tools
38
+ run: |
39
+ python -m pip install -e . --no-deps --force-reinstall
40
+
41
+ - name: Conda list
42
+ run: conda list
43
+
44
+ - name: Running Tests
45
+ run: |
46
+ python -m pytest --verbose
@@ -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,89 @@
1
+ Metadata-Version: 2.1
2
+ Name: roms-tools
3
+ Version: 0.1.0
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
+ [![Documentation Status](https://readthedocs.org/projects/roms-tools/badge/?version=latest)](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
35
+ [![PyPI version](https://badge.fury.io/py/roms-tools.svg)](https://badge.fury.io/py/roms-tools)
36
+
37
+ ## Overview
38
+
39
+ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla-roms) simulation.
40
+
41
+ ## Installation instructions
42
+
43
+ ### Installation from pip
44
+
45
+ ```bash
46
+ pip install roms-tools
47
+ ```
48
+
49
+ ### Installation from GitHub
50
+
51
+ To obtain the latest development version, clone the source repository and install it:
52
+
53
+ ```bash
54
+ git clone https://github.com/CWorthy-ocean/roms-tools.git
55
+ cd roms-tools
56
+ pip install -e .
57
+ ```
58
+
59
+
60
+ ### Run the tests
61
+
62
+ Before running the tests you can install and activate the following conda environment:
63
+
64
+ ```bash
65
+ cd roms-tools
66
+ conda env create -f ci/environment.yml
67
+ conda activate romstools
68
+ ```
69
+
70
+ Check the installation of `ROMS-Tools` has worked by running the test suite
71
+ ```bash
72
+ pytest
73
+ ```
74
+
75
+ ## Getting Started
76
+
77
+ To learn how to use `ROMS-Tools`, check out the [documentation](https://roms-tools.readthedocs.io/en/latest/).
78
+
79
+ ## Feedback and contributions
80
+
81
+ **If you find a bug, have a feature suggestion, or any other kind of feedback, please start a Discussion.**
82
+
83
+ We also accept contributions in the form of Pull Requests.
84
+
85
+
86
+ ## See also
87
+
88
+ - [ROMS source code](https://github.com/CESR-lab/ucla-roms)
89
+ - [C-Star](https://github.com/CWorthy-ocean/C-Star)
@@ -0,0 +1,58 @@
1
+ # ROMS-Tools
2
+
3
+ [![Documentation Status](https://readthedocs.org/projects/roms-tools/badge/?version=latest)](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
4
+ [![PyPI version](https://badge.fury.io/py/roms-tools.svg)](https://badge.fury.io/py/roms-tools)
5
+
6
+ ## Overview
7
+
8
+ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla-roms) simulation.
9
+
10
+ ## Installation instructions
11
+
12
+ ### Installation from pip
13
+
14
+ ```bash
15
+ pip install roms-tools
16
+ ```
17
+
18
+ ### Installation from GitHub
19
+
20
+ To obtain the latest development version, clone the source repository and install it:
21
+
22
+ ```bash
23
+ git clone https://github.com/CWorthy-ocean/roms-tools.git
24
+ cd roms-tools
25
+ pip install -e .
26
+ ```
27
+
28
+
29
+ ### Run the tests
30
+
31
+ Before running the tests you can install and activate the following conda environment:
32
+
33
+ ```bash
34
+ cd roms-tools
35
+ conda env create -f ci/environment.yml
36
+ conda activate romstools
37
+ ```
38
+
39
+ Check the installation of `ROMS-Tools` has worked by running the test suite
40
+ ```bash
41
+ pytest
42
+ ```
43
+
44
+ ## Getting Started
45
+
46
+ To learn how to use `ROMS-Tools`, check out the [documentation](https://roms-tools.readthedocs.io/en/latest/).
47
+
48
+ ## Feedback and contributions
49
+
50
+ **If you find a bug, have a feature suggestion, or any other kind of feedback, please start a Discussion.**
51
+
52
+ We also accept contributions in the form of Pull Requests.
53
+
54
+
55
+ ## See also
56
+
57
+ - [ROMS source code](https://github.com/CESR-lab/ucla-roms)
58
+ - [C-Star](https://github.com/CWorthy-ocean/C-Star)
@@ -0,0 +1,28 @@
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
+ # docs
23
+ - sphinx
24
+ - nbsphinx
25
+ - sphinx-book-theme
26
+ - sphinxcontrib-bibtex
27
+ # for running jupyter notebooks
28
+ - ipykernel
@@ -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,30 @@
1
+ API Reference
2
+ #############
3
+
4
+
5
+ Grid
6
+ ------------------------
7
+
8
+ .. autosummary::
9
+ :toctree: generated/
10
+
11
+ roms_tools.Grid
12
+
13
+ Tidal Forcing
14
+ ------------------
15
+
16
+ .. autosummary::
17
+ :toctree: generated/
18
+
19
+ roms_tools.TidalForcing
20
+
21
+ Atmospheric Forcing
22
+ --------------------
23
+
24
+ .. autosummary::
25
+ :toctree: generated/
26
+
27
+ roms_tools.AtmosphericForcing
28
+ roms_tools.SWRCorrection
29
+
30
+ =======