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)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
10518 | clem | 2019-01-15T18:06:06+01:00 | solve ticket #1997 as proposed |
Attachments (1)
Change History (6)
Changed 6 years ago by deazer
comment:1 Changed 6 years ago by nicolasmartin
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:
comment:5 Changed 5 years ago by clem
- Resolution set to fixed
- Status changed from assigned to closed
solved at r10518
Looks like related to #1857