Package 'ocedata'

Title: Oceanographic Data Sets for 'oce' Package
Description: Several Oceanographic data sets are provided for use by the 'oce' package, and for other purposes.
Authors: Dan Kelley [aut, cre] , Clark Richards [aut]
Maintainer: Dan Kelley <[email protected]>
License: GPL (>= 2)
Version: 0.2.3
Built: 2025-02-12 02:38:50 UTC
Source: https://github.com/dankelley/ocedata

Help Index


Beaufort Scale relationship wave height to wind speed

Description

beaufort is a data frame describing the Beaufort Scale for sea state. The contents are wind, the wind speed in m/s, and height, wave height in m. The data were downloaded from Reference 1 on April 20, 2014.

Usage

data(beaufort, package="ocedata")

References

https://www.metoffice.gov.uk/weather/marine/guide/beaufortscale.html

Examples

data(beaufort, package="ocedata")
plot(beaufort$wind, beaufort$height)

Measurements made at a buoy off Halifax

Description

buoy is a data frame holding hourly observations made between March 3 and April 18 of 2014, at the Environment Canada 3-metre discus buoy situated at (44.502N 63.403W) near Halifax Harbour.

Usage

data(buoy, package="ocedata")

Details

The contents are as follows; other items in the original data file are ignored.

  • time: time of observation, in POSIXct() format.

  • wind: wind speed in m/s.

  • direction: direction from which the wind is blowing, measured in degrees clockwise of true North.

  • gust: gust speed in m/s.

  • height: wave height in metres.

  • period: wave period in seconds.

  • pa: atmospheric pressure in kPa.

  • Ta: air temperature in degC.

  • Tw: water temperature in degC. The data were downloaded as a file named ⁠44258.txt⁠ in April 2014 from Reference 1, and made into a data frame. See References 2 and 3 for information on the data in such buoys, and 4 for more on this particular buoy.

The code to create the dataset is given below.

d <- read.table("44258.txt", stringsAsFactors=FALSE, skip=2)
t <- ISOdatetime(d[,1], d[,2], d[,3], d[,4], d[,5], 0, tz="UTC")
o <- order(t)
# handle missing data
d[d == "MM"] <- NA
# put oldest first
t <- t[o]
d <- d[o,]
direction <- as.numeric(d[,6])
wind <- as.numeric(d[,7])
gust <- as.numeric(d[,8])[o]
height <- as.numeric(d[,9])
period <- as.numeric(d[,10])
pa <- as.numeric(d[,13])
Ta <- as.numeric(d[,14])
Tw <- as.numeric(d[,15])

References

  1. https://www.ndbc.noaa.gov/data/realtime2/

  2. https://www.ndbc.noaa.gov/NDBCHandbookofAutomatedDataQualityControl2009.pdf

  3. https://www.ndbc.noaa.gov/measdes.shtml

  4. ⁠https://www.ndbc.noaa.gov/station_page.php?station=44258⁠ (link seen to time out on March 13, 2022).

Examples

data(buoy, package="ocedata")
plot(buoy$time, buoy$wind, ylab="Wind Speed [m/s]")
plot(buoy$time, buoy$height, ylab="Wave height [m]")
plot(buoy$time, buoy$period, ylab="Wave period [s]")

World coastline at fine-scale (1:10M) resolution

Description

coastlineWorldFine is analogous to coastlineWorldMedium, but at higher resolution, i.e. showing more detail. It may be used for regional (sub-basin) views, but for coastal work, users should consider downloading a file at finer resolution.

Usage

data(coastlineWorldFine, package="ocedata")

Details

The data for coastlineWorldFine were downloaded from shapefile ne_10m_admin_0_countries.shp, stored at https://www.naturalearthdata.com.

The documentation for coastline-class in oce explains the structure of coastline objects and discusses functions that deal with them.

See Also

Other coastline files: coastlineWorldMedium

Examples

# Regional plot of the Maritime provinces of Canada.
data(coastlineWorldFine, package="ocedata")
## Not run: 
library(oce)
plot(coastlineWorldFine, clongitude=-63, clatitude=45.5, span=600)

## End(Not run)

World coastline at medium-scale (1:50M) resolution

Description

coastlineWorldMedum is analogous to coastlineWorld in the oce package, but at higher resolution, i.e. showing more detail. It is suitable for basin-scale plots; for sub-basin work, try coastlineWorldFine.

Usage

data(coastlineWorldMedium, package="ocedata")

Details

The data for coastlineWorldMedium were downloaded from shapefile ne_50m_admin_0_countries.shp, stored at https://www.naturalearthdata.com.

The documentation for coastline-class in oce explains the structure of coastline objects and discusses functions that deal with them.

See Also

Other coastline files: coastlineWorldFine

Examples

# Regional plot of the Maritime provinces of Canada.
data(coastlineWorldMedium, package="ocedata")
## Not run: 
library(oce)
plot(coastlineWorldMedium, clongitude=-63, clatitude=45.5, span=600)

## End(Not run)

Conveyor-belt path

Description

Locations that yield a spline that roughly matches Broecker's conveyor-belt path.

Usage

data(conveyor, package="ocedata")

Details

The data were digitized from Figure 1 of Broecker (1991), by a multistep process. First, a world map was drawn with mapPlot from the oce package, using a projection (Mercator) that seemed similar to of Broecker. Second, locator() was used to digitize points along his conveyor-belt pathlines. No projection information being provided by Broecker, this had to be done by coastline reference. Third, the x-y data were converted to longitude-latitude space using map2lonlat() in the oce package. When this was done, splines were fitted to the data and the resultant paths were drawn on the map (using code like that given in the example). Then, some adjustments were made to the data files, to get the splines to more faithfully represent the paths on Broecker's diagram.

References

Broecker, W. S., 1991. The great ocean conveyor. Oceanography, 4: 79-89.

Examples

data(conveyor, package="ocedata")
## Not run: 
library(oce)
data(coastlineWorld, package="oce")
par(mar=rep(1,4))
oce::mapPlot(coastlineCut(coastlineWorld,70), projection="+proj=wintri +lon_0=70")
# Main path
lon <- subset(conveyor, path==1)$longitude
lat <- subset(conveyor, path==1)$latitude
oce::mapLines(lon, lat, col="blue", lwd=3)
## Secondary path (in Indian Ocean)
lon <- subset(conveyor, path==2)$longitude
lat <- subset(conveyor, path==2)$latitude
oce::mapLines(lon, lat, col="darkgreen", lwd=3)

## End(Not run)

Wind drag coefficient

Description

drag holds wind drag coefficients for wind-profile and eddy-covariance methods, summarized in Figure 3 of Garratt (1977). The data are stored in a data frame with four columns: U is wind speed in m/s; Cd is for (neutral) drag coefficient; n is the number of data measurements represented by the value; and method is a factor with two levels: profile and eddy, for two methods of inferring Cd.

Usage

data(drag, package="ocedata")

Details

The data were digitized from Figure 3 of Garratt (1977) by Dan Kelley.

References

J. R. Garratt, 1977. Review of drag coefficients over oceans and continents. Monthly Weather Review, 105:915-927.

Examples

data(drag, package="ocedata")
par(mar=c(3,3,1,1), mgp=c(2, 0.7, 0))
plot(drag$U, drag$Cd, pch=ifelse(drag$method == "profile", 1, 19),
    xlab="U [m/s]", ylab=expression(C[D]),
    xlim=c(0, 22), ylim=c(0, 3e-3))
legend("topleft", pch=c(1,19),
    legend=c("profile method", "eddy covariance method"))

Cook's Endeavour cruise track

Description

Time, longitude, and latitude for the H.M.S. Endeavour cruise, 1768-1771. The data were extracted from an XML file contained within a zipfile provided at Reference 1, last checked March 13, 2022.

Usage

data(endeavour, package="ocedata")

