You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-71
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,26 @@ New version compatible with [VirtualFleet 0.4.0](https://virtualfleet.readthedoc
10
10
11
11
# Documentation (preliminary)
12
12
13
-
## Working design of the procedure
13
+
## Overall prediction procedure
14
14
1. Given a specific float cycle to predict ``C``, we extract:
15
15
- space/time position of the previous cycle ``C-1``,
16
16
- configuration parameters of the previous cycle ``C-1``, such as parking depth, profiling depth and cycling period using the EA API (but these can be overwritten if necessary).
17
17
18
-
2. We download the hourly CMEMS velocity fields for a large region around the previous cycle ``C-1`` coordinates
18
+
2. We download the daily CMEMS velocity fields for a region around the previous cycle ``C-1`` coordinates
19
19
20
20
3. We run a VirtualFleet simulation:
21
21
- where we use a large number of virtual floats located with a random perturbations around the float cycle ``C-1`` position in space/time
22
22
- for the cycle ``C-1`` duration
23
23
24
24
4. We compute the most probable position of the float cycle ``C`` and prediction metrics and figures.
25
25
26
-
The reason why we make random perturbations of the float cycle ``C-1`` position is not because the float position is uncertain (with GPS it is fairly accurate most of the time), but because it is a cheap way to account for errors in the velocity field. Indeed, we assume that the _phase_ of the velocity field used to advect floats is the primary source of uncertainties to predict the final position. We do not account for strain errors at this point.
26
+
The reason why we make random perturbations of the float cycle ``C-1`` position is not because the float position is uncertain (with GPS it is fairly accurate most of the time), but because it is a cheap way to account for errors in the velocity field. Indeed, we assume that the _phase_ of the velocity field used to advect floats is the primary source of uncertainties to predict the final position. We do not account for velocity shear/strain errors at this point.
27
27
28
28
## Installation
29
-
- Get this repository:
29
+
30
+
Our goal is to distribute VFrecovery as a standalone pipy package. In the meantime, one need to work with this repo only.
Virtual floats cycle duration in [hours], default: use previous cycle value
87
92
88
93
This script can be used to make prediction of a specific float cycle position.
89
-
This script is for testing the prediction system.
90
-
Note that in order to download online velocity fields from 'https://nrt.cmems-du.eu', you need to set the environment variables: MOTU_USERNAME and MOTU_PASSWORD.
94
+
This script can be used on past or unknown float cycles.
95
+
Note that in order to download online velocity fields from the Copernicus Marine Data Store, you need to have the
96
+
appropriate credentials file setup.
91
97
92
-
(c) Argo-France/Ifremer/LOPS, 2022
98
+
(c) Argo-France/Ifremer/LOPS, 2022-2024
93
99
```
94
100
95
101
So, don't forget to:
96
-
- set the environment variables ``MOTU_USERNAME`` and ``MOTU_PASSWORD``to be able to download the velocity field
102
+
- set up your environment to be able to download velocity fields from the Copernicus Marine Toolbox
97
103
- use the option ``vf`` to specify where the VirtualFleet software has been cloned (this is temporary and will change once VirtualFleet will be available on Pypi).
98
104
99
105
### Example
@@ -105,63 +111,3 @@ Below is an example of this prediction for the 99th cycle of the 6902919 float.
105
111
The really observed 99th cycle is shown at the tip of the arrow (red point) starting from the previous 98th cycle.
106
112
The VirtualFleet Recovery prediction is in the probabilistic red shading: the most probable position predicted is in the redder region.
In order to easily use prediction results with other (web)applications, we set-up a small web API based on [Flask](https://flask.palletsprojects.com/).
112
-
113
-
### Server set up
114
-
115
-
If you used the environment provided with this repo you already have Flask installed.
116
-
In order to set up the (dev) server to access the VirtualFleet Recovery web API, open a terminal, navigate to the ``webapi`` folder and type:
117
-
```bash
118
-
export FLASK_DEBUG=True
119
-
export FLASK_APP=myapp
120
-
flask -A myapp run
121
-
```
122
-
123
-
### Usage
124
-
125
-
You should know the <IP> address of the server where the Flask app is running.
126
-
127
-
#### Make a prediction
128
-
129
-
**Method 1**
130
-
131
-
Simply visit the prediction triggering form at:
132
-
133
-
```
134
-
http://<IP>:5000/trigger
135
-
```
136
-
137
-
**Method 2**
138
-
139
-
Go the full webAPI way: to make a prediction for the position of the ``CYC`` cycle from float ``WMO``, send a POST, request to:
140
-
```
141
-
http://<IP>:5000/predict/<WMO>/<CYC>
142
-
```
143
-
This will return a json file with the prediction results. Predictions are saved in cache, so that if you send a request for a prediction already computed, you will have the json results right away.
144
-
145
-
Options available :
146
-
-``velocity``: to select the velocity field to use, it can be ``ARMOR3D`` (default) or ``GLORYS``
147
-
-``nfloats``: to set the number of virtual floats to use in the probabilistic prediction. The default value is 2000.
148
-
-``cfg_parking_depth``: to set the parking depth, in db, of virtual floats. The default values is that of the previous cycle.
149
-
-``cfg_cycle_duration``: to set the cycle duration, in hours, of virtual floats. The default values is that of the previous cycle.
0 commit comments