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 2317 – NEMO

Changeset 2317


Ignore:
Timestamp:
2010-10-26T18:01:34+02:00 (14 years ago)
Author:
cetlod
Message:

Improve the computation of the divergence of the downward solar irradiance in traqsr.F90, see ticket #726

  • change fsdepw & fse3t into fsdepw_0 & fse3t_0 in tra_qsr_init
  • modify tra_qsr to recompute systematically etot3 in vvl case
  • suppress the namelist parameter rn_si2 which is computed as the RGB longest depth of extinction in trc_oce.F90
Location:
branches/nemo_v3_3_beta/NEMOGCM
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/GYRE/EXP00/namelist

    r2294 r2317  
    198198   cn_dir      = './'      !  root directory for the location of the runoff files 
    199199   ln_traqsr   = .true.    !  Light penetration (T) or not (F) 
    200    ln_qsr_rgb  = .true.    !  RGB (Red-Green-Blue) light penetration 
    201    ln_qsr_2bd  = .false.   !  2 bands              light penetration 
     200   ln_qsr_rgb  = .false.   !  RGB (Red-Green-Blue) light penetration 
     201   ln_qsr_2bd  = .true.    !  2 bands              light penetration 
    202202   ln_qsr_bio  = .false.   !  bio-model light penetration 
    203203   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0) 
     
    205205   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    206206   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    207    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    208207/ 
    209208!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/GYRE_LOBSTER/EXP00/namelist

    r2295 r2317  
    198198   cn_dir      = './'      !  root directory for the location of the runoff files 
    199199   ln_traqsr   = .true.    !  Light penetration (T) or not (F) 
    200    ln_qsr_rgb  = .true.    !  RGB (Red-Green-Blue) light penetration 
    201    ln_qsr_2bd  = .false.   !  2 bands              light penetration 
     200   ln_qsr_rgb  = .false.   !  RGB (Red-Green-Blue) light penetration 
     201   ln_qsr_2bd  = .true.    !  2 bands              light penetration 
    202202   ln_qsr_bio  = .false.   !  bio-model light penetration 
    203203   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0) 
     
    205205   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    206206   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    207    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    208207/ 
    209208!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist

    r2296 r2317  
    205205   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    206206   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    207    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    208207/ 
    209208!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r2296 r2317  
    232232   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    233233   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    234    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    235234/ 
    236235!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist

    r2297 r2317  
    232232   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    233233   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    234    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    235234/ 
    236235!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist

    r2297 r2317  
    232232   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    233233   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    234    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    235234/ 
    236235!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/POMME/EXP00/namelist

    r2297 r2317  
    232232   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction 
    233233   rn_si1      =   23.0    !  2 bands: longest depth of extinction 
    234    rn_si2      =   62.0    !  3 bands: longest depth of extinction (for blue waveband & 0.01 mg/m2 Chl) 
    235234/ 
    236235!----------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r2287 r2317  
    4444   REAL(wp), PUBLIC ::   rn_si0     = 0.35_wp   !: very near surface depth of extinction      (RGB & 2 bands) 
    4545   REAL(wp), PUBLIC ::   rn_si1     = 23.0_wp   !: deepest depth of extinction (water type I)       (2 bands) 
    46    REAL(wp), PUBLIC ::   rn_si2     = 61.8_wp   !: deepest depth of extinction (blue & 0.01 mg.m-3)     (RGB) 
    4746    
    4847   ! Module variables 
     48   REAL(wp) ::   xsi0r                           !: inverse of rn_si0 
     49   REAL(wp) ::   xsi1r                           !: inverse of rn_si1 
    4950!$AGRIF_DO_NOT_TREAT 
    5051   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_chl   ! structure of input Chl (file informations, fields read) 
     
    9697      INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    9798      INTEGER  ::   irgb                 ! temporary integers 
    98       REAL(wp) ::   zchl, zcoef, zsi0r   ! temporary scalars 
     99      REAL(wp) ::   zchl, zcoef          ! temporary scalars 
    99100      REAL(wp) ::   zc0, zc1, zc2, zc3   !    -         - 
     101      REAL(wp) ::   zz0, zz1             !    -         - 
    100102      REAL(wp) ::   z1_e3t, zfact        !    -         - 
    101103      REAL(wp), DIMENSION(jpi,jpj)     ::   zekb, zekg, zekr            ! 2D workspace 
     
    156158            !                                             ! ------------------------- ! 
    157159            ! Set chlorophyl concentration 
    158             IF( nn_chldta ==1 ) THEN                             !*  Variable Chlorophyll 
    159                ! 
    160                CALL fld_read( kt, 1, sf_chl )                         ! Read Chl data and provides it at the current time step 
    161                !          
     160            IF( nn_chldta == 1 .OR. lk_vvl ) THEN            !*  Variable Chlorophyll or ocean volume 
     161               ! 
     162               IF( nn_chldta == 1 ) THEN                             !*  Variable Chlorophyll 
     163                  ! 
     164                  CALL fld_read( kt, 1, sf_chl )                         ! Read Chl data and provides it at the current time step 
     165                  !          
    162166!CDIR COLLAPSE 
    163167!CDIR NOVERRCHK 
    164                DO jj = 1, jpj                                         ! Separation in R-G-B depending of the surface Chl 
     168                  DO jj = 1, jpj                                         ! Separation in R-G-B depending of the surface Chl 
    165169!CDIR NOVERRCHK 
    166                   DO ji = 1, jpi 
    167                      zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
    168                      irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
    169                      zekb(ji,jj) = rkrgb(1,irgb) 
    170                      zekg(ji,jj) = rkrgb(2,irgb) 
    171                      zekr(ji,jj) = rkrgb(3,irgb) 
    172                   END DO 
    173                END DO 
    174                ! 
    175                zsi0r = 1.e0 / rn_si0 
     170                     DO ji = 1, jpi 
     171                        zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 
     172                        irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
     173                        zekb(ji,jj) = rkrgb(1,irgb) 
     174                        zekg(ji,jj) = rkrgb(2,irgb) 
     175                        zekr(ji,jj) = rkrgb(3,irgb) 
     176                     END DO 
     177                  END DO 
     178               ELSE                                            ! Variable ocean volume but constant chrlorophyll 
     179                  zchl = 0.05                                     ! constant chlorophyll 
     180                  irgb = NINT( 41 + 20.*LOG10( zchl ) + 1.e-15 ) 
     181                  zekb(:,:) = rkrgb(1,irgb)                       ! Separation in R-G-B depending of the chlorophyll  
     182                  zekg(:,:) = rkrgb(2,irgb) 
     183                  zekr(:,:) = rkrgb(3,irgb) 
     184               ENDIF 
     185               ! 
    176186               zcoef  = ( 1. - rn_abs ) / 3.e0                        ! equi-partition in R-G-B 
    177187               ze0(:,:,1) = rn_abs  * qsr(:,:) 
     
    186196!CDIR NOVERRCHK    
    187197                     DO ji = 1, jpi 
    188                         zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zsi0r     ) 
     198                        zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * xsi0r     ) 
    189199                        zc1 = ze1(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekb(ji,jj) ) 
    190200                        zc2 = ze2(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekg(ji,jj) ) 
     
    216226            !                                             ! ------------------------- ! 
    217227            ! 
    218             DO jk = 1, nksr 
    219                DO jj = 2, jpjm1 
    220                   DO ji = fs_2, fs_jpim1   ! vector opt. 
    221                      qsr_hc(ji,jj,jk) =  etot3(ji,jj,jk) * qsr(ji,jj) 
    222                   END DO 
    223                END DO 
    224             END DO 
     228            IF( lk_vvl ) THEN                                  !* variable volume 
     229               zz0   =        rn_abs   * ro0cpr 
     230               zz1   = ( 1. - rn_abs ) * ro0cpr 
     231               DO jk = 1, nksr                    ! solar heat absorbed at T-point in the top 400m  
     232                  DO jj = 2, jpjm1 
     233                     DO ji = 2, jpim1 
     234                        zc0 = zz0 * EXP( -fsdepw(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk  )*xsi1r ) 
     235                        zc1 = zz0 * EXP( -fsdepw(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk+1)*xsi1r ) 
     236                        qsr_hc(ji,jj,jk) = qsr(ji,jj) * ( zc0*tmask(ji,jj,jk) - zc1*tmask(ji,jj,jk+1) ) / fse3t(ji,jj,jk) 
     237                     END DO 
     238                  END DO 
     239               END DO 
     240            ELSE                                               !* constant volume: coef. computed one for all 
     241               DO jk = 1, nksr 
     242                  DO jj = 2, jpjm1 
     243                     DO ji = fs_2, fs_jpim1   ! vector opt. 
     244                        qsr_hc(ji,jj,jk) =  etot3(ji,jj,jk) * qsr(ji,jj) 
     245                     END DO 
     246                  END DO 
     247               END DO 
     248               ! 
     249            ENDIF 
    225250            ! 
    226251         ENDIF 
     
    280305      INTEGER  ::   irgb, ierror          ! temporary integer 
    281306      INTEGER  ::   ioptio, nqsr          ! temporary integer 
    282       REAL(wp) ::   zc0  , zc1            ! temporary scalars 
     307      REAL(wp) ::   zc0  , zc1, zcoef     ! temporary scalars 
    283308      REAL(wp) ::   zc2  , zc3  , zchl    !    -         - 
    284       REAL(wp) ::   zsi0r, zsi1r, zcoef   !    -         - 
     309      REAL(wp) ::   zz0  , zz1            !    -         - 
    285310      REAL(wp), DIMENSION(jpi,jpj)     ::   zekb, zekg, zekr              ! 2D workspace 
    286311      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze0 , ze1 , ze2 , ze3 , zea   ! 3D workspace 
     
    289314      TYPE(FLD_N)        ::   sn_chl   ! informations about the chlorofyl field to be read 
    290315      NAMELIST/namtra_qsr/  sn_chl, cn_dir, ln_traqsr, ln_qsr_rgb, ln_qsr_2bd, ln_qsr_bio,   & 
    291          &                  nn_chldta, rn_abs, rn_si0, rn_si1, rn_si2 
     316         &                  nn_chldta, rn_abs, rn_si0, rn_si1 
    292317      !!---------------------------------------------------------------------- 
    293318 
     
    314339         WRITE(numout,*) '      RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0 
    315340         WRITE(numout,*) '      2 bands: longest depth of extinction         rn_si1 = ', rn_si1 
    316          WRITE(numout,*) '      3 bands: longest depth of extinction         rn_si2 = ', rn_si2 
    317341      ENDIF 
    318342 
     
    329353         IF( ln_qsr_bio  )   ioptio = ioptio + 1 
    330354         ! 
    331          IF( ioptio /= 1 ) THEN 
    332             ln_qsr_rgb = .TRUE. 
    333             nn_chldta  = 0 
    334             ln_qsr_2bd = .FALSE. 
    335             ln_qsr_bio = .FALSE. 
    336             CALL ctl_warn( '          Choose ONE type of light penetration in namelist namtra_qsr',   & 
    337            &               ' otherwise, we force the model to run with RGB light penetration' ) 
    338          ENDIF 
     355         IF( ioptio /= 1 ) & 
     356            CALL ctl_stop( '          Choose ONE type of light penetration in namelist namtra_qsr',  & 
     357            &              ' 2 bands, 3 RGB bands or bio-model light penetration' ) 
    339358         ! 
    340359         IF( ln_qsr_rgb .AND. nn_chldta == 0 )   nqsr =  1  
     
    345364         IF(lwp) THEN                   ! Print the choice 
    346365            WRITE(numout,*) 
    347             IF( nqsr ==  1 )   WRITE(numout,*) '         R-G-B  light penetration - Constant Chlorophyll' 
    348             IF( nqsr ==  2 )   WRITE(numout,*) '         R-G-B  light penetration - Chl data ' 
    349             IF( nqsr ==  3 )   WRITE(numout,*) '         2 band light penetration' 
     366            IF( nqsr ==  1 )   WRITE(numout,*) '         R-G-B   light penetration - Constant Chlorophyll' 
     367            IF( nqsr ==  2 )   WRITE(numout,*) '         R-G-B   light penetration - Chl data ' 
     368            IF( nqsr ==  3 )   WRITE(numout,*) '         2 bands light penetration' 
    350369            IF( nqsr ==  4 )   WRITE(numout,*) '         bio-model light penetration' 
    351370         ENDIF 
     
    356375         !                       ! ===================================== ! 
    357376         ! 
    358          zsi0r = 1.e0 / rn_si0 
    359          zsi1r = 1.e0 / rn_si1 
     377         xsi0r = 1.e0 / rn_si0 
     378         xsi1r = 1.e0 / rn_si1 
    360379         !                                ! ---------------------------------- ! 
    361380         IF( ln_qsr_rgb ) THEN            !  Red-Green-Blue light penetration  ! 
    362381            !                             ! ---------------------------------- ! 
    363382            ! 
    364             !                                ! level of light extinction 
    365             nksr = trc_oce_ext_lev( rn_si2, 0.33e2 ) 
    366             IF(lwp) THEN 
    367                WRITE(numout,*) 
    368                WRITE(numout,*) '        level max of computation of qsr = ', nksr, ' ref depth = ', gdepw_0(nksr+1), ' m' 
    369             ENDIF 
    370             ! 
    371383            CALL trc_oce_rgb( rkrgb )           !* tabulated attenuation coef. 
    372 !!gm            CALL trc_oce_rgb_read( rkrgb )           !* tabulated attenuation coef. 
     384            ! 
     385            !                                   !* level of light extinction 
     386            IF(  ln_sco ) THEN   ;   nksr = jpkm1 
     387            ELSE                 ;   nksr = trc_oce_ext_lev( r_si2, 0.33e2 ) 
     388            ENDIF 
     389 
     390            IF(lwp) WRITE(numout,*) '        level of light extinction = ', nksr, ' ref depth = ', gdepw_0(nksr+1), ' m' 
    373391            ! 
    374392            IF( nn_chldta == 1 ) THEN           !* Chl data : set sf_chl structure 
     
    388406               IF(lwp) WRITE(numout,*) 
    389407               IF(lwp) WRITE(numout,*) '        Constant Chlorophyll concentration = 0.05' 
    390                IF(lwp) WRITE(numout,*) '        light distribution computed once for all' 
    391                ! 
    392                zchl = 0.05                                 ! constant chlorophyll 
    393                irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
    394                zekb(:,:) = rkrgb(1,irgb)                   ! Separation in R-G-B depending of the chlorophyl concentration 
    395                zekg(:,:) = rkrgb(2,irgb) 
    396                zekr(:,:) = rkrgb(3,irgb) 
    397                ! 
    398                zcoef = ( 1. - rn_abs ) / 3.e0              ! equi-partition in R-G-B 
    399                ze0(:,:,1) = rn_abs 
    400                ze1(:,:,1) = zcoef 
    401                ze2(:,:,1) = zcoef  
    402                ze3(:,:,1) = zcoef 
    403                zea(:,:,1) = tmask(:,:,1)                   ! = ( ze0+ze1+z2+ze3 ) * tmask 
     408               IF( lk_vvl ) THEN                   ! variable volume 
     409                  IF(lwp) WRITE(numout,*) '        key_vvl: light distribution will be computed at each time step' 
     410               ELSE                                ! constant volume: computes one for all 
     411                  IF(lwp) WRITE(numout,*) '        fixed volume: light distribution computed one for all' 
     412                  ! 
     413                  zchl = 0.05                                 ! constant chlorophyll 
     414                  irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 ) 
     415                  zekb(:,:) = rkrgb(1,irgb)                   ! Separation in R-G-B depending of the chlorophyll  
     416                  zekg(:,:) = rkrgb(2,irgb) 
     417                  zekr(:,:) = rkrgb(3,irgb) 
     418                  ! 
     419                  zcoef = ( 1. - rn_abs ) / 3.e0              ! equi-partition in R-G-B 
     420                  ze0(:,:,1) = rn_abs 
     421                  ze1(:,:,1) = zcoef 
     422                  ze2(:,:,1) = zcoef  
     423                  ze3(:,:,1) = zcoef 
     424                  zea(:,:,1) = tmask(:,:,1)                   ! = ( ze0+ze1+z2+ze3 ) * tmask 
    404425                
    405                DO jk = 2, nksr+1 
     426                  DO jk = 2, nksr+1 
    406427!CDIR NOVERRCHK 
    407                   DO jj = 1, jpj 
     428                     DO jj = 1, jpj 
    408429!CDIR NOVERRCHK    
    409                      DO ji = 1, jpi 
    410                         zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zsi0r     ) 
    411                         zc1 = ze1(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekb(ji,jj) ) 
    412                         zc2 = ze2(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekg(ji,jj) ) 
    413                         zc3 = ze3(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekr(ji,jj) ) 
    414                         ze0(ji,jj,jk) = zc0                  
    415                         ze1(ji,jj,jk) = zc1 
    416                         ze2(ji,jj,jk) = zc2      
    417                         ze3(ji,jj,jk) = zc3 
    418                         zea(ji,jj,jk) = ( zc0 + zc1 + zc2 + zc3 ) * tmask(ji,jj,jk) 
    419                      END DO 
    420                   END DO 
    421                END DO  
    422                ! 
    423                DO jk = 1, nksr 
    424                   etot3(:,:,jk) = ro0cpr * ( zea(:,:,jk) - zea(:,:,jk+1) ) / fse3t(:,:,jk) 
    425                END DO 
    426                etot3(:,:,nksr+1:jpk) = 0.e0                ! below 400m set to zero 
     430                        DO ji = 1, jpi 
     431                           zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t_0(ji,jj,jk-1) * xsi0r     ) 
     432                           zc1 = ze1(ji,jj,jk-1) * EXP( - fse3t_0(ji,jj,jk-1) * zekb(ji,jj) ) 
     433                           zc2 = ze2(ji,jj,jk-1) * EXP( - fse3t_0(ji,jj,jk-1) * zekg(ji,jj) ) 
     434                           zc3 = ze3(ji,jj,jk-1) * EXP( - fse3t_0(ji,jj,jk-1) * zekr(ji,jj) ) 
     435                           ze0(ji,jj,jk) = zc0 
     436                           ze1(ji,jj,jk) = zc1 
     437                           ze2(ji,jj,jk) = zc2 
     438                           ze3(ji,jj,jk) = zc3 
     439                           zea(ji,jj,jk) = ( zc0 + zc1 + zc2 + zc3 ) * tmask(ji,jj,jk) 
     440                        END DO 
     441                     END DO 
     442                  END DO  
     443                  ! 
     444                  DO jk = 1, nksr 
     445                     etot3(:,:,jk) = ro0cpr * ( zea(:,:,jk) - zea(:,:,jk+1) ) / fse3t_0(:,:,jk) 
     446                  END DO 
     447                  etot3(:,:,nksr+1:jpk) = 0.e0                ! below 400m set to zero 
     448               ENDIF 
    427449            ENDIF 
    428450            ! 
     
    436458            IF(lwp) THEN 
    437459               WRITE(numout,*) 
    438                WRITE(numout,*) '        level max of computation of qsr = ', nksr, ' ref depth = ', gdepw_0(nksr+1), ' m' 
    439             ENDIF 
    440             ! 
    441             DO jk = 1, nksr                    !*  solar heat absorbed at T-point computed once for all 
    442                DO jj = 1, jpj                              ! top 400 meters 
    443                   DO ji = 1, jpi 
    444                      zc0 = rn_abs * EXP( -fsdepw(ji,jj,jk  )*zsi0r ) + (1.-rn_abs) * EXP( -fsdepw(ji,jj,jk  )*zsi1r ) 
    445                      zc1 = rn_abs * EXP( -fsdepw(ji,jj,jk+1)*zsi0r ) + (1.-rn_abs) * EXP( -fsdepw(ji,jj,jk+1)*zsi1r ) 
    446                      etot3(ji,jj,jk) = ro0cpr * (  zc0 * tmask(ji,jj,jk) - zc1 * tmask(ji,jj,jk+1)  ) / fse3t(ji,jj,jk) 
    447                   END DO 
    448                END DO 
    449             END DO  
    450             etot3(:,:,nksr+1:jpk) = 0.e0                   ! below 400m set to zero 
    451             ! 
     460            IF(lwp) WRITE(numout,*) '        level of light extinction = ', nksr, ' ref depth = ', gdepw_0(nksr+1), ' m' 
     461            ENDIF 
     462            ! 
     463            IF( lk_vvl ) THEN                   ! variable volume 
     464               IF(lwp) WRITE(numout,*) '        key_vvl: light distribution will be computed at each time step' 
     465            ELSE                                ! constant volume: computes one for all 
     466               zz0 =        rn_abs   * ro0cpr 
     467               zz1 = ( 1. - rn_abs ) * ro0cpr 
     468               DO jk = 1, nksr                    !*  solar heat absorbed at T-point computed once for all 
     469                  DO jj = 1, jpj                              ! top 400 meters 
     470                     DO ji = 1, jpi 
     471                        zc0 = zz0 * EXP( -fsdepw(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk  )*xsi1r ) 
     472                        zc1 = zz0 * EXP( -fsdepw(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk+1)*xsi1r ) 
     473                        etot3(ji,jj,jk) = (  zc0 * tmask(ji,jj,jk) - zc1 * tmask(ji,jj,jk+1)  ) / fse3t_0(ji,jj,jk) 
     474                     END DO 
     475                  END DO 
     476               END DO 
     477               etot3(:,:,nksr+1:jpk) = 0.e0                   ! below 400m set to zero 
     478               ! 
     479            ENDIF 
    452480         ENDIF 
    453481         !                       ! ===================================== ! 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    r2287 r2317  
    2121   PUBLIC   trc_oce_ext_lev    ! function called by traqsr.F90 at least 
    2222  
     23   REAL(wp), PUBLIC                          ::   r_si2   !: largest depth of extinction (blue & 0.01 mg.m-3)  (RGB) 
    2324   REAL(wp), PUBLIC , DIMENSION(jpi,jpj,jpk) ::   etot3   !: light absortion coefficient 
    2425 
     
    138139      prgb(:,:) = zrgb(2:4,:) 
    139140      ! 
     141      r_si2 = 1.e0 / zrgb(2, 1)        ! blue with the smallest chlorophyll concentration) 
     142      IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2 
     143      ! 
    140144      DO jc = 1, 61                         ! check 
    141145         zchl = zrgb(1,jc) 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zopt.F90

    r2287 r2317  
    2828   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   emoy                 !: averaged PAR in the mixed layer 
    2929 
    30    INTEGER  ::   nksrp   ! levels below which the light cannot penetrate ( depth larger than 391 m) 
    31    REAL(wp) ::   & 
    32       parlux = 0.43 / 3.e0 
     30   INTEGER  ::  nksrp   ! levels below which the light cannot penetrate ( depth larger than 391 m) 
     31   REAL(wp) ::  parlux = 0.43 / 3.e0 
    3332 
    3433   REAL(wp), DIMENSION(3,61), PUBLIC ::   xkrgb  !: tabulated attenuation coefficients for RGB absorption 
     
    5453      !!--------------------------------------------------------------------- 
    5554      INTEGER, INTENT(in) ::   kt, jnt ! ocean time step 
    56       INTEGER  ::   ji, jj, jk, jc 
     55      INTEGER  ::   ji, jj, jk 
    5756      INTEGER  ::   irgb 
    5857      REAL(wp) ::   zchl, zxsi0r 
     
    235234      !!---------------------------------------------------------------------- 
    236235 
    237       !                                ! level of light extinction 
    238       nksrp = trc_oce_ext_lev( rn_si2, 0.33e2 ) 
    239       IF(lwp) THEN 
    240         WRITE(numout,*) 
    241         WRITE(numout,*) ' level max of computation of qsr = ', nksrp, ' ref depth = ', gdepw_0(nksrp+1), ' m' 
    242       ENDIF 
    243 !!      CALL trc_oce_rgb( xkrgb )     ! tabulated attenuation coefficients 
    244       CALL trc_oce_rgb_read( xkrgb )     ! tabulated attenuation coefficients 
     236!!      CALL trc_oce_rgb( xkrgb )                  ! tabulated attenuation coefficients 
     237      CALL trc_oce_rgb_read( xkrgb )               ! tabulated attenuation coefficients 
     238      nksrp = trc_oce_ext_lev( r_si2, 0.33e2 )     ! max level of light extinction (Blue Chl=0.01) 
     239      IF(lwp) WRITE(numout,*) '        level of light extinction = ', nksrp, ' ref depth = ', gdepw_0(nksrp+1), ' m' 
     240      ! 
    245241      etot (:,:,:) = 0.e0 
    246242      enano(:,:,:) = 0.e0 
    247243      ediat(:,:,:) = 0.e0 
    248       IF( ln_qsr_bio ) etot3(:,:,:) = 0.e0 
     244      IF( ln_qsr_bio )   etot3(:,:,:) = 0.e0 
     245 
    249246      !  
    250247   END SUBROUTINE p4z_opt_init 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90

    r2287 r2317  
    205205   USE traqsr  , ONLY :   rn_abs     =>    rn_abs     !: fraction absorbed in the very near surface 
    206206   USE traqsr  , ONLY :   rn_si0     =>    rn_si0     !: very near surface depth of extinction 
    207    USE traqsr  , ONLY :   rn_si2     =>    rn_si2     !: deepest depth of extinction (blue &  0.01 mg.m-3)     (RGB) 
    208207   USE traqsr  , ONLY :   ln_qsr_bio =>    ln_qsr_bio !: flag to use or not the biological fluxes for light 
    209208   USE sbcrnf  , ONLY :   rnfmsk     =>    rnfmsk     !: mixed adv scheme in runoffs vicinity (hori.)  
Note: See TracChangeset for help on using the changeset viewer.