Skip to content

Commit

Permalink
Merge branch 'main' into dockerize
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-axds committed Feb 4, 2025
2 parents 766b664 + afc38d0 commit b9b274b
Show file tree
Hide file tree
Showing 17 changed files with 993 additions and 174 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
rev: 1.6.0
hooks:
- id: interrogate
exclude: ^(docs|setup.py|tests|conftest.py)
Expand Down
37 changes: 34 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ m = ptm.OpenDriftModel(drift_model="OpenOil")

This selection sets some of the configuration details and export variables that are relevant for the simulation.


(config:export_variables)=
#### Export Variables

All possible variables will be exported by default into the outfiles and available in memory (`m.o.history` and `m.o.history_metadata` or `m.o.get_property(<key>)` for `OpenDriftModel`).
Expand All @@ -236,13 +236,44 @@ The full list of possible variables to be exported is available with
m.all_export_variables()
```

To limit the variables saved in the export file, input a list of just the variables that you want to save, keeping in mind that `['lon', 'lat', 'ID', 'status']` will also be included regardless. For example:
To limit the variables saved in the export file, input a list of just the variables that you want to save, keeping in mind that `['lon', 'lat', 'ID', 'status','z']` will also be included regardless. For example:
```
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.
The default list of `export_variables` is set in `config_model` but is modified depending on the `drift_model` set and the `export_variables` input by the user.

The export variables available for each model at time of running these docs is shown as follows.

##### OceanDrift

```{code-cell} ipython3
import particle_tracking_manager as ptm
m = ptm.OpenDriftModel(drift_model="Leeway")
m.all_export_variables()
```

##### Leeway

```{code-cell} ipython3
m = ptm.OpenDriftModel(drift_model="Leeway")
m.all_export_variables()
```

##### LarvalFish

```{code-cell} ipython3
m = ptm.OpenDriftModel(drift_model="LarvalFish", do3D=True)
m.all_export_variables()
```

##### OpenOil

```{code-cell} ipython3
m = ptm.OpenDriftModel(drift_model="OpenOil")
m.all_export_variables()
```

#### How to modify details for Stokes Drift

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To install from PyPI:
quick_start
tutorial
configuration
plots


.. toctree::
Expand Down
Loading

0 comments on commit b9b274b

Please sign in to comment.