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

Problem with Processing Altimeter Dataset- no Data found #8

Open
piau00 opened this issue Feb 6, 2024 · 1 comment
Open

Problem with Processing Altimeter Dataset- no Data found #8

piau00 opened this issue Feb 6, 2024 · 1 comment

Comments

@piau00
Copy link

piau00 commented Feb 6, 2024

Hello,
I am trying to get wave data from the coast of Chile and I’m having problems with my altimeter data.
First I got the same error message as discussed in problem #6 and then changed the beginning of the URLS.

Then this part of the code worked. But then with the process altimeter data function, all the satellites and their number of tracks are displayed when loading, but after a few minutes it says "no altimeter data found". I have already tried it with the different values of the quality control flags but I always get the same message that no data can be found. Because I have changed the start of the URL, I can no longer look into the netcdf files because these links are no longer download links. I have also tried with individual satellites (I actually want to have all of them) and also tried to split the dataset as it is relatively large, but unfortunately without success. So either I don't change my URLs at all and they are then not accepted in the first step or I change them but then get the result that no altimeter data could be found.

So this is working fine:
wa= rwave.waveAnalysis(altimeterURL='C:/Users/Pia/OneDrive/Dokumente/RADWave/AODN_data_fixed.txt', bbox=[314,344,-74,-70,], stime=[1980,1,1], etime=[2023,12,1])

This is my data with the changed URLs:
AODN_data_fixed.txt

And this is where the "error" occurs:
wa.processAltimeterData(max_qc=2, altimeter_pick='all', saveCSV = 'altimeterData.csv')

image

What is the problem, am I missing something here?

@tristan-salles
Copy link
Member

Hi there,

I think there is a problem in either the extent of your bbox or in the chosen list of URLs, see below:

import RADWave as rwave
import xarray as xr
bbox = [314,344,-74,-70]

wa= rwave.waveAnalysis(altimeterURL = 'AODN_data_fixed.txt', 
                       bbox = bbox, 
                       stime = [1980,1,1], etime = [2023,12,1])

Check the spatial range extent of the URL dataset and if it is within the area (bbox) set in the waveAnalysis function

data_Range_lat_min = 90
data_Range_lat_max = -90
data_Range_lon_min = 360
data_Range_lon_max = -360

url_in_bbox = []

for k in range(len(wa.allURL[0])):
    sat_ds = xr.open_dataset(wa.allURL[0][k])
    
    minlat = sat_ds.LATITUDE.values.min()
    maxlat = sat_ds.LATITUDE.values.max()
    minlon = sat_ds.LONGITUDE.values.min()
    maxlon = sat_ds.LONGITUDE.values.max()
    
    data_Range_lat_min = min(data_Range_lat_min,minlat)
    data_Range_lat_max = max(data_Range_lat_max,maxlat)
    data_Range_lon_min = min(data_Range_lon_min,minlon)
    data_Range_lon_max = max(data_Range_lon_max,maxlon)
    
    if minlon>=bbox[0] and maxlon<=bbox[1] and minlat>=bbox[2] and maxlat<=bbox[3]:
        url_in_bbox.append(k)

Data range for the entire set of URL:

print('URLs spatial distribution:')
print('  + latitudinal extent:  ',data_Range_lat_min,data_Range_lat_max)
print('  + longitudinal extent:  ',data_Range_lon_min,data_Range_lon_max)
print('')
if len(url_in_bbox) > 0:
    for k in range(len(url_in_bbox)):
        print(wa.allURL[0][url_in_bbox[k]])
else:
    print('None of the URLs are within the requested bounding box')
URLs spatial distribution:
  + latitudinal extent:   -45.994205 -16.055656
  + longitudinal extent:   286.0 289.91946

None of the URLs are within the requested bounding box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants