Skip to contents

This function repeats location information as required by some seawater functions, e.g. swAbsoluteSalinity(), that use the gsw package to compute seawater properties in the Gibbs Seawater formulation. It seems unlikely that users will need to call this function directly in routine work.

Usage

locationForGsw(x)

Arguments

x

an oce object.

Value

locationForGsw returns a list containing longitude and latitude, with dimensionality matching pressure in the data slot of x. If x lacks location information (in either its metadata or data slot) or lacks pressure in its data slot, then the returned list will hold NULL values for both longitude and latitude.

Details

Several gsw functions require location information to be matched up with hydrographic information. The scheme depends on the dimensionality of the hydrographic variables and the location variables. For example, the ctd stores salinity etc in vectors, an stores just one longitude-latitude pair for each vector. By contrast, the argo stores salinity etc as matrices, and stores e.g. longitude as a vector of length matching the first dimension of salinity.

Author

Dan Kelley