virtualargofleet.velocity_helpers.VelocityField#

class VelocityField[source]#

Class prototype to manage a Virtual Fleet velocity field

This prototype provides useful methods to prepare a parcels.fieldset.FieldSet for a VirtualFleet simulation. A VelocityField instance can be passed directly to a VirtualFleet instance.

You can use the Velocity() function to instantiate such a class for known products.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

add_mask()

Create mask for grounding management

plot()

Quick plot of the ParticleSet

set_global()

Ensure a global fieldset

Attributes

dim

Dimensions dictionary mapping of time, depth, lat and lon on netcdf velocity variable names

field

Internal definition of the velocity fields; it can be a xarray.Dataset or a dictionary with U and V as keys and list of corresponding files as values

fieldset

Instance of parcels.fieldset.FieldSet created using the field attribute

isglobal

Boolean indicating weather the velocity field is global or not, used to add halo_* constants on the fieldset attribute

name

shortname ID for this velocity field

var

Variable dictionary mapping of U and V on netcdf velocity variable names