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 11568 for NEMO/branches/2019/ENHANCE-02_ISF_domcfg – NEMO

Ignore:
Timestamp:
2019-09-18T17:52:11+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF: fix compatibility issue between rn_hmin and ice shelf (ticket #2142)

Location:
NEMO/branches/2019/ENHANCE-02_ISF_domcfg/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_domcfg/src/domisf.F90

    r11308 r11568  
    122122      ! 1.1 ground ice shelf if water column less than rn_glhw_min m  
    123123      ! => set the grounding line position 
    124       WHERE( bathy(:,:) - risfdep(:,:) < rn_glhw_min )  
     124      WHERE( bathy(:,:) - risfdep(:,:) < rn_glhw_min .AND. risfdep(:,:) > 0.0_wp )  
    125125         bathy  (:,:) = 0._wp ; risfdep(:,:) = 0._wp 
    126126      END WHERE 
     
    130130      DO jj = 1, jpj 
    131131         DO ji = 1, jpi 
    132             IF ( bathy(ji,jj) - risfdep(ji,jj) < rn_isfhw_min ) THEN 
     132            IF ( bathy(ji,jj) - risfdep(ji,jj) < rn_isfhw_min .AND. risfdep(ji,jj) > 0.0_wp ) THEN 
    133133               risfdep(ji,jj) = bathy(ji,jj) - rn_isfhw_min 
    134134               ! sanity check on risfdep (if < zisfdep_min) 
     
    145145      IF (ln_isfchannel) THEN 
    146146         imask(:,:) = 0 
    147          WHERE ( bathy(:,:) > 0._wp .AND. risfdep(:,:) > 0._wp ) 
     147         WHERE ( bathy(:,:) > 0._wp ) 
    148148            imask(:,:) = 1 
    149149         END WHERE 
    150150         DO jj = 2, jpjm1 
    151151            DO ji = 2, jpim1 
    152                IF( imask(ji,jj) == 1 ) THEN 
     152               IF( imask(ji,jj) == 1 .AND. risfdep(ji,jj) > 0._wp) THEN 
    153153                  ! define connexion 
    154154                  imskip1=imask(ji,jj)*imask(ji+1,jj  )  ! 1 = connexion 
     
    507507               gdept_0(ji,jj,ik-1) = gdept_0(ji,jj,ik) - e3w_0(ji,jj,ik) 
    508508               gdepw_0(ji,jj,ik-1) = gdepw_0(ji,jj,ik) - e3t_0(ji,jj,ik-1) 
     509               IF ( ik > 2 ) THEN 
     510                  e3w_0  (ji,jj,ik-1) = gdept_0(ji,jj,ik-1) - gdept_0(ji,jj,ik-2) 
     511               ELSE 
     512                  e3w_0  (ji,jj,ik-1) = 2.0 * gdept_0(ji,jj,ik-1) 
     513               END IF 
    509514            ENDIF 
    510515         END DO 
  • NEMO/branches/2019/ENHANCE-02_ISF_domcfg/src/domzgr.F90

    r11308 r11568  
    612612         zhmin = gdepw_1d(ik+1)                                                        ! minimum depth = ik+1 w-levels  
    613613         WHERE( bathy(:,:) <= 0._wp )   ;   bathy(:,:) = 0._wp                         ! min=0     over the lands 
    614          ELSE WHERE                     ;   bathy(:,:) = MAX(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
     614         ELSE WHERE ( risfdep == 0._wp );   bathy(:,:) = MAX(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
    615615         END WHERE 
    616616         IF(lwp) write(numout,*) 'Minimum ocean depth: ', zhmin, ' minimum number of ocean levels : ', ik 
Note: See TracChangeset for help on using the changeset viewer.