Index: branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 5550)
+++ branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 8353)
@@ -29,8 +29,9 @@
 
    INTEGER , PUBLIC, PARAMETER ::   jphem  =   2   ! parameter for the 2 hemispheres
-   INTEGER , PUBLIC            ::   jpyear         ! Number of years read in CFC1112 file
+   INTEGER , PUBLIC            ::   jpyear         ! Number of years read in input data file (in trcini_cfc)
    INTEGER , PUBLIC            ::   ndate_beg      ! initial calendar date (aammjj) for CFC
    INTEGER , PUBLIC            ::   nyear_res      ! restoring time constant (year)
    INTEGER , PUBLIC            ::   nyear_beg      ! initial year (aa) 
+   CHARACTER(len=200), PUBLIC  ::   clnamecfc      ! Input filename of CFCs atm. concentrations
    
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   p_cfc    ! partial hemispheric pressure for CFC
@@ -38,10 +39,10 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qtr_cfc  ! flux at surface
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qint_cfc ! cumulative flux 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   atm_cfc  ! partial hemispheric pressure for used CFC
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   patm     ! atmospheric function
 
-   REAL(wp), DIMENSION(4,2) ::   soa   ! coefficient for solubility of CFC [mol/l/atm]
-   REAL(wp), DIMENSION(3,2) ::   sob   !    "               "
-   REAL(wp), DIMENSION(4,2) ::   sca   ! coefficients for schmidt number in degre Celcius
-      
+   REAL(wp),         ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   soa      ! coefficient for solubility of CFC [mol/l/atm]
+   REAL(wp),         ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sob      !    "               "
+   REAL(wp),         ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sca      ! coefficients for schmidt number in degrees Celsius
    !                          ! coefficients for conversion
    REAL(wp) ::   xconv1 = 1.0          ! conversion from to 
@@ -82,5 +83,5 @@
       INTEGER  ::   im1, im2, ierr
       REAL(wp) ::   ztap, zdtap        
-      REAL(wp) ::   zt1, zt2, zt3, zv2
+      REAL(wp) ::   zt1, zt2, zt3, zt4, zv2
       REAL(wp) ::   zsol      ! solubility
       REAL(wp) ::   zsch      ! schmidt number 
@@ -120,6 +121,6 @@
          ! time interpolation at time kt
          DO jm = 1, jphem
-            zpatm(jm,jl) = (  p_cfc(iyear_beg, jm, jl) * FLOAT (im1)  &
-               &           +  p_cfc(iyear_end, jm, jl) * FLOAT (im2) ) / 12.
+            zpatm(jm,jl) = (  atm_cfc(iyear_beg, jm, jl) * REAL(im1, wp)  &
+               &           +  atm_cfc(iyear_end, jm, jl) * REAL(im2, wp) ) / 12.
          END DO
          
@@ -148,14 +149,15 @@
   
                ! Computation of speed transfert
-               !    Schmidt number
+               !    Schmidt number revised in Wanninkhof (2014)
                zt1  = tsn(ji,jj,1,jp_tem)
                zt2  = zt1 * zt1 
                zt3  = zt1 * zt2
-               zsch = sca(1,jl) + sca(2,jl) * zt1 + sca(3,jl) * zt2 + sca(4,jl) * zt3
-
-               !    speed transfert : formulae of wanninkhof 1992
+               zt4  = zt2 * zt2
+               zsch = sca(1,jl) + sca(2,jl) * zt1 + sca(3,jl) * zt2 + sca(4,jl) * zt3 + sca(5,jl) * zt4
+
+               !    speed transfert : formulae revised in Wanninkhof (2014)
                zv2     = wndm(ji,jj) * wndm(ji,jj)
                zsch    = zsch / 660.
-               zak_cfc = ( 0.39 * xconv2 * zv2 / SQRT(zsch) ) * tmask(ji,jj,1)
+               zak_cfc = ( 0.31 * xconv2 * zv2 / SQRT(zsch) ) * tmask(ji,jj,1)
 
                ! Input function  : speed *( conc. at equil - concen at surface )
@@ -188,10 +190,16 @@
       !
       IF( lk_iomput ) THEN
