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.
#1997 (corner point bug in SUBROUTINE bdy_ssh) – NEMO

Opened 6 years ago

Closed 5 years ago

#1997 closed Bug (fixed)

corner point bug in SUBROUTINE bdy_ssh

Reported by: deazer Owned by: gmattia
Priority: low Milestone:
Component: OCE Version: trunk
Severity: minor Keywords: BDY bdytmask zcoef
Cc:

Description

Bug in bdy_ssh when dealing with corner points.

currently the code will always result in setting ssh to 0 at such points:

               zssh(ii,ij) = zssh(ii-1,ij  ) * bdytmask(ii-1,ij  ) + &
                &           zssh(ii+1,ij  ) * bdytmask(ii+1,ij  ) + &
                 &           zssh(ii  ,ij-1) * bdytmask(ii  ,ij-1) + &
                &           zssh(ii  ,ij+1) * bdytmask(ii  ,ij+1)

because each of rgw bdytmask points at [i-1,j] ; [i+1,j] ; [i,j-1] ; and [i,j+1] are zero.

To return zero ssh gradient here we need to use points on the diagonal.

the neighbouring points that are not corner points will be set to this point, and so to ensure zero gradient

in both x and y directions we the corner point should be the same.

This is easily done by modifying the previous code to:

               zssh(ii,ij) = zssh( ii-1, ij-1 ) * bdytmask( ii-1, ij-1) + &
                 &           zssh( ii+1, ij+1 ) * bdytmask( ii+1, ij+1) + &
                 &           zssh( ii+1, ij-1 ) * bdytmask( ii+1, ij-1) + &
                 &           zssh( ii-1, ij+1 ) * bdytmask( ii-1, ij+1)

The resulting changes are small for most cases but important to correct this for WAD with reference levels.

 

Commit History (1)

ChangesetAuthorTimeChangeLog
10518clem2019-01-15T18:06:06+01:00

solve ticket #1997 as proposed

Attachments (1)

AMM12_snapshot_SSH_CORNER_POINT.png (2.8 KB) - added by deazer 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by deazer

comment:1 Changed 6 years ago by nicolasmartin

Looks like related to #1857

comment:2 Changed 6 years ago by deazer

OK, yes  this will resolve the issue reported in #1857

comment:3 Changed 6 years ago by clevy

  • Owner set to gmattia
  • Status changed from new to assigned

comment:4 Changed 5 years ago by clem

In 10518:

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

comment:5 Changed 5 years ago by clem

  • Resolution set to fixed
  • Status changed from assigned to closed

solved at r10518

Note: See TracTickets for help on using tickets.