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 10103 for NEMO/branches – NEMO

Changeset 10103 for NEMO/branches


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

dev_r9759_HPC09_ESIWACE: minor bugfix in tramle and traadv_fct

Location:
NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/TRA
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/TRA/traadv_fct.F90

    r9814 r10103  
    556556            zwi (ji,jj,ikt) = 0._wp 
    557557            zws (ji,jj,ikt) = 0._wp 
    558             zwrm(ji,jj,ikt) = 0.5_wp * ( pt_in(ji,jj,jk-1) + pt_in(ji,jj,jk) ) 
     558            zwrm(ji,jj,ikt) = 0.5_wp * ( pt_in(ji,jj,ikt-1) + pt_in(ji,jj,ikt) ) 
    559559            ! 
    560560            zwd (ji,jj,ikb) = 1._wp          ! bottom 
    561561            zwi (ji,jj,ikb) = 0._wp 
    562562            zws (ji,jj,ikb) = 0._wp 
    563             zwrm(ji,jj,ikb) = 0.5_wp * ( pt_in(ji,jj,jk-1) + pt_in(ji,jj,jk) )             
     563            zwrm(ji,jj,ikb) = 0.5_wp * ( pt_in(ji,jj,ikb-1) + pt_in(ji,jj,ikb) )             
    564564         END DO 
    565565      END DO    
  • NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/src/OCE/TRA/tramle.F90

    r9814 r10103  
    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.