Skip to content

Commit

Permalink
Atmospheric forcing (#41)
Browse files Browse the repository at this point in the history
* Add draft for atmospheric forcing class

* More capability for atmospheric forcing generation

* Finish atmospheric forcing class

* Add plotting method to AtmosphericForcing

* Add AtmosphericForcing to __init__.py

* Enable interpolation of atm forcing onto coarse grid

* Group forcing by year and month and write to netcdf

* Add lateral fill feature

* Interpolate atmospheric forcing and start revamping SWR correction

* More atmospheric forcing

* Make sure atmospheric forcing interpolation works for grid straddles

* Handle Greenwhich meridian stuff

* SWRCorrection and time chunking

* Time chunk size 1 until .save()

* clean up atmospheric_forcing module

* Protect user against interpolation errors due to discontinuous lon range

* nan_check only over the ocean

* Add SWRCorrection to __init__.py

* Add numba to conda env and rename the env

* Add atmospheric forcing notebook

* Docs stuff

* Add note to notebook

* Add numba to pyproject.toml

* Add template to docs so methods show up in API ref

* Update roms_tools/_version.py

Co-authored-by: Tom Nicholas <[email protected]>

* Change options for xr.open_mfdataset

* Delete roms_tools/_version.py

* Run linting tools on this branch

* Update atmospheric forcing docs

* Add note on perlmutter and dask behaviour

---------

Co-authored-by: Tom Nicholas <[email protected]>
  • Loading branch information
NoraLoose and TomNicholas authored Jul 9, 2024
1 parent cd007be commit fbbe244
Show file tree
Hide file tree
Showing 13 changed files with 8,043 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Before running the tests you can install and activate the following conda enviro
```bash
cd roms-tools
conda env create -f ci/environment.yml
conda activate romstools-test
conda activate romstools
```

Check the installation of `ROMS-Tools` has worked by running the test suite
Expand Down
3 changes: 2 additions & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: romstools-test
name: romstools
channels:
- conda-forge
- nodefaults
Expand All @@ -12,6 +12,7 @@ dependencies:
- netcdf4
- pooch
- packaging
- numba
- gcm_filters
# testing
- pytest
Expand Down
31 changes: 31 additions & 0 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{ objname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:special-members:

{% block methods %}
{% if methods %}
.. rubric:: Methods
.. autosummary::
:toctree:
{% for item in all_methods %}
{%- if not item.startswith('_') or item in ['__call__',
] %}
{{ name }}.{{ item }}

{% endif %}
{% endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: Attributes
.. autosummary::
{% for item in attributes %}
{{ name }}.{{ item }}
{% endfor %}
{% endif %}
{% endblock %}
11 changes: 11 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ Tidal Forcing
:toctree: generated/

roms_tools.TidalForcing

Atmospheric Forcing
--------------------

.. autosummary::
:toctree: generated/

roms_tools.AtmosphericForcing
roms_tools.SWRCorrection

=======
Loading

0 comments on commit fbbe244

Please sign in to comment.