[933] | 1 | MODULE trcsms_cfc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcsms_cfc *** |
---|
| 4 | !! TOP : CFC main model |
---|
| 5 | !!====================================================================== |
---|
[2715] | 6 | !! History : OPA ! 1999-10 (JC. Dutay) original code |
---|
| 7 | !! NEMO 1.0 ! 2004-03 (C. Ethe) free form + modularity |
---|
| 8 | !! 2.0 ! 2007-12 (C. Ethe, G. Madec) reorganisation |
---|
[933] | 9 | !!---------------------------------------------------------------------- |
---|
[2715] | 10 | !! trc_sms_cfc : compute and add CFC suface forcing to CFC trends |
---|
[3680] | 11 | !! cfc_init : sets constants for CFC surface forcing computation |
---|
[933] | 12 | !!---------------------------------------------------------------------- |
---|
[2715] | 13 | USE oce_trc ! Ocean variables |
---|
| 14 | USE par_trc ! TOP parameters |
---|
| 15 | USE trc ! TOP variables |
---|
[4990] | 16 | USE trd_oce |
---|
| 17 | USE trdtrc |
---|
[2715] | 18 | USE iom ! I/O library |
---|
[933] | 19 | |
---|
| 20 | IMPLICIT NONE |
---|
| 21 | PRIVATE |
---|
| 22 | |
---|
[2715] | 23 | PUBLIC trc_sms_cfc ! called in ??? |
---|
| 24 | PUBLIC trc_sms_cfc_alloc ! called in trcini_cfc.F90 |
---|
[933] | 25 | |
---|
| 26 | INTEGER , PUBLIC, PARAMETER :: jphem = 2 ! parameter for the 2 hemispheres |
---|
[3294] | 27 | INTEGER , PUBLIC :: jpyear ! Number of years read in CFC1112 file |
---|
| 28 | INTEGER , PUBLIC :: ndate_beg ! initial calendar date (aammjj) for CFC |
---|
| 29 | INTEGER , PUBLIC :: nyear_res ! restoring time constant (year) |
---|
| 30 | INTEGER , PUBLIC :: nyear_beg ! initial year (aa) |
---|
[933] | 31 | |
---|
[3294] | 32 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: p_cfc ! partial hemispheric pressure for CFC |
---|
[2715] | 33 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: xphem ! spatial interpolation factor for patm |
---|
| 34 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qtr_cfc ! flux at surface |
---|
| 35 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qint_cfc ! cumulative flux |
---|
[3294] | 36 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: patm ! atmospheric function |
---|
[933] | 37 | |
---|
[2423] | 38 | REAL(wp), DIMENSION(4,2) :: soa ! coefficient for solubility of CFC [mol/l/atm] |
---|
| 39 | REAL(wp), DIMENSION(3,2) :: sob ! " " |
---|
| 40 | REAL(wp), DIMENSION(4,2) :: sca ! coefficients for schmidt number in degre Celcius |
---|
[933] | 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 | !!---------------------------------------------------------------------- |
---|
[2528] | 49 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[1146] | 50 | !! $Id$ |
---|
[2715] | 51 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[933] | 52 | !!---------------------------------------------------------------------- |
---|
| 53 | CONTAINS |
---|
| 54 | |
---|
| 55 | SUBROUTINE trc_sms_cfc( kt ) |
---|
| 56 | !!---------------------------------------------------------------------- |
---|
| 57 | !! *** ROUTINE trc_sms_cfc *** |
---|
| 58 | !! |
---|
| 59 | !! ** Purpose : Compute the surface boundary contition on CFC 11 |
---|
| 60 | !! passive tracer associated with air-mer fluxes and add it |
---|
| 61 | !! to the general trend of tracers equations. |
---|
| 62 | !! |
---|
| 63 | !! ** Method : - get the atmospheric partial pressure - given in pico - |
---|
| 64 | !! - computation of solubility ( in 1.e-12 mol/l then in 1.e-9 mol/m3) |
---|
| 65 | !! - computation of transfert speed ( given in cm/hour ----> cm/s ) |
---|
| 66 | !! - the input function is given by : |
---|
| 67 | !! speed * ( concentration at equilibrium - concentration at surface ) |
---|
| 68 | !! - the input function is in pico-mol/m3/s and the |
---|
| 69 | !! CFC concentration in pico-mol/m3 |
---|
| 70 | !!---------------------------------------------------------------------- |
---|
[2715] | 71 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
| 72 | ! |
---|
| 73 | INTEGER :: ji, jj, jn, jl, jm, js |
---|
| 74 | INTEGER :: iyear_beg, iyear_end |
---|
[3294] | 75 | INTEGER :: im1, im2, ierr |
---|
[933] | 76 | REAL(wp) :: ztap, zdtap |
---|
| 77 | REAL(wp) :: zt1, zt2, zt3, zv2 |
---|
| 78 | REAL(wp) :: zsol ! solubility |
---|
| 79 | REAL(wp) :: zsch ! schmidt number |
---|
| 80 | REAL(wp) :: zpp_cfc ! atmospheric partial pressure of CFC |
---|
| 81 | REAL(wp) :: zca_cfc ! concentration at equilibrium |
---|
| 82 | REAL(wp) :: zak_cfc ! transfert coefficients |
---|
[3294] | 83 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zpatm ! atmospheric function |
---|
[933] | 84 | !!---------------------------------------------------------------------- |
---|
[2715] | 85 | ! |
---|
[3294] | 86 | ! |
---|
| 87 | IF( nn_timing == 1 ) CALL timing_start('trc_sms_cfc') |
---|
| 88 | ! |
---|
| 89 | ALLOCATE( zpatm(jphem,jp_cfc), STAT=ierr ) |
---|
| 90 | IF( ierr > 0 ) THEN |
---|
| 91 | CALL ctl_stop( 'trc_sms_cfc: unable to allocate zpatm array' ) ; RETURN |
---|
[2715] | 92 | ENDIF |
---|
[933] | 93 | |
---|
[3680] | 94 | IF( kt == nittrc000 ) CALL cfc_init |
---|
[933] | 95 | |
---|
| 96 | ! Temporal interpolation |
---|
| 97 | ! ---------------------- |
---|
[2047] | 98 | iyear_beg = nyear - 1900 |
---|
[933] | 99 | IF ( nmonth <= 6 ) THEN |
---|
[2047] | 100 | iyear_beg = iyear_beg - 1 |
---|
[933] | 101 | im1 = 6 - nmonth + 1 |
---|
| 102 | im2 = 6 + nmonth - 1 |
---|
| 103 | ELSE |
---|
| 104 | im1 = 12 - nmonth + 7 |
---|
| 105 | im2 = nmonth - 7 |
---|
| 106 | ENDIF |
---|
| 107 | iyear_end = iyear_beg + 1 |
---|
| 108 | |
---|
[1255] | 109 | ! !------------! |
---|
| 110 | DO jl = 1, jp_cfc ! CFC loop ! |
---|
| 111 | ! !------------! |
---|
| 112 | jn = jp_cfc0 + jl - 1 |
---|
[933] | 113 | ! time interpolation at time kt |
---|
| 114 | DO jm = 1, jphem |
---|
[1255] | 115 | zpatm(jm,jl) = ( p_cfc(iyear_beg, jm, jl) * FLOAT (im1) & |
---|
| 116 | & + p_cfc(iyear_end, jm, jl) * FLOAT (im2) ) / 12. |
---|
[933] | 117 | END DO |
---|
| 118 | |
---|
| 119 | ! !------------! |
---|
| 120 | DO jj = 1, jpj ! i-j loop ! |
---|
| 121 | DO ji = 1, jpi !------------! |
---|
| 122 | |
---|
| 123 | ! space interpolation |
---|
[1255] | 124 | zpp_cfc = xphem(ji,jj) * zpatm(1,jl) & |
---|
| 125 | & + ( 1.- xphem(ji,jj) ) * zpatm(2,jl) |
---|
[933] | 126 | |
---|
| 127 | ! Computation of concentration at equilibrium : in picomol/l |
---|
| 128 | ! coefficient for solubility for CFC-11/12 in mol/l/atm |
---|
| 129 | IF( tmask(ji,jj,1) .GE. 0.5 ) THEN |
---|
[2528] | 130 | ztap = ( tsn(ji,jj,1,jp_tem) + 273.16 ) * 0.01 |
---|
[1255] | 131 | zdtap = sob(1,jl) + ztap * ( sob(2,jl) + ztap * sob(3,jl) ) |
---|
| 132 | zsol = EXP( soa(1,jl) + soa(2,jl) / ztap + soa(3,jl) * LOG( ztap ) & |
---|
[2528] | 133 | & + soa(4,jl) * ztap * ztap + tsn(ji,jj,1,jp_sal) * zdtap ) |
---|
[933] | 134 | ELSE |
---|
| 135 | zsol = 0.e0 |
---|
| 136 | ENDIF |
---|
| 137 | ! conversion from mol/l/atm to mol/m3/atm and from mol/m3/atm to mol/m3/pptv |
---|
| 138 | zsol = xconv4 * xconv3 * zsol * tmask(ji,jj,1) |
---|
| 139 | ! concentration at equilibrium |
---|
| 140 | zca_cfc = xconv1 * zpp_cfc * zsol * tmask(ji,jj,1) |
---|
| 141 | |
---|
| 142 | ! Computation of speed transfert |
---|
| 143 | ! Schmidt number |
---|
[2528] | 144 | zt1 = tsn(ji,jj,1,jp_tem) |
---|
[933] | 145 | zt2 = zt1 * zt1 |
---|
| 146 | zt3 = zt1 * zt2 |
---|
[1255] | 147 | zsch = sca(1,jl) + sca(2,jl) * zt1 + sca(3,jl) * zt2 + sca(4,jl) * zt3 |
---|
[933] | 148 | |
---|
| 149 | ! speed transfert : formulae of wanninkhof 1992 |
---|
[1004] | 150 | zv2 = wndm(ji,jj) * wndm(ji,jj) |
---|
[933] | 151 | zsch = zsch / 660. |
---|
| 152 | zak_cfc = ( 0.39 * xconv2 * zv2 / SQRT(zsch) ) * tmask(ji,jj,1) |
---|
| 153 | |
---|
| 154 | ! Input function : speed *( conc. at equil - concen at surface ) |
---|
[3294] | 155 | ! trn in pico-mol/l idem qtr; ak in en m/a |
---|
[1255] | 156 | qtr_cfc(ji,jj,jl) = -zak_cfc * ( trb(ji,jj,1,jn) - zca_cfc ) & |
---|
| 157 | & * tmask(ji,jj,1) * ( 1. - fr_i(ji,jj) ) |
---|
[933] | 158 | ! Add the surface flux to the trend |
---|
[6140] | 159 | tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + qtr_cfc(ji,jj,jl) / e3t_n(ji,jj,1) |
---|
[933] | 160 | |
---|
| 161 | ! cumulation of surface flux at each time step |
---|
[1255] | 162 | qint_cfc(ji,jj,jl) = qint_cfc(ji,jj,jl) + qtr_cfc(ji,jj,jl) * rdt |
---|
[933] | 163 | ! !----------------! |
---|
| 164 | END DO ! end i-j loop ! |
---|
| 165 | END DO !----------------! |
---|
| 166 | ! !----------------! |
---|
| 167 | END DO ! end CFC loop ! |
---|
[3680] | 168 | ! |
---|
| 169 | IF( lrst_trc ) THEN |
---|
| 170 | IF(lwp) WRITE(numout,*) |
---|
| 171 | IF(lwp) WRITE(numout,*) 'trc_sms_cfc : cumulated input function fields written in ocean restart file ', & |
---|
| 172 | & 'at it= ', kt,' date= ', ndastp |
---|
| 173 | IF(lwp) WRITE(numout,*) '~~~~' |
---|
| 174 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 175 | CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) |
---|
| 176 | END DO |
---|
[4996] | 177 | ENDIF |
---|
| 178 | ! |
---|
| 179 | IF( lk_iomput ) THEN |
---|
[7041] | 180 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 181 | CALL iom_put( 'qtr_'//ctrcnm(jn) , qtr_cfc (:,:,jn) ) |
---|
| 182 | CALL iom_put( 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) |
---|
| 183 | ENDDO |
---|
[3294] | 184 | END IF |
---|
[4996] | 185 | ! |
---|
[1255] | 186 | IF( l_trdtrc ) THEN |
---|
| 187 | DO jn = jp_cfc0, jp_cfc1 |
---|
[4990] | 188 | CALL trd_trc( tra(:,:,:,jn), jn, jptra_sms, kt ) ! save trends |
---|
[1255] | 189 | END DO |
---|
| 190 | END IF |
---|
[2715] | 191 | ! |
---|
[3294] | 192 | IF( nn_timing == 1 ) CALL timing_stop('trc_sms_cfc') |
---|
[2715] | 193 | ! |
---|
[933] | 194 | END SUBROUTINE trc_sms_cfc |
---|
| 195 | |
---|
[2715] | 196 | |
---|
[3680] | 197 | SUBROUTINE cfc_init |
---|
[933] | 198 | !!--------------------------------------------------------------------- |
---|
[3680] | 199 | !! *** cfc_init *** |
---|
[933] | 200 | !! |
---|
| 201 | !! ** Purpose : sets constants for CFC model |
---|
| 202 | !!--------------------------------------------------------------------- |
---|
[3680] | 203 | INTEGER :: jn |
---|
[933] | 204 | |
---|
[2715] | 205 | ! coefficient for CFC11 |
---|
| 206 | !---------------------- |
---|
[933] | 207 | |
---|
[2715] | 208 | ! Solubility |
---|
| 209 | soa(1,1) = -229.9261 |
---|
| 210 | soa(2,1) = 319.6552 |
---|
| 211 | soa(3,1) = 119.4471 |
---|
| 212 | soa(4,1) = -1.39165 |
---|
[933] | 213 | |
---|
[2715] | 214 | sob(1,1) = -0.142382 |
---|
| 215 | sob(2,1) = 0.091459 |
---|
| 216 | sob(3,1) = -0.0157274 |
---|
[933] | 217 | |
---|
[2715] | 218 | ! Schmidt number |
---|
| 219 | sca(1,1) = 3501.8 |
---|
| 220 | sca(2,1) = -210.31 |
---|
| 221 | sca(3,1) = 6.1851 |
---|
| 222 | sca(4,1) = -0.07513 |
---|
[1004] | 223 | |
---|
[2715] | 224 | ! coefficient for CFC12 |
---|
| 225 | !---------------------- |
---|
[1004] | 226 | |
---|
[2715] | 227 | ! Solubility |
---|
| 228 | soa(1,2) = -218.0971 |
---|
| 229 | soa(2,2) = 298.9702 |
---|
| 230 | soa(3,2) = 113.8049 |
---|
| 231 | soa(4,2) = -1.39165 |
---|
[1255] | 232 | |
---|
[2715] | 233 | sob(1,2) = -0.143566 |
---|
| 234 | sob(2,2) = 0.091015 |
---|
| 235 | sob(3,2) = -0.0153924 |
---|
[1255] | 236 | |
---|
[2715] | 237 | ! schmidt number |
---|
| 238 | sca(1,2) = 3845.4 |
---|
| 239 | sca(2,2) = -228.95 |
---|
| 240 | sca(3,2) = 6.1908 |
---|
| 241 | sca(4,2) = -0.067430 |
---|
[1255] | 242 | |
---|
[3680] | 243 | IF( ln_rsttr ) THEN |
---|
| 244 | IF(lwp) WRITE(numout,*) |
---|
| 245 | IF(lwp) WRITE(numout,*) ' Read specific variables from CFC model ' |
---|
| 246 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' |
---|
| 247 | ! |
---|
| 248 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 249 | CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) |
---|
| 250 | END DO |
---|
| 251 | ENDIF |
---|
| 252 | IF(lwp) WRITE(numout,*) |
---|
| 253 | ! |
---|
| 254 | END SUBROUTINE cfc_init |
---|
[1255] | 255 | |
---|
[2715] | 256 | |
---|
| 257 | INTEGER FUNCTION trc_sms_cfc_alloc() |
---|
| 258 | !!---------------------------------------------------------------------- |
---|
| 259 | !! *** ROUTINE trc_sms_cfc_alloc *** |
---|
| 260 | !!---------------------------------------------------------------------- |
---|
| 261 | ALLOCATE( xphem (jpi,jpj) , & |
---|
| 262 | & qtr_cfc (jpi,jpj,jp_cfc) , & |
---|
| 263 | & qint_cfc(jpi,jpj,jp_cfc) , STAT=trc_sms_cfc_alloc ) |
---|
| 264 | ! |
---|
| 265 | IF( trc_sms_cfc_alloc /= 0 ) CALL ctl_warn('trc_sms_cfc_alloc : failed to allocate arrays.') |
---|
| 266 | ! |
---|
| 267 | END FUNCTION trc_sms_cfc_alloc |
---|
| 268 | |
---|
[933] | 269 | !!====================================================================== |
---|
| 270 | END MODULE trcsms_cfc |
---|