OceanographyCruises.jl

Types and interface for oceanographic cruise data (designed for use by the AIBECS)
Author briochemc
Popularity
2 Stars
Updated Last
11 Months Ago
Started In
December 2019

OceanographyCruises.jl

An interface for dealing with oceanographic cruises data

Create a Station,

julia> using OceanographyCruises

julia> st = Station(name="ALOHA", lat=22.75, lon=-158)
Station ALOHA (22.8N, 158.0W)

a CruiseTrack of stations,

julia> N = 10 ;

julia> stations = [Station(name=string(i), lat=i, lon=2i) for i in 1:N] ;

julia> ct = CruiseTrack(stations=stations, name="TestCruiseTrack")
Cruise TestCruiseTrack
┌─────────┬──────┬──────┬──────┐
│ Station │ Date │  Lat │  Lon │
├─────────┼──────┼──────┼──────┤
│       1 │      │  1.02.0 │
│       2 │      │  2.04.0 │
│       3 │      │  3.06.0 │
│       4 │      │  4.08.0 │
│       5 │      │  5.010.0 │
│       6 │      │  6.012.0 │
│       7 │      │  7.014.0 │
│       8 │      │  8.016.0 │
│       9 │      │  9.018.0 │
│      10 │      │ 10.020.0 │
└─────────┴──────┴──────┴──────┘

And make a Transect of DepthProfiles along that CruiseTrack

julia> depths = [10, 50, 100, 200, 300, 400, 500, 700, 1000, 2000, 3000, 5000] ;

julia> idepths = [rand(Bool, length(depths)) for i in 1:N] ;

julia> profiles = [DepthProfile(station=stations[i], depths=depths[idepths[i]], values=rand(12)[idepths[i]]) for i in 1:N] ;

julia> t = Transect(tracer="PO₄", cruise=ct.name, profiles=profiles)
Transect of PO₄
Cruise TestCruiseTrack
┌─────────┬──────┬──────┬──────┐
│ Station │ Date │  Lat │  Lon │
├─────────┼──────┼──────┼──────┤
│       1 │      │  1.02.0 │
│       2 │      │  2.04.0 │
│       3 │      │  3.06.0 │
│       4 │      │  4.08.0 │
│       5 │      │  5.010.0 │
│       6 │      │  6.012.0 │
│       7 │      │  7.014.0 │
│       8 │      │  8.016.0 │
│       9 │      │  9.018.0 │
│      10 │      │ 10.020.0 │
└─────────┴──────┴──────┴──────┘


julia> t.profiles[3]
Depth profile at Station 3 (3.0N, 6.0E)
┌────────┬────────────────────┐
│  Depth │              Value │
├────────┼────────────────────┤
│   50.00.519255214063679 │
│  300.00.6289521421572468 │
│  500.00.8564006614918445 │
│ 5000.00.7610393670925686 │
└────────┴────────────────────┘

Used By Packages

No packages found.