virtualship.instruments package

Measurement instrument that can be used with Parcels.

Submodules

virtualship.instruments.adcp module

ADCP instrument.

virtualship.instruments.adcp.simulate_adcp(fieldset, out_path, max_depth, min_depth, num_bins, sample_points)

Use Parcels to simulate an ADCP in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the ADCP in.

  • out_path (str | Path) – The path to write the results to.

  • max_depth (float) – Maximum depth the ADCP can measure.

  • min_depth (float) – Minimum depth the ADCP can measure.

  • num_bins (int) – How many samples to take in the complete range between max_depth and min_depth.

  • sample_points (list[Spacetime]) – The places and times to sample at.

Return type:

None

virtualship.instruments.argo_float module

Argo float instrument.

class virtualship.instruments.argo_float.ArgoFloat(spacetime, min_depth, max_depth, drift_depth, vertical_speed, cycle_days, drift_days)

Bases: object

Configuration for a single Argo float.

Parameters:
cycle_days: float
drift_days: float
drift_depth: float
max_depth: float
min_depth: float
spacetime: Spacetime
vertical_speed: float
virtualship.instruments.argo_float.simulate_argo_floats(fieldset, out_path, argo_floats, outputdt, endtime)

Use Parcels to simulate a set of Argo floats in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the Argo floats in.

  • out_path (str | Path) – The path to write the results to.

  • argo_floats (list[ArgoFloat]) – A list of Argo floats to simulate.

  • outputdt (timedelta) – Interval which dictates the update frequency of file output during simulation

  • endtime (datetime | None) – Stop at this time, or if None, continue until the end of the fieldset.

Return type:

None

virtualship.instruments.ctd module

CTD instrument.

class virtualship.instruments.ctd.CTD(spacetime, min_depth, max_depth)

Bases: object

Configuration for a single CTD.

Parameters:
max_depth: float
min_depth: float
spacetime: Spacetime
virtualship.instruments.ctd.simulate_ctd(fieldset, out_path, ctds, outputdt)

Use Parcels to simulate a set of CTDs in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the CTDs in.

  • out_path (str | Path) – The path to write the results to.

  • ctds (list[CTD]) – A list of CTDs to simulate.

  • outputdt (timedelta) – Interval which dictates the update frequency of file output during simulation

Raises:

ValueError – Whenever provided CTDs, fieldset, are not compatible with this function.

Return type:

None

virtualship.instruments.drifter module

Drifter instrument.

class virtualship.instruments.drifter.Drifter(spacetime, depth, lifetime)

Bases: object

Configuration for a single Drifter.

Parameters:
depth: float
lifetime: timedelta | None
spacetime: Spacetime
virtualship.instruments.drifter.simulate_drifters(fieldset, out_path, drifters, outputdt, dt, endtime)

Use Parcels to simulate a set of drifters in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the Drifters in.

  • out_path (str | Path) – The path to write the results to.

  • drifters (list[Drifter]) – A list of drifters to simulate.

  • outputdt (timedelta) – Interval which dictates the update frequency of file output during simulation.

  • dt (timedelta) – Dt for integration.

  • endtime (datetime | None) – Stop at this time, or if None, continue until the end of the fieldset or until all drifters ended. If this is earlier than the last drifter ended or later than the end of the fieldset, a warning will be printed.

Return type:

None

virtualship.instruments.ship_underwater_st module

Ship salinity and temperature.

virtualship.instruments.ship_underwater_st.simulate_ship_underwater_st(fieldset, out_path, depth, sample_points)

Use Parcels to simulate underway data, measuring salinity and temperature at the given depth along the ship track in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the sampling in.

  • out_path (str | Path) – The path to write the results to.

  • depth (float) – The depth at which to measure. 0 is water surface, negative is into the water.

  • sample_points (list[Spacetime]) – The places and times to sample at.

Return type:

None

virtualship.instruments.xbt module

XBT instrument.

class virtualship.instruments.xbt.XBT(spacetime, min_depth, max_depth, fall_speed, deceleration_coefficient)

Bases: object

Configuration for a single XBT.

Parameters:
deceleration_coefficient: float
fall_speed: float
max_depth: float
min_depth: float
spacetime: Spacetime
virtualship.instruments.xbt.simulate_xbt(fieldset, out_path, xbts, outputdt)

Use Parcels to simulate a set of XBTs in a fieldset.

Parameters:
  • fieldset (FieldSet) – The fieldset to simulate the XBTs in.

  • out_path (str | Path) – The path to write the results to.

  • xbts (list[XBT]) – A list of XBTs to simulate.

  • outputdt (timedelta) – Interval which dictates the update frequency of file output during simulation

Raises:

ValueError – Whenever provided XBTs, fieldset, are not compatible with this function.

Return type:

None