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.
#using MeshArrays, GeoJSON, DataDeps
#pol=MeshArrays.Dataset("countries_geojson1")
pol=missingSupported 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) - Gliders (
Glider_AOML.jl,Glider_EGO.jl,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)
plot(argo)
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)Gliders
Three data sets, corresponding to different glider programs (Spray, EGO, AOML).
using OceanRobots, CairoMakie
glider=read(Glider_Spray(),"GulfStream.nc",1)
plot(glider,pol=pol)glider=read(Glider_EGO(),2)
plot(glider,pol=pol)
file=Glider_AOML_module.sample_file()
Glider_AOML_module.download_AOML(file)
glider=read(Glider_AOML(),file)
plot(glider,pol=pol,markersize=8)
read methods
Base.read — Function
read(x::Glider_Spray, file::String, mission=1, format=0)Read a Spray Glider file into a Glider_Spray.
using OceanRobots, CairoMakie
glider=read(Glider_Spray(),"GulfStream.nc",1)
plot(glider)format==0(default) : format data viato_DataFrameformat==0: format data viato_DataFrame_v1(to plot viaplot_glider_Spray_v1)
read(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::Glider_EGO, ID=1)Read a EGO Glider files.
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::Glider_AOML, file::String)Read a AOML Glider file.
using OceanRobots
sample_file=Glider_AOML_module.sample_file()
glider=read(Glider_AOML(),sample_file)read(x::Glider_AOML, ID::Symbol, mission::Symbol)Read a AOML glider mission.
using OceanRobots
(ID,MS)=Glider_AOML_module.ID_MS(3,1)
glider=read(Glider_AOML(),ID,MS,folder=folder)
using CairoMakie
scatter(glider.data.longitude,glider.data.latitude)read(x::NOAAbuoy,args...)Read a NOAA buoy file (past month).
read(x::NOAAbuoy_monthly,args...)Read a NOAA buoy file (historical).
plot methods
Makie.plot — Function
plot(x::SurfaceDrifter;size=(900,600),pol=missing)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=missing,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::Glider_Spray,ID;size=(900,600),pol=missing)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
glider=read(Glider_Spray(),"GulfStream.nc",1)
plot(glider)plot(x::Glider_EGO;size=(900,600),pol=missing)using OceanRobots, CairoMakie
glider=read(Glider_EGO(),1);
plot(glider)plot(x::Glider_AOML;size=(900,600),pol=missing)using OceanRobots, CairoMakie
sample_file=Glider_AOML_module.sample_file()
glider=read(Glider_AOML(),sample_file)
plot(glider,markersize=8)plot(x::XBTtransect;pol=missing)Default plot for XBT data.
using OceanRobots, CairoMakie
xbt=read(XBTtransect(),transect="PX05",cruise="0910")
plot(xbt)query method
OceanRobots.query — Function
query(x::DataType)Get list of observing platforms.
using OceanRobots
OceanRobots.query(ShipCruise)
OceanRobots.query(XBTtransect,"AOML")#not treated yet : Glider_Spray, CloudDrift
list=( ArgoFloat, SurfaceDrifter, XBTtransect, ShipCruise,
ObservingPlatform, OceanSite, NOAAbuoy,
Glider_AOML, Glider_EGO )
#has failed : Glider_Spray
for T in list
println("\n"); show(T); println("\n"); show(query(T));
end
ArgoFloat
21049×2 DataFrame
Row │ folder wmo
│ Any Any
───────┼─────────────────
1 │ aoml 13857
2 │ aoml 13858
3 │ aoml 13859
4 │ aoml 15819
5 │ aoml 15820
6 │ aoml 15851
7 │ aoml 15852
8 │ aoml 15853
⋮ │ ⋮ ⋮
21043 │ nmdis 2901627
21044 │ nmdis 2901628
21045 │ nmdis 2901629
21046 │ nmdis 2901630
21047 │ nmdis 2901631
21048 │ nmdis 2901632
21049 │ nmdis 2901633
21034 rows omitted
SurfaceDrifter
17324×1 DataFrame
Row │ ID
│ Int64
───────┼─────────
1 │ 101143
2 │ 101144
3 │ 101509
4 │ 101510
5 │ 101511
6 │ 101512
7 │ 101513
8 │ 101514
⋮ │ ⋮
17318 │ 99238
17319 │ 99239
17320 │ 99240
17321 │ 99241
17322 │ 9927907
17323 │ 9929867
17324 │ 9929870
17309 rows omitted
XBTtransect
18×1 DataFrame
Row │ transect
│ String
─────┼────────────
1 │ PX05
2 │ PX06
3 │ PX30
4 │ PX34
5 │ PX37
6 │ PX37-South
7 │ PX38
8 │ PX40
⋮ │ ⋮
12 │ PX25
13 │ PX44
14 │ PX50
15 │ PX81
16 │ AX22
17 │ IX15
18 │ IX28
3 rows omitted
ShipCruise
155×6 DataFrame
Row │ transect id startDate endDate lon lat
│ String Int64 String String Float64 Float64
─────┼────────────────────────────────────────────────────────────────────
1 │ 33H320260511 2634 2026-05-11 2026-07-05 -110.255 9.50053
2 │ 33RO20130803 1025 2013-08-03 2013-10-03 -23.6518 29.5025
3 │ 06MT20010507 206 2001-05-07 2001-05-31 -47.8017 45.335
4 │ 35MF20030123 235 2003-01-23 2003-02-17 143.8 -55.945
5 │ 325020060213 433 2006-02-13 2006-03-29 -152.0 20.5001
6 │ 74JC20081212 230 2008-12-12 2008-12-20 -56.9118 -57.2396
7 │ 49NZ20031209 238 2003-12-09 2004-01-24 69.7998 -19.9997
8 │ 49NZ199909_2 220 1999-09-11 1999-10-06 146.085 41.8491
⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
149 │ 06M320260113 2631 2026-01-13 2026-02-09 NaN NaN
150 │ 320620180309 2132 2018-03-09 2018-05-14 -145.998 -67.4001
151 │ 33RR20080204 232 2008-02-04 2008-03-17 29.9997 -54.005
152 │ 33RO200501 857 2005-01-11 2005-02-24 -25.0008 -32.2494
153 │ 325020080826 37 2008-08-26 2008-09-17 -152.0 41.4998
154 │ 316N200310 227 2003-10-23 2003-11-13 -66.0023 24.5511
155 │ 18HU2001022_1 384 2001-05-30 2001-06-15 -53.4157 54.7612
140 rows omitted
ObservingPlatform
56×5 DataFrame
Row │ nameShort name descripti ⋯
│ String String Any ⋯
─────┼──────────────────────────────────────────────────────────────────────────
1 │ ASAP-INT ASAP INT ⋯
2 │ ASAP-DIS ASAP DIS
3 │ TSUNAMETER Tsunameter Buoy Tsunamete
4 │ TROPICAL_MB Tropical Moored Buoy Tropical
5 │ VOS_AWS VOS Automatic Weather Station ⋯
6 │ VOS_MWS VOS Manual Weather Station
7 │ DB_POLLUTION DB POLLUTION Pollution
8 │ MET_MB Meteorological Moored Buoy Meteorolo
⋮ │ ⋮ ⋮ ⋱
50 │ FFVP Fixed Fishing Vessels Probes ⋯
51 │ MFVP Mobile Fishing Vessel Probes
52 │ HF_RADAR HF Radar
53 │ ICEBUOY Ice Buoy Drifting
54 │ SUBSEA_CABLE_OBSERVING_SYSTEM Subsea Cable Observing System ⋯
55 │ BEN Benthic Lander
56 │ Tagged animal Tagged animal
3 columns and 41 rows omitted
OceanSite
60150×17 DataFrame
Row │ FILE DATE_UPDATE START_DATE ⋯
│ DataStri… DataString? DataString? ⋯
───────┼────────────────────────────────────────────────────────────────────────
1 │ DATA/ALOHA/OS_ACO_20110613-08-16… unknown 2011-06-13T0 ⋯
2 │ DATA/ALOHA/OS_ACO_20110613-16-24… unknown 2011-06-13T1
3 │ DATA/ALOHA/OS_ACO_20110614-00-08… unknown 2011-06-14T0
4 │ DATA/ALOHA/OS_ACO_20110614-08-16… unknown 2011-06-14T0
5 │ DATA/ALOHA/OS_ACO_20110614-16-24… unknown 2011-06-14T1 ⋯
6 │ DATA/ALOHA/OS_ACO_20110615-00-08… unknown 2011-06-15T0
7 │ DATA/ALOHA/OS_ACO_20110615-08-16… unknown 2011-06-15T0
8 │ DATA/ALOHA/OS_ACO_20110615-16-24… unknown 2011-06-15T1
⋮ │ ⋮ ⋮ ⋮ ⋱
60144 │ DATA_GRIDDED/TRITON/OS_8n130e_20… 2023-12-20T16:59:27Z 2002-08-12T2 ⋯
60145 │ DATA_GRIDDED/TRITON/OS_8n137e_20… 2023-12-20T16:59:42Z 2001-09-27T2
60146 │ DATA_GRIDDED/TRITON/OS_8n156e_19… 2023-12-20T17:00:02Z 1998-03-08T2
60147 │ DATA_GRIDDED/TRITON/OS_8s95e_200… 2023-12-20T17:00:18Z 2009-11-13T2
60148 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004… 2019-06-24T15:08:40Z 2004-08-13T0 ⋯
60149 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004… 2019-06-26T16:59:52Z 2004-08-13T0
60150 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004… 2019-06-26T17:04:47Z 2004-08-15T0
15 columns and 60135 rows omitted
NOAAbuoy
1885×1 DataFrame
Row │ transect
│ String
──────┼──────────
1 │ 1801583
2 │ 1801589
3 │ 1801593
4 │ 21413
5 │ 21414
6 │ 21415
7 │ 21416
8 │ 21417
⋮ │ ⋮
1879 │ 32012
1880 │ 32ST0
1881 │ 41060
1882 │ 41061
1883 │ 41NT0
1884 │ 43010
1885 │ 51WH0
1870 rows omitted
Glider_AOML
20×1 DataFrame
Row │ ID
│ Symbol
─────┼─────────
1 │ SG265
2 │ SG265.0
3 │ SG547
4 │ SG609
5 │ SG610
6 │ SG617
7 │ SG630
8 │ SG635
⋮ │ ⋮
14 │ SG667
15 │ SG668
16 │ SG669
17 │ SG670
18 │ SG678
19 │ SG683
20 │ SG684
5 rows omitted
Glider_EGO
183×2 DataFrame
Row │ ID name
│ Int64 String
─────┼─────────────────
1 │ 1 agathe
2 │ 2 amadeus
3 │ 3 amazon
4 │ 4 amerigo
5 │ 5 ammonite
6 │ 6 ardbeg
7 │ 7 artemis
8 │ 8 baker
⋮ │ ⋮ ⋮
177 │ 177 unit_403
178 │ 178 urd
179 │ 179 verd
180 │ 180 wall-E
181 │ 181 wallis
182 │ 182 zephyr
183 │ 183 ziggy
168 rows omittedAdd-Ons
#using Climatology, CairoMakie, NCDatasets
#SLA=read(SeaLevelAnomaly(name="sla_podaac"))
#plot(SLA)