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.

Functionalities

read

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::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::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

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=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

Supported Datasets

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

CTD profiles

using OceanRobots, CairoMakie
cruise=ShipCruise("33RR20160208")
plot(cruise,variable="salinity",colorrange=(33.5,35.0))
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
Note

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

using MeshArrays, Shapefile, DataDeps
pol_file=demo.download_polygons("ne_110m_admin_0_countries.shp")
pol=MeshArrays.read_polygons(pol_file)
using Climatology, CairoMakie, NCDatasets
SLA=read(SeaLevelAnomaly(name="sla_podaac"))
plot(SLA)
Example block output