User Interface (API)

Each type of ocean data gets :

  • a simple read function that downloads data if needed.
  • a default plot function that depicts some of the data.

Supported Datasets

  • OceanOPS data base (OceanOPS.jl)
  • Surface Drifters (Drifter_GDP.jl , Drifter_CloudDrift.jl)
  • Argo Profilers (Float_Argo.jl)
  • Ship-Based CTD (ShipCruise_CCHDO.jl)
  • Ship-Based XBT (XBT_transect.jl)
  • NOAA Buoys (Buoy_NWP_NOAA.jl , Buoy_NWP_NOAA_monthly.jl)
  • Spray Gliders (Glider_Spray.jl)
  • WHOTS Mooring (Mooring_WHOTS.jl)

Surface Drifters

using OceanRobots, CairoMakie
drifter=read(SurfaceDrifter(),1)
plot(drifter,pol=pol)
Example block output

Argo Profilers

using OceanRobots, CairoMakie
argo=read(ArgoFloat(),wmo=2900668)
plot(argo,pol=pol)
Example block output

Ship-Based CTD

using OceanRobots, CairoMakie
cruise=read(ShipCruise(),"33RR20160208")
plot(cruise,variable="salinity",colorrange=(33.5,35.0))
Example block output

Ship-Based XBT

using OceanRobots, CairoMakie
#xbt=read(XBTtransect(),source="SIO",transect="PX05",cruise="0910")
xbt=read(XBTtransect(),source="AOML",transect="AX08",cr=1)
fig=plot(xbt,pol=pol)
Example block output

NOAA Buoys

using OceanRobots, CairoMakie
buoy=read(NOAAbuoy(),41044)
plot(buoy,["PRES","ATMP","WTMP"],size=(900,600))
Example block output
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy_monthly(),44013)
plot(buoy)
Example block output

WHOTS Mooring

using OceanRobots
whots=read(OceanSite(),:WHOTS)

using CairoMakie, Dates
date1=DateTime(2005,1,1)
date2=DateTime(2005,2,1)
plot(whots,date1,date2)
Example block output

Spray Gliders

using OceanRobots, CairoMakie
gliders=read(Gliders(),"GulfStream.nc")
plot(gliders,1,pol=pol)
Example block output

read methods

Base.readFunction
read(x::OceanSite, ID=:WHOTS)

Read OceanSite data.

source
read(x::ArgoFloat;wmo=2900668)

Note: the first time this method is used, it calls ArgoData.GDAC.files_list() to get the list of Argo floats from server, and save it to a temporary file.

using OceanRobots
read(ArgoFloat(),wmo=2900668)
source
read(x::ShipCruise, ID="unknown")

Read ShipCruise data.

source
read(x::XBTtransect;transect="PX05",cr=1,cruise="")
using OceanRobots
read(XBTtransect(),source="SIO",transect="PX05",cruise="0910")
source
read(x::SurfaceDrifter,ii::Int)

Open file number ii from NOAA ftp server using NCDatasets.jl.

Server : ftp://ftp.aoml.noaa.gov/pub/phod/lumpkin/hourly/v2.00/netcdf/

Note: the first time this method is used, it calls GDP.list_files() to get the list of drifters from server, and save it to a temporary file.

using OceanRobots
sd=read(SurfaceDrifter(),1)
source
read(x::SurfaceDrifter; ID=300234065515480, version="v2.01")

Download file from NOAA http server read it using NCDatasets.jl.

Server : https://www.aoml.noaa.gov/ftp/pub/phod/lumpkin/hourly/

using OceanRobots
sd=read(SurfaceDrifter(),ID=300234065515480)
source
read(x::CloudDrift, file)

Read a GDP/CloudDrift file.

source
read(x::NOAAbuoy,args...)

Read a NOAA buoy file (past month).

source
read(x::NOAAbuoy_monthly,args...)

Read a NOAA buoy file (historical).

source
read(x::Gliders, file::String)

Read a Spray Glider file.

source

plot methods

