OceanLib Command Help
angle - SUBROUTINE ANGLE(ARC, IDEG, MIN, SEC)
Converts an latitude or longitude angle from arc seconds to degrees, min
and sec. Negative angles are assumed to be west of Greenwich or south of
equator.
input:
ARC [real] - angle to be converted (arc seconds)
output:
IDEG [int] - degrees
MIN [int] - minutes
SEC [real] - seconds
atg - REAL FUNCTION ATG(S,T,P)
calculates the adiabatic temperature change (partial derivative of
temperature wrt pressure with no exchange) for a water parcel
at a given temperature, salinity and pressure.
(based on reference, Bryden,H.,1973, Deep-Sea Res., 20, 401-408)
input:
S [real] - salinity (PSU)
T [real] - temperature (deg C)
P [real] - pressure (decibars)
output:
ATG [real] - partial deriv of T wrt P. deg. C per decibar
brvl - SUBROUTINE BRVL(PRSP,PRS,TMPP,TMP,SALP,SAL,BV)
calculates the Brunt-Vaisala frequency, or buoyancy frequency,
for two sets of temperature and salinity separated vertically.
input:
SALP [real] - salinity of shallower measurement (PSU)
TMPP [real] - temperature of shallower measurement (deg C)
PRSP [real] - pressure at shallower measurement (decibars)
SAL [real] - salinity of deeper measurement (PSU)
TMP [real] - temperature of deeper measurement (deg C)
PRS [real] - pressure at deeper measurement (decibars)
output:
BV [real] - Brunt-Vaisala frequency (cycles per hour)
needed routines:
EOS80
cpsw - REAL FUNCTION CPSW(S,T,P0)
calculates the specific heat of seawater for a given temperature
and salinity at a given depth.
References: Millero et al, 1973, JGR, 78, 4499-4507
Millero et al, UNESCO Report No. 38, 1981, 99-188.
input:
S [real] - salinity (PSU)
T [real] - temperature (deg C)
P0 [real] - pressure (decibars)
output:
CPSW [real] - specific heat (J per kg per deg C)
density - SUBROUTINE DENSITY (PRESS,TEMP,DEWPT,DENS,N)
calculates air density from given values of temperature and pressure.
effect of humidity are neglected as being small. This works on
an array of values. Missing input data must be given the value 1.0e30.
input:
N [integer] - number of elements in the input arrays
PRESS [real array of size N ] - air pressure (millibars)
TEMP [real array of size N ] - air temperature (deg C)
DEWPT [real array of size N ] - dew point temperature (deg C) [not used]
output:
DENS [real array of size N ] - air density (kg per cubic meter)
depth - REAL FUNCTION DEPTH(P,LAT)
calculates the depth for a given pressure and latitude using
the method of Saunders and Fofonoff, Deep-Sea Res., 1976, 23, 109-111.
uses the 1980 equation of state.
input:
P [real] - pressure (decibars)
LAT [real] - latitude (degrees)
output:
DEPTH [real] - depth (meters)
distance - SUBROUTINE DISTANCE(LAT1,LONG1,LAT2,LONG2,DIST)
calculates the distance between two points on the earth's mean surface
specified by latitude and longitude.
C A SUBROUTINE TO CALCULATE DISTANCE BETWEEN
C TWO POINTS GIVEN THE LATITUDE AND LOGITUDE OF EACH
input:
LAT1 [real] - latitude of the first point (decimal degrees)
LONG1 [real] - longitude of the first point (decimal degrees)
LAT2 [real] - latitude of the second point (decimal degrees)
LONG2 [real] - longitude of the second point (decimal degrees)
output:
DIST [real] - distance along earth's surface (kilometers)
dkds - FUNCTION DKDS(P,T,S)
calculates the change in tangent bulk modulus (K) with
salinty (partial derivative of compressibility wrt salinity).
The reciprocal of the bulk modulus (K) is the compressibility (beta).
The compressibility is defined as beta = - (1/V) dV / dP,
where V is the volume and P is the pressure.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DKDS [real] - change in bulk modulus with salinity (decibar per PSU)
required routines:
DVDP
dkdt - FUNCTION DKDT(P,T,S)
calculates the change in tangent bulk modulus (K) with
temperature (partial derivative of compressibility wrt temperature).
The reciprocal of the bulk modulus (K) is the compressibility (beta).
The compressibility is defined as beta = - (1/V) dV / dP,
where V is the volume and P is the pressure.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DKDT [real] - change in bulk modulus with temperature (decibar per
deg C)
required routines:
DVDP
dva - FUNCTION DVA(P,T,S)
calculates specific volume anomaly. Calls routine svan, so see
documentation for that routine for details.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DVA [real] - specific volume anomaly (cubic meters per kg)
required routines:
SVAN
dvdp - FUNCTION DVDP(P,T,S)
calculates the adiabatic change of specific volume for a change in
pressure.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DVDP [real] - change in specific volume wrt pressure (cubic meters per
kg per decibar)
required routines:
EOS80, ATG, DVDT
dvds - FUNCTION DVDS(P,T,S)
calculates the adiabatic change of specific volume for a change in
salinity.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DVDS [real] - change in specific volume wrt salinity (cubic meters per
kg per PSU)
required routines:
EOS80
dvdt - FUNCTION DVDT(P,T,S)
calculates the adiabatic change of specific volume for a change in
temperature.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
DVDT [real] - change in specific volume wrt temperature (cubic meters per
kg per deg C)
required routines:
EOS80
eos80 - REAL FUNCTION EOS80(P1,T,S)
calculates the specific volume of sea water using the 1980 equation of
state (Millard, et al, 1980. Deep-Sea Res., 27A, 255-264.
input:
P1 [real] - pressure (decibars)
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
EOS80 [real] - specific volume (cubic centimeters per gm)
jmin - integer*4 function jmin(h,mi,d,m,y)
converts gregorian time and date into julian time, which is
minutes since 16 Nov, 1858. based on algorithm 199 in
communications of the acm,vol 6, num 8 aug 1963.
input:
h [integer] - hour
mi [integer] - minutes
d [integer] - day
m [integer] - month
y [integer] - year
output:
jmin [integer] - julian time (minutes)
kdate - SUBROUTINE KDATE(KD,ID,M,IY)
converts Julian day into a Gregorian date
input:
KD [integer] - julian time (days)
output:
ID [integer] - Gregorian day
M [integer] - Gregorian month
Y [integer] - Gregorian year
kday - INTEGER FUNCTION KDAY(ID,IMO,IYR)
converts a Gregorian date into Julian day
need to add 2440000 to get true Julian day
input:
ID [integer] - Gregorian day
IMO [integer] - Gregorian month
IYR [integer] - Gregorian year
output:
KDAY [integer] - Julian date (days)
oxys - subroutine oxys (t,s,oxysa)
calculates the oxygen saturation concentration for given conditions
of temperature and salinity
input:
t [real] - temperature (deg C)
s [real] - salinity (PSU)
output:
oxysa [real] - oxygen saturation concentration (ml per liter)
pss78 - REAL FUNCTION pss78 (c,t,p)
convert conductivity to Practical Salinity Scale using
the equations of Rathlev, 1982.
Note that c is conductivity, not conductivity ratio.
input:
p [real] - pressure (decibars)
t [real] - temperature (deg C)
c [real] - conductivity (milli mhos)
output:
pss78 [real] - salinity (PSU)
sal - FUNCTION SAL(P,T,D)
compute the salinity given the temperature, pressure and specific
volume anomaly.
input:
P [real] - pressure (decibars)
T [real] - temperature (deg C)
D [real] - specific volume anomaly (cubic meters per kg)
output:
SAL [real] - salinity (PSU)
required routines:
SVAN, DVDS
sal78 - REAL FUNCTION SAL78(CND,T,P,M)
convert the conductivity ratio to salinity (practical salinity scale)
or vice versa depending on the value of M. The salinity is
calculated from the conductivity ratio if M=0, and vice versa if M=1.
input:
CND [real] - M=0: conductivity ratio (no units)
M=1: salinity (PSU)
P [real] - pressure (decibars)
T [real] - temperature (deg C)
M [integer] - flag to signify
M=0: that CND is conductivity ratio
M=1: that CND is salinity
output:
SAL78 [real] - M=0: salinity (PSU)
M=1: conductivity ratio (no units)
required routines:
SAL
sgo - FUNCTION SGO(S)
calculates density of sea water at zero temperature and pressure.
uses sigma units for density. Uses Knudsen formulas.
input:
S [real] - salinity (PSU)
output:
SGO [real] - density (sigma units)
sgt - FUNCTION SGT(T,S,SG)
calculates the density of seawater at zero pressure.
uses sigma units for density. Uses Knudsen formulas.
input:
T [real] - temperature (deg C)
S [real] - salinity (PSU)
output:
SG [real] - density at zero temperature (sigma units)
SGT [real] - density at zero pressure (sigma units)
required routines:
SGO
svan - REAL FUNCTION SVAN(S,T,P0,SIGMA)
calculate specific volume anomaly (steric anomaly) based on 1980
equation of state for seawater and 1978 Practical Salinity Scale.
References:
Millero, et al (1980) Deep-Sea Res.,27A,255-264
Millero and Poisson 1981, Deep-Sea Res.,28A,625-629
input:
S [real] - salinity (PSU)
T [real] - temperature (deg C)
P0 [real] - pressure (decibars)
output:
SIGMA [real] - density anomaly (kg per cubic meter)
SVAN [real] - specific volume anomaly (1.e-8 * cubic meters per kg)
svel - REAL FUNCTION SVEL(S,T,P0)
calculates the speed of sound in sea water according to
Chen and Millero 1977, JASA, 62, 1129-1135.
input:
S [real] - salinity (PSU)
T [real] - temperature (deg C)
P0 [real] - pressure (decibars)
output:
SVEL [real] - sound speed (meters/sec)
t48 - FUNCTION T48(T)
convert temperture based on the 1968 scale to the 1948 standard.
input:
T [real] - temperature in 1968 scale (deg C)
output:
T48 [real] - temperature in 1948 scale (deg C)
t68 - FUNCTION T68(T)
convert temperture based on the 1968 scale to the 1948 standard.
input:
T [real] - temperature in 1948 scale (deg C)
output:
T68 [real] - temperature in 1968 scale (deg C)
tf - REAL FUNCTION TF(S,P)
compute the freezing point of seawater
Reference: UNESCO Tech. Papers in the Marine Science No. 28, 1978
Eighth Report JPOTS, ANNEX 6 Freezing Point of Seawater
F.J. Millero, 29-35.
input:
S [real] - salinity (PSU)
P [real] - pressure (decibars)
output:
TF [real] - seawater freezing point (deg C)
theta - REAL FUNCTION THETA(S,T0,P0,PR)
compute local potential temperature at PR using Bryden 1973
polynomial for adiabatic lapse rate and Runge-Kutta 4-th order
integration algorithm.
Ref.: Bryden,H.,1973, Deep-Sea Res., 20, 401-408
Fofonoff,N.,1977, Deep-Sea Res., 24, 489-491
input:
S [real] - salinity (PSU)
T0 [real] - in-situ temperature (deg C)
P0 [real] - in-situ pressure (decibars)
PR [real] - reference pressure (decibars)
output:
THETA [real] - potential temperature (deg C)
required routines:
ATG
v350p - REAL FUNCTION V350P(P1)
calculate the specific volume of water at salinity 35
and temperature 0 deg C at the given pressure.
input:
P1 [real] - in-situ pressure (decibars)
output:
V350P [real] - specific volume (cubic meters per kg)
vke - FUNCTION VKE(P,T,S)
calculate the specific volume using the formulas of
Knudsen and Ekman.
input:
S [real] - salinity (PSU)
T [real] - temperature (deg C)
P [real] - pressure (decibars)
output:
VKE [real] - specific volume (cubic meters per kg ?)
required routines:
SGT
Press here to return to the User's Guide Menu.