diff --git a/Convert_Matlab/Documentation_texfol/documentation.tex b/Convert_Matlab/Documentation_texfol/documentation.tex index 31e84225af0c469e985979fdba39f04cbc9ffa7e..550f20e7edf01258d2f6f663233af827ae2719aa 100644 --- a/Convert_Matlab/Documentation_texfol/documentation.tex +++ b/Convert_Matlab/Documentation_texfol/documentation.tex @@ -46,18 +46,17 @@ the first date of the dataset. We call date index the integer: \end{equation*} So the first value of $k$ is 0. -Let $e_{\mathrm{max}, o}(k)$ be the number of instantaneous eddies -with orientation $o$ at date index $k$. $e_{\mathrm{max}, o}(k)$ is -stored in Matlab variables Nanti and Ncyclo. We assume we know an -overestimate $E$ of $e_{\mathrm{max}, o}(k)$ for all $k$ and both -orientations. That is, we guarantee that: +Let $e_\mathrm{max}(k)$ be the number of instantaneous eddies at date +index $k$. $e_\mathrm{max}(k)$ is stored in Matlab variables Nanti and +Ncyclo. We assume we know an overestimate $E$ of $e_\mathrm{max}(k)$ +for all $k$. That is, we guarantee that: \begin{equation*} - \forall (k, o), e_{\mathrm{max}, o}(k) \le E + \forall k, e_\mathrm{max}(k) \le E \end{equation*} -The eddy indices $e$ for eddies with orientation $o$ at date index $k$ -start at 1 and increment 1 by 1, without any jump. So they go from 1 -to $e_{\mathrm{max}, o}(k)$. +The eddy indices $e$ for eddies at date index $k$ start at 1 and +increment 1 by 1, without any jump. So they go from 1 to +$e_\mathrm{max}(k)$. The relation between node index $n$, date index $k$ and eddy index $e$ is: @@ -104,10 +103,10 @@ suite of processed dates. k' = \left \lfloor \frac{n' - 1}{E} \right \rfloor \end{equation*} The suite of processed dates is stored in the array -\verb+date_num+. For a given orientation, from $n'$ we can compute -$k'$ and $e$, and then $d$ from \verb+date_num[k']+, without any -search. But the reverse conversion needs a search: from $d$ and $e$, -we need to search \verb+date_num+ to get $k'$, then $n'$. +\verb+date_num+. From $n'$ we can compute $k'$ and $e$, and then $d$ +from \verb+date_num[k']+, without any search. But the reverse +conversion needs a search: from $d$ and $e$, we need to search +\verb+date_num+ to get $k'$, then $n'$. To convert from $n'$ to $n$, we note that: \begin{equation*} @@ -118,6 +117,8 @@ and: n = n' + (k - k') E \end{equation*} +Note that $E$ is specific to a given orientation. + \section{Instantaneous eddies} The data for instantaneous eddies is stored in shapefiles, in the @@ -171,25 +172,24 @@ the number of eddies at the date, in the field \verb+eddy_index+. The file \verb+ishape_last.txt+ in the directory \verb+SHPC_(anti|cyclo)+ is used to access directly any instantaneous -eddy at any date. Let $l_o(k)$ be the shape index in the shapefiles, -for a given orientation $o$, of the last instantaneous eddy at date -index $k$: +eddy at any date. Let $l(k)$ be the shape index in the shapefiles of +the last instantaneous eddy at date index $k$: \begin{equation*} - l_o(k) = \sum_{k' = 0} ^k e_{\mathrm{max}, o}(k') - 1 + l(k) = \sum_{k' = 0} ^k e_\mathrm{max}(k') - 1 \end{equation*} So the shape index $i$ of the eddy with eddy index $e$ at date index $k$ is: \begin{equation*} i = \begin{array}{|ll} e - 1 & \mathrm{if}\ k = 0 \\ - l_o(k - 1) + e & \mathrm{if}\ k \ge 1 + l(k - 1) + e & \mathrm{if}\ k \ge 1 \end{array} \end{equation*} Also, note that, if $k \ge 1$ then: \begin{equation*} - e_{\mathrm{max}, o}(k) = l(k) - l(k - 1) + e_\mathrm{max}(k) = l(k) - l(k - 1) \end{equation*} -\verb+ishape_last.txt+ gives $l_o(k)$ for all $k$. +\verb+ishape_last.txt+ gives $l(k)$ for all $k$. Finally, the file \verb+grid_nml.txt+ in the directory \verb+SHPC_(anti|cyclo)+ gives (in Fortran namelist format) the grid diff --git a/Overlap/Documentation_texfol/documentation.tex b/Overlap/Documentation_texfol/documentation.tex index 3a18fa973c9d81522d994087fced023a49117fc4..b35c0c7e4a8d0db6a008afdbb08c42f592a9a5f3 100644 --- a/Overlap/Documentation_texfol/documentation.tex +++ b/Overlap/Documentation_texfol/documentation.tex @@ -216,11 +216,9 @@ implicite, dans les shapefiles et les fichiers edgelist. En effet, on a le nombre de tourbillons valides à chaque date d'après les shapefiles, et on a la liste des tourbillons non isolés d'après la liste des arcs. Mais la liste des sommets isolés n'est donc pas très -facilement trouvée. On ajoute par conséquent les fichiers de sortie -suivants : +facilement trouvée. On ajoute par conséquent le fichier de sortie +suivant : \begin{description} -\item[number\_eddies\_\$m.csv] Une colonne indice de date, une colonne - nombre de tourbillons visibles. \item[isolated\_nodes\_\$m.txt] Sur chaque ligne : indice de date, indice de tourbillon. Peut être lu comme une simple liste d'adjacence. @@ -229,14 +227,13 @@ suivants : Les entrées-sorties sont dans : l'algorithme principal directement (lecture de longitude et latitude), \verb+get_snapshot+ (lecture des shapefiles), \verb+write_overlap+ (écriture dans -\verb+edgelist_$m.txt+, arcs entre $k_b$(m) et -\verb+k_end_main_loop+(m)), \verb+write_eddy+ (écriture dans -\verb+extremum+, \verb+outermost_contour+, \verb+max_speed_contour+), -\verb+dispatch_snapshot+ directement (écriture dans -\verb+isolated_nodes_$m+, -\verb+number_eddies_$m+). Les processus écrivent dans des fichiers ou -répertoires indicés par le numéro de processus donc deux processus ne -peuvent écrire dans le même fichier. Cf. figure +\verb+edgelist_$m.txt+, arcs entre +$k_b$(m) et \verb+k_end_main_loop+(m)), \verb+write_eddy+ (écriture +dans \verb+extremum+, \verb+outermost_contour+, +\verb+max_speed_contour+), \verb+dispatch_snapshot+ directement +(écriture dans \verb+isolated_nodes_$m+). Les processus écrivent dans +des fichiers ou répertoires indicés par le numéro de processus donc +deux processus ne peuvent écrire dans le même fichier. Cf. figure (\ref{fig:input_output}). \begin{figure}[htbp] \centering diff --git a/Overlap/eddy_graph_in.sh b/Overlap/eddy_graph_in.sh index 947c08fc9fa9a6660fd0bd52c57210c786b5d5a9..86b81ad26e1a9840e9ce6315078aa3c623c5a133 100755 --- a/Overlap/eddy_graph_in.sh +++ b/Overlap/eddy_graph_in.sh @@ -25,9 +25,7 @@ do done # Sort the edge list for easier comparison between runs: - export LC_NUMERIC=C # for the sort command - sort --key=1 --numeric-sort --output=edgelist.csv edgelist_unsorted.csv rm edgelist_unsorted.csv