Skip to contents

This determines what things can be derived from the supplied variables. For example, if salinity, temperature, and pressure are supplied, then potential temperature, sound speed, and several other things can be derived. If, in addition, longitude and latitude are supplied, then Absolute Salinity, Conservative Temperature, and some other things can be derived. Similarly, nitrate can be computed from NO2+NO3 together with nitrate, and nitrite can be computed from NO2+NO3 together with nitrate. See the “Examples” for a full listing.

Usage

computableWaterProperties(x)

Arguments

x

a specification of the names of known variables. This may be (a) an oce object, in which case the names are determined by calling names() on the data slot of x, or (b) a vector of character values indicating the names.

Value

computableWaterProperties() returns a sorted character vector holding the names of computable water properties, or NULL, if there are no computable values.

Author

Dan Kelley

Examples

library(oce)
# Example 1
data(ctd)
computableWaterProperties(ctd)
#>  [1] "Absolute Salinity"        "CT"                      
#>  [3] "Conservative Temperature" "N2"                      
#>  [5] "Rrho"                     "RrhoSF"                  
#>  [7] "SA"                       "SP"                      
#>  [9] "SR"                       "Sstar"                   
#> [11] "density"                  "potential temperature"   
#> [13] "sigma0"                   "sigma1"                  
#> [15] "sigma2"                   "sigma3"                  
#> [17] "sigma4"                   "sigmaTheta"              
#> [19] "sound speed"              "spice"                   
#> [21] "spiciness0"               "spiciness1"              
#> [23] "spiciness2"               "theta"                   
#> [25] "z"                       
# Example 2: nothing an be computed from just salinity
computableWaterProperties("salinity")
#> NULL
# Example 3: quite a lot can be computed from this trio of values
computableWaterProperties(c("salinity", "temperature", "pressure"))
#>  [1] "N2"                    "Rrho"                  "RrhoSF"               
#>  [4] "SP"                    "density"               "depth"                
#>  [7] "potential temperature" "sigmaTheta"            "sound speed"          
#> [10] "spice"                 "theta"                 "z"                    
# Example 4: now we can get TEOS-10 values as well
computableWaterProperties(c(
    "salinity", "temperature", "pressure",
    "longitude", "latitude"
))
#>  [1] "Absolute Salinity"        "CT"                      
#>  [3] "Conservative Temperature" "N2"                      
#>  [5] "Rrho"                     "RrhoSF"                  
#>  [7] "SA"                       "SP"                      
#>  [9] "SR"                       "Sstar"                   
#> [11] "density"                  "depth"                   
#> [13] "potential temperature"    "sigma0"                  
#> [15] "sigma1"                   "sigma2"                  
#> [17] "sigma3"                   "sigma4"                  
#> [19] "sigmaTheta"               "sound speed"             
#> [21] "spice"                    "spiciness0"              
#> [23] "spiciness1"               "spiciness2"              
#> [25] "theta"                    "z"