Using along track satellite data
I downloaded the simulated SWOT data from AVISO. The data is along the track. I used the PET method to detect the eddy, but it could not be carried out. The returned error shows that the latitude and longitude can only be 1D array. longitude and latitude of the simlated SWOT data is 2D array., is there any way to fix it , thanks.
You must use unregulargrid class for swath data
I provide my code for you to check. The error finally shows is as follows (Using unregulargidDataset).
Traceback (most recent call last):
File "x:\MasterStudent_HY\Some data\Simulated SWOT data\Step1_identification.py", line 24, in
shape_error=55, # Error max (%) between ratio of circle fit and contour
TypeError: eddy_identification() missing 1 required positional argument: 'date'
Besides, the SWOT simulated data does not have the two parameters of u and v. Could this be the reason?
the data information is as following : The simulated SWOT data information.txt
If you take look at the API doc, you could see that u field and v field are mandatory. There is no builtin method to compute U/V field on non cartesian grid. It's something to improve.
If I calculate the u and v parameters and put them in the original altimetry file(nc file), will I be able to do the eddy identification.
It must work
Dear @AntSimi
I recently calculated the two geostrophic velocity components of u and v, and saved them to the nc file. The program seems to be able to work, but the following error message appears. How can I fix it?
IndexError: index 3155 is out of bounds for axis 0 with size 2
thank you
H.Y.
To investigate, we need information to repoduce your problem (i. e. code and data).
Dear @AntSimi
data as following : SWOT_L2_LR_SSH_Expert_266_008_20150101T003140_20150101T012245_DG10_01.nc.zip
and code :
grid_name, lon_name, lat_name = (
"X:\MasterStudent_HY\Some data\Simulated SWOT data\SWOT_L2_LR_SSH_Expert_266_008_20150101T003140_20150101T012245_DG10_01.nc",
"longitude",
"latitude",
)
from datetime import datetime
from py_eddy_tracker.dataset.grid import UnRegularGridDataset
from matplotlib import pyplot as plt
h = UnRegularGridDataset(grid_name, lon_name, lat_name,)
date = datetime(2015,1,1)
a, c = h.eddy_identification (
'ssha_karin', 'ugosa', 'vgosa', # Variables used for identification
date, # Date of identification
0.002, # step between two isolines of detection (m)
pixel_limit=(8, 1000), # Min and max pixel count for valid contour
shape_error=70, # Error max (%) between ratio of circle fit and contour
)
fig = plt.figure(figsize=(15,7))
ax = fig.add_axes([.03,.03,.94,.94])
ax = fig.add_subplot(1, 1, 1)
ax.set_title('Eddies detected -- Cyclonic(red) and Anticyclonic(blue)')
ax.set_ylim(-5,35)
ax.set_xlim(105,135)
ax.set_aspect('equal')
a.display(ax, label="Anticyclonic ({nb_obs} eddies)",color='b', linewidth=1)
c.display(ax, label="cyclonic ({nb_obs} eddies)",color='r', linewidth=1)
ax.legend(loc="upper left")
ax.grid()
print(a, c)
many thanks
When i take a look at ssha_karin i didn't see mesoscale signal? ugosa and vgosa haven't same dimensions in netcdf than ssha_karin
The matrix size of ugosa and vgosa I calculated should be the same as the size of ssha_karin. I would like to ask how to solve the problem of dimension