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 1176 for trunk/NEMO/TOP_SRC/LOBSTER/trcopt.F90 – NEMO

Ignore:
Timestamp:
2008-09-11T18:26:59+02:00 (16 years ago)
Author:
cetlod
Message:

update LOBSTER modules to take into account new trends organization, see ticket:248

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/LOBSTER/trcopt.F90

    r1146 r1176  
    4848      INTEGER, INTENT( in ) ::   kt   ! index of the time stepping 
    4949      INTEGER  ::   ji, jj, jk 
    50       INTEGER , DIMENSION(jpi,jpj)     ::   itabe           ! euphotic layer last k index 
    51       INTEGER , DIMENSION(jpi,jpj,jpk) ::   imaske          ! euphotic layer mask 
    5250      REAL(wp) ::   zpig                                    ! total pigment 
    5351      REAL(wp) ::   zkr                                     ! total absorption coefficient in red 
     
    103101      END DO 
    104102 
    105       ! determination of euphotic layer depth (xze) 
    106       ! ------------------------------------- 
     103      ! 3. Determination of euphotic layer depth 
     104      ! ---------------------------------------- 
    107105 
    108       DO jk = 1, jpk                   ! imaske equal 1 in the euphotic layer, and 0 without 
     106      ! Euphotic layer bottom level 
     107      neln(:,:) = 1                                           ! initialisation of EL level 
     108      DO jk = 1, jpk 
    109109         DO jj = 1, jpj 
    110             DO ji = 1,jpi 
    111                IF( xpar(ji,jj,jk) >= zpar100(ji,jj) ) THEN 
    112                   imaske(ji,jj,jk) = 1 
    113                ELSE 
    114                   imaske(ji,jj,jk) = 0 
    115                ENDIF 
    116             END DO 
     110           DO ji = 1, jpi 
     111              IF( xpar(ji,jj,jk) >= zpar100(ji,jj) )   neln(ji,jj) = jk+1 ! 1rst T-level strictly below EL bottom 
     112              !                                                  ! nb. this is to ensure compatibility with 
     113              !                                                  ! nmld_trc definition in trd_mld_trc_zint 
     114           END DO 
    117115         END DO 
    118       END DO 
    119       !                                ! sum of imaske Cover the vertical with a minimim value of 1  
    120       itabe(:,:) = 1                   !   surface value setto 1 <=> set a ninimum value to 1 
    121       DO jk = 2, jpk 
    122          DO jj = 1, jpj 
    123             DO ji = 1,jpi 
    124                itabe(ji,jj) = itabe(ji,jj) + imaske(ji,jj,jk) 
    125             END DO 
     116      ENDDO 
     117 
     118      ! Euphotic layer depth 
     119      DO jj = 1, jpj 
     120         DO ji = 1, jpi 
     121            xze(ji,jj) = fsdepw( ji, jj, neln(ji,jj) )            ! exact EL depth 
    126122         END DO 
    127       END DO 
    128       DO jj = 1, jpj                  ! converte the number of level into depth 
    129          DO ji = 1,jpi 
    130             xze(ji,jj) = fsdepw(ji,jj,itabe(ji,jj)+1) 
    131          END DO 
    132       END DO 
    133       ! 
     123      ENDDO  
     124 
    134125 
    135126      IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.