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 12871 for utils/tools_ticket2457 – NEMO

Ignore:
Timestamp:
2020-05-05T17:57:08+02:00 (4 years ago)
Author:
mathiot
Message:

ticket #2457: add fix suggested in ticket.

Location:
utils/tools_ticket2457/DOMAINcfg/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • utils/tools_ticket2457/DOMAINcfg/src/domisf.F90

    r12414 r12871  
    109109      INTEGER  :: ji, jj                             ! loop indexes 
    110110      INTEGER  :: imskjp1, imskjm1, imskip1, imskim1 ! local variable 
     111      INTEGER  :: ibtest, icompt                     ! local variables 
    111112      INTEGER, DIMENSION(jpi,jpj) :: imask           ! isf mask 
    112113      ! 
     114      REAL(wp) ::   zdummy       ! dummy variable used for the lnclnk 
    113115      REAL(wp) ::   zisfdep_min  ! minimal ice shelf draft allowed 
    114116      !!--------------------------------------------------------------------- 
     117      ! 
     118      ! 0.0 fill isolated grid point in the bathymetry 
     119      ! will be done again later on in zgr_bat_ctl, but need to be done here to adjust risfdep/misfdep respectively 
     120      icompt = 0 
     121      DO jj = 2, jpjm1 
     122         DO ji = 2, jpim1 
     123            ibtest = MAX(  mbathy(ji-1,jj), mbathy(ji+1,jj),   & 
     124               &           mbathy(ji,jj-1), mbathy(ji,jj+1)  ) 
     125               IF( ibtest < mbathy(ji,jj) ) THEN 
     126                  mbathy(ji,jj) = ibtest 
     127                  bathy(ji,jj)  = gdepw_1d(ibtest+1) 
     128                  icompt = icompt + 1 
     129               END IF 
     130         END DO 
     131      END DO 
     132      ! 
     133      ! ensure halo correct  
     134      zdummy(:,:) = FLOAT( mbathy(:,:) ) ; CALL lbc_lnk('domisf', zdummy, 'T', 1._wp ) ; mbathy(:,:) = INT( zdummy(:,:) ) 
     135      ! 
     136      IF( lk_mpp )   CALL mpp_sum('domisf', icompt ) 
     137      IF( icompt == 0 ) THEN 
     138         IF(lwp) WRITE(numout,*)'     no isolated ocean grid points' 
     139      ELSE 
     140         IF(lwp) WRITE(numout,*)'    ',icompt,' ocean grid points suppressed' 
     141      ENDIF 
    115142      ! 
    116143      ! 1.0 set iceshelf to the minimum depth allowed 
     
    220247         WHERE( risfdep(:,:) > 0._wp .AND. risfdep(:,:) >= zdepth )   misfdep(:,:) = jk+1  
    221248      END DO  
    222       ! 
    223       ! 2.1 fill isolated grid point in the bathymetry 
    224       ! will be done again later on in zgr_bat_ctl, but need to be done here to adjust misfdep respectively 
    225       icompt = 0 
    226       DO jj = 2, jpjm1 
    227          DO ji = 2, jpim1 
    228             ibtest = MAX(  mbathy(ji-1,jj), mbathy(ji+1,jj),   & 
    229                &           mbathy(ji,jj-1), mbathy(ji,jj+1)  ) 
    230                IF( ibtest < mbathy(ji,jj) ) THEN 
    231                   mbathy(ji,jj) = ibtest 
    232                   icompt = icompt + 1 
    233                END IF 
    234          END DO 
    235       END DO 
    236       ! 
    237       ! ensure halo correct  
    238       zdummy(:,:) = FLOAT( mbathy(:,:) ) ; CALL lbc_lnk('domisf', zdummy, 'T', 1._wp ) ; mbathy(:,:) = INT( zdummy(:,:) ) 
    239       ! 
    240       IF( lk_mpp )   CALL mpp_sum('domisf', icompt ) 
    241       IF( icompt == 0 ) THEN 
    242          IF(lwp) WRITE(numout,*)'     no isolated ocean grid points' 
    243       ELSE 
    244          IF(lwp) WRITE(numout,*)'    ',icompt,' ocean grid points suppressed' 
    245       ENDIF 
    246249      ! 
    247250      ! 2.2 be sure misfdep not below mbathy  
  • utils/tools_ticket2457/DOMAINcfg/src/domzgr.F90

    r12414 r12871  
    895895      IF(lwp) WRITE(numout,*) '              mbathy is recomputed : bathy_level file is NOT used' 
    896896 
    897       ! compute position of the ice shelf grounding line 
    898       ! set bathy and isfdraft to 0 where grounded 
    899       IF ( ln_isfcav ) CALL zgr_isf_zspace 
    900  
    901897      ! bathymetry in level (from bathy_meter) 
    902898      ! =================== 
     
    916912      END DO 
    917913 
    918       ! Check compatibility between bathy and iceshelf draft 
    919       ! insure at least 2 wet level on the vertical under an ice shelf 
    920       ! compute misfdep and adjust isf draft if needed 
    921       IF ( ln_isfcav ) CALL zgr_isf_kspace 
     914      ! isf draft in z and level 
     915      ! ======================== 
     916      ! if under ice shelf cavities, compute misfdep for ocean point (i.e. the top level) 
     917      IF ( ln_isfcav ) THEN 
     918         ! compute position of the ice shelf grounding line 
     919         CALL zgr_isf_zspace 
     920         ! compute misfdep and adjust isf draft if needed 
     921         CALL zgr_isf_kspace 
     922      END IF 
    922923 
    923924      ! Scale factors and depth at T- and W-points 
Note: See TracChangeset for help on using the changeset viewer.