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

path

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

reset_grids

shift_files

Add next file to the list and remove the oldest

Attributes

are_loaded

advect(x, y, t_init, mask_particule=None, nb_step=10, time_step=600, rk4=True, reset_grid=None, **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

  • t_init (float) – time to start advection

  • mask_particule (array,None) – advect only i mask is True

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

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

  • rk4 (bool) – Use rk4 algorithm instead of finite difference

  • reset_grid (int) – Delete all loaded data in cube if there are more than N grid loaded

Returns

t,x,y position

Time advection

Time advection

Time advection
FSLE experiment in med

FSLE experiment in med

FSLE experiment in med
Follow particle

Follow particle

Follow particle
property are_loaded
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

Time advection

Time advection

Time advection
Follow particle

Follow particle

Follow particle
classmethod from_netcdf_cube(filename, x_name, y_name, t_name, heigth=None, **kwargs)[source]
classmethod from_netcdf_list(filenames, t, x_name, y_name, indexs=None, heigth=None, **kwargs)[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

path(x0, y0, *args, nb_time=2, **kwargs)[source]

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

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

  • y0 (array) – Latitude of obs to move

  • nb_time (int) – Number of iteration for particle

  • kwargs (dict) – look at GridCollection.advect()

Returns

t,x,y

Build path of particle drifting

Build path of particle drifting

Build path of particle drifting
reset_grids(N=None)[source]
shift_files(t, filename, heigth=None, **rgd_kwargs)[source]

Add next file to the list and remove the oldest