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
%%Automating the collocation of mesoscale eddies and BGC-Argo profiles
2
+
%{
3
+
This tutorial guides you through the process of automating the collocation of mesoscale eddies and BGC-Argo profiles using EddyProfSync. The necessary data has been downloaded and prepared in advance, and you can find the corresponding `.mat` files in the `data` directory.
4
+
5
+
## Data Sources and Tools
6
+
7
+
### BGC-Argo Profiles
8
+
9
+
We obtained BGC-Argo data using the [OneArgo-Mat](https://github.com/NOAA-PMEL/OneArgo-Mat) tool. This versatile tool allows us to download and perform initial quality control on the data. However, they recommend to write own function for perform analyses. For this tutorial, we processed approximately 96 floats in the Southern Ocean, capturing their spatio-temporal locations only to reduce the size of data. Furthermore, to identify profiles that are surfaced in eddies, we only need longitude, latitude and time of profile along with its identifier.
10
+
11
+
### Mesoscale Eddies
12
+
13
+
Mesoscale eddies were derived from the META datasets, and their trajectories were processed using Python scripts provided by [AVISO](https://www.aviso.altimetry.fr/en/data/products/value-added-products/global-mesoscale-eddy-trajectory-product/meta3-2-dt.html). Specifically, we truncated Mesoscale Eddies Trajectories for the year 2018, focusing on cyclonic and anticyclonic eddies in the Southern Ocean.
14
+
15
+
## Workflow Overview
16
+
17
+
In this tutorial, we demonstrate a streamlined workflow for collocating mesoscale eddies and BGC-Argo profiles. Notably, we illustrate that there is no need to worry about overlapping periods of both datasets when preparing indices, as shown in a previous tutorial (`matchInsituProfiles_stas.ipynb`).
EddyProfSync requires input in a column array format. However, since Argo data is typically stored by float, we need to extract and organize the spatio-temporal information into an array. To facilitate this process, I've provided two functions designed to retrieve longitude, latitude, and time from the OneArgo-Mat data structure. These functions can be found in the `utils` directory.
To ensure the integrity of the data, we remove virtual eddies from the Meta dataset, as they may exhibit unusual contours. For this purpose, I've implemented a function named `omitvirtualeddy4mMETA.m`, which should be found in the `utils` directory.
45
+
%}
46
+
cycvar = omitvirtualeddy4mMETA(cycdata);
47
+
acycvar = omitvirtualeddy4mMETA(acycdata);
48
+
49
+
%%Building Indices for BGC-Argo Profiles and Cyclonic Eddies
50
+
%{
51
+
In the collocation process of BGC-Argo profiles with cyclonic eddies, we'll start by building indices. First, we'll prepare the index for BGC-Argo profiles, followed by the index for cyclonic eddies to streamline the collocation process.
52
+
53
+
For the BGC-Argo indices, I recommend using the float's WMO and cycle number as indices. Unlike profile IDs, which may not be sequential in the original data, utilizing the float's WMO and cycle number allows us to efficiently extract physical and biogeochemical measurements after collocating. For this purpose, I have provided a function called `myargoindex.m` in the `utils` directory.
Next, for the cyclonic eddies indices, we'll utilize the `time` variable to label rows. This approach is useful when we want to collocate eddies and profiles without concerning ourselves with overlapping periods.
62
+
63
+
It's important to note that while this method serves illustration purposes, it is generally recommended to create overlap data for efficient matching of eddies and surfaced profiles. Nonetheless, EddyProfSync is designed to gracefully handle situations where there are no cyclonic eddies or no profiles to collocate.
Extract profiles outside of cyclonic eddies to identify profiles in anticyclonic eddies. Removing cyclonic eddies' profiles avoids redundancy in the collocation process. While the overlap of cyclonic and anticyclonic eddies is unlikely due to the accuracy of the tracking algorithm, we won't assume it. Therefore, removing cyclonic eddies' profiles ensures a more precise identification of profiles in anticyclonic eddies.
Let's save all the variables for further analyses in Argo format so that we can retrieve relavent information if and when needed from the Argo data structure. To do so, I have written `ra_saveinargostruct.m` and `ra_mat2argostruct.m`, should be found in the `utils` directory.
131
+
%}
132
+
% Saving all data in a separate variables for further analyses.
133
+
disp('Saving .mat files...')
134
+
% NOTE: these functions need column input therefore we converted earlier..
135
+
% here PROFID is in practice is a cycle number to match the profile.
136
+
% This will save .mat file at the current location.
disp('All .mat files are ready to be analysed!!!')
149
+
%%Extracting information from the collocated data
150
+
%{
151
+
Now, we can retrieve corresponding information from both original data sets related to the collocation. First, we will retrieve Argo data corresponding to collocated profiles for each category, namely, profiles in cyclonic eddies, profiles in anticyclonic eddies, and those outside of eddies. Please find `ra_importdata_interp.m` in the `utils` directory to perform this.
Let's delve into the analysis of collocated eddies and BGC-Argo profiles, which we have saved in separate `.mat` files with corresponding eddies and profiles in previous step. To demonstrate the synchronization achieved by the EddyProfSync algorithm, we will start by visualizing through a GIF.
0 commit comments