MakieCore.plotFunction
plot(x::SurfaceDrifter;size=(900,600),pol=Any[])

Default plot for surface drifter data.

  • size let's you set the figure dimensions
  • pol is a set of polygons (e.g., continents)
using OceanRobots, CairoMakie
drifter=read(SurfaceDrifter(),1)
plot(drifter)
source
plot(x::OceanSite,d0,d1;size=(900,600))

Default plot for OceanSite (mooring data).

  • d0,d1 are two dates in DateTime format
  • size let's you set the figure dimensions
  • pol is a set of polygons (e.g., continents)
using OceanRobots, Dates
whots=read(OceanSite(),:WHOTS)
plot(whots,DateTime(2005,1,1),DateTime(2005,2,1),size=(900,600))
source
plot(x::NOAAbuoy,variables; size=(900,600))

Default plot for NOAAbuoy (moored buoy data).

  • variables (String, or array of String) are variables to plot
  • size let's you set the figure dimensions
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy(),41044)
plot(buoy,["PRES" "WTMP"],size=(900,600))
source
plot(x::NOAAbuoy_monthly, variable="T(°F)"; size=(900,600))

Default plot for NOAAbuoy_monthly (monthly averaged moored buoy data).

  • variable (String) is the variable to plot
  • size let's you set the figure dimensions
using OceanRobots
buoy=read(NOAAbuoy_monthly(),44013)
plot(buoy)
source
plot(x::ShipCruise; 
	markersize=6,pol=Any[],colorrange=(2,20),
	size=(900,600),variable="temperature",apply_log10=false)

Default plot for ShipCruise (source : https://cchdo.ucsd.edu).

  • variable (String) is the variable to plot
  • size let's you set the figure dimensions
  • pol is a set of polygons (e.g., continents)
  • if apply_log10=true then we apply log10
  • markersize and colorrange are plotting parameters

note : the list of valid expocode values (e.g., "33RR20160208") can be found at https://usgoship.ucsd.edu/data/

using OceanRobots, CairoMakie
cruise=read(ShipCruise(),"33RR20160208")
plot(cruise)

or

plot(cruise,variable="chi_up",apply_log10=true,colorrange=(-12,-10))
source
plot(x::Gliders,ID;size=(900,600),pol=Any[])

Default plot for glider data.

  • ID is an integer (currently between 0 and 56)
  • size let's you set the figure dimensions
  • pol is a set of polygons (e.g., continents)
using OceanRobots, CairoMakie
gliders=read(Gliders(),"GulfStream.nc")
plot(gliders,1,size=(900,600))
source
plot(x::XBTtransect;pol=Any[])

Default plot for XBT data.

using OceanRobots, CairoMakie
xbt=read(XBTtransect(),transect="PX05",cruise="0910")
plot(xbt)
source

query method

OceanRobots.queryFunction
query(x::DataType)

Get list of observing platforms.

using OceanRobots
OceanRobots.query(ShipCruise)
OceanRobots.query(XBTtransect,"AOML")

#not treated yet : Gliders, CloudDrift

source
using OceanRobots
OceanRobots.query(XBTtransect,"AOML")
17-element Vector{String}:
 "AX01"
 "AX02"
 "AX04"
 "AX07"
 "AX08"
 "AX10"
 "AX18"
 "AX20"
 "AX25"
 "AX32"
 "AX90"
 "AX97"
 "AXCOAST"
 "AXWBTS"
 "MX01"
 "MX02"
 "MX04"

Add-Ons

Note

To put data in context, it is useful to download country polygons.

using MeshArrays, Shapefile, DataDeps, CairoMakie
pol_file=demo.download_polygons("ne_110m_admin_0_countries.shp")
pol=MeshArrays.read_polygons(pol_file)
plot(argo,pol=pol)
Example block output
Note

To put data in context, it is useful to download gridded data sets.

using Climatology, CairoMakie, NCDatasets
SLA=read(SeaLevelAnomaly(name="sla_podaac"))
plot(SLA)
Example block output