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 2712 – NEMO

Changeset 2712


Ignore:
Timestamp:
2011-03-29T13:41:29+02:00 (13 years ago)
Author:
rfurner
Message:

bug fix for s coordinates and use of rn_hmin

File:
1 edited

Legend:

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

    r2536 r2712  
    500500      !                                               !     set a minimum depth     ! 
    501501      !                                               ! =========================== ! 
    502       IF( rn_hmin < 0._wp ) THEN    ;   ik = - INT( rn_hmin )                                      ! from a nb of level 
    503       ELSE                          ;   ik = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 )  ! from a depth 
    504       ENDIF 
    505       zhmin = gdepw_0(ik+1)                                                         ! minimum depth = ik+1 w-levels  
    506       WHERE( bathy(:,:) <= 0._wp )   ;   bathy(:,:) = 0._wp                         ! min=0     over the lands 
    507       ELSE WHERE                     ;   bathy(:,:) = MAX(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
    508       END WHERE 
    509       IF(lwp) write(numout,*) 'Minimum ocean depth: ', zhmin, ' minimum number of ocean levels : ', ik 
     502      IF ( .not. ln_sco ) THEN 
     503         IF( rn_hmin < 0._wp ) THEN    ;   ik = - INT( rn_hmin )                                      ! from a nb of level 
     504         ELSE                          ;   ik = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 )  ! from a depth 
     505         ENDIF 
     506         zhmin = gdepw_0(ik+1)                                                         ! minimum depth = ik+1 w-levels  
     507         WHERE( bathy(:,:) <= 0._wp )   ;   bathy(:,:) = 0._wp                         ! min=0     over the lands 
     508         ELSE WHERE                     ;   bathy(:,:) = MAX(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
     509         END WHERE 
     510         IF(lwp) write(numout,*) 'Minimum ocean depth: ', zhmin, ' minimum number of ocean levels : ', ik 
     511      ENDIF 
    510512      ! 
    511513   END SUBROUTINE zgr_bat 
Note: See TracChangeset for help on using the changeset viewer.