R: Reform longitude and latitude for use in gsw computations.

locationForGsw {oce} | R Documentation

## Reform longitude and latitude for use in gsw computations.

### Description

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.

### Usage

    locationForGsw(x)

### Arguments

`x` | an oce object.

### Details

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

### Value

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

### Author(s)

Dan Kelley

### See Also

Other functions that calculate seawater properties: `T68fromT90()`, `T90fromT48()`, `T90fromT68()`, `computableWaterProperties()`, `swAbsoluteSalinity()`, `swAlphaOverBeta()`, `swAlpha()`, `swBeta()`, `swCSTp()`, `swConservativeTemperature()`, `swDepth()`, `swDynamicHeight()`, `swLapseRate()`, `swN2()`, `swPressure()`, `swRho()`, `swRrho()`, `swSCTp()`, `swSR()`, `swSTrho()`, `swSigma0()`, `swSigma1()`, `swSigma2()`, `swSigma3()`, `swSigma4()`, `swSigmaTheta()`, `swSigmaT()`, `swSigma()`, `swSoundAbsorption()`, `swSoundSpeed()`, `swSpecificHeat()`, `swSpice()`, `swSstar()`, `swTFreeze()`, `swTSrho()`, `swThermalConductivity()`, `swTheta()`, `swViscosity()`, `swZ()`

[Package oce version 1.7-2 Index]