References

  1. https://www.data.gov.au/dataset/7f03ac78-7210-4702-8cd5-f3e373f4097b

Examples

data(endeavour, package="ocedata")
## Not run: 
library(oce)
data(coastlineWorld, package="oce")
mapPlot(coastlineWorld, col="tan")
mapPoints(endeavour$longitude, endeavour$latitude, pch=20, cex=2/3, col=2)

## End(Not run)

GEOSECS station 235 data

Description

geosecs235 is station 235 of the GEOSECS mission, with data downloaded from Reference 1, and referred to in Kelley and Van Scoy (1999).

Usage

data(geosecs235, package="ocedata")

References

  1. https://iridl.ldeo.columbia.edu/SOURCES/.GEOSECS/ISTA/235/VALUE/

  2. D. E. Kelley and Van Scoy, K. A., 1999. A basin-wide estimate of vertical mixing in the upper pycnocline: spreading of bomb tritium in the North Pacific Ocean. Journal of Physical Oceanography, 29:1759–1771.

Examples

data(geosecs235, package="ocedata")
## Not run: 
# Create a plot similar to Figure 10 of Kelley and Van Scoy (1999)
oce::plotProfile(geosecs235, xtype="tritium", type='p', ylim=c(600, 0))

## End(Not run)

Time series of NASA/GISS land-ocean temperature index

Description

A data frame containing the Goddard Institute for Space Studies (GISS) time series called LOTI (Land-Ocean Temperature Index) of surface temperature anomaly.

Usage

data(giss, package="ocedata")

Details

