Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tons of updates to and for docs #23

Merged
merged 10 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,38 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }}
- uses: conda-incubator/setup-miniconda@v3
# - uses: conda-incubator/setup-miniconda@v3
# with:
# # mamba-version: "*" # activate this to build with mamba.
# python-version: ${{ matrix.python-version }}
# miniforge-variant: Mambaforge
# channels: conda-forge, defaults # These need to be specified to use mamba
# channel-priority: true
# environment-file: ci/environment-py${{ matrix.python-version }}.yml

# activate-environment: test_env_particle-tracking-manager
# use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
# - name: Set up conda environment
# shell: bash -l {0}
# run: |
# python -m pip install -e . --no-deps --force-reinstall

- name: Setup Micromamba Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
with:
# mamba-version: "*" # activate this to build with mamba.
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge, defaults # These need to be specified to use mamba
channel-priority: true
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} --channel conda-forge
environment-file: ci/environment-py${{ matrix.python-version }}.yml
cache-environment: true
post-cleanup: 'all'

activate-environment: test_env_particle-tracking-manager
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Set up conda environment
- name: Install package
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall


- name: Run Tests
shell: bash -l {0}
run: |
Expand Down
72 changes: 37 additions & 35 deletions ci/environment-py3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,43 @@ channels:
dependencies:
- python=3.10
############## These will have to be adjusted to your specific project
# - adios_db
# - adios-db
- appdirs
- aiohttp
- kerchunk
- numpy
# opendrift reqs
- matplotlib>=3.5
- numpy>=1.17
- scipy>=1.6
- netcdf4<=1.6.1
- ffmpeg
- pyproj>=2.3
- libgdal>=3.1
- gdal>=3.1
- xarray
- dask
- cfgrib
- pygrib
- xhistogram
- requests
- pytest<8
- pytest-cov
- pytest-benchmark
- pytest-mpl
- cartopy>=0.20
- nc-time-axis
- geojson
- pynucos>=2.12
- isodate
- coloredlogs
- cmocean
- utm
- roaring-landmask>=0.7
# - trajan>=0.1.3
# - adios_db
# # opendrift reqs
# - matplotlib>=3.5
# - numpy>=1.17
# - scipy>=1.6
# - netcdf4<=1.6.1
# - ffmpeg
# - pyproj>=2.3
# - libgdal>=3.1
# - gdal>=3.1
# - xarray
# - dask
# - cfgrib
# - pygrib
# - xhistogram
# - requests
# - pytest<8
# - pytest-cov
# - pytest-benchmark
# - pytest-mpl
# - cartopy>=0.20
# - nc-time-axis
# - geojson
# - pynucos>=2.12
# - isodate
# - coloredlogs
# - cmocean
# - utm
# - roaring-landmask>=0.7
# # - trajan>=0.1.3
# # - adios_db
##
#- opendrift
- opendrift>=1.11.2
- scipy
- xarray
# - xroms
Expand All @@ -49,7 +50,8 @@ dependencies:
- coverage
- pip
- pytest
- pip:
- git+https://github.com/OpenDrift/opendrift
- git+https://github.com/fsspec/kerchunk
# - pip:
# - adios_db
# - git+https://github.com/OpenDrift/opendrift
# - git+https://github.com/fsspec/kerchunk
# - xroms # can't be found on conda-forge for CI, but don't need since in runslow tests?
68 changes: 35 additions & 33 deletions ci/environment-py3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,43 @@ channels:
dependencies:
- python=3.11
############## These will have to be adjusted to your specific project
# - adios_db
# - adios-db
- appdirs
- aiohttp
- kerchunk
- numpy
# opendrift reqs
- matplotlib>=3.5
- numpy>=1.17
- scipy>=1.6
- netcdf4<=1.6.1
- ffmpeg
- pyproj>=2.3
- libgdal>=3.1
- gdal>=3.1
- xarray
- dask
- cfgrib
- pygrib
- xhistogram
- requests
- pytest<8
- pytest-cov
- pytest-benchmark
- pytest-mpl
- cartopy>=0.20
- nc-time-axis
- geojson
- pynucos>=2.12
- isodate
- coloredlogs
- cmocean
- utm
- roaring-landmask>=0.7
# # opendrift reqs
# - matplotlib>=3.5
# - numpy>=1.17
# - scipy>=1.6
# - netcdf4<=1.6.1
# - ffmpeg
# - pyproj>=2.3
# - libgdal>=3.1
# - gdal>=3.1
# - xarray
# - dask
# - cfgrib
# - pygrib
# - xhistogram
# - requests
# - pytest<8
# - pytest-cov
# - pytest-benchmark
# - pytest-mpl
# - cartopy>=0.20
# - nc-time-axis
# - geojson
# - pynucos>=2.12
# - isodate
# - coloredlogs
# - cmocean
# - utm
# - roaring-landmask>=0.7
# - trajan>=0.1.3
# - adios_db
##
#- opendrift
- opendrift>=1.11.2
- scipy
- xarray
# - xroms
Expand All @@ -49,7 +50,8 @@ dependencies:
- coverage
- pip
- pytest
- pip:
- git+https://github.com/OpenDrift/opendrift
- git+https://github.com/fsspec/kerchunk
# - pip:
# - adios_db
# - git+https://github.com/OpenDrift/opendrift
# - git+https://github.com/fsspec/kerchunk
# - xroms # can't be found on conda-forge for CI, but don't need since in runslow tests?
68 changes: 35 additions & 33 deletions ci/environment-py3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,43 @@ channels:
dependencies:
- python=3.9
############## These will have to be adjusted to your specific project
# - adios_db
# - adios-db
- appdirs
- aiohttp
- kerchunk
- numpy
# opendrift reqs
- matplotlib>=3.5
- numpy>=1.17
- scipy>=1.6
- netcdf4<=1.6.1
- ffmpeg
- pyproj>=2.3
- libgdal>=3.1
- gdal>=3.1
- xarray
- dask
- cfgrib
- pygrib
- xhistogram
- requests
- pytest<8
- pytest-cov
- pytest-benchmark
- pytest-mpl
- cartopy>=0.20
- nc-time-axis
- geojson
- pynucos>=2.12
- isodate
- coloredlogs
- cmocean
- utm
- roaring-landmask>=0.7
# # opendrift reqs
# - matplotlib>=3.5
# - numpy>=1.17
# - scipy>=1.6
# - netcdf4<=1.6.1
# - ffmpeg
# - pyproj>=2.3
# - libgdal>=3.1
# - gdal>=3.1
# - xarray
# - dask
# - cfgrib
# - pygrib
# - xhistogram
# - requests
# - pytest<8
# - pytest-cov
# - pytest-benchmark
# - pytest-mpl
# - cartopy>=0.20
# - nc-time-axis
# - geojson
# - pynucos>=2.12
# - isodate
# - coloredlogs
# - cmocean
# - utm
# - roaring-landmask>=0.7
# - trajan>=0.1.3
# - adios_db
##
#- opendrift
- opendrift>=1.11.2
- scipy
- xarray
# - xroms
Expand All @@ -49,7 +50,8 @@ dependencies:
- coverage
- pip
- pytest
- pip:
- git+https://github.com/OpenDrift/opendrift
- git+https://github.com/fsspec/kerchunk
# - pip:
# - adios_db
# - git+https://github.com/OpenDrift/opendrift
# - git+https://github.com/fsspec/kerchunk
# - xroms # can't be found on conda-forge for CI, but don't need since in runslow tests?
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ API
:recursive:

