Department of Oceanography and Hydrography
Bangabandhu Sheikh Mujibur Rahman Maritime University,Bangladesh
Email
Abstract
The oce package makes it easy to read, summarize and plot data from a variety of Oceanographic instruments, isolating the researcher from the quirky data formats that are common in this field. It also provides functions for working with basic seawater properties such as the equation of state, and with derived quantities such as the buoyancy frequency. Although simple enough to be used in a teaching context, oce is powerful enough for a research setting. These things are illustrated here, in the context of some practical examples. Worked examples are provided, in order to help readers take early steps towards using the oce package in their research. Author:Dan E. Kelly
We will use Ocepackage for this analysis.
library(oce)
ocedata("ctd")
plot(ctd)
top left=Temperature and salinity curve,top right=Density curve,bottom left=T-S diagram,bottom right=Station location
You can also get a summmary of the data with summary(ctd)
Now,we want to plot a profile of \(σ~θ\) and \(N^2\) for the data in the pycnocline.
pycnocline <- ctdTrim(ctd,"range",parameters = list(item="pressure",from=5,to=12))
plotProfile(pycnocline,xtype = "density+N2")
1.(a) What is the density of a seawater parcel at pressure 100 dbar, with salinity 34 PSU and temperature 10◦C?
swRho(salinity = 34,temperature = 10,pressure = 100)
## [1] 1026.624
swTheta(salinity =34,temperature = 10,pressure = 100 )
## [1] 9.988599
swRho(salinity = 34,temperature = swTheta(salinity =34,temperature = 10,pressure = 100 ),pressure = 0)
## [1] 1026.173
swRho(salinity = 34,temperature = swTheta(34,10,100,200),pressure = 200)
## [1] 1027.074
2.Plot a profile of σθ and N2, for the data in the pycnocline.
library(oce)
data("ctd")
pycnocline <- subset(ctd,5<= pressure &pressure<=12)
plotProfile(pycnocline,xtype ="density+N2")
data("ctdRaw")
plotScan(ctdRaw)
⨂ Scanwise plot of the ctdRaw sample data set
plotScan(ctdTrim(ctdRaw,"range",parameters = list(item="scan",from=140,to=250)))
plotScan(ctdTrim(ctdRaw,"range",parameters = list(item="scan",from=150,to=250)))
### Section plot
3.Draw a T-S diagram for the section data, colour-coded by station
data("section")
SS<-TT<-PP<-id<-NULL
n<-length(section@data$station)
for(stn in section@data$station){
SS<- c(SS,stn@data$salinity)
TT<-c(TT,stn@data$temperature)
PP<-c(PP,stn@data$pressure)
}
ctd.sec <- as.ctd(SS,TT,PP)
plotTS(ctd.sec)