This is data frame with columns named year for decimal year (sampled monthly and represented here at mid-month, i.e. the first sample in any given year is at year+1/24) and index for the temperature anomaly. The resolution of the latter is 0.01C. The details of the original data processing are provided in References 1 and 2, and the site of the (Land-Ocean Temperature Index. Anyone using the present dataset is advised very strongly to read the NASA documents on changes to the processing of the data (see Reference 3).

The data were downloaded from Reference 1, yielding a text file that starts as in shown below. These data were then read with R code (reference 5) that skips the headers, chops out the annual means and then assigns columns to year fractions, e.g. the first two numbers in the data shown below are -29 and -20, yielding values -0.29degC and -0.20degC, and times are here represented as 1880+1/24 and 1880+3/24, i.e. 1880.042 and 1880.125.

        GLOBAL Land-Ocean Temperature Index in 0.01 degrees Celsius   base period: 1951-1980

                    sources:  GHCN-v3 1880-11/2015 + SST: ERSST v4 1880-11/2015
                    using elimination of outliers and homogeneity adjustment
                    Notes: 1950 DJF = Dec 1949 - Feb 1950 ;  ***** = missing

                                                                     AnnMean
Year   Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec    J-D D-N    DJF  MAM  JJA  SON  Year
1880   -29  -20  -18  -27  -14  -28  -22   -7  -16  -15  -18  -20    -19 ***   ****  -19  -19  -16  1880
1881    -9  -13    2   -2   -4  -28   -5   -2   -8  -19  -25  -14    -11 -11    -14   -1  -12  -17  1881
1882    10    9    2  -19  -17  -24   -9    4    0  -22  -20  -24     -9  -8      1  -11  -10  -14  1882

References

  1. Web location of the raw LOTI data: https://data.giss.nasa.gov/gistemp/tabledata_v3/GLB.Ts+dSST.txt

  2. GISTEMP Team, 2015: GISS Surface Temperature Analysis (GISTEMP). NASA Goddard Institute for Space Studies. https://data.giss.nasa.gov/gistemp/

  3. J. Hansen, R. Ruedy, M. Sato and K. Lo, 2010. Global surface temperature change. Rev. Geophys., 48, RG4004. https://pubs.giss.nasa.gov/abs/ha00510u.html

  4. Updates to analysis: https://data.giss.nasa.gov/gistemp/updates_v3/

  5. R code to convert from NASA format to the format stored here https://github.com/dankelley/ocedata/blob/master/create_data/giss/create_giss.R


Gulf Stream position

Description

Monthly latitude and longitude of Gulf Stream position, averaged from 1973 to 1992, according to Drinkwater et al. 1994 (page 103), in the form of a list containing month, the numbers 1 through 12, longitude, the longitudes in degrees east, and latitude, a matrix of latitudes, with columns for months and rows for longitudes. The data were entered by hand by Dan Kelley, and may suffer errors resulting from typos and inaccurate reading of occasionally blurry digits.

Usage

data(gs, package="ocedata")

References

K. F. Drinkwater, R. A Myers, R. G. Pettipas and T. L. Wright, 1994. Climatic data for the northwest Atlantic: the position of the shelf/slope front and the northern boundary of the Gulf Stream between 50W and 75W, 1973-1992. Canadian Data Report of Fisheries and Ocean Sciences 125. Department of Fisheries and Oceans, Canada.

Examples

data(gs, package="ocedata")
## Not run: 
library(oce)
data(coastlineWorldMedium, package="ocedata")
plot(coastlineWorldMedium, span=3200,
    clongitude=mean(gs$longitude), clatitude=mean(gs$latitude))
data(topoWorld, package="oce")
contour(topoWorld[["longitude"]]-360,
    topoWorld[["latitude"]], -topoWorld[["z"]],
    level=1000*(1:5), col='brown', add=TRUE)
for (i in gs$month)
    lines(gs$longitude, gs$latitude[,i], col='blue')

## End(Not run)

Annually-averaged sea-surface temperature and salinity

Description

Sea-surface temperature and salinity from the 2013 version of the World Ocean Atlas (WOA), commonly referred to as the Levitus atlas, in the form of a list containing longitude, latitude, and sea-surface salinity SSS and temperature SST. See References 2 and 3 for more information about the dataset.

Usage

data(levitus, package="ocedata")

Details

The levitus dataset was constructed from the World Ocean Atlas as of 2013, downloaded from Reference 1. The data were read with ncdf4, and the top layers of temperature and salinity were selected. Then longitude was shifted from (0,360) notation to the (-180,180) notation used by oce.

References

  1. https://www.nodc.noaa.gov/OC5/woa13/

  2. Locarnini, R. A., A. V. Mishonov, J. I. Antonov, T. P. Boyer, H. E. Garcia, O. K. Baranova, M. M. Zweng, C. R. Paver, J. R. Reagan, D. R. Johnson, M. Hamilton, and D. Seidov, 2013. World Ocean Atlas 2013, Volume 1: Temperature. S. Levitus, Ed., A. Mishonov Technical Ed.; NOAA Atlas NESDIS 73, 40 pp.

  3. Zweng, M.M, J.R. Reagan, J.I. Antonov, R.A. Locarnini, A.V. Mishonov, T.P. Boyer, H.E. Garcia, O.K. Baranova, D.R. Johnson, D.Seidov, M.M. Biddle, 2013. World Ocean Atlas 2013, Volume 2: Salinity. S. Levitus, Ed., A. Mishonov Technical Ed.; NOAA Atlas NESDIS 74, 39 pp.

Examples

data(levitus, package="ocedata")
attach(levitus)
## Not run: 
oce::imagep(longitude, latitude, SST, col=oceColorsTemperature, zlim=c(-2, 30))
oce::imagep(longitude, latitude, SSS, col=oceColorsSalinity, zlim=c(20, 40))

## End(Not run)

Munk's (1966) temperature profile

Description

Temperature profile digitized from the left-hand panel of Munk's Figure 1.

Usage

data(munk, package="ocedata")

References

Walter H. Munk, 1966. Abyssal recipes. Deep-Sea Research, 13, 707-730.

Examples

data(munk, package="ocedata")
plot(munk$temperature, munk$depth,
    ylim=rev(range(munk$depth)),
    xlab="Temperature [degC]", ylab="Depth [km]")

North Atlantic Oscillation Index

Description

This is the North Oscillation Index, downloaded in May 2014 and processed as follows.

d <- scan("https://www.cpc.ncep.noaa.gov/products/precip/CWlink/pna/norm.nao.monthly.b5001.current.ascii.table")
isYear <- d > 1900
index <- d[!isYear]
year <- 1/24 + seq(d[isYear][1], by=1/12, length.out=length(index))
nao <- data.frame(year=year, index=index)

Usage

data(nao, package="ocedata")

Examples

data(nao, package="ocedata")
plot(nao$year, nao$index, xlab="Year", ylab="NAO index", type="l", col="gray")
k <- kernel("fejer", m=25, r=2)
smoothed <- kernapply(nao$index, k, circular=TRUE)
lines(nao$year, smoothed, col=2)

Base Class for oce Objects

Description

This is used to create objects to be used by oce, created here by ocedata.

Slots

metadata

A list containing information about the data.

data

A list containing the data.

processingLog

A list containing time-stamped processing steps.


Geometries of the five world oceans

Description

Surface areas, average depths, and maximum depths for five world oceans, calculated from the ETOPO-1 dataset. Area is in square metres (converted from square kilometres on the NOAA site), and depths are in metres.

Usage

data(oceans, package="ocedata")

Details

The data were downloaded from the NOAA website https://ngdc.noaa.gov/mgg/global/etopo1_ocean_volumes.html in October 2012.

References

Amante, C. and B. W. Eakins, ETOPO1 1 Arc-Minute Global Relief Model: Procedures, Data Sources and Analysis. NOAA Technical Memorandum NESDIS NGDC-24, 19 pp, March 2009.

Examples

data(oceans, package="ocedata")
dotchart(oceans$Area, rownames(oceans), main="Surface Area [m^2]",
    xlim=c(0, max(oceans$Area)))

OWS Papa hydrographic record during 2010

Description

papa holds the temperature and salinity measured at Ocean Weather Station Papa (50N, 145W) in the year 2010. Time and vertical coordinate are in vectors papa$t and papa$z, while temperature, salinity and σθ\sigma_\theta are in the matrices papa$temperature, papa$salinity and papa$sigmaTheta. This is an excerpt from a larger dataset that spans 2007-06-08 to 2012-10-24, and it has been trimmed to just those z values that are common to the larger dataset, namely -1, -10, -20, -45, -80, -100, -120, -150, and -200m. Time is sampled daily, from 2011-01-01 12:00:00 to 2011-12-31 12:00:00 UTC.

Usage

data(papa, package="ocedata")

Details

Salinity was inferred from ⁠https://www.pmel.noaa.gov/stnP/data/daily/s50n145w_dy.ascii⁠ and temperature from ⁠https://www.pmel.noaa.gov/stnP/data/daily/t50n145w_dy.ascii⁠, as downloaded in early 2015; PMEL changed its website subsequent to that date, and as of early 2016 there seems to be no way to link directly to the data; instead, one must use a graphical interface provided at ⁠https://www.pmel.noaa.gov/ocs/data/disdel/⁠, which includes filling out a form identifying the user and purpose.

Although there is a data file for σθ\sigma_\theta on the NOAA website, here it was calculated with swSigmaTheta() in the oce package.

The larger data set is described at ⁠http://www.pmel.noaa.gov/stnP/⁠.

Examples

data(papa, package="ocedata")
xlim <- c(min(papa$t)-3*28*86400, max(papa$t)) # extra for legend
plot(papa$t, papa$temperature[,1], type='l', xlim=xlim,
     xlab="", ylab="Temperature", ylim=range(papa$temperature))
for (i in 2:dim(papa$temperature)[2])
    lines(papa$t, papa$temperature[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")
plot(papa$t, papa$salinity[,1], type='l', xlim=xlim,
     xlab="", ylab="Salinity", ylim=range(papa$salinity), lwd=2)
for (i in 2:dim(papa$salinity)[2])
    lines(papa$t, papa$salinity[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")
plot(papa$t, papa$sigmaTheta[,1], type='l', xlim=xlim,
     xlab="", ylab=expression(sigma[theta]), ylim=range(papa$sigmaTheta), lwd=2)
for (i in 2:dim(papa$sigmaTheta)[2])
    lines(papa$t, papa$sigmaTheta[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")

Redfield's (1934) NO3 and total CO2 data

Description

Data digitized from Redfield's (1934) Figure 3, showing NO3\textrm{NO}_3 dependence on total CO2\textrm{CO}_2.

Usage

data(redfieldNC, package="ocedata")

References

Alfred C. Redfield, 1934. On the proportions of organic derivations in sea water and their relation to the composition of plankton. Pages 177–192 in James Johnstone Memorial Volume, University Press of Liverpool.

See Also

Other data related to Redfield (1934): redfieldNP, redfieldPlankton

Examples

data(redfieldNC, package="ocedata")
plot(redfieldNC$CO2, redfieldNC$NO3,
    xlab=expression(CO[2]), ylab=expression(NO[3]))
slope <- 1/7
abline(-275.5, slope, lwd=3)
abline(-288.5, slope, lwd=3)

Redfield's (1934) NO3 and PO4 data

Description

Data digitized from Redfield's (1934) Figure 1, showing NO3\textrm{NO}_3 dependence on PO4\textrm{PO}_4. This dataset is used in Chapter 4 of Kelley (2018).

Usage

data(redfieldNP, package="ocedata")

References

  1. Kelley, Dan E. Oceanographic Analysis with R. 1st ed. 2018. New York, NY: Springer New York: Imprint: Springer, 2018. doi:10.1007/978-1-4939-8844-0.

  2. Alfred C. Redfield, 1934. On the proportions of organic derivations in sea water and their relation to the composition of plankton. Pages 177–192 in James Johnstone Memorial Volume, University Press of Liverpool.

See Also

Other data related to Redfield (1934): redfieldNC, redfieldPlankton

Examples

data(redfieldNP, package="ocedata")
plot(redfieldNP$PO4, redfieldNP$NO3,
    xlab=expression(PO[4]), ylab=expression(NO[3]))
abline(0, 20, lwd=3)  # slope N:P = 20:1, shown by Redfield

Redfield's (1934) Table II

Description

Contents of Redfield's (1934) Table II, containing columns for sampled species, carbon content by weight (normalized to 100), Nitrogen content by weight, and Phosphorus content by weight. This dataset is used in Chapter 4 of Kelley (2018).

Usage

data(redfieldPlankton, package="ocedata")

References

  1. Kelley, Dan E. Oceanographic Analysis with R. 1st ed. 2018. New York, NY: Springer New York: Imprint: Springer, 2018. doi:10.1007/978-1-4939-8844-0.

  2. Alfred C. Redfield, 1934. On the proportions of organic derivations in sea water and their relation to the composition of plankton. Pages 177–192 in James Johnstone Memorial Volume, University Press of Liverpool.

See Also

Other data related to Redfield (1934): redfieldNC, redfieldNP

Examples

data(redfieldPlankton, package="ocedata")
par(mfrow=c(1,2))
boxplot(redfieldPlankton$Nitrogen)
abline(h=16.7, col='gray')
boxplot(redfieldPlankton$Phosphorus)
abline(h=1.85, col='gray')

Riley's (1946) observation/theory of phytoplankton concentration

Description

riley is a list holding information relating to Riley's (1946) observation and theory of phytoplankton concentration, used in Chapter 4 of Kelley (2018).

Usage

data(riley, package="ocedata")

Details

The elements of riley are as follows.

  • fig21points is a data frame representing the data shown in Riley's Figure 21. Resulting from digitization of his graph, this is a list containing day (day in year) and P (phytoplankton concentration, in grams of Carbon per square meter.

  • fig21curve is a data frame with columns named day and P, containing a digitized trace of the curve with which Riley illustrates his numerical solution of the differential equations for phytoplankton growth.

  • DEparameters (from Riley's (1946) appendix) is a list containing data about twice per month, in elements day for the day of the year, Ph for phytoplankton growth rate, R for phytoplankton respiration rate, and G for the rate at which zooplankton graze on phytoplankton. The rates are in inverse days.

References

Kelley, Dan E. Oceanographic Analysis with R. 1st ed. 2018. New York, NY: Springer New York: Imprint: Springer, 2018. doi:10.1007/978-1-4939-8844-0.

Gordon A. Riley, 1946. Factors controlling phytoplankton populations on Georges Bank. Journal of Marine Research, 6(1): 54-73.

Examples

data(riley, package="ocedata")
plot(riley$fig21points$day, riley$fig21points$P, xlab="Day of Year", ylab="Phytoplankton [gC/m^2]")
lines(riley$fig21curve$day, riley$fig21curve$P)

Seawater profile used by Reiniger and Ross (1968)

Description

RRprofile is the hydrographic profile used by Reiniger and Ross (1968, Table 2) to illustrate the use of their method for interpolating oceanographic data.

Usage

data(RRprofile, package="ocedata")

References

R.F. Reiniger and C.K. Ross, 1968. A method of interpolation with application to oceanographic data. Deep Sea Research, 15, 185-193.

Examples

data(RRprofile, package="ocedata")
## Not run: 
library(oce)
par(mgp=getOption('oceMgp'))
par(mar=c(3,3,1,1))
ctd <- as.ctd(RRprofile$salinity, RRprofile$temperature, RRprofile$depth)
plot(ctd)
zz <- seq(0,2000,5)
plot(RRprofile$temperature, RRprofile$depth, ylim=c(500,0), xlim=c(2,11),
     xlab="Temperature", ylab="Depth [m]")
TT <- oceApprox(RRprofile$depth, RRprofile$temperature, zz)
lines(TT, zz)
a <- approx(RRprofile$depth, RRprofile$temperature, zz)
lines(a$y, zz, col='red')
s <- smooth.spline(RRprofile$depth, RRprofile$temperature)
lines(predict(s, zz)$y, zz, col='blue')
legend("topright", lwd=1, col=c("black", "red", "blue"),
      legend=c("oceApprox", "approx", "smooth.spline"), cex=2/3)

## End(Not run)

Schmitt's (1981) NACW temperature-salinity data

Description

Schmitt's (1981) temperature-salinity data for North Atlantic Central Water. The data were digitized from Schmitt's Figure 1, to a tolerance of about half the symbol size in that diagram. Schmitt reported the original data source as a cruise of the vessel T. G. Thompson in 1970, and a location of 25.2N and 35.8W.

Usage

data(schmitt, package="ocedata")

References

R. W. Schmitt, 1981. Form of the temperature-salinity relationship in central water: evidence for double-diffusive mixing. Journal of Physical Oceanography, 11:1015-1026.

Examples

data(schmitt, package="ocedata")
## Not run: 
oce::plotTS(oce::as.ctd(schmitt$S, schmitt$theta, 0), eos="unesco")

## End(Not run)

Secchi depth dataset

Description

Measurements of Secchi depth in the North and Baltic Seas.

Usage

data(secchi, package="ocedata")

Details

The data were downloaded as a file named Secchi_Ships.csv that was available from Reference 1 in October 2013 and then formed into a data frame with new variable names, for use in R. See Thorkild (2002) for more information on the data.

References

  1. ⁠https://ocean.ices.dk/Project/SECCHI/⁠ (noticed to be a broken link on March 13, 2022).

  2. Thorkild Aarup 2002, Transparency of the North Sea and Baltic Sea–a Secchi Depth data mining study, Oceanologia, 44(3), 323-337.

Examples

data(coastlineWorldMedium, package="ocedata")
data(secchi, package="ocedata")
## Not run: 
logdepth <- log10(secchi$depth)
cm <- colormap(logdepth, col=oceColorsTurbo)
par(mar=c(3, 3, 2, 1))
oce::drawPalette(colormap=cm)
oce::plot(coastlineWorldMedium, clongitude=10, clatitude=60, span=3000,
    mar=par("mar"))
points(secchi$longitude, secchi$latitude, pch=20, col=cm$zcol)
title("log10 of secchi depth in m")

## End(Not run)

Southern Oscillation Index

Description

soi is a data frame containing the Southern Oscillation Index with columns named year for decimal year (sampled monthly and represented at mid-month) and index for the index.

Usage

data(soi, package="ocedata")

Details

The data were downloaded on August 11, 2017, and processed as follows.

library(ncdf4)
url <- "https://www.cgd.ucar.edu/cas/catalog/climind/SOI.nc"
download.file(url, "SOI.nc")
f <- nc_open("SOI.nc")
year <- as.vector(ncvar_get(f, "TIME"))
index <- as.vector(ncvar_get(f, "SOI_SIGNAL"))
ok <- is.finite(index)
year <- year[ok]
index <- index[ok]
soi <- data.frame(year=year, index=index)

Examples

data(soi, package="ocedata")
recent <- subset(soi, year > 1950)
plot(recent$year, recent$index, type='l', xlab="Year", ylab="SOI")

World topography on a 2-degree grid

Description

topo2 is a matrix containing world topography data, on a 2-degree grid. This is provided for occasions where the higher resolution topography in topoWorld from the Oce package is not needed. See “Examples” for a plot that illustrates the longitude and latitude grid for the data.

Usage

data(topo2, package="ocedata")

Details

The data are calculated by applying decimate() to the topoWorld dataset from the oce package, followed by extraction of the "z" value.

Examples

# Coastline and 2 km isobath
data(topo2, package="ocedata")
lon <- seq(-179.5, 178.5, by=2)
lat <- seq(-89.5, 88.5, by=2)
contour(lon, lat, topo2, asp=1, drawlabels=FALSE,
    level=c(0,-2000), col=c(1,2))

Grant et al. (1962) turbulence data

Description

Turbulence spectrum phiphi, as a function of wavenumber kk for a run starring at 0905h on October 3, 1959, with data in their Appendix 1 and graph in their Figure 9 and Appendix 1. The units are c.g.s., that is kk is in cm2cm^{-2} and phiphi is in cm3/s2cm^3/s^2.

Usage

data(turbulence, package="ocedata")

References

H. L. Grant and R. W. Stewart and A. Moilliet, 1962. Turbulence spectra from a tidal channel. Journal of Fluid Mechanics, 12(2): 241-268.

Examples

# Recreate Fig 9 of Grant et al. (1962), with intercept
# chosen to mimic the published figure
data(turbulence, package="ocedata")
plot(log10(turbulence$k), log10(turbulence$phi),
    xlab=expression(log[10]*k), ylab=expression(log[10]*phi), pch=20)
grid()
power <- -5/3
intercept <- -0.3
abline(intercept, power)

Wilson's (1963) table of seafloor spreading

Description

wilson holds Wilson's (1963) table of seafloor spreading, extracted from his Table 1, taking only the first 3 columns, and only those rows for which Wilson reported an estimate of spreading rate. This dataset was used in Chapter 4 of Kelley (2018).

Usage

data(wilson, package="ocedata")

References

Kelley, Dan E. Oceanographic Analysis with R. 1st ed. 2018. New York, NY: Springer New York: Imprint: Springer, 2018. doi:10.1007/978-1-4939-8844-0.

J. Tuzo Wilson, 1963. Evidence from islands on the spreading of ocean floors. Nature, 197(4867):536-538. doi:10.1038/197536a0

Examples

data(wilson, package="ocedata")
plot(wilson$Age, wilson$Distance, xlab="Age [My]", ylab="Distance [km]",
    xlim=c(125,0), ylim=c(0,4000))
abline(0,4000/125)
m <- lm(Distance~Age-1, data=wilson)
# Wilson reports in cm/year; 1cm/y = 1km/1My * 1e5 / 1e6
spreadingRate <- as.numeric(coef(m)) / 10
print(spreadingRate)
abline(m, col=2)