Closed mikestaub closed 5 months ago
hi @mikestaub it's probably the Ifremer ERDDAP server that is not able to handle such a large data request
Soluce 1:
did you tried the parallel=True
option in the data fetcher ?
it will chunk the domain in peaces to reduce the size of the ERDDAP requests, this should allows to go through
(you can also add the progress=True
to monitor what's happening)
Soluce 2: try with the argovis data source, it could be able to handle such a request
Note: I see in your script that you compute the temperature average of the dataset, I don't know your level of Argo data knowledge, but remember that measurements are not equally distributed over pressure; most of the time, measurements are sparser at depths, meaning that they represent a larger chunk of water that measurements near the surface. You can still use the argopy interpoler to project all measurements on standard depth levels or bins.
Thanks! I am new to the project and your comment is super helpful. I am unblocked now and will continue playing with the data.
Hey @gmaze,
I have the same behaviour. But i already tried using parallel=True
and i also tried manually setting different chunksizes. I got the same behaviour for argovis. Or am I getting something wrong?
Thank you in Advance!
from argopy import DataFetcher, set_options
regions = [
[-69, -10, 12, 59, 0, 10, '2021-06', '2022-06']
]
all_data = pd.DataFrame()
with set_options(dataset='phy', src='argovis', mode='standard', api_timeout=300):
params = 'all' # Define your parameters here
fetcher = DataFetcher(params=params,parallel=True,progress=True).region(regions[0])
print("here3")
for uri in fetcher.uri:
print("http: ... ", "&".join(uri.split("&")[1:-2])) # Display only the relevant part of each URLs of URI:
for region in regions:
try:
f = fetcher.region(region)
print("fetching region")
print(region)
data = f.to_xarray().to_dataframe().reset_index() # Convert to DataFrame
all_data = pd.concat([all_data, data], ignore_index=True)
except FileNotFoundError as e:
print(f"FileNotFoundError for region {region}: {e}")
all_data.info()```
Its me again.. I was too fast. Worked with Argovis, but still - chunking with ERDDAP didnt lead to success. Thanks for your work guys!
alright ! I'm glad that using argovis
is solving the issue for your large domain requests !
When I try to download the global data, I get a 502 error. When I make the
ArgoDataFetcher
region smaller, the code works as expected. Any idea why?MCVE Code Sample
Expected Output
Problem Description
Versions
Output of `argopy.show_versions()`
0.1.15