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

Changeset 11248


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

Location:
branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM
Files:
2 edited

Legend:

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

    r9513 r11248  
    201201         END DO   
    202202      END DO   
     203      ! 
     204      ! (ISF) define barotropic mask and mask the ice shelf point 
     205      DO jj = 1, jpj 
     206         DO ji = 1, jpi   ! vector loop 
     207            ssmask(ji,jj)  = MIN(1._wp,SUM(tmask(ji,jj,:))) 
     208         END DO 
     209      END DO 
    203210      ! 
    204211      IF ( ln_isfsubgl ) THEN 
     
    222229            WHERE (tmask(:,:,jk) < 0) tmask(:,:,jk) = 1 ! restore mask value 
    223230         END DO 
     231         ! update ssmask 
     232         DO jj = 1, jpj 
     233            DO ji = 1, jpi   ! vector loop 
     234               ssmask(ji,jj)  = MIN(1._wp,SUM(tmask(ji,jj,:))) 
     235            END DO 
     236         END DO 
     237         ! update mbathy, misfdep, bathy, risfdep 
     238         bathy(:,:)   = bathy(:,:)   * ssmask(:,:) 
     239         risfdep(:,:) = risfdep(:,:) * ssmask(:,:) 
     240         WHERE ( ssmask(:,:) == 0._wp ) 
     241            misfdep(:,:) = 1 
     242            mbathy(:,:)  = 0 
     243         END WHERE 
    224244      END IF 
    225245 
    226       ! (ISF) define barotropic mask and mask the ice shelf point 
    227       DO jj = 1, jpj 
    228          DO ji = 1, jpi   ! vector loop 
    229             ssmask(ji,jj)  = MIN(1._wp,SUM(tmask(ji,jj,:))) 
    230          END DO 
    231       END DO 
    232246!!gm  ???? 
    233247#if defined key_zdfkpp 
  • 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.