User Interface (API)
Each type of ocean data gets :
- a simple
readfunction that downloads data if needed. - a default
plotfunction 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)
Argo Profilers
using OceanRobots, CairoMakie
argo=read(ArgoFloat(),wmo=2900668)
plot(argo,pol=pol)
Ship-Based CTD
using OceanRobots, CairoMakie
cruise=read(ShipCruise(),"33RR20160208")
plot(cruise,variable="salinity",colorrange=(33.5,35.0))
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)
NOAA Buoys
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy(),41044)
plot(buoy,["PRES","ATMP","WTMP"],size=(900,600))
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy_monthly(),44013)
plot(buoy)
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)
Spray Gliders
using OceanRobots, CairoMakie
gliders=read(Gliders(),"GulfStream.nc")
plot(gliders,1,pol=pol)
read methods
Base.read — Functionread(x::OceanSite, ID=:WHOTS)Read OceanSite data.
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)read(x::ShipCruise, ID="unknown")Read ShipCruise data.
read(x::XBTtransect;transect="PX05",cr=1,cruise="")using OceanRobots
read(XBTtransect(),source="SIO",transect="PX05",cruise="0910")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)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)read(x::CloudDrift, file)Read a GDP/CloudDrift file.
read(x::NOAAbuoy,args...)Read a NOAA buoy file (past month).
read(x::NOAAbuoy_monthly,args...)Read a NOAA buoy file (historical).
read(x::Gliders, file::String)Read a Spray Glider file.
plot methods
Makie.plot — Functionplot(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)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))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))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)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=truethen we applylog10 markersizeandcolorrangeare 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))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))plot(x::XBTtransect;pol=Any[])Default plot for XBT data.
using OceanRobots, CairoMakie
xbt=read(XBTtransect(),transect="PX05",cruise="0910")
plot(xbt)query method
OceanRobots.query — Functionquery(x::DataType)Get list of observing platforms.
using OceanRobots
OceanRobots.query(ShipCruise)
OceanRobots.query(XBTtransect,"AOML")#not treated yet : Gliders, CloudDrift
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
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)
using Climatology, CairoMakie, NCDatasets
SLA=read(SeaLevelAnomaly(name="sla_podaac"))
plot(SLA)