argopy.OceanOPSDeployments#

class OceanOPSDeployments(box: list | None = None, deployed_only: bool = False)[source]#

Use the OceanOPS API for metadata access to retrieve Argo floats deployment information.

The API is documented here: https://www.ocean-ops.org/api/swagger/?url=https://www.ocean-ops.org/api/1/oceanops-api.yaml

Description of deployment status name:

Status

Id

Description

PROBABLE

0

Starting status for some platforms, when there is only a few metadata available, like rough deployment location and date. The platform may be deployed

CONFIRMED

1

Automatically set when a ship is attached to the deployment information. The platform is ready to be deployed, deployment is planned

REGISTERED

2

Starting status for most of the networks, when deployment planning is not done. The deployment is certain, and a notification has been sent via the OceanOPS system

OPERATIONAL

6

Automatically set when the platform is emitting a pulse and observations are distributed within a certain time interval

INACTIVE

4

The platform is not emitting a pulse since a certain time

CLOSED

5

The platform is not emitting a pulse since a long time, it is considered as dead

Examples

Import the class:

>>> from argopy.related import OceanOPSDeployments
>>> from argopy import OceanOPSDeployments

Possibly define the space/time box to work with:

>>> box = [-20, 0, 42, 51]
>>> box = [-20, 0, 42, 51, '2020-01', '2021-01']
>>> box = [-180, 180, -90, 90, '2020-01', None]

Instantiate the metadata fetcher:

>>> deployment = OceanOPSDeployments()
>>> deployment = OceanOPSDeployments(box)
>>> deployment = OceanOPSDeployments(box, deployed_only=True) # Remove planification

Load information:

>>> df = deployment.to_dataframe()
>>> data = deployment.to_json()

Useful attributes and methods:

>>> deployment.uri
>>> deployment.uri_decoded
>>> deployment.status_code
>>> fig, ax = deployment.plot_status()
>>> plan_virtualfleet = deployment.plan
__init__(box: list | None = None, deployed_only: bool = False)[source]#
Parameters:
  • box (list, optional, default=None) –

    Define the domain to load the Argo deployment plan for. By default, box is set to None to work with the global deployment plan starting from the current date. The list expects one of the following format:

    • [lon_min, lon_max, lat_min, lat_max]

    • [lon_min, lon_max, lat_min, lat_max, date_min]

    • [lon_min, lon_max, lat_min, lat_max, date_min, date_max]

    Longitude and latitude values must be floats. Dates are strings. If box is provided with a regional domain definition (only 4 values given), then date_min will be set to the current date.

  • deployed_only (bool, optional, default=False) – Return only floats already deployed. If set to False (default), will return the full deployment plan (floats with all possible status). If set to True, will return only floats with one of the following status: OPERATIONAL, INACTIVE, and CLOSED.

Methods

__init__([box, deployed_only])

param box:

Define the domain to load the Argo deployment plan for. By default, box is set to None to work with the

exp([encoded])

Return an Ocean-Ops API deployment search expression for an argopy region box definition

include([encoded])

Return an Ocean-Ops API 'include' expression

plot_status(**kwargs)

Quick plot of the deployment plan

to_dataframe()

Return the deployment plan as pandas.DataFrame

to_json()

Return OceanOPS API request response as a json object

Attributes

api

URL to the API

api_server_check

URL to check if the API is alive

box_name

Return a string to print the box property

model

This model represents a Platform entity and is used to retrieve a platform information (schema model named 'Ptf').

plan

Return a dictionary to be used as argument in a virtualargofleet.VirtualFleet

size

status_code

Return a pandas.DataFrame with the definition of status

uri

Return encoded URL to post an Ocean-Ops API request

uri_decoded

Return decoded URL to post an Ocean-Ops API request