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 2536 for trunk/NEMOGCM/NEMO – NEMO

Changeset 2536 for trunk/NEMOGCM/NEMO


Ignore:
Timestamp:
2010-12-30T17:17:43+01:00 (13 years ago)
Author:
rblod
Message:

correct a bug in domzgr, see ticket #783

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r2535 r2536  
    500500      !                                               !     set a minimum depth     ! 
    501501      !                                               ! =========================== ! 
    502       IF( rn_hmin < 0._wp ) THEN    ;   ik = ABS(INT( rn_hmin ))                                   ! from a nb of level 
     502      IF( rn_hmin < 0._wp ) THEN    ;   ik = - INT( rn_hmin )                                      ! from a nb of level 
    503503      ELSE                          ;   ik = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 )  ! from a depth 
    504504      ENDIF 
    505505      zhmin = gdepw_0(ik+1)                                                         ! minimum depth = ik+1 w-levels  
    506506      WHERE( bathy(:,:) <= 0._wp )   ;   bathy(:,:) = 0._wp                         ! min=0     over the lands 
    507       ELSE WHERE                     ;   bathy(:,:) = MIN(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
     507      ELSE WHERE                     ;   bathy(:,:) = MAX(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
    508508      END WHERE 
    509509      IF(lwp) write(numout,*) 'Minimum ocean depth: ', zhmin, ' minimum number of ocean levels : ', ik 
Note: See TracChangeset for help on using the changeset viewer.