- Timestamp:
- 2018-10-29T11:44:36+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
r10246 r10248 49 49 !!---------------------------------------------------------------------- 50 50 INTEGER, INTENT(in) :: kt ! Main time step counter 51 REAL(wp), DIMENSION( jpi,jpj), INTENT(inout) :: pua2d, pva2d52 REAL(wp), DIMENSION( jpi,jpj), INTENT(in ) :: pub2d, pvb2d53 REAL(wp), DIMENSION( jpi,jpj), INTENT(in ) :: phur, phvr54 REAL(wp), DIMENSION( jpi,jpj), INTENT(in ) :: pssh51 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pua2d, pva2d 52 REAL(wp), DIMENSION(:,:), INTENT(in ) :: pub2d, pvb2d 53 REAL(wp), DIMENSION(:,:), INTENT(in ) :: phur, phvr 54 REAL(wp), DIMENSION(:,:), INTENT(in ) :: pssh 55 55 !! 56 56 INTEGER :: ib_bdy ! Loop counter … … 92 92 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 93 93 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 94 REAL(wp), DIMENSION( jpi,jpj), INTENT(inout) :: pua2d, pva2d94 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pua2d, pva2d 95 95 !! 96 96 INTEGER :: jb, jk ! dummy loop indices … … 147 147 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 148 148 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 149 REAL(wp), DIMENSION( jpi,jpj), INTENT(inout) :: pua2d, pva2d150 REAL(wp), DIMENSION( jpi,jpj), INTENT(in) :: pssh, phur, phvr149 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pua2d, pva2d 150 REAL(wp), DIMENSION(:,:), INTENT(in) :: pssh, phur, phvr 151 151 152 152 INTEGER :: jb, igrd ! dummy loop indices … … 237 237 TYPE(OBC_DATA), INTENT(in) :: dta ! OBC external data 238 238 INTEGER, INTENT(in) :: ib_bdy ! number of current open boundary set 239 REAL(wp), DIMENSION( jpi,jpj),INTENT(inout) :: pua2d, pva2d240 REAL(wp), DIMENSION( jpi,jpj),INTENT(in) :: pub2d, pvb2d239 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pua2d, pva2d 240 REAL(wp), DIMENSION(:,:), INTENT(in) :: pub2d, pvb2d 241 241 LOGICAL, INTENT(in) :: ll_npo ! flag for NPO version 242 242 … … 271 271 !! 272 272 !!---------------------------------------------------------------------- 273 REAL(wp), DIMENSION( jpi,jpj), INTENT(inout) :: zssh ! Sea level273 REAL(wp), DIMENSION(:,:), INTENT(inout) :: zssh ! Sea level 274 274 !! 275 275 INTEGER :: ib_bdy, ib, igrd ! local integers 276 INTEGER :: ii, ij, zcoef, zcoef1, zcoef2,ip, jp ! " "276 INTEGER :: ii, ij, zcoef, ip, jp ! " " 277 277 278 278 igrd = 1 ! Everything is at T-points here … … 283 283 ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 284 284 ! Set gradient direction: 285 zcoef1 = bdytmask(ii-1,ij ) + bdytmask(ii+1,ij ) 286 zcoef2 = bdytmask(ii ,ij-1) + bdytmask(ii ,ij+1) 287 IF ( zcoef1+zcoef2 == 0 ) THEN 288 ! corner 289 ! zcoef = tmask(ii-1,ij,1) + tmask(ii+1,ij,1) + tmask(ii,ij-1,1) + tmask(ii,ij+1,1) 290 ! zssh(ii,ij) = zssh(ii-1,ij ) * tmask(ii-1,ij ,1) + & 291 ! & zssh(ii+1,ij ) * tmask(ii+1,ij ,1) + & 292 ! & zssh(ii ,ij-1) * tmask(ii ,ij-1,1) + & 293 ! & zssh(ii ,ij+1) * tmask(ii ,ij+1,1) 294 zcoef = bdytmask(ii-1,ij) + bdytmask(ii+1,ij) + bdytmask(ii,ij-1) + bdytmask(ii,ij+1) 295 zssh(ii,ij) = zssh(ii-1,ij ) * bdytmask(ii-1,ij ) + & 296 & zssh(ii+1,ij ) * bdytmask(ii+1,ij ) + & 297 & zssh(ii ,ij-1) * bdytmask(ii ,ij-1) + & 298 & zssh(ii ,ij+1) * bdytmask(ii ,ij+1) 299 zssh(ii,ij) = ( zssh(ii,ij) / MAX( 1, zcoef) ) * tmask(ii,ij,1) 285 zcoef = bdytmask(ii-1,ij) + bdytmask(ii+1,ij) + bdytmask(ii,ij-1) + bdytmask(ii,ij+1) 286 IF ( zcoef == 0 ) THEN 287 zssh(ii,ij) = 0._wp 300 288 ELSE 301 289 ip = bdytmask(ii+1,ij ) - bdytmask(ii-1,ij )
Note: See TracChangeset
for help on using the changeset viewer.