Opened 2 years ago

Closed 15 months 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 2 years ago.

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by deazer

comment:1 Changed 2 years ago by nicolasmartin

Looks like related to #1857

comment:2 Changed 2 years ago by deazer

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

comment:3 Changed 2 years ago by clevy

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

comment:4 Changed 15 months ago by clem

In 10518:

solve ticket #1997 as proposed

comment:5 Changed 15 months ago by clem

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

solved at r10518

Note: See TracTickets for help on using tickets.