Module ocmip2_co2calc_mod
OVERVIEW
Surface fCO2 calculation
Calculate the fugacity of CO2 at the surface in thermodynamic
equilibrium with the current alkalinity (Alk) and total dissolved
inorganic carbon (DIC) at a particular temperature and salinity
using an initial guess for the total hydrogen
ion concentration (htotal)
OTHER MODULES USED
PUBLIC INTERFACE
PUBLIC DATA
None.
PUBLIC ROUTINES
-
init_ocmip2_co2calc
-
DESCRIPTION
- Initialize parameters to be used for the calculation of
delta co2*.
INPUT
time = the time when this routine is called (saved so
the routine may be called from multiple
places, but calculations only performed once)
imt_in = i-dimension of the arrays
km_in = k-dimension of the arrays
t = temperature (degrees C)
s = salinity (PSU)
OUTPUT
k2 = activity factors for carbonate species
k2 (see below)
invtk = 1/(t+273.15)
-
ocmip2_co2calc
-
DESCRIPTION
- Calculate delta co2* from total alkalinity and total CO2 at
temperature (t), salinity (s) and "atmpres" atmosphere total pressure.
It is assumed that init_ocmip2_co2calc has already been called with
the T and S to calculate the various coefficients.
INPUT
imt_in = i-dimension of the arrays
km_in = k-dimension of the arrays
mask = land mask array (0.0 = land)
dic_in = total inorganic carbon (mol/m^3)
where 1 T = 1 metric ton = 1000 kg
ta_in = total alkalinity (eq/m^3)
pt_in = inorganic phosphate (mol/m^3)
sit_in = inorganic silicate (mol/m^3)
htotallo = lower limit of htotal range
htotalhi = upper limit of htotal range
htotal = H+ concentraion
xco2_in = atmospheric mole fraction CO2 in dry air (ppmv)
atmpres = atmospheric pressure in atmospheres
(1 atm = 1013.25 mbar)
OUTPUT
co2star = CO2*water (mol/m^3)
co2starair = CO2*air (mol/m^3)
dco2star = Delta CO2* (mol/m^3)
pco2surf = oceanic pCO2 (ppmv)
dpco2 = Delta pCO2, i.e, pCO2ocn - pCO2atm (ppmv)
IMPORTANT: Some words about units - (JCO, 4/4/1999)
- Models carry tracers in mol/m^3 (on a per volume basis)
- Conversely, this routine, which was written by observationalists
(C. Sabine and R. Key), passes input arguments in umol/kg
(i.e., on a per mass basis)
- I have changed things slightly so that input arguments are
in mol/m^3,
- Thus, all input concentrations (dic, ta, pt, and st) should be
given in mol/m^3; output arguments "co2star" and "co2starair"
and "dco2star" are likewise be in mol/m^3.
FILES and PROGRAMS NEEDED: drtsafe, ta_iter_1
-
drtsafe
-
DESCRIPTION
- File taken from Numerical Recipes. Modified R. M. Key 4/94
-
ta_iter_1
-
DESCRIPTION
- This routine expresses TA as a function of DIC, htotal and constants.
It also calculates the derivative of this function with respect to
htotal. It is used in the iterative solution for htotal. In the call
"x" is the input value for htotal, "fn" is the calculated value for TA
and "df" is the value for dTA/dhtotal
-
alloc_ocmip2_co2calc
-
DESCRIPTION
- initialize arrays for use in ocmip2_co2calc subroutine
DATA SETS
None.
ERROR MESSAGES
None.