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.
using MeshArrays, GeoJSON, DataDeps
pol=MeshArrays.Dataset("countries_geojson1")

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)
  • 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)
Example block output

Argo Profilers

using OceanRobots, CairoMakie
argo=read(ArgoFloat(),wmo=2900668)
#plot(argo,pol=pol)
plot(argo)
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

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)
Example block output
glider=read(Glider_EGO(),2)
plot(glider,pol=pol)
Example block output
file=Glider_AOML_module.sample_file()
Glider_AOML_module.download_AOML(file)
glider=read(Glider_AOML(),file)
plot(glider,pol=pol,markersize=8)
Example block output

read methods

Base.readFunction
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 via to_DataFrame
  • format==0 : format data via to_DataFrame_v1 (to plot via plot_glider_Spray_v1)
source
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::Glider_EGO, ID=1)

Read a EGO Glider files.

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::Glider_AOML, file::String)

Read a AOML Glider file.

using OceanRobots
sample_file=Glider_AOML_module.sample_file()
glider=read(Glider_AOML(),sample_file)
source
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)
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

plot methods

Makie.plotFunction
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)
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=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=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::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)
source
plot(x::Glider_EGO;size=(900,600),pol=missing)
using OceanRobots, CairoMakie
glider=read(Glider_EGO(),1);
plot(glider)
source
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)
source
plot(x::XBTtransect;pol=missing)

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 : Glider_Spray, CloudDrift

source
list=(  ArgoFloat, SurfaceDrifter, XBTtransect, ShipCruise,
        ObservingPlatform, OceanSite, NOAAbuoy,
        Glider_AOML, Glider_Spray, Glider_EGO )

for T in list
    println("\n"); show(T); println("\n"); show(query(T));
end


ArgoFloat

20337×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
   ⋮   │   ⋮        ⋮
 20331 │ nmdis   2901627
 20332 │ nmdis   2901628
 20333 │ nmdis   2901629
 20334 │ nmdis   2901630
 20335 │ nmdis   2901631
 20336 │ nmdis   2901632
 20337 │ nmdis   2901633
       20322 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

147×6 DataFrame
 Row │ transect       id     startDate   endDate     lon        lat
     │ String         Int64  String      String      Float64    Float64
─────┼───────────────────────────────────────────────────────────────────
   1 │ 33RO20130803    1025  2013-08-03  2013-10-03   -23.6518   29.5025
   2 │ 06MT20010507     206  2001-05-07  2001-05-31   -47.8017   45.335
   3 │ 35MF20030123     235  2003-01-23  2003-02-17   143.8     -55.945
   4 │ 325020060213     433  2006-02-13  2006-03-29  -152.0      20.5001
   5 │ 74JC20081212     230  2008-12-12  2008-12-20   -56.9118  -57.2396
   6 │ 49NZ20031209     238  2003-12-09  2004-01-24    69.7998  -19.9997
   7 │ 49NZ199909_2     220  1999-09-11  1999-10-06   146.085    41.8491
   8 │ 29HE20130320     200  2013-03-20  2013-05-22   -32.096   -16.8445
  ⋮  │       ⋮          ⋮        ⋮           ⋮           ⋮         ⋮
 141 │ 06MT20110624    1064  2011-06-24  2011-08-02   -43.2182   49.2991
 142 │ 320620180309    2132  2018-03-09  2018-05-14  -145.998   -67.4001
 143 │ 33RR20080204     232  2008-02-04  2008-03-17    29.9997  -54.005
 144 │ 33RO200501       857  2005-01-11  2005-02-24   -25.0008  -32.2494
 145 │ 325020080826      37  2008-08-26  2008-09-17  -152.0      41.4998
 146 │ 316N200310       227  2003-10-23  2003-11-13   -66.0023   24.5511
 147 │ 18HU2001022_1    384  2001-05-30  2001-06-15   -53.4157   54.7612
                                                         132 rows omitted

ObservingPlatform

60×5 DataFrame
 Row │ nameShort                     name                             descript ⋯
     │ String                        String                           Any      ⋯
