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.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, ArgoData
read(ArgoFloat(),wmo=2900668)
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::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
MakieCore.plot
— Functionplot(x::SurfaceDrifter)
using OceanRobots, CairoMakie
drifter=read(SurfaceDrifter(),1)
plot(drifter)
plot(x::OceanSite,args...)
using OceanRobots, Dates
whots=read(OceanSite(),:WHOTS)
plot(whots,DateTime(2005,1,1),DateTime(2005,2,1),size=(900,600))
plot(x::NOAAbuoy,var)
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy(),41046)
plot(buoy,"PRES",size=(900,600))
plot(x::NOAAbuoy_monthly, var=""; option=:demo)
using OceanRobots
buoy=read(NOAAbuoy_monthly(),44013)
plot(buoy;option=:demo)
plot(b::SeaLevelAnomaly; dates=[], kwargs...)
using OceanRobots
sla=read(SeaLevelAnomaly(),:sla_podaac)
plot(sla)
plot(x::ShipCruise;
markersize=6,pol=Any[],colorrange=(2,20),
size=(900,600),variable="temperature",apply_log10=false)
using OceanRobots, CairoMakie
cruise=ShipCruise("33RR20160208")
plot(cruise)
or
plot(cruise,variable="chi_up",apply_log10=true,colorrange=(-12,-10))
plot(x::ArgoFloat; option=:standard, markersize=2,pol=Any[])
using OceanRobots, ArgoData, CairoMakie
argo=read(ArgoFloat),wmo=2900668)
f1=plot(argo,option=:samples)
f2=plot(argo,option=:TS)
f3=plot(argo,option=:standard)
plot(x::Gliders,ID)
using OceanRobots, CairoMakie
gliders=read(Gliders(),"GulfStream.nc")
plot(gliders,1,size=(900,600))
Supported Datasets
Surface Drifters
using OceanRobots, CairoMakie
drifter=read(SurfaceDrifter(),1)
plot(drifter,pol=pol)
Argo Profilers
using OceanRobots, ArgoData, CairoMakie
argo=read(ArgoFloat(),wmo=2900668)
plot(argo,pol=pol)
CTD profiles
using OceanRobots, CairoMakie
cruise=ShipCruise("33RR20160208")
plot(cruise,variable="salinity",colorrange=(33.5,35.0))
NOAA Buoys
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy(),41046)
plot(buoy,["PRES","ATMP","WTMP"],size=(900,600))
using OceanRobots, CairoMakie
buoy=read(NOAAbuoy_monthly(),44013)
plot(buoy;option=:demo)
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)
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 OceanRobots, CairoMakie
sla=read(SeaLevelAnomaly(),:sla_podaac)
plot(sla)