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.
Changeset 6403 for trunk/NEMOGCM/NEMO/OPA_SRC/TRA – NEMO

Ignore:
Timestamp:
2016-03-25T17:24:35+01:00 (8 years ago)
Author:
cetlod
Message:

trunk:new developments already included in 3.6 stable, see points 1, 2 and 4 of ticket #1678

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r6140 r6403  
    1111   !!            3.2  !  2009-04  (G. Madec & NEMO team)  
    1212   !!            3.6  !  2012-05  (C. Rousset) store attenuation coef for use in ice model  
     13   !!            3.6  !  2015-12  (O. Aumont, J. Jouanno, C. Ethe) use vertical profile of chlorophyll 
    1314   !!            3.7  !  2015-11  (G. Madec, A. Coward)  remove optimisation for fix volume  
    1415   !!---------------------------------------------------------------------- 
     
    100101      !! Reference  : Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp. 
    101102      !!              Lengaigne et al. 2007, Clim. Dyn., V28, 5, 503-516. 
     103      !!              Morel, A. et Berthon, JF, 1989, Limnol Oceanogr 34(8), 1545-1562 
    102104      !!---------------------------------------------------------------------- 
    103105      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     
    109111      REAL(wp) ::   zzc0, zzc1, zzc2, zzc3   !    -         - 
    110112      REAL(wp) ::   zz0 , zz1                !    -         - 
     113      REAL(wp) ::   zCb, zCmax, zze, zpsi, zpsimax, zdelpsi, zCtot, zCze 
     114      REAL(wp) ::   zlogc, zlogc2, zlogc3  
    111115      REAL(wp), POINTER, DIMENSION(:,:)   :: zekb, zekg, zekr 
    112116      REAL(wp), POINTER, DIMENSION(:,:,:) :: ze0, ze1, ze2, ze3, zea, ztrdt 
    113       REAL(wp), POINTER, DIMENSION(:,:,:) :: zetot 
     117      REAL(wp), POINTER, DIMENSION(:,:,:) :: zetot, zchl3d 
    114118      !!---------------------------------------------------------------------- 
    115119      ! 
     
    158162         ! 
    159163         CALL wrk_alloc( jpi,jpj,       zekb, zekg, zekr        )  
    160          CALL wrk_alloc( jpi,jpj,jpk,   ze0, ze1, ze2, ze3, zea )  
     164         CALL wrk_alloc( jpi,jpj,jpk,   ze0, ze1, ze2, ze3, zea, zchl3d )  
    161165         ! 
    162166         IF( nqsr == np_RGBc ) THEN          !*  Variable Chlorophyll 
    163167            CALL fld_read( kt, 1, sf_chl )         ! Read Chl data and provides it at the current time step 
    164             DO jj = 2, jpjm1                       ! Separation in R-G-B depending of the surface Chl 
    165                DO ji = fs_2, fs_jpim1 
    166                   zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
    167                   irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
    168                   zekb(ji,jj) = rkrgb(1,irgb) 
    169                   zekg(ji,jj) = rkrgb(2,irgb) 
    170                   zekr(ji,jj) = rkrgb(3,irgb) 
     168            DO jk = 1, nksr + 1 
     169               DO jj = 2, jpjm1                       ! Separation in R-G-B depending of the surface Chl 
     170                  DO ji = fs_2, fs_jpim1 
     171                     zchl    = sf_chl(1)%fnow(ji,jj,1) 
     172                     zCtot   = 40.6  * zchl**0.459 
     173                     zze     = 568.2 * zCtot**(-0.746) 
     174                     IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293) 
     175                     zpsi    = gdepw_n(ji,jj,jk) / zze 
     176                     ! 
     177                     zlogc   = LOG( zchl ) 
     178                     zlogc2  = zlogc * zlogc 
     179                     zlogc3  = zlogc * zlogc * zlogc 
     180                     zCb     = 0.768 + 0.087 * zlogc - 0.179 * zlogc2 - 0.025 * zlogc3 
     181                     zCmax   = 0.299 - 0.289 * zlogc + 0.579 * zlogc2 
     182                     zpsimax = 0.6   - 0.640 * zlogc + 0.021 * zlogc2 + 0.115 * zlogc3 
     183                     zdelpsi = 0.710 + 0.159 * zlogc + 0.021 * zlogc2 
     184                     zCze    = 1.12  * (zchl)**0.803  
     185                     ! 
     186                     zchl3d(ji,jj,jk) = zCze * ( zCb + zCmax * EXP( -( (zpsi - zpsimax) / zdelpsi )**2 ) ) 
     187                  END DO 
     188                  ! 
    171189               END DO 
    172190            END DO 
    173191         ELSE                                !* constant chrlorophyll 
    174             zchl = 0.05                            ! constant chlorophyll 
    175             !                                      ! Separation in R-G-B depending of the chlorophyll 
    176             irgb = NINT( 41 + 20.*LOG10( zchl ) + 1.e-15 ) 
    177             DO jj = 2, jpjm1 
    178                DO ji = fs_2, fs_jpim1 
    179                   zekb(ji,jj) = rkrgb(1,irgb)                       
    180                   zekg(ji,jj) = rkrgb(2,irgb) 
    181                   zekr(ji,jj) = rkrgb(3,irgb) 
    182                END DO 
    183             END DO 
     192           DO jk = 1, nksr + 1 
     193              zchl3d(:,:,jk) = 0.05  
     194            ENDDO 
    184195         ENDIF 
    185196         ! 
     
    195206         END DO 
    196207         ! 
    197          DO jk = 2, nksr+1                   !* interior equi-partition in R-G-B 
     208         DO jk = 2, nksr+1                   !* interior equi-partition in R-G-B depending of vertical profile of Chl 
     209            DO jj = 2, jpjm1 
     210               DO ji = fs_2, fs_jpim1 
     211                  zchl = MIN( 10. , MAX( 0.03, zchl3d(ji,jj,jk) ) ) 
     212                  irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
     213                  zekb(ji,jj) = rkrgb(1,irgb) 
     214                  zekg(ji,jj) = rkrgb(2,irgb) 
     215                  zekr(ji,jj) = rkrgb(3,irgb) 
     216               END DO 
     217            END DO 
     218 
    198219            DO jj = 2, jpjm1 
    199220               DO ji = fs_2, fs_jpim1 
     
    220241         ! 
    221242         CALL wrk_dealloc( jpi,jpj,        zekb, zekg, zekr        )  
    222          CALL wrk_dealloc( jpi,jpj,jpk,   ze0, ze1, ze2, ze3, zea )  
     243         CALL wrk_dealloc( jpi,jpj,jpk,   ze0, ze1, ze2, ze3, zea, zchl3d )  
    223244         ! 
    224245      CASE( np_2BD  )            !==  2-bands fluxes  ==! 
Note: See TracChangeset for help on using the changeset viewer.