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

Question in eddy dicts #13

Open
qjuanr opened this issue Feb 23, 2022 · 5 comments
Open

Question in eddy dicts #13

qjuanr opened this issue Feb 23, 2022 · 5 comments

Comments

@qjuanr
Copy link

qjuanr commented Feb 23, 2022

Hello, Prof !
I am new in eddy detection and I have some questions about eddy dicts.

1.The key of '2dgaussianfit' & ’area‘ both have three rows. What does each column mean?
2.The key of 'majoraxis' has two rows. What does each column mean?

If possible ,could you please release a variable user manual? Thanks for your reply!

positive_eddies=analyseddyzt(ssha[:,:,:],lon,lat,0,31,1,levels,preferences=preferences ,areamap=areamap,areaparms=checkarea,filters=filters ,maskopt='contour',diagnostics=False,pprint=True)

@josuemtzmo
Copy link
Owner

Hello @qjuanr,

Thanks for using the trackeddy. I will need to check the code to come up with a variable user manual (It may take me a couple of days to put it together).

  • In the meantime, I can say that the reason the area have multiple rows is because they contain information of the ellipse, closed contour and 2d gaussian. For example:

At line 342 the area first index is the area of the contour, the second index is by default the area of a circle with the Rossby radius of deformation, and the third index is the area of the fitted gaussian.

area=[[areastatus['contour'],areastatus['check'],gaussarea[1]]]

  • The 2dgaussianfit, the different indexes correspond to the parameters of the best fitted gaussian from the optimisation function. In other words, the output corresponds to the x output from the function scipy.optimize.leastsq. From the top of my head, I think it should have 6 indexes indexes which corresponds to the inputs of the 2D gaussian fit function:

def twoD_Gaussian(coords, sigma_x, sigma_y, theta, slopex=0, slopey=0, offset=0):
'''
*************** twoD_Gaussian *******************
Build a 2D gaussian.
Notes:
Remmember to do g.ravel().reshape(len(x),len(y)) for plotting purposes.
Args:
coords [x,y] (list|array): Coordinates in x and y.
amplitude (float): Amplitud of gaussian.
x0 , yo (float): Center of Gausian.
sigma_x,sigma_y (float): Deviation.
theta (Float): Orientation.
offset (Float): Gaussian Offset.
Returns:

  • The major axis has two rows, as you need two coordinates to construct the vector from the center of the eddy to the location of the major axis of the fitted ellipse.

I hope this is clearer.

Something important to mention, which has led to confusion before with this algorithm is that it do not track eddies in time, i.e. there is no tracking over time of the identified eddies.

@qjuanr
Copy link
Author

qjuanr commented Feb 25, 2022

Thank you for the response!

I am a little confused about the note you mentioned at the end of your reply. Does you mean that Trackeddy algorithm only recognize eddies and reconstruct KE field , but do not track eddies in time? It's true that I didn't see obvious mention of eddy tracking in your paper, but after executing the code, the data items in the eddy dictionaries have a time dimension. What am I to make of that?

@josuemtzmo
Copy link
Owner

Hello @qjuanr, your interpretation is correct, although the dictionaries have a time dimension, meaning that technically a tracking algorithm could be implemented as a post-processing step. Trackeddy does not have a method implemented yet. In fact, the TrackEddy algorithm was used to recognise eddies and reconstruct their kinetic energy imprint.

@qjuanr
Copy link
Author

qjuanr commented Feb 25, 2022

Hello!
I found it possible to track eddies by calling 'analyseddyzt' function with multiple days of SLA data, which is probably the post-processing step you mentioned. Can you describe the criteria used for eddy tracking in this function? Thanks a lot!

positive_eddies=analyseddyzt(sla[:,:,:],lon,lat,0,31,1,levels,preferences=preferences ,areamap=areamap,areaparms=checkarea,filters=filters ,maskopt='contour',diagnostics=False,pprint=True)

@josuemtzmo
Copy link
Owner

Hello, please note that that function does not track on time, it does not create a path or trajectory for the identified eddies. This function only allows to identify eddies at different snapshots in time. The output will contain the time of detection, which could be used to construct a track as a post-processing step, but this functionality is not implemented in TrackEddy.

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