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.
trcsms_cfc.F90 in trunk/NEMO/TOP_SRC/CFC – NEMO

source: trunk/NEMO/TOP_SRC/CFC/trcsms_cfc.F90 @ 1004

Last change on this file since 1004 was 1004, checked in by cetlod, 16 years ago

Update CFC modules to take into account the re-organization of TOP initialization phase, see ticket 168

File size: 10.2 KB
Line 
1MODULE trcsms_cfc
2   !!======================================================================
3   !!                      ***  MODULE trcsms_cfc  ***
4   !! TOP : CFC main model
5   !!======================================================================
6   !! History :    -   !  1999-10  (JC. Dutay)  original code
7   !!             1.0  !  2004-03 (C. Ethe) free form + modularity
8   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  reorganisation
9   !!----------------------------------------------------------------------
10#if defined key_cfc
11   !!----------------------------------------------------------------------
12   !!   'key_cfc'                                               CFC tracers
13   !!----------------------------------------------------------------------
14   !!   trc_sms_cfc     :  compute and add CFC suface forcing to CFC trends
15   !!   trc_cfc_cst :  sets constants for CFC surface forcing computation
16   !!----------------------------------------------------------------------
17   USE daymod       ! calendar
18   USE oce_trc      ! Ocean variables
19   USE par_trc      ! TOP parameters
20   USE trc          ! TOP variables
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   trc_sms_cfc       ! called in ???   
26
27   INTEGER , PUBLIC, PARAMETER ::   jpyear = 100   ! temporal parameter
28   INTEGER , PUBLIC, PARAMETER ::   jphem  =   2   ! parameter for the 2 hemispheres
29   INTEGER , PUBLIC    ::   ndate_beg      ! initial calendar date (aammjj) for CFC
30   INTEGER , PUBLIC    ::   nyear_res      ! restoring time constant (year)
31   INTEGER , PUBLIC    ::   nyear_beg      ! initial year (aa)
32   
33   REAL(wp), PUBLIC, DIMENSION(jpyear,jphem, jp_cfc0:jp_cfc1) ::   p_cfc   ! partial hemispheric pressure for CFC         
34   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)                       ::   xphem    ! spatial interpolation factor for patm
35   REAL(wp), PUBLIC, DIMENSION(jpi,jpj      ,jp_cfc0:jp_cfc1) ::   qtr      ! input function
36   REAL(wp), PUBLIC, DIMENSION(jpi,jpj      ,jp_cfc0:jp_cfc1) ::   qint     ! flux function
37
38   REAL(wp), DIMENSION(jp_cfc0:jp_cfc1) ::   soa1, soa2, soa3, soa4   ! coefficient for solubility of CFC [mol/l/atm]
39   REAL(wp), DIMENSION(jp_cfc0:jp_cfc1) ::   sob1, sob2, sob3         !    "               "
40   REAL(wp), DIMENSION(jp_cfc0:jp_cfc1) ::   sca1, sca2, sca3, sca4   ! coefficients for schmidt number in degre Celcius
41     
42   !                          ! coefficients for conversion
43   REAL(wp) ::   xconv1 = 1.0          ! conversion from to
44   REAL(wp) ::   xconv2 = 0.01/3600.   ! conversion from cm/h to m/s:
45   REAL(wp) ::   xconv3 = 1.0e+3       ! conversion from mol/l/atm to mol/m3/atm
46   REAL(wp) ::   xconv4 = 1.0e-12      ! conversion from mol/m3/atm to mol/m3/pptv
47
48   !! * Substitutions
49#  include "top_substitute.h90"
50   !!----------------------------------------------------------------------
51   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)
52   !! $Id: trccfc.F90 776 2007-12-19 14:10:14Z gm $
53   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
54   !!----------------------------------------------------------------------
55
56CONTAINS
57
58   SUBROUTINE trc_sms_cfc( kt )
59      !!----------------------------------------------------------------------
60      !!                     ***  ROUTINE trc_sms_cfc  ***
61      !!
62      !! ** Purpose :   Compute the surface boundary contition on CFC 11
63      !!             passive tracer associated with air-mer fluxes and add it
64      !!             to the general trend of tracers equations.
65      !!
66      !! ** Method  : - get the atmospheric partial pressure - given in pico -
67      !!              - computation of solubility ( in 1.e-12 mol/l then in 1.e-9 mol/m3)
68      !!              - computation of transfert speed ( given in cm/hour ----> cm/s )
69      !!              - the input function is given by :
70      !!                speed * ( concentration at equilibrium - concentration at surface )
71      !!              - the input function is in pico-mol/m3/s and the
72      !!                CFC concentration in pico-mol/m3
73      !!----------------------------------------------------------------------
74      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
75      !!
76      INTEGER ::   ji, jj, jn, jm
77      INTEGER ::   iyear_beg, iyear_end
78      INTEGER ::   im1, im2
79
80      REAL(wp) ::   ztap, zdtap       
81      REAL(wp) ::   zt1, zt2, zt3, zv2
82      REAL(wp) ::   zsol      ! solubility
83      REAL(wp) ::   zsch      ! schmidt number
84      REAL(wp) ::   zpp_cfc   ! atmospheric partial pressure of CFC
85      REAL(wp) ::   zca_cfc   ! concentration at equilibrium
86      REAL(wp) ::   zak_cfc   ! transfert coefficients
87
88      REAL(wp), DIMENSION(jphem,jp_cfc)   ::   zpatm       ! atmospheric function
89      !!----------------------------------------------------------------------
90
91      IF( kt == nittrc000 )   CALL trc_cfc_cst
92
93      ! Temporal interpolation
94      ! ----------------------
95      iyear_beg = nyear + ( nyear_res - 1900 - nyear_beg  )
96      IF ( nmonth <= 6 ) THEN
97         iyear_beg = iyear_beg - 2 + nyear_beg
98         im1       =  6 - nmonth + 1
99         im2       =  6 + nmonth - 1
100      ELSE
101         iyear_beg = iyear_beg - 1 + nyear_beg
102         im1       = 12 - nmonth + 7
103         im2       =      nmonth - 7
104      ENDIF
105      iyear_end = iyear_beg + 1
106
107      !                                                         !------------!
108      DO jn = jp_cfc0, jp_cfc1                                  !  CFC loop  !
109         !                                                      !------------!
110         ! time interpolation at time kt
111         DO jm = 1, jphem
112            zpatm(jm,jn) = (  p_cfc(iyear_beg, jm, jn) * FLOAT (im1)  &
113               &           +  p_cfc(iyear_end, jm, jn) * FLOAT (im2) ) / 12.
114         END DO
115         
116         !                                                         !------------!
117         DO jj = 1, jpj                                            !  i-j loop  !
118            DO ji = 1, jpi                                         !------------!
119 
120               ! space interpolation
121               zpp_cfc  =       xphem(ji,jj)   * zpatm(1,jn)   &
122                  &     + ( 1.- xphem(ji,jj) ) * zpatm(2,jn)
123
124               ! Computation of concentration at equilibrium : in picomol/l
125               ! coefficient for solubility for CFC-11/12 in  mol/l/atm
126               IF( tmask(ji,jj,1) .GE. 0.5 ) THEN
127                  ztap  = ( tn(ji,jj,1) + 273.16 ) * 0.01
128                  zdtap = ( sob3(jn) * ztap + sob2(jn) ) * ztap + sob1(jn) 
129                  zsol  =  EXP( soa1(jn) + soa2(jn) / ztap + soa3(jn) * LOG( ztap )   &
130                     &                   + soa4(jn) * ztap * ztap + sn(ji,jj,1) * zdtap ) 
131               ELSE
132                  zsol  = 0.e0
133               ENDIF
134               ! conversion from mol/l/atm to mol/m3/atm and from mol/m3/atm to mol/m3/pptv   
135               zsol = xconv4 * xconv3 * zsol * tmask(ji,jj,1) 
136               ! concentration at equilibrium
137               zca_cfc = xconv1 * zpp_cfc * zsol * tmask(ji,jj,1)             
138 
139               ! Computation of speed transfert
140               !    Schmidt number
141               zt1  = tn(ji,jj,1)
142               zt2  = zt1 * zt1 
143               zt3  = zt1 * zt2
144               zsch = sca1(jn) + sca2(jn) * zt1 + sca3(jn) * zt2 + sca4(jn) * zt3
145
146               !    speed transfert : formulae of wanninkhof 1992
147               zv2     = wndm(ji,jj) * wndm(ji,jj)
148               zsch    = zsch / 660.
149               zak_cfc = ( 0.39 * xconv2 * zv2 / SQRT(zsch) ) * tmask(ji,jj,1)
150
151               ! Input function  : speed *( conc. at equil - concen at surface )
152               ! trn in pico-mol/l idem qtr; ak in en m/s
153               qtr(ji,jj,jn) = -zak_cfc * ( trb(ji,jj,1,jn) - zca_cfc )   &
154#if defined key_off_degrad
155                  &                     * facvol(ji,jj,1)                           &
156#endif
157                  &                     * tmask(ji,jj,1) * ( 1. - freeze(ji,jj) )
158
159               ! Add the surface flux to the trend
160               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + qtr(ji,jj,jn) / fse3t(ji,jj,1) 
161
162               ! cumulation of surface flux at each time step
163               qint(ji,jj,jn) = qint (ji,jj,jn) + qtr(ji,jj,jn) * rdt
164               !                                               !----------------!
165            END DO                                             !  end i-j loop  !
166         END DO                                                !----------------!
167         !                                                  !----------------!
168      END DO                                                !  end CFC loop  !
169      !                                                     !----------------!
170   END SUBROUTINE trc_sms_cfc
171
172   SUBROUTINE trc_cfc_cst
173      !!---------------------------------------------------------------------
174      !!                     ***  trc_cfc_cst  *** 
175      !!
176      !! ** Purpose : sets constants for CFC model
177      !!---------------------------------------------------------------------
178
179      ! coefficient for solubility of CFC11/CFC12 in mol/l/atm
180
181        soa1(jp11) = -229.9261 
182        soa2(jp11) =  319.6552
183        soa3(jp11) =  119.4471
184        soa4(jp11) =  -1.39165
185        sob1(jp11) =  -0.142382
186        sob2(jp11) =   0.091459
187        sob3(jp11) =  -0.0157274
188
189        soa1(jp12) = -218.0971
190        soa2(jp12) =  298.9702
191        soa3(jp12) =  113.8049
192        soa4(jp12) =  -1.39165
193        sob1(jp12) =  -0.143566
194        sob2(jp12) =   0.091015
195        sob3(jp12) =  -0.0153924
196
197         
198      ! coefficients for schmidt number in degre Celcius
199        sca1(jp11) = 3501.8
200        sca2(jp11) = -210.31
201        sca3(jp11) =  6.1851
202        sca4(jp11) = -0.07513
203
204        sca1(jp12) =  3845.4 
205        sca2(jp12) =  -228.95
206        sca3(jp12) =  6.1908 
207        sca4(jp12) =  -0.067430
208
209   END SUBROUTINE trc_cfc_cst
210   
211#else
212   !!----------------------------------------------------------------------
213   !!   Dummy module                                         No CFC tracers
214   !!----------------------------------------------------------------------
215CONTAINS
216   SUBROUTINE trc_sms_cfc( kt )       ! Empty routine
217      WRITE(*,*) 'trc_sms_cfc: You should not have seen this print! error?', kt
218   END SUBROUTINE trc_sms_cfc
219#endif
220
221   !!======================================================================
222END MODULE trcsms_cfc
Note: See TracBrowser for help on using the repository browser.