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 11248 for branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90 – NEMO

Ignore:
Timestamp:
2019-07-10T19:01:37+02:00 (5 years ago)
Author:
mathiot
Message:

add condition to fill isolated grid point in the bathymetry in zgr_isf to ensure compatibility with ice shelf draft and properly mask bathy,risfdep,mbathy,misfdep after filling subglacial lakes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r9746 r11248  
    12871287      !!   
    12881288      INTEGER  ::   ji, jj, jk, jn 
     1289      INTEGER  ::   ios, icompt 
    12891290      INTEGER  ::   ibtest, ibtestim1, ibtestip1, ibtestjm1, ibtestjp1   ! (ISF) 
    12901291      INTEGER  ::   zmbathyij, zmbathyip1, zmbathyim1, zmbathyjp1, zmbathyjm1 
     
    12971298      !!----------------- 
    12981299      ! NAMELIST 
    1299       INTEGER  ::   ios 
    13001300      INTEGER  :: nn_kisfmax    = 999.                              !   
    13011301      REAL(wp) :: rn_isfdep_min = 10.0_wp                           ! ice shelf minimal thickness  
     
    14231423         END DO 
    14241424      END DO 
     1425      ! 
    14251426      ! ensure halo correct  
    14261427      IF( lk_mpp ) THEN 
     
    14461447      END DO  
    14471448      ! 
    1448       ! 2.1 be sure misfdep not below mbathy  
    1449       ! warning because of condition 4 we could have 'wet cell with misfdep below mbathy 
    1450       ! risfdep of these cells will be fix later on (see 5) 
    1451       WHERE( misfdep > mbathy .AND. mbathy > 0 ) misfdep=mbathy 
     1449      ! 2.1 fill isolated grid point in the bathymetry 
     1450      ! need to be done here to fix compatibility (will be done again in zgr_bat_ctl) 
     1451      DO jj = 2, jpjm1 
     1452         DO ji = 2, jpim1 
     1453            ibtest = MAX(  mbathy(ji-1,jj), mbathy(ji+1,jj),   & 
     1454               &           mbathy(ji,jj-1), mbathy(ji,jj+1)  ) 
     1455               IF( ibtest < mbathy(ji,jj) ) THEN 
     1456                  mbathy(ji,jj) = ibtest 
     1457                  icompt = icompt + 1 
     1458               END IF 
     1459         END DO 
     1460      END DO 
     1461      ! 
     1462      ! ensure halo correct  
     1463      zdummy(:,:) = FLOAT( mbathy(:,:) ) ; CALL lbc_lnk( zdummy, 'T', 1._wp ) ; mbathy(:,:) = INT( zdummy(:,:) ) 
     1464      ! 
     1465      IF( lk_mpp )   CALL mpp_sum( icompt ) 
     1466      IF( icompt == 0 ) THEN 
     1467         IF(lwp) WRITE(numout,*)'     no isolated ocean grid points' 
     1468      ELSE 
     1469         IF(lwp) WRITE(numout,*)'    ',icompt,' ocean grid points suppressed' 
     1470      ENDIF 
     1471      ! 
     1472      ! 2.2 be sure misfdep not below mbathy  
     1473      ! warning because of condition 2.0 and 2.1 we could have 'wet cell with misfdep below mbathy 
     1474      ! risfdep of these cells will be fix later on 
     1475      WHERE( misfdep > mbathy ) misfdep(:,:) = MAX( 1, mbathy(:,:) ) 
    14521476      ! 
    14531477      ! 3.0 Assure 2 wet cells in the column at T point and along the edge. 
Note: See TracChangeset for help on using the changeset viewer.