This function is mainly intended for use within swAbsoluteSalinity() and similar functions that use the gsw package to compute seawater properties in the Gibbs Seawater formulation.




an oce object.


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.


The 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.

locationForGsw repeats location information as required, returning values with dimensionality matching pressure.


Dan Kelley