New URL for NEMO forge!

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.
#2457 (Bug domcfg with isf) – NEMO

Opened 4 years ago

Last modified 4 years ago

#2457 new Bug

Bug domcfg with isf

Reported by: mathiot Owned by: mathiot
Priority: low Milestone:
Component: tools Version: trunk
Severity: minor Keywords:



Under some condition domisf leads to negative vertical scale factor: case where isolated grid point in bathymetry where ice shelf almost grounded.


This comes from the position of the modification of the bathy because of isolated grid point in the bathymetry.
It has been included before the computation of misfdep (zgr_isf_kspace) but it should be done at the very beginning in zgr_isf_zspace when compatibility between isf draft and bathy is done.


in domisf.F90, move the bloc:

      ! 0.0 fill isolated grid point in the bathymetry
      ! will be done again later on in zgr_bat_ctl, but need to be done here to adjust risfdep/misfdep respectively
      icompt = 0 
      DO jj = 2, jpjm1
         DO ji = 2, jpim1
            ibtest = MAX(  mbathy(ji-1,jj), mbathy(ji+1,jj),   &   
               &           mbathy(ji,jj-1), mbathy(ji,jj+1)  )
               IF( ibtest < mbathy(ji,jj) ) THEN
                  mbathy(ji,jj) = ibtest
                  bathy(ji,jj)  = gdepw_1d(ibtest+1)
                  icompt = icompt + 1 
               END IF
         END DO
      END DO
      ! ensure halo correct 
      zdummy(:,:) = FLOAT( mbathy(:,:) ) ; CALL lbc_lnk('domisf', zdummy, 'T', 1._wp ) ; mbathy(:,:) = INT( zdummy(:,:) )
      IF( lk_mpp )   CALL mpp_sum('domisf', icompt )
      IF( icompt == 0 ) THEN
         IF(lwp) WRITE(numout,*)'     no isolated ocean grid points'
         IF(lwp) WRITE(numout,*)'    ',icompt,' ocean grid points suppressed'

out of zgr_isf_kspace in zgr_isf_zspace at the top as 0.0 to be sure mbathy and bathy not modify before starting to compute the isfdraft.

And in domzgr, move the call to zgr_isf_zspace after the computation of mbathy and before the call to zgr_isf_kspace:

  • domzgr.F90

    894894      IF(lwp) WRITE(numout,*) '    ~~~~~~~ ' 
    895895      IF(lwp) WRITE(numout,*) '              mbathy is recomputed : bathy_level file is NOT used' 
    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 
    901897      ! bathymetry in level (from bathy_meter) 
    902898      ! =================== 
    903899      zmax = gdepw_1d(jpk) + e3t_1d(jpk)        ! maximum depth (i.e. the last ocean level thickness <= 2*e3t_1d(jpkm1) ) 
    915911         WHERE( 0._wp < bathy(:,:) .AND. bathy(:,:) <= zdepth )   mbathy(:,:) = jk-1 
    916912      END DO 
    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      ! if under ice shelf cavities, compute misfdep for ocean point (i.e. the top level) 
     915      IF ( ln_isfcav ) THEN 
     916         ! compute position of the ice shelf grounding line 
     917         CALL zgr_isf_zspace 
     918         ! compute misfdep and adjust isf draft if needed 
     919         CALL zgr_isf_kspace 
     920      END IF 

Commit History (2)


ticket #2457: add fix suggested in ticket.


ticket #2457: branch to fix minor issue in tools (negative e3t in some specific cases with isf)

Change History (3)

comment:1 Changed 4 years ago by mathiot

In 12869:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:2 Changed 4 years ago by mathiot

In 12871:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:3 Changed 4 years ago by mathiot

As I was not able to reproduced the bug described by Clement B. (Mercator), I will not push this. I send an email to Clement to send me the information needed to reproduce the bug. I am waiting feedback.

Note: See TracTickets for help on using tickets.