New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
gas_transfer.F90 in branches/UKMO/dev_r5518_GO6_package_FOAMv14_Hs_CO2/NEMOGCM/NEMO/TOP_SRC/MEDUSA – NEMO

source: branches/UKMO/dev_r5518_GO6_package_FOAMv14_Hs_CO2/NEMOGCM/NEMO/TOP_SRC/MEDUSA/gas_transfer.F90 @ 15463

Last change on this file since 15463 was 15463, checked in by dford, 8 months ago

CO2 flux based on input significant wave height.

File size: 6.8 KB
Line 
1MODULE gastransfer
2   !!======================================================================
3   !!                         ***  MODULE trcdms_medusa  ***
4   !! TOP :   MEDUSA
5   !!======================================================================
6   !! History :
7   !!  -   !  2015-06  (A. Yool)             added for UKESM1 project
8   !!----------------------------------------------------------------------
9#if defined key_medusa && defined key_roam
10      USE oce_trc
11      USE trc
12      USE sms_medusa
13      USE lbclnk
14      USE prtctl_trc      ! Print control for debugging
15      USE in_out_manager  ! I/O manager
16      USE phycst, ONLY: grav
17
18      IMPLICIT NONE
19      PRIVATE
20
21      PUBLIC   gas_transfer  ! called by trcbio_medusa.F90 module
22
23   !!* Substitution
24#  include "domzgr_substitute.h90"
25   !!----------------------------------------------------------------------
26   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)
27   !! $Id$
28   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
29   !!----------------------------------------------------------------------
30
31CONTAINS
32
33      subroutine gas_transfer(wind, N, eqn, swh, tau, sst, sss, kw660)
34! --------------------------------------------------------------------
35!  Gas transfer velocity
36! --------------------------------------------------------------------
37!
38! Title  : Calculates gas transfer velocity
39! Author : Andrew Yool
40! Date   : 15/10/04
41!
42! This subroutine uses near-surface wind speed to calculate gas
43! transfer velocity for use in CO2 and O2 exchange calculations.
44!
45! Note that the parameterisation of Wanninkhof quoted here is a
46! truncation of the original equation.  It excludes a chemical
47! enhancement function (based on temperature), although such
48! temperature dependence is reported negligible by Etcheto &
49! Merlivat (1988).
50!
51! Note also that in calculating scalar wind, the variance of the
52! wind over the period of a timestep is ignored.  Some authors,
53! for instance OCMIP-2, favour including some reference to the
54! variability of wind.  However, their wind fields are averaged
55! over relatively long time periods, and so this issue may be
56! safely (!) ignored here.
57!
58! AXY (12/06/2015)
59! UPDATED: revised formulation from Wanninkhof (2014) update to
60! original 1992 paper. Full reference is:
61!
62! Wanninkhof, R. (2014). Relationship between wind speed and gas
63! exchange over the ocean revisited. LIMNOLOGY AND OCEANOGRAPHY-METHODS
64! 12, 351-362, doi:10.4319/lom.2014.12.351
65!
66! Subroutine inputs are (in order) :
67!     wind      wind velocity at 10 m (m/s)
68!     N         size of input array (value 1 at this time)
69!     eqn       choice of parameterisation:
70!               1 = Liss & Merlivat (1986)    [approximated]
71!               2 = Wanninkhof (1992)         [sans enhancement]
72!               3 = Nightingale et al. (2000) [good]
73!               4 = Nightingale et al. (2000) [better]
74!               5 = Nightingale et al. (2000) [best]
75!               6 = OCMIP-2                   [sans variability]
76!               7 = Wanninkhof (2014)         [assumes 6h avg winds]
77! (*) k         gas transfer velocity (m/s)
78!
79! Where (*) is the function output and (+) is a diagnostic output.
80!
81      implicit none
82
83      INTEGER, INTENT(in) :: N, eqn
84! Input variables
85!     real(kind=wp), INTENT(in),  DIMENSION(N) :: wind
86      real(wp), INTENT(in)  :: wind, swh, tau, sst, sss
87!
88! Output variables
89!     real(kind=wp), INTENT(out), DIMENSION(N) :: kw660
90      real(wp), INTENT(out) :: kw660
91!
92!     INTEGER :: eqn
93!
94! Coefficients for various parameterisations
95      real(wp) :: a(7)
96      real(wp) :: b(7)
97!
98!     real(wp), DIMENSION(N) :: tmp_k
99      real(wp) :: tmp_k
100      real(wp) :: ln_k_0, k_0, a_b, a_nb, r, u_star
101!
102! Values of coefficients
103      data a(1) / 0.166 /  ! Liss & Merlivat (1986)    [approximated]
104      data a(2) / 0.3   /  ! Wanninkhof (1992)         [sans enhancement]
105      data a(3) / 0.23  /  ! Nightingale et al. (2000) [good]
106      data a(4) / 0.23  /  ! Nightingale et al. (2000) [better]
107      data a(5) / 0.222 /  ! Nightingale et al. (2000) [best]
108      data a(6) / 0.337 /  ! OCMIP-2                   [sans variability]
109      data a(7) / 0.251 /  ! Wanninkhof (2014)         [assumes 6h avg winds]
110!
111      data b(1) / 0.133 /
112      data b(2) / 0.0   /
113      data b(3) / 0.0   /
114      data b(4) / 0.1   /
115      data b(5) / 0.333 /
116      data b(6) / 0.0   /
117      data b(7) / 0.0   /
118!
119! Which parameterisation is to be used?
120!     eqn = 7
121!
122! Calculate gas transfer velocity (cm/h)
123
124      if ( (swh < 0.0) .OR. (swh > 100.0) ) then
125         ! Wanninkhof (2014)
126         tmp_k = (a(eqn) * wind**2) + (b(eqn) * wind)
127         !write(numout,*) 'swh, wind, tmp_k = ', swh, wind, tmp_k
128!
129! Convert tmp_k from cm/h to m/s
130         kw660 = tmp_k / (100. * 3600.)
131      else
132         ! Deike and Melville (2018)
133         ln_k_0 = -60.2409 + &
134            &     93.4517 * (100.0 / sst) + &
135            &     23.3585 * LOG(sst/100.0) + &
136            &     sss * &
137            &     (0.023517 - &
138            &      0.023656 * (sst/100.0) + &
139            &      0.0047036 * (sst/100.0) * (sst/100.0))
140         k_0 = EXP(ln_k_0)        ! solubility
141!tmp = 9345.17d0/tk0 - 60.2409d0 + 23.3585d0 * LOG(tk0/100.0d0)
142!nK0we74 = tmp + s*(0.023517d0 - 0.00023656d0*tk0 + 0.0047036e-4_wp*tk0*tk0)
143!K0(i) = EXP(nK0we74)
144         a_b = 0.00001             ! bubble coefficient
145         a_nb = 0.000155           ! non-bubble coefficient
146         r = 83.14472             ! gas constant
147         u_star = SQRT(tau/1.22)  ! friction velocity = wind shear / air density
148         
149         tmp_k = (a_b / (k_0 * r * sst)) * u_star**(5.0/3.0) * (grav * swh)**(2.0/3.0) + &
150            &    a_nb * u_star
151         !write(numout,*) 'swh, wind, tau, sst, sss, ln_k_0, k_0, u_star, tmp_k = ', swh, wind, tau, sst, sss, ln_k_0, k_0, u_star, tmp_k
152         kw660 = tmp_k
153      endif
154
155!
156! Convert tmp_k from cm/h to m/s
157!      kw660 = tmp_k / (100. * 3600.)
158!
159      return
160
161    end subroutine gas_transfer
162
163!=======================================================================
164!=======================================================================
165!=======================================================================
166
167#else
168   !!======================================================================
169   !!  Dummy module :                                   No MEDUSA bio-model
170   !!======================================================================
171
172CONTAINS
173
174   SUBROUTINE gas_transfer(wind, N, eqn, swh, tau, sst, sss, kw660)
175      USE par_kind
176
177      REAL(wp), INTENT( in )    :: wind, swh, tau, sst, sss
178      REAL(wp), INTENT( in )    :: kw660
179      INTEGER, INTENT(in) :: N, eqn
180
181      WRITE(*,*) 'gas_transfer: You should not have seen this print! error?', kt
182
183   END SUBROUTINE gas_transfer
184#endif
185
186   !!======================================================================
187END MODULE gastransfer
Note: See TracBrowser for help on using the repository browser.