Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgoPy compatibility with EuroArgo data selection #357

Closed
ElenaTerzic opened this issue Jun 5, 2024 · 4 comments
Closed

ArgoPy compatibility with EuroArgo data selection #357

ElenaTerzic opened this issue Jun 5, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@ElenaTerzic
Copy link

Hi!

I have a question regarding the compatibility of Euro-Argo data downloading (https://dataselection.euro-argo.eu/) options (in Copernicus csv and netCDF or original Argo csv format) with the ArgoPy library?

Is there a way to use the same tools for data manipulation and visualization from argopy with the data that are extracted that way? For example, to convert it to a Pandas data frame format or something similar which could be compatible with the tools from this library?

Thanks in advance!

@gmaze
Copy link
Member

gmaze commented Jun 5, 2024

Hi @ElenaTerzic

The library cannot "consumed" csv data returned by the https://dataselection.euro-argo.eu/ platform (in fact, we're working on a way to output the platform selection as a code snippet using argopy, see #197 )

The easiest method, is to try to make your data selection and download directly from your code using the argopy datafetcher, no need to go through the https://dataselection.euro-argo.eu/ platform.

If you share some example of data selection you're doing on the web platform, I could help check if we can transform it into a code snippet with argopy

@gmaze gmaze added the question Further information is requested label Jun 5, 2024
@gmaze gmaze self-assigned this Jun 5, 2024
@ElenaTerzic
Copy link
Author

Hi @gmaze

Thanks a lot for your reply. I'll try with your suggestion. The snippet could indeed be a very helpful tool.

I downloaded all available T-S data for the Southern Adriatic with 642 cycles in total.
Screenshot 2024-06-05 at 09 49 03
For now I chose the csv format, but netCDF is also fine.

I'll go with data fetcher and see how this works.

Thanks a lot!

Best,
E

@gmaze
Copy link
Member

gmaze commented Jun 5, 2024

ok @ElenaTerzic

you can do such a selection with the region selection end point in argopy:
https://argopy.readthedocs.io/en/latest/user-guide/fetching-argo-data/data_selection.html#data-selection-region

it's a rectangular domain, but it's easy to refine it after download
Here is a code snippet to download all research quality data for your domain:

from argopy import DataFetcher, ArgoIndex

# Southern Adriatic, surface down to 1000m:
box = [16.2488, 19.8558, 40.6261, 42.8421, 0, 1000]

# Checkout any profiles available in the domain:
idx = ArgoIndex(cache=True).search_lat_lon(box[0:4])
print(idx.N_MATCH)

# Define an Argo set
ArgoSet = DataFetcher(mode='research', ds='phy', cache=True, parallel=True).region(box)

# Download data (takes about 45 secs):
ArgoSet.load()

# Plot float trajectories:
ArgoSet.plot()
Screenshot 2024-06-05 at 10 11 23
# Get data structure as an xarray:
ds = ArgoSet.data

<xarray.Dataset.argo>
This is a collection of Argo points
N_POINTS(240796) ~ N_PROF(1316) x N_LEVELS(998)
# Possibly convert points to profiles:
ds.argo.point2profile()

@ElenaTerzic
Copy link
Author

@gmaze , that's excellent, thank you very much!

Best,
E

@gmaze gmaze closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants