Learn R Programming

marelac (version 2.1.11)

sw_gibbs: Gibbs Function of Seawater

Description

Calculates the seawater specific gibbs free energy, including derivatives up to order 2, for a given temperature, salinity and pressure.

The Gibbs function of seawater g(S,t,p) is related to the specific enthalpy h and entropy s, by g = h - (273.15 K + t) s

Usage

sw_gibbs(S = 35, t = 25, p = P-1.013253, 
         P = 1.013253, dS = 0, dt = 0, dp = 0)

Value

The Gibbs function, J/kg, or its derivative

Arguments

S

Absolute salinity (g/kg),

t

Temperature, \(^\circ\)C,

p

gauge or applied pressure, pressure referenced against the local atmospheric pressure, bar

P

true pressure, bar

dS

order of the S derivative

dt

order of the t derivative

dp

order of the p derivative

Author

Karline Soetaert <karline.soetaert@nioz.nl>

References

Feistel R, 2008. A Gibbs function for seawater thermodynamics for -6 to 80 dgC and salinity up to 120 g/kg. Deep-Sea Research I, 55, 1639-1671.

McDougall TJ, Feistel R, Millero FJ, Jackett DR, Wright DG, King BA, Marion GM, Chen C-T A and Spitzer P, 2009. Calculation of the Thermophysical Properties of Seawater, Global Ship-based Repeat Hydrography Manual, IOCCP Report No. 14, ICPO Publication Series no. 134.

See Also

sw_adtgrad, sw_alpha, sw_beta, sw_comp, sw_conserv, sw_cp, sw_dens, sw_depth, sw_enthalpy, sw_entropy, sw_kappa, sw_kappa_t, sw_sfac, sw_svel, sw_tfreeze, sw_tpot

convert_PStoAS, to convert from practical salinity (-) to absolute salinity (g/kg)

Examples

Run this code
# table 22 Feistel 2008
sw_gibbs(0, 0, 0)                             #= 101.34274
sw_gibbs(0, 0, 0, dS = 1)                     # 0
sw_gibbs(0, 0, 0, dt = 1)                     #0.147643376
sw_gibbs(0, 0, 0, dp = 1)                     #0.1000015694e-2
sw_gibbs(0, 0, 0, dS = 1, dp = 1)             #0
sw_gibbs(0, 0, 0, dt = 1, dp = 1)             #-0.677700318e-7

sw_gibbs(0, 79.85, 0)                         #-0.446114969e5 differs (see note)
sw_gibbs(0, 79.85, 0, dt = 1)                 #-0.107375993e4 differs
sw_gibbs(0, 79.85, 0, dp = 1)                 #0.102892956e-2 differs
sw_gibbs(0, 79.85, 0, dS = 1, dp = 1)         #0
sw_gibbs(0, 79.85, 0, dt = 1, dp = 1)         #0.659051552e-6


sw_gibbs(0, 0, 998.98675)                     #0.977303862e5
sw_gibbs(0, 0, 998.98675, dt = 1)             #0.851466502e1
sw_gibbs(0, 0, 998.98675, dp = 1)             #0.956683329e-3
sw_gibbs(0, 0, 998.98675, dS = 1, dp = 1)     #0
sw_gibbs(0, 0, 998.98675, dt = 1, dp = 1)     #0.199079571e-6

# table 21 Feistel 2008
sw_gibbs(35.16504, 0, 0)                      #=0
sw_gibbs(35.16504, 0, 0, dS = 1)              #0.639974067e2      differs
sw_gibbs(35.16504, 0, 0, dt = 1)              #=0
sw_gibbs(35.16504, 0, 0, dp = 1)              #0.972661217e-3
sw_gibbs(35.16504, 0, 0, dS = 1, dp = 1)      #-0.759615412e-6
sw_gibbs(35.16504, 0, 0, dt = 1, dp = 1)      #0.515167556e-7    !!!

sw_gibbs(100, 79.85, 0)                       #=-0.295243229e5   differs
sw_gibbs(100, 79.85, 0, dS = 1)               #0.251957276e3
sw_gibbs(100, 79.85, 0, dt = 1)               #-0.917529024e3    differs
sw_gibbs(100, 79.85, 0, dp = 1)               #0.971006828e-3    differs
sw_gibbs(100, 79.85, 0, dS = 1, dp = 1)       #-0.305957802e-6
sw_gibbs(100, 79.85, 0, dt = 1, dp = 1)       #0.146211315e-5

sw_gibbs(35.16504, 0, 998.98675)                 #=0.951294557e5
sw_gibbs(35.16504, 0, 998.98675, dS = 1)         #-0.545861581e1
sw_gibbs(35.16504, 0, 998.98675, dt = 1)         #0.160551219e2
sw_gibbs(35.16504, 0, 998.98675, dp = 1)         #0.933770945e-3
sw_gibbs(35.16504, 0, 998.98675, dS = 1, dp = 1) #-0.640757619e-6
sw_gibbs(35.16504, 0, 998.98675, dt = 1, dp = 1) #0.245708012e-6

Run the code above in your browser using DataLab