─────┼──────────────────────────────────────────────────────────────────────────
   1 │ FLOAT_DEEP                    Float Deep                       Profilin ⋯
   2 │ FLOAT                         Float                            Profilin
   3 │ ICE_TETHERED_PROFILER         Ice Tethered Profiler            Surface
   4 │ FLOAT_COASTAL                 Float Coastal                    Coastal
   5 │ POLAR_OCEAN_PROFILING_SYSTEM  Polar Ocean Profiling System     Ice plat ⋯
   6 │ ASAP-INT                      ASAP INT
   7 │ ASAP-DIS                      ASAP DIS
   8 │ TSUNAMETER                    Tsunameter Buoy                  Tsunamet
  ⋮  │              ⋮                               ⋮                          ⋱
  54 │ Autonaut                      Autonaut                                  ⋯
  55 │ SailBuoy                      SailBuoy
  56 │ MARINER X                     MARINER X
  57 │ SAILDRONE                     SailDrone                        Sailing
  58 │ GENERIC USV                   GENERIC Unmaned Surface Vehicle           ⋯
  59 │ WAVEGLIDER                    WaveGlider                       Wave Gli
  60 │ SEASATS                       SEASATS
                                                   3 columns and 45 rows omitted

OceanSite

56286×17 DataFrame
   Row │ FILE                               DATE_UPDATE           START_DATE   ⋯
       │ String                             String31?             String31?    ⋯
───────┼────────────────────────────────────────────────────────────────────────
     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
   ⋮   │                 ⋮                           ⋮                     ⋮   ⋱
 56280 │ DATA_GRIDDED/TRITON/OS_8n130e_20…  2023-12-20T16:59:27Z  2002-08-12T2 ⋯
 56281 │ DATA_GRIDDED/TRITON/OS_8n137e_20…  2023-12-20T16:59:42Z  2001-09-27T2
 56282 │ DATA_GRIDDED/TRITON/OS_8n156e_19…  2023-12-20T17:00:02Z  1998-03-08T2
 56283 │ DATA_GRIDDED/TRITON/OS_8s95e_200…  2023-12-20T17:00:18Z  2009-11-13T2
 56284 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004…  2019-06-24T15:08:40Z  2004-08-13T0 ⋯
 56285 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004…  2019-06-26T16:59:52Z  2004-08-13T0
 56286 │ DATA_GRIDDED/WHOTS/OS_WHOTS_2004…  2019-06-26T17:04:47Z  2004-08-15T0
                                               15 columns and 56271 rows omitted

NOAAbuoy

1864×1 DataFrame
  Row │ transect
      │ String
──────┼──────────
    1 │ 1801583
    2 │ 1801589
    3 │ 1801593
    4 │ 21413
    5 │ 21414
    6 │ 21415
    7 │ 21416
    8 │ 21417
  ⋮   │    ⋮
 1858 │ 32012
 1859 │ 32ST0
 1860 │ 41060
 1861 │ 41061
 1862 │ 41NT0
 1863 │ 43010
 1864 │ 51WH0
1849 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_Spray

68×2 DataFrame
 Row │ ID     name
     │ Int64  String
─────┼─────────────────
   1 │     1  04900701
   2 │     2  05600701
   3 │     3  05C00701
   4 │     4  08B02101
   5 │     5  15401001
   6 │     6  15705501
   7 │     7  15A06501
   8 │     8  15C06601
  ⋮  │   ⋮       ⋮
  62 │    62  24706901
  63 │    63  24907001
  64 │    64  24B06601
  65 │    65  25106501
  66 │    66  25400701
  67 │    67  25406901
  68 │    68  25507101
        53 rows omitted

Glider_EGO

180×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
  ⋮  │   ⋮       ⋮
 174 │   174  unit_403
 175 │   175  urd
 176 │   176  verd
 177 │   177  wall-E
 178 │   178  wallis
 179 │   179  zephyr
 180 │   180  ziggy
       165 rows omitted

Add-Ons

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