[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 | !!---------------------------------------------------------------------- |
---|
| 10 | #if defined key_cfc |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! 'key_cfc' CFC tracers |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[2715] | 14 | !! trc_sms_cfc : compute and add CFC suface forcing to CFC trends |
---|
[3680] | 15 | !! cfc_init : sets constants for CFC surface forcing computation |
---|
[933] | 16 | !!---------------------------------------------------------------------- |
---|
[2715] | 17 | USE oce_trc ! Ocean variables |
---|
| 18 | USE par_trc ! TOP parameters |
---|
| 19 | USE trc ! TOP variables |
---|
[4990] | 20 | USE trd_oce |
---|
| 21 | USE trdtrc |
---|
[2715] | 22 | USE iom ! I/O library |
---|
[933] | 23 | |
---|
| 24 | IMPLICIT NONE |
---|
| 25 | PRIVATE |
---|
| 26 | |
---|
[2715] | 27 | PUBLIC trc_sms_cfc ! called in ??? |
---|
| 28 | PUBLIC trc_sms_cfc_alloc ! called in trcini_cfc.F90 |
---|
[933] | 29 | |
---|
| 30 | INTEGER , PUBLIC, PARAMETER :: jphem = 2 ! parameter for the 2 hemispheres |
---|
[8353] | 31 | INTEGER , PUBLIC :: jpyear ! Number of years read in input data file (in trcini_cfc) |
---|
[3294] | 32 | INTEGER , PUBLIC :: ndate_beg ! initial calendar date (aammjj) for CFC |
---|
| 33 | INTEGER , PUBLIC :: nyear_res ! restoring time constant (year) |
---|
| 34 | INTEGER , PUBLIC :: nyear_beg ! initial year (aa) |
---|
[8353] | 35 | CHARACTER(len=200), PUBLIC :: clnamecfc ! Input filename of CFCs atm. concentrations |
---|
[933] | 36 | |
---|
[3294] | 37 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: p_cfc ! partial hemispheric pressure for CFC |
---|
[2715] | 38 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: xphem ! spatial interpolation factor for patm |
---|
| 39 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qtr_cfc ! flux at surface |
---|
| 40 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qint_cfc ! cumulative flux |
---|
[8353] | 41 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: atm_cfc ! partial hemispheric pressure for used CFC |
---|
[3294] | 42 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: patm ! atmospheric function |
---|
[933] | 43 | |
---|
[8353] | 44 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: soa ! coefficient for solubility of CFC [mol/l/atm] |
---|
| 45 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: sob ! " " |
---|
| 46 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: sca ! coefficients for schmidt number in degrees Celsius |
---|
[933] | 47 | ! ! coefficients for conversion |
---|
| 48 | REAL(wp) :: xconv1 = 1.0 ! conversion from to |
---|
| 49 | REAL(wp) :: xconv2 = 0.01/3600. ! conversion from cm/h to m/s: |
---|
| 50 | REAL(wp) :: xconv3 = 1.0e+3 ! conversion from mol/l/atm to mol/m3/atm |
---|
| 51 | REAL(wp) :: xconv4 = 1.0e-12 ! conversion from mol/m3/atm to mol/m3/pptv |
---|
| 52 | |
---|
| 53 | !! * Substitutions |
---|
| 54 | # include "top_substitute.h90" |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
[2528] | 56 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[1146] | 57 | !! $Id$ |
---|
[2715] | 58 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[933] | 59 | !!---------------------------------------------------------------------- |
---|
| 60 | CONTAINS |
---|
| 61 | |
---|
| 62 | SUBROUTINE trc_sms_cfc( kt ) |
---|
| 63 | !!---------------------------------------------------------------------- |
---|
| 64 | !! *** ROUTINE trc_sms_cfc *** |
---|
| 65 | !! |
---|
| 66 | !! ** Purpose : Compute the surface boundary contition on CFC 11 |
---|
| 67 | !! passive tracer associated with air-mer fluxes and add it |
---|
| 68 | !! to the general trend of tracers equations. |
---|
| 69 | !! |
---|
| 70 | !! ** Method : - get the atmospheric partial pressure - given in pico - |
---|
| 71 | !! - computation of solubility ( in 1.e-12 mol/l then in 1.e-9 mol/m3) |
---|
| 72 | !! - computation of transfert speed ( given in cm/hour ----> cm/s ) |
---|
| 73 | !! - the input function is given by : |
---|
| 74 | !! speed * ( concentration at equilibrium - concentration at surface ) |
---|
| 75 | !! - the input function is in pico-mol/m3/s and the |
---|
| 76 | !! CFC concentration in pico-mol/m3 |
---|
| 77 | !!---------------------------------------------------------------------- |
---|
[2715] | 78 | ! |
---|
| 79 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
| 80 | ! |
---|
| 81 | INTEGER :: ji, jj, jn, jl, jm, js |
---|
| 82 | INTEGER :: iyear_beg, iyear_end |
---|
[3294] | 83 | INTEGER :: im1, im2, ierr |
---|
[933] | 84 | REAL(wp) :: ztap, zdtap |
---|
[8353] | 85 | REAL(wp) :: zt1, zt2, zt3, zt4, zv2 |
---|
[933] | 86 | REAL(wp) :: zsol ! solubility |
---|
| 87 | REAL(wp) :: zsch ! schmidt number |
---|
| 88 | REAL(wp) :: zpp_cfc ! atmospheric partial pressure of CFC |
---|
| 89 | REAL(wp) :: zca_cfc ! concentration at equilibrium |
---|
| 90 | REAL(wp) :: zak_cfc ! transfert coefficients |
---|
[3294] | 91 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zpatm ! atmospheric function |
---|
[933] | 92 | !!---------------------------------------------------------------------- |
---|
[2715] | 93 | ! |
---|
[3294] | 94 | ! |
---|
| 95 | IF( nn_timing == 1 ) CALL timing_start('trc_sms_cfc') |
---|
| 96 | ! |
---|
| 97 | ALLOCATE( zpatm(jphem,jp_cfc), STAT=ierr ) |
---|
| 98 | IF( ierr > 0 ) THEN |
---|
| 99 | CALL ctl_stop( 'trc_sms_cfc: unable to allocate zpatm array' ) ; RETURN |
---|
[2715] | 100 | ENDIF |
---|
[933] | 101 | |
---|
[3680] | 102 | IF( kt == nittrc000 ) CALL cfc_init |
---|
[933] | 103 | |
---|
| 104 | ! Temporal interpolation |
---|
| 105 | ! ---------------------- |
---|
[2047] | 106 | iyear_beg = nyear - 1900 |
---|
[933] | 107 | IF ( nmonth <= 6 ) THEN |
---|
[2047] | 108 | iyear_beg = iyear_beg - 1 |
---|
[933] | 109 | im1 = 6 - nmonth + 1 |
---|
| 110 | im2 = 6 + nmonth - 1 |
---|
| 111 | ELSE |
---|
| 112 | im1 = 12 - nmonth + 7 |
---|
| 113 | im2 = nmonth - 7 |
---|
| 114 | ENDIF |
---|
| 115 | iyear_end = iyear_beg + 1 |
---|
| 116 | |
---|
[1255] | 117 | ! !------------! |
---|
| 118 | DO jl = 1, jp_cfc ! CFC loop ! |
---|
| 119 | ! !------------! |
---|
| 120 | jn = jp_cfc0 + jl - 1 |
---|
[933] | 121 | ! time interpolation at time kt |
---|
| 122 | DO jm = 1, jphem |
---|
[8353] | 123 | zpatm(jm,jl) = ( atm_cfc(iyear_beg, jm, jl) * REAL(im1, wp) & |
---|
| 124 | & + atm_cfc(iyear_end, jm, jl) * REAL(im2, wp) ) / 12. |
---|
[933] | 125 | END DO |
---|
| 126 | |
---|
| 127 | ! !------------! |
---|
| 128 | DO jj = 1, jpj ! i-j loop ! |
---|
| 129 | DO ji = 1, jpi !------------! |
---|
| 130 | |
---|
| 131 | ! space interpolation |
---|
[1255] | 132 | zpp_cfc = xphem(ji,jj) * zpatm(1,jl) & |
---|
| 133 | & + ( 1.- xphem(ji,jj) ) * zpatm(2,jl) |
---|
[933] | 134 | |
---|
| 135 | ! Computation of concentration at equilibrium : in picomol/l |
---|
| 136 | ! coefficient for solubility for CFC-11/12 in mol/l/atm |
---|
| 137 | IF( tmask(ji,jj,1) .GE. 0.5 ) THEN |
---|
[2528] | 138 | ztap = ( tsn(ji,jj,1,jp_tem) + 273.16 ) * 0.01 |
---|
[1255] | 139 | zdtap = sob(1,jl) + ztap * ( sob(2,jl) + ztap * sob(3,jl) ) |
---|
| 140 | zsol = EXP( soa(1,jl) + soa(2,jl) / ztap + soa(3,jl) * LOG( ztap ) & |
---|
[2528] | 141 | & + soa(4,jl) * ztap * ztap + tsn(ji,jj,1,jp_sal) * zdtap ) |
---|
[933] | 142 | ELSE |
---|
| 143 | zsol = 0.e0 |
---|
| 144 | ENDIF |
---|
| 145 | ! conversion from mol/l/atm to mol/m3/atm and from mol/m3/atm to mol/m3/pptv |
---|
| 146 | zsol = xconv4 * xconv3 * zsol * tmask(ji,jj,1) |
---|
| 147 | ! concentration at equilibrium |
---|
| 148 | zca_cfc = xconv1 * zpp_cfc * zsol * tmask(ji,jj,1) |
---|
| 149 | |
---|
| 150 | ! Computation of speed transfert |
---|
[8353] | 151 | ! Schmidt number revised in Wanninkhof (2014) |
---|
[2528] | 152 | zt1 = tsn(ji,jj,1,jp_tem) |
---|
[933] | 153 | zt2 = zt1 * zt1 |
---|
| 154 | zt3 = zt1 * zt2 |
---|
[8353] | 155 | zt4 = zt2 * zt2 |
---|
| 156 | zsch = sca(1,jl) + sca(2,jl) * zt1 + sca(3,jl) * zt2 + sca(4,jl) * zt3 + sca(5,jl) * zt4 |
---|
[933] | 157 | |
---|
[8353] | 158 | ! speed transfert : formulae revised in Wanninkhof (2014) |
---|
[1004] | 159 | zv2 = wndm(ji,jj) * wndm(ji,jj) |
---|
[933] | 160 | zsch = zsch / 660. |
---|
[8353] | 161 | zak_cfc = ( 0.31 * xconv2 * zv2 / SQRT(zsch) ) * tmask(ji,jj,1) |
---|
[933] | 162 | |
---|
| 163 | ! Input function : speed *( conc. at equil - concen at surface ) |
---|
[3294] | 164 | ! trn in pico-mol/l idem qtr; ak in en m/a |
---|
[1255] | 165 | qtr_cfc(ji,jj,jl) = -zak_cfc * ( trb(ji,jj,1,jn) - zca_cfc ) & |
---|
[2528] | 166 | #if defined key_degrad |
---|
[1255] | 167 | & * facvol(ji,jj,1) & |
---|
[933] | 168 | #endif |
---|
[1255] | 169 | & * tmask(ji,jj,1) * ( 1. - fr_i(ji,jj) ) |
---|
[933] | 170 | ! Add the surface flux to the trend |
---|
[1255] | 171 | tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + qtr_cfc(ji,jj,jl) / fse3t(ji,jj,1) |
---|
[933] | 172 | |
---|
| 173 | ! cumulation of surface flux at each time step |
---|
[1255] | 174 | qint_cfc(ji,jj,jl) = qint_cfc(ji,jj,jl) + qtr_cfc(ji,jj,jl) * rdt |
---|
[933] | 175 | ! !----------------! |
---|
| 176 | END DO ! end i-j loop ! |
---|
| 177 | END DO !----------------! |
---|
| 178 | ! !----------------! |
---|
| 179 | END DO ! end CFC loop ! |
---|
[3680] | 180 | ! |
---|
| 181 | IF( lrst_trc ) THEN |
---|
| 182 | IF(lwp) WRITE(numout,*) |
---|
| 183 | IF(lwp) WRITE(numout,*) 'trc_sms_cfc : cumulated input function fields written in ocean restart file ', & |
---|
| 184 | & 'at it= ', kt,' date= ', ndastp |
---|
| 185 | IF(lwp) WRITE(numout,*) '~~~~' |
---|
| 186 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 187 | CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) |
---|
| 188 | END DO |
---|
[4996] | 189 | ENDIF |
---|
| 190 | ! |
---|
| 191 | IF( lk_iomput ) THEN |
---|
[8353] | 192 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 193 | CALL iom_put( 'qtr_'//TRIM(ctrcnm(jn)) , qtr_cfc (:,:,jn) ) |
---|
| 194 | CALL iom_put( 'qint_'//TRIM(ctrcnm(jn)), qint_cfc(:,:,jn) ) |
---|
| 195 | ENDDO |
---|
[4996] | 196 | ELSE |
---|
| 197 | IF( ln_diatrc ) THEN |
---|
[8353] | 198 | jl = 0 |
---|
| 199 | DO jn = jp_cfc0_2d, jp_cfc1_2d, 2 |
---|
| 200 | jl = jl + 1 |
---|
| 201 | trc2d(:,:,jn ) = qtr_cfc (:,:,jl) |
---|
| 202 | trc2d(:,:,jn + 1) = qint_cfc(:,:,jl) |
---|
| 203 | ENDDO |
---|
[4996] | 204 | END IF |
---|
[3294] | 205 | END IF |
---|
[4996] | 206 | ! |
---|
[1255] | 207 | IF( l_trdtrc ) THEN |
---|
| 208 | DO jn = jp_cfc0, jp_cfc1 |
---|
[4990] | 209 | CALL trd_trc( tra(:,:,:,jn), jn, jptra_sms, kt ) ! save trends |
---|
[1255] | 210 | END DO |
---|
| 211 | END IF |
---|
[2715] | 212 | ! |
---|
[3294] | 213 | IF( nn_timing == 1 ) CALL timing_stop('trc_sms_cfc') |
---|
[2715] | 214 | ! |
---|
[933] | 215 | END SUBROUTINE trc_sms_cfc |
---|
| 216 | |
---|
[2715] | 217 | |
---|
[3680] | 218 | SUBROUTINE cfc_init |
---|
[933] | 219 | !!--------------------------------------------------------------------- |
---|
[3680] | 220 | !! *** cfc_init *** |
---|
[933] | 221 | !! |
---|
| 222 | !! ** Purpose : sets constants for CFC model |
---|
| 223 | !!--------------------------------------------------------------------- |
---|
[3680] | 224 | INTEGER :: jn |
---|
[8353] | 225 | !!---------------------------------------------------------------------- |
---|
| 226 | ! |
---|
| 227 | jn = 0 |
---|
[2715] | 228 | ! coefficient for CFC11 |
---|
| 229 | !---------------------- |
---|
[8353] | 230 | if ( lp_cfc11 ) then |
---|
| 231 | jn = jn + 1 |
---|
| 232 | ! Solubility |
---|
| 233 | soa(1,jn) = -229.9261 |
---|
| 234 | soa(2,jn) = 319.6552 |
---|
| 235 | soa(3,jn) = 119.4471 |
---|
| 236 | soa(4,jn) = -1.39165 |
---|
[933] | 237 | |
---|
[8353] | 238 | sob(1,jn) = -0.142382 |
---|
| 239 | sob(2,jn) = 0.091459 |
---|
| 240 | sob(3,jn) = -0.0157274 |
---|
[933] | 241 | |
---|
[8353] | 242 | ! Schmidt number |
---|
| 243 | sca(1,jn) = 3579.2 |
---|
| 244 | sca(2,jn) = -222.63 |
---|
| 245 | sca(3,jn) = 7.5749 |
---|
| 246 | sca(4,jn) = -0.14595 |
---|
| 247 | sca(5,jn) = 0.0011874 |
---|
[933] | 248 | |
---|
[8353] | 249 | ! atm. concentration |
---|
| 250 | atm_cfc(:,:,jn) = p_cfc(:,:,1) |
---|
| 251 | endif |
---|
[1004] | 252 | |
---|
[2715] | 253 | ! coefficient for CFC12 |
---|
| 254 | !---------------------- |
---|
[8353] | 255 | if ( lp_cfc12 ) then |
---|
| 256 | jn = jn + 1 |
---|
| 257 | ! Solubility |
---|
| 258 | soa(1,jn) = -218.0971 |
---|
| 259 | soa(2,jn) = 298.9702 |
---|
| 260 | soa(3,jn) = 113.8049 |
---|
| 261 | soa(4,jn) = -1.39165 |
---|
[1004] | 262 | |
---|
[8353] | 263 | sob(1,jn) = -0.143566 |
---|
| 264 | sob(2,jn) = 0.091015 |
---|
| 265 | sob(3,jn) = -0.0153924 |
---|
[1255] | 266 | |
---|
[8353] | 267 | ! schmidt number |
---|
| 268 | sca(1,jn) = 3828.1 |
---|
| 269 | sca(2,jn) = -249.86 |
---|
| 270 | sca(3,jn) = 8.7603 |
---|
| 271 | sca(4,jn) = -0.1716 |
---|
| 272 | sca(5,jn) = 0.001408 |
---|
[1255] | 273 | |
---|
[8353] | 274 | ! atm. concentration |
---|
| 275 | atm_cfc(:,:,jn) = p_cfc(:,:,2) |
---|
| 276 | endif |
---|
[1255] | 277 | |
---|
[8353] | 278 | ! coefficient for SF6 |
---|
| 279 | !---------------------- |
---|
| 280 | if ( lp_sf6 ) then |
---|
| 281 | jn = jn + 1 |
---|
| 282 | ! Solubility |
---|
| 283 | soa(1,jn) = -80.0343 |
---|
| 284 | soa(2,jn) = 117.232 |
---|
| 285 | soa(3,jn) = 29.5817 |
---|
| 286 | soa(4,jn) = 0.0 |
---|
| 287 | |
---|
| 288 | sob(1,jn) = 0.0335183 |
---|
| 289 | sob(2,jn) = -0.0373942 |
---|
| 290 | sob(3,jn) = 0.00774862 |
---|
| 291 | |
---|
| 292 | ! schmidt number |
---|
| 293 | sca(1,jn) = 3177.5 |
---|
| 294 | sca(2,jn) = -200.57 |
---|
| 295 | sca(3,jn) = 6.8865 |
---|
| 296 | sca(4,jn) = -0.13335 |
---|
| 297 | sca(5,jn) = 0.0010877 |
---|
| 298 | |
---|
| 299 | ! atm. concentration |
---|
| 300 | atm_cfc(:,:,jn) = p_cfc(:,:,3) |
---|
| 301 | endif |
---|
| 302 | |
---|
[3680] | 303 | IF( ln_rsttr ) THEN |
---|
| 304 | IF(lwp) WRITE(numout,*) |
---|
| 305 | IF(lwp) WRITE(numout,*) ' Read specific variables from CFC model ' |
---|
| 306 | IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' |
---|
| 307 | ! |
---|
| 308 | DO jn = jp_cfc0, jp_cfc1 |
---|
| 309 | CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) |
---|
| 310 | END DO |
---|
| 311 | ENDIF |
---|
| 312 | IF(lwp) WRITE(numout,*) |
---|
| 313 | ! |
---|
| 314 | END SUBROUTINE cfc_init |
---|
[1255] | 315 | |
---|
[2715] | 316 | |
---|
| 317 | INTEGER FUNCTION trc_sms_cfc_alloc() |
---|
| 318 | !!---------------------------------------------------------------------- |
---|
| 319 | !! *** ROUTINE trc_sms_cfc_alloc *** |
---|
| 320 | !!---------------------------------------------------------------------- |
---|
[8353] | 321 | ALLOCATE( xphem (jpi,jpj) , atm_cfc(jpyear,jphem,jp_cfc) , & |
---|
| 322 | & qtr_cfc (jpi,jpj,jp_cfc) , qint_cfc(jpi,jpj,jp_cfc) , & |
---|
| 323 | & soa(4,jp_cfc) , sob(3,jp_cfc) , sca(5,jp_cfc) , & |
---|
| 324 | & STAT=trc_sms_cfc_alloc ) |
---|
[2715] | 325 | ! |
---|
| 326 | IF( trc_sms_cfc_alloc /= 0 ) CALL ctl_warn('trc_sms_cfc_alloc : failed to allocate arrays.') |
---|
| 327 | ! |
---|
| 328 | END FUNCTION trc_sms_cfc_alloc |
---|
| 329 | |
---|
[933] | 330 | #else |
---|
| 331 | !!---------------------------------------------------------------------- |
---|
| 332 | !! Dummy module No CFC tracers |
---|
| 333 | !!---------------------------------------------------------------------- |
---|
| 334 | CONTAINS |
---|
| 335 | SUBROUTINE trc_sms_cfc( kt ) ! Empty routine |
---|
| 336 | WRITE(*,*) 'trc_sms_cfc: You should not have seen this print! error?', kt |
---|
| 337 | END SUBROUTINE trc_sms_cfc |
---|
| 338 | #endif |
---|
| 339 | |
---|
| 340 | !!====================================================================== |
---|
| 341 | END MODULE trcsms_cfc |
---|