the_manager
models.opendrift
models
6 changes: 5 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ m.show_config(key="ocean_model")
The built-in ocean models are:
* NWGOA (1999–2008) over the Northwest Gulf of Alaska (Danielson, S. L., K. S. Hedstrom, E. Curchitser, 2016. Cook Inlet Model Calculations, Final Report to Bureau of Ocean Energy Management, M14AC00014, OCS Study BOEM 2015-050, University of Alaska Fairbanks, Fairbanks, AK, 149 pp.)
* CIOFS (1999–2022) across Cook Inlet, Alaska, a hindcast version of NOAA's CIOFS model. (Thyng, K. M., C. Liu, M. Feen, E. L. Dobbins, 2023. Cook Inlet Circulation Modeling, Final Report to Oil Spill Recovery Institute, Axiom Data Science, Anchorage, AK.)
* CIOFS_NOW (mid-2021 through 48 hours from present time) which is the nowcast/forecast version of the CIOFS model. (Shi, L., L. Lanerolle, Y. Chen, D. Cao, R. Patchen, A. Zhang,
* CIOFSOP (mid-2021 through 48 hours from present time) which is the nowcast/forecast version of the CIOFS model. (Shi, L., L. Lanerolle, Y. Chen, D. Cao, R. Patchen, A. Zhang,
and E. P. Myers, 2020. NOS Cook Inlet Operational Forecast System: Model development and hindcast skill assessment, NOAA Technical Report NOS CS 40, Silver Spring, Maryland, September 2020.)

If you are running locally on an Axiom server you can use `ocean_model_local=True` to access the model output locally instead of remotely.

An alternative ocean model can be used instead by initializing the `Manager` then setting up the reader manually, as shown in a {ref}`Quick Start<new_reader>` example:

```
Expand Down Expand Up @@ -239,6 +241,8 @@ To limit the variables saved in the export file, input a list of just the variab
m = ptm.OpenDriftModel(export_variables=[])
```

The default list of `export_variables` is set in `config_model` but is modified depending on the `drift_model` set.


#### How to modify details for Stokes Drift

Expand Down
1 change: 1 addition & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- adios_db
- aiohttp
- appdirs
- cmocean
- numpy
- xarray
# These are needed for the docs themselves
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ To install from PyPI:
:caption: Examples and demos

quick_start
tutorial
configuration


Expand Down
Loading
Loading