Travis CI (Python 3.6) | Read the Docs | Code Coverage |
---|---|---|
Python 3
This module computes the transport along perpendicular vectors to the coast.
The processing of the data is done through xarray
. For more information
refer to ReadTheDocs
- Make a new directory where you want the repository.
- Clone the tcoasts repository from Github. In the command prompt, type:
git clone https://github.com/Josue-Martinez-Moreno/tcoasts.git
- Install the package globally:
pip install -e .
This make the package an editable install so that it can be updated with future additions to tcoasts. To instead install the package locally:pip install --user .
- Move into your tcoasts directory.
- Update your GitHub repository.
git pull
- Edit your install of tcoasts .
pip install -e .
orpip install --force-reinstall -e .
or, for local installation:pip install --ignore-installed --user .
Execute:
pytest -m tcoasts --cov=tcoasts
This code computes the transport along perpendicular vectors to the coast.
Perpendicular vectors are computed using the coastline slopes. Normal vectors are computed at the center of each interpolated cell (Figure 1) and the interpolated velocity is projected over the normal by using the scalar projection property of dot products:
Then the new projected velocity vector corresponds to:
Then the transport is computed using:
Additional constrains can be added in which the transport will be masked by tracers. For example, figure 2 shows the transport of passive tracers at the Gulf of Mexico with concentrations larger than 10% (C_0 = 1 mol/m^3).