-         CALL iom_put( "qtrCFC11"  , qtr_cfc (:,:,1) )
-         CALL iom_put( "qintCFC11" , qint_cfc(:,:,1) )
+         DO jn = jp_cfc0, jp_cfc1
+            CALL iom_put( 'qtr_'//TRIM(ctrcnm(jn)) , qtr_cfc (:,:,jn) )
+            CALL iom_put( 'qint_'//TRIM(ctrcnm(jn)), qint_cfc(:,:,jn) )
+         ENDDO
       ELSE
          IF( ln_diatrc ) THEN
-            trc2d(:,:,jp_cfc0_2d    ) = qtr_cfc (:,:,1)
-            trc2d(:,:,jp_cfc0_2d + 1) = qint_cfc(:,:,1)
+            jl = 0
+            DO jn = jp_cfc0_2d, jp_cfc1_2d, 2
+               jl = jl + 1
+               trc2d(:,:,jn    ) = qtr_cfc (:,:,jl)
+               trc2d(:,:,jn + 1) = qint_cfc(:,:,jl)
+            ENDDO
          END IF
       END IF
@@ -215,42 +223,81 @@
       !!---------------------------------------------------------------------
       INTEGER :: jn
-
+      !!----------------------------------------------------------------------
+      !
+      jn = 0 
       ! coefficient for CFC11 
       !----------------------
-
-      ! Solubility
-      soa(1,1) = -229.9261 
-      soa(2,1) =  319.6552
-      soa(3,1) =  119.4471
-      soa(4,1) =  -1.39165
-
-      sob(1,1) =  -0.142382
-      sob(2,1) =   0.091459
-      sob(3,1) =  -0.0157274
-
-      ! Schmidt number 
-      sca(1,1) = 3501.8
-      sca(2,1) = -210.31
-      sca(3,1) =  6.1851
-      sca(4,1) = -0.07513
+      if ( lp_cfc11 ) then
+         jn = jn + 1
+         ! Solubility
+         soa(1,jn) = -229.9261 
+         soa(2,jn) =  319.6552
+         soa(3,jn) =  119.4471
+         soa(4,jn) =  -1.39165
+
+         sob(1,jn) =  -0.142382
+         sob(2,jn) =   0.091459
+         sob(3,jn) =  -0.0157274
+
+         ! Schmidt number 
+         sca(1,jn) = 3579.2
+         sca(2,jn) = -222.63
+         sca(3,jn) = 7.5749
+         sca(4,jn) = -0.14595
+         sca(5,jn) = 0.0011874
+
+         ! atm. concentration
+         atm_cfc(:,:,jn) = p_cfc(:,:,1)
+      endif
 
       ! coefficient for CFC12 
       !----------------------
-
-      ! Solubility
-      soa(1,2) = -218.0971
-      soa(2,2) =  298.9702
-      soa(3,2) =  113.8049
-      soa(4,2) =  -1.39165
-
-      sob(1,2) =  -0.143566
-      sob(2,2) =   0.091015
-      sob(3,2) =  -0.0153924
-
-      ! schmidt number 
-      sca(1,2) =  3845.4 
-      sca(2,2) =  -228.95
-      sca(3,2) =  6.1908 
-      sca(4,2) =  -0.067430
+      if ( lp_cfc12 ) then
+         jn = jn + 1
+         ! Solubility
+         soa(1,jn) = -218.0971
+         soa(2,jn) =  298.9702
+         soa(3,jn) =  113.8049
+         soa(4,jn) =  -1.39165
+
+         sob(1,jn) =  -0.143566
+         sob(2,jn) =   0.091015
+         sob(3,jn) =  -0.0153924
+
+         ! schmidt number 
+         sca(1,jn) = 3828.1
+         sca(2,jn) = -249.86
+         sca(3,jn) = 8.7603
+         sca(4,jn) = -0.1716
+         sca(5,jn) = 0.001408
+
+         ! atm. concentration
+         atm_cfc(:,:,jn) = p_cfc(:,:,2)
+      endif
+
+      ! coefficient for SF6
+      !----------------------
+      if ( lp_sf6 ) then
+         jn = jn + 1
+         ! Solubility
+         soa(1,jn) = -80.0343
+         soa(2,jn) = 117.232
+         soa(3,jn) =  29.5817
+         soa(4,jn) =   0.0
+
+         sob(1,jn) =  0.0335183 
+         sob(2,jn) = -0.0373942 
+         sob(3,jn) =  0.00774862
+
+         ! schmidt number
+         sca(1,jn) = 3177.5
+         sca(2,jn) = -200.57
+         sca(3,jn) = 6.8865
+         sca(4,jn) = -0.13335
+         sca(5,jn) = 0.0010877
+  
+         ! atm. concentration
+         atm_cfc(:,:,jn) = p_cfc(:,:,3)
+       endif
 
       IF( ln_rsttr ) THEN
@@ -272,7 +319,8 @@
       !!                     ***  ROUTINE trc_sms_cfc_alloc  ***
       !!----------------------------------------------------------------------
-      ALLOCATE( xphem   (jpi,jpj)        ,     &
-         &      qtr_cfc (jpi,jpj,jp_cfc) ,     &
-         &      qint_cfc(jpi,jpj,jp_cfc) , STAT=trc_sms_cfc_alloc )
+      ALLOCATE( xphem   (jpi,jpj)        , atm_cfc(jpyear,jphem,jp_cfc)  ,    &
+         &      qtr_cfc (jpi,jpj,jp_cfc) , qint_cfc(jpi,jpj,jp_cfc)      ,    &
+         &      soa(4,jp_cfc)    ,  sob(3,jp_cfc)   ,  sca(5,jp_cfc)     ,    &
+         &      STAT=trc_sms_cfc_alloc )
          !
       IF( trc_sms_cfc_alloc /= 0 ) CALL ctl_warn('trc_sms_cfc_alloc : failed to allocate arrays.')
