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

DataStructure #2

Open
philippemiron opened this issue Apr 3, 2023 · 1 comment
Open

DataStructure #2

philippemiron opened this issue Apr 3, 2023 · 1 comment
Assignees

Comments

@philippemiron
Copy link
Owner

philippemiron commented Apr 3, 2023

The code is working fine now, but it could be made simpler.

  • How to store the xgcm.grid objects (velocity fields, and trajectory grids)?

Could have a class xlcs that contains:

  • parameters of the trajectory (x,y,dx,dy,T)
  • build the grids automatically
  • then you can call flowmap() operation without having to pass the grid object

I think that creating a class might be overkill and would make it harder to use the method independently. Have to think about this more carefully...

@philippemiron philippemiron self-assigned this Apr 3, 2023
@philippemiron
Copy link
Owner Author

Create independent functions for ftle, lavd, and elliptic vortices.

Each of those functions should take a parameter dictionary and the velocity field store in a xr.Dataset. In one line, we should be able to obtain the scalar across the domain and/or the extracted contours. Fill parameter with default value if not present.

FTLE

  • add the trajectory grid, flowmap, eigvalues, eigenvectors to the initial dataset.

LAVD:

  • add trajectory grid, flowmap, lavd
  • even if flowmap was previously calculated we have to sample the vorticity
  • contour as a separate Dataset? Might be better to return as an different object since it has nonuniform length

Elliptic LCS

  • same as FTLE
  • extracted contours

This seems like a good structure and the function that are call can be general enough to be reused between the 3 use cases..

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

1 participant