virtualargofleet.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. AVelocityField
instance can be passed directly to aVirtualFleet
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
Ensure a global fieldset
Attributes
dim
Dimensions dictionary mapping of
time
,depth
,lat
andlon
on netcdf velocity variable namesfield
Internal definition of the velocity fields; it can be a
xarray.Dataset
or a dictionary withU
andV
as keys and list of corresponding files as valuesInstance of
parcels.fieldset.FieldSet
created using thefield
attributeisglobal
Boolean indicating weather the velocity field is global or not, used to add
halo_*
constants on thefieldset
attributename
shortname ID for this velocity field
var
Variable dictionary mapping of
U
andV
on netcdf velocity variable names