MODULE trcoxy_medusa !!====================================================================== !! *** MODULE trcoxy_medusa *** !! TOP : MEDUSA !!====================================================================== !! History : !! - ! 2011-07 (A. Yool) added for ROAM project !!---------------------------------------------------------------------- #if defined key_medusa && defined key_roam !!---------------------------------------------------------------------- !! MEDUSA oxygen cycle !!---------------------------------------------------------------------- !! trc_oxy_medusa : !!---------------------------------------------------------------------- USE oce_trc USE trc USE sms_medusa USE lbclnk USE prtctl_trc ! Print control for debugging IMPLICIT NONE PRIVATE PUBLIC trc_oxy_medusa ! called in trc_bio_medusa !!* Substitution # include "domzgr_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) !! $Id$ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- ! The following is a map of the subroutines contained within this module ! - trc_oxy_medusa ! - CALLS gas_transfer ! - CALLS oxy_schmidt ! - CALLS oxy_sato CONTAINS !======================================================================= ! SUBROUTINE trc_oxy_medusa( pt, ps, uwind, vwind, pp0, o2, dz, & !! inputs kw660, o2flux, o2sat ) !! outputs ! !======================================================================= !! !! Title : Calculates O2 change due to air-sea gas exchange !! Author : Andrew Yool !! Date : 15/10/04 (revised 08/07/11) !! !! This subroutine calculates oxygen air-sea gas exchange in the !! surface layer of the ocean. The formulation is taken from one !! written by Ray Najjar for the OCMIP-2 project. The routine !! calls two other subroutines, oxy_schmidt.f (calculates Schmidt !! number of oxygen) and oxy_sato.f (calculates oxygen saturation !! concentration at 1 atm). !! !! Function inputs are (in order) : !! pt temperature (degrees C) !! ps salinity (PSU) !! uwind u-wind velocity (m/s) !! vwind v-wind velocity (m/s) !! pp0 surface pressure (divided by 1 atm) !! o2 surface O2 concentration (mol/m3) !! dz surface layer thickness (m) !! (*) kw660 gas transfer velocity (m/s) !! (*) o2flux exchange rate of oxygen (mol/m3/s) !! (+) o2sat oxygen saturation concentration (mol/m3) !! !! Where (*) is the function output (note its units). !! !======================================================================= implicit none ! REAL(wp), INTENT( in ) :: pt REAL(wp), INTENT( in ) :: ps REAL(wp), INTENT( in ) :: uwind REAL(wp), INTENT( in ) :: vwind REAL(wp), INTENT( in ) :: pp0 REAL(wp), INTENT( in ) :: o2 REAL(wp), INTENT( in ) :: dz REAL(wp), INTENT( inout ) :: kw660, o2flux, o2sat ! REAL(wp) :: scl_wind, kwo2, o2schmidt, o2sato ! ! Calculate gas transfer ! call gas_transfer(uwind, vwind, scl_wind, kw660) ! ! Calculate oxygen Schmidt number ! call oxy_schmidt(pt, o2schmidt) ! ! Calculate the transfer velocity for O2 (m/s) ! kwo2 = kw660 * (660 / o2schmidt)**0.5 ! ! Calculate the saturation concentration for oxygen (mol/m3) ! call oxy_sato(pt, ps, o2sato) o2sat = o2sato * pp0 ! ! Calculate time rate of change of O2 due to gas exchange (mol/m3/s) ! o2flux = kwo2 * (o2sat - o2) / dz ! END SUBROUTINE trc_oxy_medusa !======================================================================= !======================================================================= !======================================================================= !======================================================================= ! SUBROUTINE oxy_schmidt( pt, & !! input o2_schmidt ) !! output ! !======================================================================= !! !! Title : Calculates Schmidt number for ocean uptake of O2 !! Author : Andrew Yool !! Date : 14/10/04 (revised 08/07/11) !! !! This subroutine calculates the Schmidt number for O2 using sea !! surface temperature. The code is based upon that developed as !! part of the OCMIP-2 project (1998-2000). The coefficients used !! are taken from Keeling et al. (1998, GBC, 12, 141-163). !! !! Function inputs are (in order) : !! t temperature (degrees C) !! (*) o2_schmidt oxygen Schmidt number !! !! Where (*) is the function output. !! !======================================================================= implicit none ! REAL(wp) :: pt, o2_schmidt REAL(wp) :: a0, a1, a2, a3 ! data a0 / 1638.0 / data a1 / -81.83 / data a2 / 1.483 / data a3 / -0.008004 / ! o2_schmidt = a0 + pt*(a1 + pt*(a2 + pt*a3)) ! END SUBROUTINE oxy_schmidt !======================================================================= !======================================================================= !======================================================================= !======================================================================= ! SUBROUTINE oxy_sato( pt, ps, & !! inputs o2_sato ) !! output ! !======================================================================= !! !! Title : Calculates O2 saturation at 1 atm pressure !! Author : Andrew Yool !! Date : 14/10/04 (revised 08/07/11) !! !! This subroutine calculates the oxygen saturation concentration !! at 1 atmosphere pressure in mol/m3 given ambient temperature !! and salinity. This formulation is (ostensibly) taken from !! Garcia & Gordon (1992, L&O, 1307-1312). The function works !! in the range -1.9 <= T <= 40, 0 <= S <= 42. !! !! Function inputs are (in order) : !! pt temperature (degrees C) !! ps salinity (PSU) !! (*) o2_sato oxygen saturation (mol/m3) !! !! Where (*) is the function output (note its units). !! !! Check value : T = 10, S = 35, oxy_sato = 0.282015 mol/m3 !! !======================================================================= implicit none ! REAL(wp) :: pt, ps, o2_sato ! REAL(wp) :: a0, a1, a2, a3, a4, a5 REAL(wp) :: b0, b1, b2, b3 REAL(wp) :: c0 ! REAL(wp) :: tt, tk, ts, ts2, ts3, ts4, ts5 REAL(wp) :: ans1, ans2 ! data a0 / 2.00907 / data a1 / 3.22014 / data a2 / 4.05010 / data a3 / 4.94457 / data a4 / -2.56847E-1 / data a5 / 3.88767 / ! data b0 / -6.24523E-3 / data b1 / -7.37614E-3 / data b2 / -1.03410E-2 / data b3 / -8.17083E-3 / ! data c0 / -4.88682E-7 / ! tt = 298.15 - pt tk = 273.15 + pt ts = log(tt / tk) ts2 = ts**2 ts3 = ts**3 ts4 = ts**4 ts5 = ts**5 ans1 = a0 + a1*ts + a2*ts2 + a3*ts3 + a4*ts4 + a5*ts5 & + ps*(b0 + b1*ts + b2*ts2 + b3*ts3) & + c0*(ps*ps) ans2 = exp(ans1) ! ! Convert from ml/l to mol/m3 ! o2_sato = (ans2 / 22391.6) * 1000.0 ! END SUBROUTINE oxy_sato !======================================================================= !======================================================================= !======================================================================= !======================================================================= ! SUBROUTINE gas_transfer( uwind, vwind, & !! input scl_wind, k ) !! output ! !======================================================================= !! !! Title : Calculates gas transfer velocity !! Author : Andrew Yool !! Date : 15/10/04 (revised 04/08/2011) !! !! This subroutine uses near-surface wind speed to calculate gas !! transfer velocity for use in CO2 and O2 exchange calculations. !! !! Note that the parameterisation of Wanninkhof quoted here is a !! truncation of the original equation. It excludes a chemical !! enhancement function (based on temperature), although such !! temperature dependence is reported negligible by Etcheto & !! Merlivat (1988). !! !! Note also that in calculating scalar wind, the variance of the !! wind over the period of a timestep is ignored. Some authors, !! for instance OCMIP-2, favour including some reference to the !! variability of wind. However, their wind fields are averaged !! over relatively long time periods, and so this issue may be !! safely (!) ignored here. !! !! Subroutine inputs are (in order) : !! uwind wind u velocity at 10 m (m/s) !! vwind wind v velocity at 10 m (m/s) !! (+) scl_wind scalar wind velocity at 10 m (m/s) !! (*) k gas transfer velocity (m/s) !! Where (*) is the function output and (+) is a diagnostic output. !! !======================================================================= implicit none ! ! Input variables REAL(wp) :: uwind, vwind ! ! Output variables REAL(wp) :: scl_wind, k, tmp_k ! ! Choice of parameterisation INTEGER :: eqn ! ! Coefficients for various parameterisations REAL(wp), DIMENSION(6) :: a REAL(wp), DIMENSION(6) :: b ! ! Values of coefficients data a(1) / 0.166 / ! Liss & Merlivat (1986) [approximated] data a(2) / 0.3 / ! Wanninkhof (1992) [sans enhancement] data a(3) / 0.23 / ! Nightingale et al. (2000) [good] data a(4) / 0.23 / ! Nightingale et al. (2000) [better] data a(5) / 0.222 / ! Nightingale et al. (2000) [best] data a(6) / 0.337 / ! OCMIP-2 [sans variability] ! data b(1) / 0.133 / data b(2) / 0.0 / data b(3) / 0.0 / data b(4) / 0.1 / data b(5) / 0.333 / data b(6) / 0.0 / ! ! Which parameterisation is to be used? eqn = 2 ! ! Calculate scalar wind (m/s) scl_wind = (uwind**2 + vwind**2)**0.5 ! ! Calculate gas transfer velocity (cm/h) tmp_k = (a(eqn) * scl_wind**2) + (b(eqn) * scl_wind) ! ! Convert tmp_k from cm/h to m/s k = tmp_k / (100. * 3600.) ! END SUBROUTINE gas_transfer !======================================================================= !======================================================================= !======================================================================= #else !!====================================================================== !! Dummy module : No MEDUSA bio-model !!====================================================================== CONTAINS SUBROUTINE trc_oxy_medusa( pt, ps, uwind, vwind, pp0, o2, dz, & !! inputs kw660, o2flux, o2sat ) !! outputs USE par_kind REAL(wp), INTENT( in ) :: pt REAL(wp), INTENT( in ) :: ps REAL(wp), INTENT( in ) :: pp0 REAL(wp), INTENT( in ) :: o2 REAL(wp), INTENT( in ) :: dz REAL(wp), INTENT( inout ) :: kw660, o2flux, o2sat WRITE(*,*) 'trc_oxy_medusa: You should not have seen this print! error?', kt END SUBROUTINE trc_oxy_medusa #endif !!====================================================================== END MODULE trcoxy_medusa