Changeset 4623


Ignore:
Timestamp:
2014-04-22T17:21:41+02:00 (7 years ago)
Author:
acc
Message:

#1305. Fix trc_oce_ext_lev function in trc_oce.F90 so that the correct maximum light penetration level is determined even if all a processing elements wet points are above the maximum penetration depth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    r3770 r4623  
    267267      !!---------------------------------------------------------------------- 
    268268      ! 
    269       ! It is not necessary to compute anything bellow the following depth 
     269      ! It is not necessary to compute anything below the following depth 
    270270      zhext = prldex * ( LOG(10._wp) * zprec + LOG(pqsr_frc) ) 
    271271      ! 
     
    273273      pjl = jpkm1 
    274274      DO jk = jpkm1, 1, -1 
    275          zem = MAXVAL( fsdepw(:,:,jk+1) * tmask(:,:,jk) ) 
    276          IF( zem >= zhext )   pjl = jk                       ! last T-level reached by Qsr 
     275         IF(SUM(tmask(:,:,jk)) > 0 ) THEN 
     276            zem = MAXVAL( fsdepw(:,:,jk+1) * tmask(:,:,jk) ) 
     277            IF( zem >= zhext )   pjl = jk                       ! last T-level reached by Qsr 
     278         ELSE 
     279            pjl = jk                                            ! or regional sea-bed depth  
     280         ENDIF 
    277281      END DO 
    278282      ! 
Note: See TracChangeset for help on using the changeset viewer.