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
"\n# How data is stored\n\nGeneral information about eddies storage.\n\nAll eddies files have same structure with more or less field and a way of ordering.\n\nThere are 3 class of files:\n\n- Eddies collections which contains a list of eddies without link between observations\n- Track eddies collections which manage eddies when there are merged in trajectory\n (track field allow to separate each track)\n- Network eddies collections which manage eddies when there are merged in network\n (track/segment field allow to separate observations)\n"
"Eddies could be store in 2 formats with same structures:\n\n- zarr (https://zarr.readthedocs.io/en/stable/), which allow efficiency in IO,...\n- NetCDF4 (https://unidata.github.io/netcdf4-python/), well-known format\n\nEach field are stored in column, each row corresponds at 1 observation,\narray field like contour/profile are 2D column.\n\n"
37
+
]
38
+
},
39
+
{
40
+
"cell_type": "markdown",
41
+
"metadata": {},
42
+
"source": [
43
+
"Eddies files (zarr or netcdf) could be loaded with `load_file` method:\n\n"
44
+
]
45
+
},
46
+
{
47
+
"cell_type": "code",
48
+
"execution_count": null,
49
+
"metadata": {
50
+
"collapsed": false
51
+
},
52
+
"outputs": [],
53
+
"source": [
54
+
"eddies_collections = EddiesObservations.load_file(get_path(\"Cyclonic_20160515.nc\"))\neddies_collections.field_table()\n# offset and scale_factor are used only when data is stored in zarr or netCDF4"
55
+
]
56
+
},
57
+
{
58
+
"cell_type": "markdown",
59
+
"metadata": {},
60
+
"source": [
61
+
"## Field access\n\n"
62
+
]
63
+
},
64
+
{
65
+
"cell_type": "code",
66
+
"execution_count": null,
67
+
"metadata": {
68
+
"collapsed": false
69
+
},
70
+
"outputs": [],
71
+
"source": [
72
+
"eddies_collections.amplitude"
73
+
]
74
+
},
75
+
{
76
+
"cell_type": "markdown",
77
+
"metadata": {},
78
+
"source": [
79
+
"Data matrix is a numpy ndarray\n\n"
80
+
]
81
+
},
82
+
{
83
+
"cell_type": "code",
84
+
"execution_count": null,
85
+
"metadata": {
86
+
"collapsed": false
87
+
},
88
+
"outputs": [],
89
+
"source": [
90
+
"eddies_collections.obs"
91
+
]
92
+
},
93
+
{
94
+
"cell_type": "code",
95
+
"execution_count": null,
96
+
"metadata": {
97
+
"collapsed": false
98
+
},
99
+
"outputs": [],
100
+
"source": [
101
+
"eddies_collections.obs.dtype"
102
+
]
103
+
},
104
+
{
105
+
"cell_type": "markdown",
106
+
"metadata": {},
107
+
"source": [
108
+
"## Contour storage\nContour are stored to fixed size for all, contour are resample with an algorithm before to be store in object\n\n"
109
+
]
110
+
},
111
+
{
112
+
"cell_type": "markdown",
113
+
"metadata": {},
114
+
"source": [
115
+
"## Tracks\nTracks add several field like:\n\n- track : ID which allow to identify path\n- observation_flag : True if it's an observation to filled a missing detection\n- observation_number : Age of eddies\n- cost_association : result of cost function which allow to associate the observation with eddy path\n\n"
116
+
]
117
+
},
118
+
{
119
+
"cell_type": "code",
120
+
"execution_count": null,
121
+
"metadata": {
122
+
"collapsed": false
123
+
},
124
+
"outputs": [],
125
+
"source": [
126
+
"eddies_tracks = TrackEddiesObservations.load_file(\n py_eddy_tracker_sample.get_path(\"eddies_med_adt_allsat_dt2018/Cyclonic.zarr\")\n)\n# In this example some field are removed like effective_contour_longitude, ... in order to save time for doc building\neddies_tracks.field_table()"
127
+
]
128
+
},
129
+
{
130
+
"cell_type": "markdown",
131
+
"metadata": {},
132
+
"source": [
133
+
"## Network\nNetwork files use some specific field:\n\n- track : ID of network (ID 0 are for lonely eddies/trash)\n- segment : ID of path in network (from 0 to N)\n- previous_obs : Index of the previous observation in the full dataset, if -1 there are no previous observation\n- next_obs : Index of the next observation in the full dataset, if -1 there are no next observation\n- previous_cost : Result of cost_function (1 good <> 0 bad) with previous observation\n- next_cost : Result of cost_function (1 good <> 0 bad) with next observation\n\n"
0 commit comments