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 10105 for NEMO/trunk/src – NEMO

Changeset 10105 for NEMO/trunk/src


Ignore:
Timestamp:
2018-09-07T15:21:13+02:00 (6 years ago)
Author:
smasson
Message:

trunk: minor bugfix in tramle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/tramle.F90

    r10068 r10105  
    9797      !                                                ! compute from the 10m density to deal with the diurnal cycle 
    9898      inml_mle(:,:) = mbkt(:,:) + 1                    ! init. to number of ocean w-level (T-level + 1) 
    99       DO jk = jpkm1, nlb10, -1                         ! from the bottom to nlb10 (10m) 
    100          DO jj = 1, jpj 
    101             DO ji = 1, jpi                             ! index of the w-level at the ML based 
    102                IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rn_rho_c_mle )   inml_mle(ji,jj) = jk      ! Mixed layer 
    103             END DO 
    104          END DO 
    105       END DO 
     99      IF ( nla10 > 0 ) THEN                            ! avoid case where first level is thicker than 10m 
     100         DO jk = jpkm1, nlb10, -1                      ! from the bottom to nlb10 (10m) 
     101            DO jj = 1, jpj 
     102               DO ji = 1, jpi                          ! index of the w-level at the ML based 
     103                  IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rn_rho_c_mle )   inml_mle(ji,jj) = jk      ! Mixed layer 
     104               END DO 
     105            END DO 
     106         END DO 
     107      ENDIF 
    106108      ikmax = MIN( MAXVAL( inml_mle(:,:) ), jpkm1 )                  ! max level of the computation 
    107109      ! 
Note: See TracChangeset for help on using the changeset viewer.