py_eddy_tracker.dataset.grid.GridCollection

class py_eddy_tracker.dataset.grid.GridCollection[source]

Bases: object

Methods

advect

At each call it will update position in place with u & v field

filament

Produce filament with concatenation of advection

from_netcdf_cube

from_netcdf_list

get_next_time_step

get_previous_time_step

interp

Compute z over lons, lats

advect(x, y, u_name, v_name, t_init, mask_particule=None, nb_step=10, time_step=600, rk4=True, **kw)[source]

At each call it will update position in place with u & v field

Parameters
  • x (array) – Longitude of obs to move

  • y (array) – Latitude of obs to move

  • u_name (str,array) – U field to advect obs

  • v_name (str,array) – V field to advect obs

  • nb_step (int) – Number of iteration before to release data

  • time_step (int) – Number of second for each advection

Returns

x,y position

filament(x, y, u_name, v_name, t_init, nb_step=10, time_step=600, filament_size=6, rk4=True, **kw)[source]

Produce filament with concatenation of advection

Parameters
  • x (array) – Longitude of obs to move

  • y (array) – Latitude of obs to move

  • u_name (str,array) – U field to advect obs

  • v_name (str,array) – V field to advect obs

  • nb_step (int) – Number of iteration before to release data

  • time_step (int) – Number of second for each advection

  • filament_size (int) – Number of point by filament

Returns

x,y for a line

classmethod from_netcdf_cube(filename, x_name, y_name, t_name, heigth=None)[source]
classmethod from_netcdf_list(filenames, t, x_name, y_name, indexs=None, heigth=None)[source]
get_next_time_step(t_init)[source]
get_previous_time_step(t_init)[source]
interp(grid_name, t, lons, lats, method='bilinear')[source]

Compute z over lons, lats

Parameters
  • grid_name (str) – Grid to be interpolated

  • t (float,) – time for interpolation

  • lons – new x

  • lats – new y

  • method (str) – Could be ‘bilinear’ or ‘nearest’

Returns

new z