Skip to content

Commit 02f9687

Browse files
committed
Add some documentation
1 parent 32fda01 commit 02f9687

File tree

7 files changed

+83
-6
lines changed

7 files changed

+83
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Method is used in :
1818

1919
To avoid problems with installation, use of the virtualenv Python virtual environment is recommended.
2020

21-
Then use pip to install all dependencies (numpy, scipy, matplotlib, netCDF4, cython, pyproj, Shapely, ...), e.g.:
21+
Then use pip to install all dependencies (numpy, scipy, matplotlib, netCDF4, pyproj, ...), e.g.:
2222

2323
```bash
2424
pip install numpy scipy netCDF4 matplotlib opencv-python pyyaml pyproj pint polygon3

doc/autodoc/observations.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
Observations
22
============
33

4-
.. automodule:: py_eddy_tracker.observations
4+
.. automodule:: py_eddy_tracker.observations.observation
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
.. automodule:: py_eddy_tracker.observations.tracking
510
:members:
611
:undoc-members:
712
:show-inheritance:

doc/custom_tracking.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
==================
2+
Customize tracking
3+
==================

doc/grid_identification.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,32 @@ Eddy identification
33
===================
44

55
Run the identification process for a single day
6-
***********************************************
6+
7+
8+
Shell/bash command
9+
******************
10+
11+
Bash command will allow to process one grid, it will apply a filter and an identification.
12+
13+
14+
.. code-block:: bash
15+
16+
EddyId share/nrt_global_allsat_phy_l4_20190223_20190226.nc 20190223 \
17+
adt ugos vgos longitude latitude \
18+
out_directory -v DEBUG
19+
20+
21+
Filter could be modify with options *--cut_wavelength* and *--filter_order*. You could also defined height between two isolines with *--isoline_step*, which could
22+
improve speed profile quality and detect accurately tiny eddies. You could also use *--fit_errmax* to manage acceptable shape of eddies.
23+
24+
An eddy identification will produce two files in the output directory, one for anticyclonic eddies and the other one for cyclonic.
25+
26+
In regional area which are away from the equator, current could be deduce from height, juste write *None None* inplace of *ugos vgos*
27+
28+
Python code
29+
***********
30+
31+
If we want customize eddies identification, python module is here.
732

833
Activate verbose
934

doc/index.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,30 @@
66
Welcome to py-eddy-tracker's documentation!
77
===========================================
88

9+
910
.. toctree::
1011
:maxdepth: 2
1112
:caption: Installation
1213

1314
installation
1415

16+
1517
.. toctree::
1618
:maxdepth: 2
1719
:caption: Grid manipulation
1820

21+
grid_identification
1922
grid_load_display
2023
spectrum
21-
grid_identification
24+
25+
26+
.. toctree::
27+
:maxdepth: 2
28+
:caption: Tracking
29+
30+
run_tracking
31+
custom_tracking
32+
2233

2334
.. toctree::
2435
:maxdepth: 2

doc/run_tracking.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
========
2+
Tracking
3+
========
4+
5+
To run a tracking just create an yaml file with minimal specification (*FILES_PATTERN* and *SAVE_DIR*).
6+
7+
Example of yaml
8+
9+
.. code-block:: yaml
10+
11+
PATHS:
12+
# Files produces with EddyIdentification
13+
FILES_PATTERN: MY/IDENTIFICATION_PATH/Anticyclonic*.nc
14+
SAVE_DIR: MY_OUTPUT_PATH
15+
16+
# Number of timestep for missing detection
17+
VIRTUAL_LENGTH_MAX: 3
18+
# Minimal time to consider as a full track
19+
TRACK_DURATION_MIN: 10
20+
21+
To run:
22+
23+
.. code-block:: bash
24+
25+
EddyTracking conf.yaml -v DEBUG
26+
27+
28+
It will produce 4 files by run:
29+
30+
- A file of correspondances which will contains all the information to merge all identifications file
31+
- A file which will contains all the observations which are alone
32+
- A file which will contains all the short track which are shorter than TRACK_DURATION_MIN
33+
- A file which will contains all the long track which are longer than TRACK_DURATION_MIN

src/scripts/EddyId

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def id_parser():
2424
parser.add_argument('--filter_order', default=3, type=int)
2525
parser.add_argument('--isoline_step', default=0.002, type=float,
2626
help='Step between 2 isoline in m')
27-
parser.add_argument('--fir_errmax', default=55, type=float,
27+
parser.add_argument('--fit_errmax', default=55, type=float,
2828
help='Error max accepted to fit circle in percent')
2929
parser.add_argument('--height_unit', default=None, type=str,
3030
help='Force height unit')
@@ -49,7 +49,7 @@ if __name__ == '__main__':
4949
if args.cut_wavelength != 0:
5050
h.bessel_high_filter(args.h, args.cut_wavelength, order=args.filter_order)
5151
a, c = h.eddy_identification(args.h, u, v, date, args.isoline_step, pixel_limit=(5, 2000),
52-
shape_error=args.fir_errmax, force_height_unit=args.height_unit,
52+
shape_error=args.fit_errmax, force_height_unit=args.height_unit,
5353
force_speed_unit=args.speed_unit)
5454
if args.zarr:
5555
h = zarr.open(args.path_out + date.strftime('/Anticyclonic_%Y%m%d.zarr'), 'w')

0 commit comments

Comments
 (0)