Changeset 12807
- Timestamp:
- 2020-04-23T15:14:45+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo
- Files:
-
- 56 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/NST/agrif_ice_interp.F90
r10069 r12807 260 260 ! imin = i1 ; imax = i2 ; jmin = j1 ; jmax = j2 261 261 ! IF( (nbondj == -1) .OR. (nbondj == 2) ) jmin = 3 262 ! IF( (nbondj == +1) .OR. (nbondj == 2) ) jmax = nlcj-2262 ! IF( (nbondj == +1) .OR. (nbondj == 2) ) jmax = jpj-2 263 263 ! IF( (nbondi == -1) .OR. (nbondi == 2) ) imin = 3 264 ! IF( (nbondi == +1) .OR. (nbondi == 2) ) imax = nlci-2264 ! IF( (nbondi == +1) .OR. (nbondi == 2) ) imax = jpi-2 265 265 ! 266 266 ! ! smoothed fields 267 267 ! IF( eastern_side ) THEN 268 ! ztab( nlci,j1:j2,:) = z1 * ptab(nlci,j1:j2,:) + z2 * ptab(nlci-1,j1:j2,:)268 ! ztab(jpi,j1:j2,:) = z1 * ptab(jpi,j1:j2,:) + z2 * ptab(jpi-1,j1:j2,:) 269 269 ! DO jj = jmin, jmax 270 270 ! rswitch = 0. 271 ! IF( u_ice( nlci-2,jj) > 0._wp ) rswitch = 1.272 ! ztab( nlci-1,jj,:) = ( 1. - umask(nlci-2,jj,1) ) * ztab(nlci,jj,:) &273 ! & + umask(nlci-2,jj,1) * &274 ! & ( ( 1. - rswitch ) * ( z4 * ztab(nlci,jj,:) + z3 * ztab(nlci-2,jj,:) ) &275 ! & + rswitch * ( z6 * ztab(nlci-2,jj,:) + z5 * ztab(nlci,jj,:) + z7 * ztab(nlci-3,jj,:) ) )276 ! ztab( nlci-1,jj,:) = ztab(nlci-1,jj,:) * tmask(nlci-1,jj,1)271 ! IF( u_ice(jpi-2,jj) > 0._wp ) rswitch = 1. 272 ! ztab(jpi-1,jj,:) = ( 1. - umask(jpi-2,jj,1) ) * ztab(jpi,jj,:) & 273 ! & + umask(jpi-2,jj,1) * & 274 ! & ( (1. - rswitch) * ( z4 * ztab(jpi ,jj,:) + z3 * ztab(jpi-2,jj,:) ) & 275 ! & + rswitch * ( z6 * ztab(jpi-2,jj,:) + z5 * ztab(jpi ,jj,:) + z7 * ztab(jpi-3,jj,:) ) ) 276 ! ztab(jpi-1,jj,:) = ztab(jpi-1,jj,:) * tmask(jpi-1,jj,1) 277 277 ! END DO 278 278 ! ENDIF 279 279 ! ! 280 280 ! IF( northern_side ) THEN 281 ! ztab(i1:i2, nlcj,:) = z1 * ptab(i1:i2,nlcj,:) + z2 * ptab(i1:i2,nlcj-1,:)281 ! ztab(i1:i2,jpj,:) = z1 * ptab(i1:i2,jpj,:) + z2 * ptab(i1:i2,jpj-1,:) 282 282 ! DO ji = imin, imax 283 283 ! rswitch = 0. 284 ! IF( v_ice(ji, nlcj-2) > 0._wp ) rswitch = 1.285 ! ztab(ji, nlcj-1,:) = ( 1. - vmask(ji,nlcj-2,1) ) * ztab(ji,nlcj,:) &286 ! & + vmask(ji,nlcj-2,1) * &287 ! & ( ( 1. - rswitch ) * ( z4 * ztab(ji,nlcj,:) + z3 * ztab(ji,nlcj-2,:) ) &288 ! & + rswitch * ( z6 * ztab(ji,nlcj-2,:) + z5 * ztab(ji,nlcj,:) + z7 * ztab(ji,nlcj-3,:) ) )289 ! ztab(ji, nlcj-1,:) = ztab(ji,nlcj-1,:) * tmask(ji,nlcj-1,1)284 ! IF( v_ice(ji,jpj-2) > 0._wp ) rswitch = 1. 285 ! ztab(ji,jpj-1,:) = ( 1. - vmask(ji,jpj-2,1) ) * ztab(ji,jpj,:) & 286 ! & + vmask(ji,jpj-2,1) * & 287 ! & ( (1. - rswitch) * ( z4 * ztab(ji,jpj ,:) + z3 * ztab(ji,jpj-2,:) ) & 288 ! & + rswitch * ( z6 * ztab(ji,jpj-2,:) + z5 * ztab(ji,jpj ,:) + z7 * ztab(ji,jpj-3,:) ) ) 289 ! ztab(ji,jpj-1,:) = ztab(ji,jpj-1,:) * tmask(ji,jpj-1,1) 290 290 ! END DO 291 291 ! END IF … … 318 318 ! ! 319 319 ! ! Treatment of corners 320 ! IF( (eastern_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( nlci-1,2,:) = ptab(nlci-1,2,:)! East south321 ! IF( (eastern_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( nlci-1,nlcj-1,:) = ptab(nlci-1,nlcj-1,:)! East north322 ! IF( (western_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( 2,2,:) = ptab(2,2,:)! West south323 ! IF( (western_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( 2,nlcj-1,:) = ptab(2,nlcj-1,:)! West north320 ! IF( (eastern_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab(jpi-1,2 ,:) = ptab(jpi-1, 2,:) ! East south 321 ! IF( (eastern_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab(jpi-1,jpj-1,:) = ptab(jpi-1,jpj-1,:) ! East north 322 ! IF( (western_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) ) ztab( 2, 2,:) = ptab( 2, 2,:) ! West south 323 ! IF( (western_side) .AND. ((nbondj == 1).OR.(nbondj == 2)) ) ztab( 2,jpj-1,:) = ptab( 2,jpj-1,:) ! West north 324 324 ! 325 325 ! ! retrieve ice tracers -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/NST/agrif_oce_sponge.F90
r12489 r12807 646 646 647 647 jmax = j2-1 648 IF ((nbondj == 1).OR.(nbondj == 2)) jmax = MIN(jmax, nlcj-nbghostcells-2) ! North648 IF ((nbondj == 1).OR.(nbondj == 2)) jmax = MIN(jmax,jpj-nbghostcells-2) ! North 649 649 650 650 DO jj = j1+1, jmax … … 802 802 803 803 imax = i2 - 1 804 IF ((nbondi == 1).OR.(nbondi == 2)) imax = MIN(imax, nlci-nbghostcells-2) ! East804 IF ((nbondi == 1).OR.(nbondi == 2)) imax = MIN(imax,jpi-nbghostcells-2) ! East 805 805 806 806 DO jj = j1+1, j2 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/NST/agrif_user.F90
r12489 r12807 65 65 ind2 = 1 + nbghostcells 66 66 ind3 = 2 + nbghostcells 67 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),e1u_id)68 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),e2v_id)67 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),e1u_id) 68 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),e2v_id) 69 69 70 70 ! 2. Type of interpolation … … 318 318 ind3 = 2 + nbghostcells 319 319 # if defined key_vertical 320 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts+1/),tsn_id)321 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts+1/),tsn_sponge_id)322 323 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_interp_id)324 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_interp_id)325 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_update_id)326 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_update_id)327 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),un_sponge_id)328 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),vn_sponge_id)320 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_id) 321 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_sponge_id) 322 323 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_interp_id) 324 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_interp_id) 325 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_update_id) 326 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_update_id) 327 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_sponge_id) 328 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_sponge_id) 329 329 # else 330 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts/),tsn_id)331 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jpts/),tsn_sponge_id)332 333 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_interp_id)334 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_interp_id)335 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_update_id)336 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_update_id)337 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),un_sponge_id)338 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),vn_sponge_id)339 # endif 340 341 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpk/),e3t_id)330 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsn_id) 331 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts/),tsn_sponge_id) 332 333 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_interp_id) 334 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_interp_id) 335 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_update_id) 336 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_update_id) 337 CALL agrif_declare_variable((/1,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),un_sponge_id) 338 CALL agrif_declare_variable((/2,1,0,0/),(/ind3,ind2,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),vn_sponge_id) 339 # endif 340 341 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),e3t_id) 342 342 343 343 # if defined key_vertical 344 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),mbkt_id)345 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),ht0_id)346 # endif 347 348 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,3/),scales_t_id)349 350 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),unb_id)351 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),vnb_id)352 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),ub2b_interp_id)353 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),vb2b_interp_id)354 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),ub2b_update_id)355 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),vb2b_update_id)356 357 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/ nlci,nlcj/),sshn_id)344 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),mbkt_id) 345 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),ht0_id) 346 # endif 347 348 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,3/),scales_t_id) 349 350 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),unb_id) 351 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vnb_id) 352 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),ub2b_interp_id) 353 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vb2b_interp_id) 354 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),ub2b_update_id) 355 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),vb2b_update_id) 356 357 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),sshn_id) 358 358 359 359 IF( ln_zdftke.OR.ln_zdfgls ) THEN 360 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpk/), en_id)361 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpk/),avt_id)360 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/), en_id) 361 ! CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avt_id) 362 362 # if defined key_vertical 363 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,2/),avm_id)363 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),avm_id) 364 364 # else 365 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,1/),avm_id)365 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,1/),avm_id) 366 366 # endif 367 367 ENDIF … … 535 535 ind2 = 1 + nbghostcells 536 536 ind3 = 2 + nbghostcells 537 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/ nlci,nlcj,jpl*(8+nlay_s+nlay_i)/),tra_ice_id)538 CALL agrif_declare_variable((/1,2/) ,(/ind2,ind3/) ,(/'x','y'/) ,(/1,1/) ,(/ nlci,nlcj/) ,u_ice_id )539 CALL agrif_declare_variable((/2,1/) ,(/ind3,ind2/) ,(/'x','y'/) ,(/1,1/) ,(/ nlci,nlcj/) ,v_ice_id )537 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpl*(8+nlay_s+nlay_i)/),tra_ice_id) 538 CALL agrif_declare_variable((/1,2/) ,(/ind2,ind3/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,u_ice_id ) 539 CALL agrif_declare_variable((/2,1/) ,(/ind3,ind2/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,v_ice_id ) 540 540 541 541 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) … … 661 661 ind3 = 2 + nbghostcells 662 662 # if defined key_vertical 663 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra+1/),trn_id)664 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra+1/),trn_sponge_id)663 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra+1/),trn_id) 664 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra+1/),trn_sponge_id) 665 665 # else 666 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra/),trn_id)667 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/ nlci,nlcj,jpk,jptra/),trn_sponge_id)666 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) 667 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_sponge_id) 668 668 # endif 669 669 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/CRS/crs.F90
r10068 r12807 36 36 INTEGER :: jpiglo_full, jpjglo_full !: jpiglo / jpjglo 37 37 INTEGER :: npiglo, npjglo !: jpjglo 38 INTEGER :: nlci_full, nlcj_full !: i-, j-dimension of local or sub domain on parent grid 39 INTEGER :: nldi_full, nldj_full !: starting indices of internal sub-domain on parent grid 40 INTEGER :: nlei_full, nlej_full !: ending indices of internal sub-domain on parent grid 41 INTEGER :: nlci_crs, nlcj_crs !: i-, j-dimension of local or sub domain on coarse grid 42 INTEGER :: nldi_crs, nldj_crs !: starting indices of internal sub-domain on coarse grid 43 INTEGER :: nlei_crs, nlej_crs !: ending indices of internal sub-domain on coarse grid 38 INTEGER :: Nis0_full, Njs0_full !: starting indices of internal sub-domain on parent grid 39 INTEGER :: Nie0_full, Nje0_full !: ending indices of internal sub-domain on parent grid 40 INTEGER :: Nis0_crs , Njs0_crs !: starting indices of internal sub-domain on coarse grid 41 INTEGER :: Nie0_crs , Nje0_crs !: ending indices of internal sub-domain on coarse grid 44 42 45 43 INTEGER :: narea_full, narea_crs !: node … … 48 46 INTEGER :: nimpp_full, njmpp_full !: global position of point (1,1) of subdomain on parent grid 49 47 INTEGER :: nimpp_crs, njmpp_crs !: set to 1,1 for now . Valid only for monoproc 50 INTEGER :: nreci_full, nrecj_full51 INTEGER :: nreci_crs, nrecj_crs52 48 !cc 53 49 INTEGER :: noea_full, nowe_full !: index of the local neighboring processors in … … 76 72 INTEGER, DIMENSION(:), ALLOCATABLE :: mi0_crs, mi1_crs, mj0_crs, mj1_crs 77 73 INTEGER :: mxbinctr, mybinctr ! central point in grid box 78 INTEGER, DIMENSION(:), ALLOCATABLE :: nlcit_crs, nlcit_full!: dimensions of every subdomain79 INTEGER, DIMENSION(:), ALLOCATABLE :: n ldit_crs, nldit_full!: first, last indoor index for each i-domain80 INTEGER, DIMENSION(:), ALLOCATABLE :: n leit_crs, nleit_full!: first, last indoor index for each j-domain81 INTEGER, DIMENSION(:), ALLOCATABLE :: nimppt_crs, nimppt_full!: first, last indoor index for each j-domain82 INTEGER, DIMENSION(:), ALLOCATABLE :: nlcjt_crs, nlcjt_full!: dimensions of every subdomain83 INTEGER, DIMENSION(:), ALLOCATABLE :: n ldjt_crs, nldjt_full!: first, last indoor index for each i-domain84 INTEGER, DIMENSION(:), ALLOCATABLE :: n lejt_crs, nlejt_full!: first, last indoor index for each j-domain85 INTEGER, DIMENSION(:), ALLOCATABLE :: njmppt_crs, njmppt_full!: first, last indoor index for each j-domain74 INTEGER, DIMENSION(:), ALLOCATABLE :: jpiall_crs, jpiall_full !: dimensions of every subdomain 75 INTEGER, DIMENSION(:), ALLOCATABLE :: nis0all_crs, nis0all_full !: first, last indoor index for each i-domain 76 INTEGER, DIMENSION(:), ALLOCATABLE :: nie0all_crs, nie0all_full !: first, last indoor index for each j-domain 77 INTEGER, DIMENSION(:), ALLOCATABLE :: nimppt_crs, nimppt_full !: first, last indoor index for each j-domain 78 INTEGER, DIMENSION(:), ALLOCATABLE :: jpjall_crs, jpjall_full !: dimensions of every subdomain 79 INTEGER, DIMENSION(:), ALLOCATABLE :: njs0all_crs, njs0all_full !: first, last indoor index for each i-domain 80 INTEGER, DIMENSION(:), ALLOCATABLE :: nje0all_crs, nje0all_full !: first, last indoor index for each j-domain 81 INTEGER, DIMENSION(:), ALLOCATABLE :: njmppt_crs, njmppt_full !: first, last indoor index for each j-domain 86 82 87 83 88 84 ! Masks 89 85 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmask_crs, umask_crs, vmask_crs, fmask_crs 90 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: tmask_i_crs, rnfmsk_crs, tpol_crs, fpol_crs 91 92 ! REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmask_i_crs, tpol, fpol 93 86 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: rnfmsk_crs 87 94 88 ! Scale factors 95 89 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1t_crs, e2t_crs, e1e2t_crs ! horizontal scale factors grid type T … … 182 176 & umask_crs(jpi_crs,jpj_crs,jpk) , vmask_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(2)) 183 177 184 ALLOCATE( tmask_i_crs(jpi_crs,jpj_crs) , rnfmsk_crs(jpi_crs,jpj_crs), & 185 & tpol_crs(jpiglo_crs,jpjglo_crs), fpol_crs(jpiglo_crs,jpjglo_crs), STAT=ierr(3) ) 178 ALLOCATE( rnfmsk_crs(jpi_crs,jpj_crs), STAT=ierr(3) ) 186 179 187 180 ALLOCATE( gphit_crs(jpi_crs,jpj_crs) , glamt_crs(jpi_crs,jpj_crs) , & … … 238 231 & hmlp_crs(jpi_crs,jpj_crs) , hmlpt_crs(jpi_crs,jpj_crs) , STAT=ierr(14) ) 239 232 240 ALLOCATE( nimppt_crs (jpnij) , nlcit_crs (jpnij) , nldit_crs (jpnij) , nleit_crs (jpnij), &241 & nimppt_full(jpnij) , nlcit_full(jpnij) , nldit_full(jpnij) , nleit_full(jpnij), &242 njmppt_crs (jpnij) , nlcjt_crs (jpnij) , nldjt_crs (jpnij) , nlejt_crs (jpnij), &243 & njmppt_full(jpnij) , nlcjt_full(jpnij) , nldjt_full(jpnij) , nlejt_full(jpnij) , STAT=ierr(15) )233 ALLOCATE( nimppt_crs (jpnij) , jpiall_crs (jpnij) , nis0all_crs (jpnij) , nie0all_crs (jpnij), & 234 & nimppt_full(jpnij) , jpiall_full(jpnij) , nis0all_full(jpnij) , nie0all_full(jpnij), & 235 njmppt_crs (jpnij) , jpjall_crs (jpnij) , njs0all_crs (jpnij) , nje0all_crs (jpnij), & 236 & njmppt_full(jpnij) , jpjall_full(jpnij) , njs0all_full(jpnij) , nje0all_full(jpnij) , STAT=ierr(15) ) 244 237 245 238 crs_dom_alloc = MAXVAL(ierr) … … 258 251 ierr(:) = 0 259 252 260 ALLOCATE( mjs_crs( nlej_crs) , mje_crs(nlej_crs), mis_crs(nlei_crs) , mie_crs(nlei_crs), STAT=ierr(1) )253 ALLOCATE( mjs_crs(Nje0_crs) , mje_crs(Nje0_crs), mis_crs(Nie0_crs) , mie_crs(Nie0_crs), STAT=ierr(1) ) 261 254 crs_dom_alloc2 = MAXVAL(ierr) 262 255 … … 282 275 jpjglo = jpjglo_full 283 276 284 nlci = nlci_full285 nlcj = nlcj_full286 nldi = nldi_full287 nldj = nldj_full288 nlei = nlei_full289 nlej = nlej_full290 nimpp 291 njmpp 292 293 nlcit(:) = nlcit_full(:)294 n ldit(:) = nldit_full(:)295 n leit(:) = nleit_full(:)296 nimppt (:) = nimppt_full(:)297 nlcjt(:) = nlcjt_full(:)298 n ldjt(:) = nldjt_full(:)299 n lejt(:) = nlejt_full(:)300 njmppt (:) = njmppt_full(:)277 jpi = jpi_full 278 jpj = jpj_full 279 Nis0 = Nis0_full 280 Njs0 = Njs0_full 281 Nie0 = Nie0_full 282 Nje0 = Nje0_full 283 nimpp = nimpp_full 284 njmpp = njmpp_full 285 286 jpiall (:) = jpiall_full (:) 287 nis0all(:) = nis0all_full(:) 288 nie0all(:) = nie0all_full(:) 289 nimppt (:) = nimppt_full (:) 290 jpjall (:) = jpjall_full (:) 291 njs0all(:) = njs0all_full(:) 292 nje0all(:) = nje0all_full(:) 293 njmppt (:) = njmppt_full (:) 301 294 302 295 END SUBROUTINE dom_grid_glo … … 322 315 323 316 324 nlci = nlci_crs325 nlcj = nlcj_crs326 nldi = nldi_crs327 nlei = nlei_crs328 nlej = nlej_crs329 nldj = nldj_crs330 nimpp 331 njmpp 332 333 nlcit(:) = nlcit_crs(:)334 n ldit(:) = nldit_crs(:)335 n leit(:) = nleit_crs(:)336 nimppt (:) = nimppt_crs(:)337 nlcjt(:) = nlcjt_crs(:)338 n ldjt(:) = nldjt_crs(:)339 n lejt(:) = nlejt_crs(:)340 njmppt (:) = njmppt_crs(:)317 jpi = jpi_crs 318 jpj = jpj_crs 319 Nis0 = Nis0_crs 320 Nie0 = Nie0_crs 321 Nje0 = Nje0_crs 322 Njs0 = Njs0_crs 323 nimpp = nimpp_crs 324 njmpp = njmpp_crs 325 326 jpiall (:) = jpiall_crs (:) 327 nis0all(:) = nis0all_crs(:) 328 nie0all(:) = nie0all_crs(:) 329 nimppt (:) = nimppt_crs (:) 330 jpjall (:) = jpjall_crs (:) 331 njs0all(:) = njs0all_crs(:) 332 nje0all(:) = nje0all_crs(:) 333 njmppt (:) = njmppt_crs (:) 341 334 ! 342 335 END SUBROUTINE dom_grid_crs -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/CRS/crsdom.F90
r11536 r12807 73 73 74 74 75 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA275 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 76 76 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 77 77 je_2 = mje_crs(2) ; ij = je_2 … … 81 81 ENDIF 82 82 DO jk = 1, jpkm1 83 DO ji = 2, nlei_crs83 DO ji = 2, Nie0_crs 84 84 ijis = mis_crs(ji) ; ijie = mie_crs(ji) 85 85 ! … … 101 101 ! 102 102 DO jk = 1, jpkm1 103 DO ji = 2, nlei_crs103 DO ji = 2, Nie0_crs 104 104 ijis = mis_crs(ji) ; ijie = mie_crs(ji) 105 DO jj = 3, nlej_crs105 DO jj = 3, Nje0_crs 106 106 ijjs = mjs_crs(jj) ; ijje = mje_crs(jj) 107 107 … … 168 168 SELECT CASE ( cd_type ) 169 169 CASE ( 'T' ) 170 DO jj = nldj_crs, nlej_crs170 DO jj = Njs0_crs, Nje0_crs 171 171 ijjs = mjs_crs(jj) + mybinctr 172 DO ji = 2, nlei_crs172 DO ji = 2, Nie0_crs 173 173 ijis = mis_crs(ji) + mxbinctr 174 174 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 177 177 ENDDO 178 178 CASE ( 'U' ) 179 DO jj = nldj_crs, nlej_crs179 DO jj = Njs0_crs, Nje0_crs 180 180 ijjs = mjs_crs(jj) + mybinctr 181 DO ji = 2, nlei_crs181 DO ji = 2, Nie0_crs 182 182 ijis = mis_crs(ji) 183 183 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 186 186 ENDDO 187 187 CASE ( 'V' ) 188 DO jj = nldj_crs, nlej_crs188 DO jj = Njs0_crs, Nje0_crs 189 189 ijjs = mjs_crs(jj) 190 DO ji = 2, nlei_crs190 DO ji = 2, Nie0_crs 191 191 ijis = mis_crs(ji) + mxbinctr 192 192 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 195 195 ENDDO 196 196 CASE ( 'F' ) 197 DO jj = nldj_crs, nlej_crs197 DO jj = Njs0_crs, Nje0_crs 198 198 ijjs = mjs_crs(jj) 199 DO ji = 2, nlei_crs199 DO ji = 2, Nie0_crs 200 200 ijis = mis_crs(ji) 201 201 p_gphi_crs(ji,jj) = p_gphi(ijis,ijjs) … … 212 212 SELECT CASE ( cd_type ) 213 213 CASE ( 'T', 'V' ) 214 DO ji = 2, nlei_crs214 DO ji = 2, Nie0_crs 215 215 ijis = mis_crs(ji) + mxbinctr 216 216 p_gphi_crs(ji,1) = p_gphi(ijis,1) … … 218 218 ENDDO 219 219 CASE ( 'U', 'F' ) 220 DO ji = 2, nlei_crs220 DO ji = 2, Nie0_crs 221 221 ijis = mis_crs(ji) 222 222 p_gphi_crs(ji,1) = p_gphi(ijis,1) … … 261 261 262 262 DO jk = 1, jpk 263 DO ji = 2, nlei_crs263 DO ji = 2, Nie0_crs 264 264 ijie = mie_crs(ji) 265 DO jj = nldj_crs, nlej_crs265 DO jj = Njs0_crs, Nje0_crs 266 266 ijje = mje_crs(jj) ; ijrs = mje_crs(jj) - mjs_crs(jj) 267 267 ! Only for a factro 3 coarsening … … 374 374 ENDIF 375 375 376 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2376 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 377 377 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 378 378 je_2 = mje_crs(2) … … 512 512 ENDIF 513 513 514 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2514 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 515 515 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 516 516 je_2 = mje_crs(2) … … 617 617 CASE( 'T', 'W' ) 618 618 619 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2619 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 620 620 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 621 621 je_2 = mje_crs(2) … … 674 674 CASE( 'V' ) 675 675 676 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2676 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 677 677 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 678 678 ijje = mje_crs(2) … … 711 711 CASE( 'U' ) 712 712 713 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2713 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 714 714 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 715 715 je_2 = mje_crs(2) … … 782 782 CASE( 'T', 'W' ) 783 783 784 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2784 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 785 785 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 786 786 je_2 = mje_crs(2) … … 842 842 CASE( 'V' ) 843 843 844 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2844 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 845 845 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 846 846 ijje = mje_crs(2) … … 883 883 CASE( 'U' ) 884 884 885 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2885 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 886 886 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 887 887 je_2 = mje_crs(2) … … 953 953 CASE( 'T', 'W' ) 954 954 955 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2955 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 956 956 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 957 957 je_2 = mje_crs(2) … … 1013 1013 CASE( 'V' ) 1014 1014 1015 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21015 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1016 1016 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1017 1017 ijje = mje_crs(2) … … 1053 1053 CASE( 'U' ) 1054 1054 1055 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21055 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1056 1056 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1057 1057 je_2 = mje_crs(2) … … 1158 1158 zsurfmsk(:,:) = p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1) 1159 1159 1160 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21160 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1161 1161 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1162 1162 je_2 = mje_crs(2) … … 1234 1234 CASE( 'T', 'W' ) 1235 1235 1236 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21236 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1237 1237 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1238 1238 je_2 = mje_crs(2) … … 1285 1285 CASE( 'V' ) 1286 1286 1287 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21287 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1288 1288 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1289 1289 ijje = mje_crs(2) … … 1318 1318 CASE( 'U' ) 1319 1319 1320 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21320 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1321 1321 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1322 1322 je_2 = mje_crs(2) … … 1369 1369 CASE( 'T', 'W' ) 1370 1370 1371 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21371 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1372 1372 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1373 1373 je_2 = mje_crs(2) … … 1420 1420 CASE( 'V' ) 1421 1421 1422 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21422 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1423 1423 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1424 1424 ijje = mje_crs(2) … … 1453 1453 CASE( 'U' ) 1454 1454 1455 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21455 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1456 1456 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1457 1457 je_2 = mje_crs(2) … … 1497 1497 CASE( 'T', 'W' ) 1498 1498 1499 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21499 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1500 1500 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1501 1501 je_2 = mje_crs(2) … … 1548 1548 CASE( 'V' ) 1549 1549 1550 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21550 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1551 1551 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1552 1552 ijje = mje_crs(2) … … 1581 1581 CASE( 'U' ) 1582 1582 1583 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21583 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1584 1584 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1585 1585 je_2 = mje_crs(2) … … 1665 1665 ENDDO 1666 1666 1667 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21667 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1668 1668 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1669 1669 je_2 = mje_crs(2) … … 1808 1808 END SELECT 1809 1809 1810 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA21810 IF( Njs0_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN !!cc bande du sud style ORCA2 1811 1811 IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN 1812 1812 je_2 = mje_crs(2) … … 1899 1899 ! 2.a Define processor domain 1900 1900 IF( .NOT. lk_mpp ) THEN 1901 nimpp_crs = 1 1902 njmpp_crs = 1 1903 nlci_crs = jpi_crs 1904 nlcj_crs = jpj_crs 1905 nldi_crs = 1 1906 nldj_crs = 1 1907 nlei_crs = jpi_crs 1908 nlej_crs = jpj_crs 1901 nimpp_crs = 1 1902 njmpp_crs = 1 1903 Nis0_crs = 1 1904 Njs0_crs = 1 1905 Nie0_crs = jpi_crs 1906 Nje0_crs = jpj_crs 1909 1907 ELSE 1910 1908 ! Initialisation of most local variables - 1911 nimpp_crs = 1 1912 njmpp_crs = 1 1913 nlci_crs = jpi_crs 1914 nlcj_crs = jpj_crs 1915 nldi_crs = 1 1916 nldj_crs = 1 1917 nlei_crs = jpi_crs 1918 nlej_crs = jpj_crs 1909 nimpp_crs = 1 1910 njmpp_crs = 1 1911 Nis0_crs = 1 1912 Njs0_crs = 1 1913 Nie0_crs = jpi_crs 1914 Nje0_crs = jpj_crs 1919 1915 1920 1916 ! Calculs suivant une découpage en j 1921 1917 DO jn = 1, jpnij, jpni 1922 1918 IF( jn < ( jpnij - jpni + 1 ) ) THEN 1923 n lejt_crs(jn) = AINT( REAL( ( jpjglo - (njmppt(jn ) - 1) ) / nn_facty, wp ) ) &1919 nje0all_crs(jn) = AINT( REAL( ( jpjglo - (njmppt(jn ) - 1) ) / nn_facty, wp ) ) & 1924 1920 & - AINT( REAL( ( jpjglo - (njmppt(jn+jpni) - 1) ) / nn_facty, wp ) ) 1925 1921 ELSE 1926 n lejt_crs(jn) = AINT( REAL( nlejt(jn) / nn_facty, wp ) ) + 11922 nje0all_crs(jn) = AINT( REAL( nje0all(jn) / nn_facty, wp ) ) + 1 1927 1923 ENDIF 1928 IF( noso < 0 ) n lejt_crs(jn) = nlejt_crs(jn) + 11924 IF( noso < 0 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1929 1925 SELECT CASE( ibonjt(jn) ) 1930 1926 CASE ( -1 ) 1931 IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 ) n lejt_crs(jn) = nlejt_crs(jn) + 11932 nlcjt_crs(jn) = nlejt_crs(jn) + nn_hls1933 n ldjt_crs(jn) = nldjt(jn)1927 IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1928 jpjall_crs (jn) = nje0all_crs(jn) + nn_hls 1929 njs0all_crs(jn) = njs0all(jn) 1934 1930 1935 1931 CASE ( 0 ) 1936 1932 1937 n ldjt_crs(jn) = nldjt(jn)1938 IF( n ldjt(jn) == 1 ) nlejt_crs(jn) = nlejt_crs(jn) + 11939 n lejt_crs(jn) = nlejt_crs(jn) + nn_hls1940 nlcjt_crs(jn) = nlejt_crs(jn) + nn_hls1933 njs0all_crs(jn) = njs0all(jn) 1934 IF( njs0all(jn) == 1 ) nje0all_crs(jn) = nje0all_crs(jn) + 1 1935 nje0all_crs(jn) = nje0all_crs(jn) + nn_hls 1936 jpjall_crs (jn) = nje0all_crs(jn) + nn_hls 1941 1937 1942 1938 CASE ( 1, 2 ) 1943 1939 1944 n lejt_crs(jn) = nlejt_crs(jn) + nn_hls1945 nlcjt_crs(jn) = nlejt_crs(jn)1946 n ldjt_crs(jn) = nldjt(jn)1940 nje0all_crs(jn) = nje0all_crs(jn) + nn_hls 1941 jpjall_crs (jn) = nje0all_crs(jn) 1942 njs0all_crs(jn) = njs0all(jn) 1947 1943 1948 1944 CASE DEFAULT 1949 1945 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (1) ...' ) 1950 1946 END SELECT 1951 IF( nlcjt_crs(jn) > jpj_crs ) jpj_crs = jpj_crs + 11952 1953 IF(n ldjt_crs(jn) == 1 ) THEN1947 IF( jpjall_crs(jn) > jpj_crs ) jpj_crs = jpj_crs + 1 1948 1949 IF(njs0all_crs(jn) == 1 ) THEN 1954 1950 njmppt_crs(jn) = 1 1955 1951 ELSE … … 1958 1954 1959 1955 DO jj = jn + 1, jn + jpni - 1 1960 n lejt_crs(jj) = nlejt_crs(jn)1961 nlcjt_crs(jj) = nlcjt_crs(jn)1962 n ldjt_crs(jj) = nldjt_crs(jn)1963 njmppt_crs (jj)= njmppt_crs(jn)1956 nje0all_crs(jj) = nje0all_crs(jn) 1957 jpjall_crs (jj) = jpjall_crs(jn) 1958 njs0all_crs(jj) = njs0all_crs(jn) 1959 njmppt_crs (jj) = njmppt_crs(jn) 1964 1960 ENDDO 1965 1961 ENDDO 1966 nlej_crs = nlejt_crs(nproc + 1)1967 nlcj_crs = nlcjt_crs(nproc + 1)1968 nldj_crs = nldjt_crs(nproc + 1)1969 njmpp_crs = njmppt_crs (nproc + 1)1962 Nje0_crs = nje0all_crs(nproc + 1) 1963 jpj_crs = jpjall_crs (nproc + 1) 1964 Njs0_crs = njs0all_crs(nproc + 1) 1965 njmpp_crs = njmppt_crs (nproc + 1) 1970 1966 1971 1967 ! Calcul suivant un decoupage en i 1972 1968 DO jn = 1, jpni 1973 1969 IF( jn == 1 ) THEN 1974 n leit_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + nlcit(jn ) ) / nn_factx, wp) )1970 nie0all_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + jpiall(jn ) ) / nn_factx, wp) ) 1975 1971 ELSE 1976 n leit_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + nlcit(jn ) ) / nn_factx, wp) ) &1977 & - AINT( REAL( ( nimppt(jn-1) - 1 + nlcit(jn-1) ) / nn_factx, wp) )1972 nie0all_crs(jn) = AINT( REAL( ( nimppt(jn ) - 1 + jpiall(jn ) ) / nn_factx, wp) ) & 1973 & - AINT( REAL( ( nimppt(jn-1) - 1 + jpiall(jn-1) ) / nn_factx, wp) ) 1978 1974 ENDIF 1979 1975 1980 1976 SELECT CASE( ibonit(jn) ) 1981 1977 CASE ( -1 ) 1982 n leit_crs(jn) = nleit_crs(jn) + nn_hls1983 nlcit_crs(jn) = nleit_crs(jn) + nn_hls1984 n ldit_crs(jn) = nldit(jn)1978 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1979 jpiall_crs (jn) = nie0all_crs(jn) + nn_hls 1980 nis0all_crs(jn) = nis0all(jn) 1985 1981 1986 1982 CASE ( 0 ) 1987 n leit_crs(jn) = nleit_crs(jn) + nn_hls1988 nlcit_crs(jn) = nleit_crs(jn) + nn_hls1989 n ldit_crs(jn) = nldit(jn)1983 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1984 jpiall_crs (jn) = nie0all_crs(jn) + nn_hls 1985 nis0all_crs(jn) = nis0all(jn) 1990 1986 1991 1987 CASE ( 1, 2 ) 1992 IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 ) n leit_crs(jn) = nleit_crs(jn) + 11993 n leit_crs(jn) = nleit_crs(jn) + nn_hls1994 nlcit_crs(jn) = nleit_crs(jn)1995 n ldit_crs(jn) = nldit(jn)1988 IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 ) nie0all_crs(jn) = nie0all_crs(jn) + 1 1989 nie0all_crs(jn) = nie0all_crs(jn) + nn_hls 1990 jpiall_crs (jn) = nie0all_crs(jn) 1991 nis0all_crs(jn) = nis0all(jn) 1996 1992 1997 1993 CASE DEFAULT … … 2001 1997 nimppt_crs(jn) = ANINT( REAL( (nimppt(jn) + 1 ) / nn_factx, wp ) ) + 1 2002 1998 DO jj = jn + jpni , jpnij, jpni 2003 n leit_crs(jj) = nleit_crs(jn)2004 nlcit_crs(jj) = nlcit_crs(jn)2005 n ldit_crs(jj) = nldit_crs(jn)2006 nimppt_crs (jj)= nimppt_crs(jn)1999 nie0all_crs(jj) = nie0all_crs(jn) 2000 jpiall_crs (jj) = jpiall_crs (jn) 2001 nis0all_crs(jj) = nis0all_crs(jn) 2002 nimppt_crs (jj) = nimppt_crs (jn) 2007 2003 ENDDO 2008 2004 ENDDO 2009 2005 2010 nlei_crs = nleit_crs(nproc + 1)2011 nlci_crs = nlcit_crs(nproc + 1)2012 nldi_crs = nldit_crs(nproc + 1)2013 nimpp_crs = nimppt_crs (nproc + 1)2006 Nie0_crs = nie0all_crs(nproc + 1) 2007 jpi_crs = jpiall_crs (nproc + 1) 2008 Nis0_crs = nis0all_crs(nproc + 1) 2009 nimpp_crs = nimppt_crs (nproc + 1) 2014 2010 2015 2011 DO ji = 1, jpi_crs … … 2043 2039 jpjglo_full = jpjglo 2044 2040 2045 nlcj_full = nlcj2046 nlci_full = nlci2047 nldi_full = nldi2048 nldj_full = nldj2049 nlei_full = nlei2050 nlej_full = nlej2051 nimpp_full 2052 njmpp_full 2041 jpj_full = jpj 2042 jpi_full = jpi 2043 Nis0_full = Nis0 2044 Njs0_full = Njs0 2045 Nie0_full = Nie0 2046 Nje0_full = Nje0 2047 nimpp_full = nimpp 2048 njmpp_full = njmpp 2053 2049 2054 nlcit_full(:) = nlcit(:)2055 n ldit_full(:) = nldit(:)2056 n leit_full(:) = nleit(:)2057 nimppt_full (:) = nimppt(:)2058 nlcjt_full(:) = nlcjt(:)2059 n ldjt_full(:) = nldjt(:)2060 n lejt_full(:) = nlejt(:)2061 njmppt_full (:) = njmppt(:)2050 jpiall_full (:) = jpiall (:) 2051 nis0all_full(:) = nis0all(:) 2052 nie0all_full(:) = nie0all(:) 2053 nimppt_full (:) = nimppt (:) 2054 jpjall_full (:) = jpjall (:) 2055 njs0all_full(:) = njs0all(:) 2056 nje0all_full(:) = nje0all(:) 2057 njmppt_full (:) = njmppt (:) 2062 2058 2063 2059 CALL dom_grid_crs !swich de grille … … 2073 2069 WRITE(numout,*) 2074 2070 WRITE(numout,*) ' nproc = ' , nproc 2075 WRITE(numout,*) ' nlci = ' , nlci2076 WRITE(numout,*) ' nlcj = ' , nlcj2077 WRITE(numout,*) ' nldi = ' , nldi2078 WRITE(numout,*) ' nldj = ' , nldj2079 WRITE(numout,*) ' nlei = ' , nlei2080 WRITE(numout,*) ' nlej = ' , nlej2081 WRITE(numout,*) ' nlei_full=' , nlei_full2082 WRITE(numout,*) ' nldi_full=' , nldi_full2071 WRITE(numout,*) ' jpi = ' , jpi 2072 WRITE(numout,*) ' jpj = ' , jpj 2073 WRITE(numout,*) ' Nis0 = ' , Nis0 2074 WRITE(numout,*) ' Njs0 = ' , Njs0 2075 WRITE(numout,*) ' Nie0 = ' , Nie0 2076 WRITE(numout,*) ' Nje0 = ' , Nje0 2077 WRITE(numout,*) ' Nie0_full=' , Nie0_full 2078 WRITE(numout,*) ' Nis0_full=' , Nis0_full 2083 2079 WRITE(numout,*) ' nimpp = ' , nimpp 2084 2080 WRITE(numout,*) ' njmpp = ' , njmpp … … 2203 2199 mje_crs(:) = mje2_crs(:) 2204 2200 ELSE 2205 DO jj = 1, nlej_crs2201 DO jj = 1, Nje0_crs 2206 2202 mjs_crs(jj) = mjs2_crs(mjg_crs(jj)) - njmpp + 1 2207 2203 mje_crs(jj) = mje2_crs(mjg_crs(jj)) - njmpp + 1 2208 2204 ENDDO 2209 DO ji = 1, nlei_crs2205 DO ji = 1, Nie0_crs 2210 2206 mis_crs(ji) = mis2_crs(mig_crs(ji)) - nimpp + 1 2211 2207 mie_crs(ji) = mie2_crs(mig_crs(ji)) - nimpp + 1 … … 2213 2209 ENDIF 2214 2210 ! 2215 nistr = mis_crs(2) ; niend = mis_crs( nlci_crs - 1)2216 njstr = mjs_crs(3) ; njend = mjs_crs( nlcj_crs - 1)2211 nistr = mis_crs(2) ; niend = mis_crs(jpi_crs - 1) 2212 njstr = mjs_crs(3) ; njend = mjs_crs(jpj_crs - 1) 2217 2213 ! 2218 2214 END SUBROUTINE crs_dom_def -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/CRS/crsdomwri.F90
r12377 r12807 50 50 INTEGER :: ji, jj, jk ! dummy loop indices 51 51 INTEGER :: inum ! local units for 'mesh_mask.nc' file 52 INTEGER :: iif, iil, ijf, ijl53 52 CHARACTER(len=21) :: clnam ! filename (mesh and mask informations) 54 53 ! ! workspace … … 76 75 CALL iom_rstput( 0, 0, inum, 'fmask', fmask_crs, ktype = jp_i1 ) 77 76 78 79 tmask_i_crs(:,:) = tmask_crs(:,:,1) 80 iif = nn_hls 81 iil = nlci_crs - nn_hls + 1 82 ijf = nn_hls 83 ijl = nlcj_crs - nn_hls + 1 84 85 tmask_i_crs( 1:iif , : ) = 0._wp 86 tmask_i_crs(iil:jpi_crs, : ) = 0._wp 87 tmask_i_crs( : , 1:ijf ) = 0._wp 88 tmask_i_crs( : ,ijl:jpj_crs) = 0._wp 89 90 91 tpol_crs(1:jpiglo_crs,:) = 1._wp 92 fpol_crs(1:jpiglo_crs,:) = 1._wp 93 IF( jperio == 3 .OR. jperio == 4 ) THEN 94 tpol_crs(jpiglo_crs/2+1:jpiglo_crs,:) = 0._wp 95 fpol_crs( 1 :jpiglo_crs,:) = 0._wp 96 IF( mjg_crs(nlej_crs) == jpiglo_crs ) THEN 97 DO ji = iif+1, iil-1 98 tmask_i_crs(ji,nlej_crs-1) = tmask_i_crs(ji,nlej_crs-1) & 99 & * tpol_crs(mig_crs(ji),1) 100 ENDDO 101 ENDIF 102 ENDIF 103 IF( jperio == 5 .OR. jperio == 6 ) THEN 104 tpol_crs( 1 :jpiglo_crs,:)=0._wp 105 fpol_crs(jpiglo_crs/2+1:jpiglo_crs,:)=0._wp 106 ENDIF 107 108 CALL iom_rstput( 0, 0, inum, 'tmaskutil', tmask_i_crs, ktype = jp_i1 ) 109 ! ! unique point mask 77 CALL dom_uniq_crs( zprw, 'T' ) 78 zprt = tmask_crs(:,:,1) * zprw 79 CALL iom_rstput( 0, 0, inum, 'tmaskutil', zprt, ktype = jp_i1 ) 110 80 CALL dom_uniq_crs( zprw, 'U' ) 111 81 zprt = umask_crs(:,:,1) * zprw … … 211 181 REAL(wp) :: zshift ! shift value link to the process number 212 182 INTEGER :: ji ! dummy loop indices 213 LOGICAL , DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) :: lldbl! store whether each point is unique or not214 REAL(wp), DIMENSION(jpi_crs,jpj_crs ) ::ztstref183 LOGICAL , DIMENSION(jpi_crs,jpj_crs,1) :: lluniq ! store whether each point is unique or not 184 REAL(wp), DIMENSION(jpi_crs,jpj_crs ) :: ztstref 215 185 !!---------------------------------------------------------------------- 216 186 ! … … 218 188 ! in mpp: make sure that these values are different even between process 219 189 ! -> apply a shift value according to the process number 220 zshift = jpi_crs * jpj_crs * ( narea - 1 )190 zshift = (jpi_crs+1.) * (jpj_crs+1.) * ( narea - 1 ) ! we should use jpimax_crs but not existing 221 191 ztstref(:,:) = RESHAPE( (/ (zshift + REAL(ji,wp), ji = 1, jpi_crs*jpj_crs) /), (/ jpi_crs, jpj_crs /) ) 222 192 ! 223 puniq(:,:) = ztstref(:,:) ! default definition 224 CALL crs_lbc_lnk( puniq,cdgrd, 1. ) ! apply boundary conditions 225 lldbl(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed 226 ! 227 puniq(:,:) = 1. ! default definition 228 ! fill only the inner part of the cpu with llbl converted into real 229 puniq(nldi_crs:nlei_crs,nldj_crs:nlej_crs) = REAL( COUNT( lldbl(nldi_crs:nlei_crs,nldj_crs:nlej_crs,:), dim = 3 ) , wp ) 193 puniq(:,:) = ztstref(:,:) ! default definition 194 CALL crs_lbc_lnk( puniq,cdgrd, 1. ) ! apply boundary conditions 195 lluniq(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed 196 ! 197 puniq(:,:) = REAL( COUNT( lluniq(:,:,:), dim = 3 ), wp ) 230 198 ! 231 199 END SUBROUTINE dom_uniq_crs -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DIA/diadct.F90
r12489 r12807 409 409 ijloc=ijglo-njmpp+1 ! " 410 410 411 !verify if the point is on the local domain:(1, nlei)*(1,nlej)412 IF( iiloc >= 1 .AND. iiloc <= nlei.AND. &413 ijloc >= 1 .AND. ijloc <= nlej)THEN411 !verify if the point is on the local domain:(1,Nie0)*(1,Nje0) 412 IF( iiloc >= 1 .AND. iiloc <= Nie0 .AND. & 413 ijloc >= 1 .AND. ijloc <= Nje0 )THEN 414 414 iptloc = iptloc + 1 ! count local points 415 415 secs(jsec)%listPoint(iptloc) = POINT_SECTION(mi0(iiglo),mj0(ijglo)) ! store local coordinates … … 516 516 517 517 !which coordinate shall we verify ? 518 IF ( cdind=='I' )THEN ; itest= nlei; iind=1519 ELSE IF ( cdind=='J' )THEN ; itest= nlej; iind=2518 IF ( cdind=='I' )THEN ; itest=Nie0 ; iind=1 519 ELSE IF ( cdind=='J' )THEN ; itest=Nje0 ; iind=2 520 520 ELSE ; CALL ctl_stop("removepoints :Wrong value for cdind") 521 521 ENDIF -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/dom_oce.F90
r12586 r12807 75 75 ! ! domain MPP decomposition parameters 76 76 INTEGER , PUBLIC :: nimpp, njmpp !: i- & j-indexes for mpp-subdomain left bottom 77 INTEGER , PUBLIC :: nreci, nrecj !: overlap region in i and j78 77 INTEGER , PUBLIC :: nproc !: number for local processor 79 78 INTEGER , PUBLIC :: narea !: number for local area … … 85 84 86 85 INTEGER, PUBLIC :: npolj !: north fold mark (0, 3 or 4) 87 INTEGER, PUBLIC :: nlci, nldi, nlei !: i-dimensions of the local subdomain and its first and last indoor indices88 INTEGER, PUBLIC :: nlcj, nldj, nlej !: i-dimensions of the local subdomain and its first and last indoor indices89 86 INTEGER, PUBLIC :: noea, nowe !: index of the local neighboring processors in 90 87 INTEGER, PUBLIC :: noso, nono !: east, west, south and north directions … … 97 94 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: mj0, mj1 !: global ==> local domain j-index (mj0=1 and mj1=0 if the global index 98 95 ! ! is not in the local domain) 99 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nimppt,njmppt !: i-, j-indexes for each processor100 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ibonit,ibonjt !: i-, j- processor neighbour existence101 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nlcit , nlcjt !: dimensions of everysubdomain102 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: n ldit , nldjt !: first, last indoor index for each i-domain103 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: n leit , nlejt !: first, last indoor index for each j-domain104 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfiimpp, nfipproc, nfi lcit96 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nimppt, njmppt !: i-, j-indexes for each processor 97 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ibonit, ibonjt !: i-, j- processor neighbour existence 98 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: jpiall, jpjall !: dimensions of all subdomain 99 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nis0all, njs0all !: first, last indoor index for all i-subdomain 100 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nie0all, nje0all !: first, last indoor index for all j-subdomain 101 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfiimpp, nfipproc, nfijpit 105 102 106 103 !!---------------------------------------------------------------------- … … 185 182 REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) :: tmask, umask, vmask, wmask !: land/ocean mask at T-, U-, V-pts 186 183 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wumask, wvmask !: land/ocean mask at WT-, WU- and WV-pts 187 188 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: tpol, fpol !: north fold mask (jperio= 3 or 4)189 184 190 185 !!---------------------------------------------------------------------- … … 250 245 ALLOCATE( mig(jpi), mjg(jpj), STAT=ierr(1) ) 251 246 ! 252 ALLOCATE( mi0(jpiglo) , mi1 (jpiglo), mj0(jpjglo) , mj1 (jpjglo) , & 253 & tpol(jpiglo) , fpol(jpiglo) , STAT=ierr(2) ) 247 ALLOCATE( mi0(jpiglo), mi1(jpiglo), mj0(jpjglo), mj1(jpjglo), STAT=ierr(2) ) 254 248 ! 255 249 ALLOCATE( glamt(jpi,jpj) , glamu(jpi,jpj) , glamv(jpi,jpj) , glamf(jpi,jpj) , & -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/domhgr.F90
r12738 r12807 31 31 USE iom ! I/O library 32 32 USE lib_mpp ! MPP library 33 USE lbclnk ! lateal boundary condition / mpp exchanges 33 34 USE timing ! Timing 34 35 … … 199 200 CALL iom_get( inum, jpdom_global, 'gphif', pphif, cd_type = 'F', psgn = 1._wp ) 200 201 ! 201 CALL iom_get( inum, jpdom_global, 'e1t' , pe1t , cd_type = 'T', psgn = 1._wp )202 CALL iom_get( inum, jpdom_global, 'e1u' , pe1u , cd_type = 'U', psgn = 1._wp )203 CALL iom_get( inum, jpdom_global, 'e1v' , pe1v , cd_type = 'V', psgn = 1._wp )204 CALL iom_get( inum, jpdom_global, 'e1f' , pe1f , cd_type = 'F', psgn = 1._wp )205 ! 206 CALL iom_get( inum, jpdom_global, 'e2t' , pe2t , cd_type = 'T', psgn = 1._wp )207 CALL iom_get( inum, jpdom_global, 'e2u' , pe2u , cd_type = 'U', psgn = 1._wp )208 CALL iom_get( inum, jpdom_global, 'e2v' , pe2v , cd_type = 'V', psgn = 1._wp )209 CALL iom_get( inum, jpdom_global, 'e2f' , pe2f , cd_type = 'F', psgn = 1._wp )202 CALL iom_get( inum, jpdom_global, 'e1t' , pe1t , cd_type = 'T', psgn = 1._wp, kfill = jpfillcopy ) 203 CALL iom_get( inum, jpdom_global, 'e1u' , pe1u , cd_type = 'U', psgn = 1._wp, kfill = jpfillcopy ) 204 CALL iom_get( inum, jpdom_global, 'e1v' , pe1v , cd_type = 'V', psgn = 1._wp, kfill = jpfillcopy ) 205 CALL iom_get( inum, jpdom_global, 'e1f' , pe1f , cd_type = 'F', psgn = 1._wp, kfill = jpfillcopy ) 206 ! 207 CALL iom_get( inum, jpdom_global, 'e2t' , pe2t , cd_type = 'T', psgn = 1._wp, kfill = jpfillcopy ) 208 CALL iom_get( inum, jpdom_global, 'e2u' , pe2u , cd_type = 'U', psgn = 1._wp, kfill = jpfillcopy ) 209 CALL iom_get( inum, jpdom_global, 'e2v' , pe2v , cd_type = 'V', psgn = 1._wp, kfill = jpfillcopy ) 210 CALL iom_get( inum, jpdom_global, 'e2f' , pe2f , cd_type = 'F', psgn = 1._wp, kfill = jpfillcopy ) 210 211 ! 211 212 IF( iom_varid( inum, 'ff_f', ldstop = .FALSE. ) > 0 .AND. & … … 221 222 IF( iom_varid( inum, 'e1e2u', ldstop = .FALSE. ) > 0 ) THEN 222 223 IF(lwp) WRITE(numout,*) ' e1e2u & e1e2v read in ', TRIM( cn_domcfg ), ' file' 223 CALL iom_get( inum, jpdom_global, 'e1e2u', pe1e2u, cd_type = 'U', psgn = 1._wp )224 CALL iom_get( inum, jpdom_global, 'e1e2v', pe1e2v, cd_type = 'V', psgn = 1._wp )224 CALL iom_get( inum, jpdom_global, 'e1e2u', pe1e2u, cd_type = 'U', psgn = 1._wp, kfill = jpfillcopy ) 225 CALL iom_get( inum, jpdom_global, 'e1e2v', pe1e2v, cd_type = 'V', psgn = 1._wp, kfill = jpfillcopy ) 225 226 ke1e2u_v = 1 226 227 ELSE -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/dommsk.F90
r12738 r12807 25 25 USE oce ! ocean dynamics and tracers 26 26 USE dom_oce ! ocean space and time domain 27 USE domutl ! 27 28 USE usrdef_fmask ! user defined fmask 28 29 USE bdy_oce ! open boundary … … 88 89 ! 89 90 INTEGER :: ji, jj, jk ! dummy loop indices 90 INTEGER :: iif, iil ! local integers91 INTEGER :: ijf, ijl ! - -92 91 INTEGER :: iktop, ikbot ! - - 93 92 INTEGER :: ios, inum … … 131 130 ! 132 131 tmask(:,:,:) = 0._wp 133 DO_2D_ 11_11132 DO_2D_00_00 134 133 iktop = k_top(ji,jj) 135 134 ikbot = k_bot(ji,jj) 136 135 IF( iktop /= 0 ) THEN ! water in the column 137 tmask(ji,jj,iktop:ikbot 136 tmask(ji,jj,iktop:ikbot) = 1._wp 138 137 ENDIF 139 138 END_2D 140 139 ! 141 ! the following callis mandatory140 ! the following is mandatory 142 141 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 CALL lbc_lnk( 'dommsk', tmask , 'T', 1._wp ) ! Lateral boundary conditions 142 IF( .NOT. (nbondj == 1 .OR. nbondj == 0 .OR. l_Jperio) ) THEN 143 tmask(mi0( 1 ):mi1(jpiglo),mj0(Njs0):mj1(Njs0 ),:) = 0._wp ! line number Njs0 at 0 144 ENDIF 145 IF( .NOT. (nbondi == 1 .OR. nbondi == 0 .OR. l_Iperio) ) THEN 146 tmask(mi0(Nis0):mi1( Nis0),mj0( 1 ):mj1(jpjglo),:) = 0._wp ! column number Nis0 at 0 147 ENDIF 148 CALL lbc_lnk( 'dommsk', tmask, 'T', 1._wp ) ! Lateral boundary conditions 144 149 145 150 ! Mask corrections for bdy (read in mppini2) … … 186 191 END DO 187 192 188 189 193 ! Ocean/land column mask at t-, u-, and v-points (i.e. at least 1 wet cell in the vertical) 190 194 ! ---------------------------------------------- … … 193 197 ssvmask(:,:) = MAXVAL( vmask(:,:,:), DIM=3 ) 194 198 195 196 199 ! Interior domain mask (used for global sum) 197 200 ! -------------------- 198 201 ! 199 iif = nn_hls ; iil = nlci - nn_hls + 1 200 ijf = nn_hls ; ijl = nlcj - nn_hls + 1 201 ! 202 ! ! halo mask : 0 on the halo and 1 elsewhere 203 tmask_h(:,:) = 1._wp 204 tmask_h( 1 :iif, : ) = 0._wp ! first columns 205 tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns) 206 tmask_h( : , 1 :ijf) = 0._wp ! first rows 207 tmask_h( : ,ijl:jpj) = 0._wp ! last rows (including mpp extra rows) 208 ! 209 ! ! north fold mask 210 tpol(1:jpiglo) = 1._wp 211 fpol(1:jpiglo) = 1._wp 212 IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot 213 tpol(jpiglo/2+1:jpiglo) = 0._wp 214 fpol( 1 :jpiglo) = 0._wp 215 IF( mjg(nlej) == jpjglo ) THEN ! only half of the nlcj-1 row for tmask_h 216 DO ji = iif+1, iil-1 217 tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji)) 218 END DO 219 ENDIF 220 ENDIF 221 ! 222 IF( jperio == 5 .OR. jperio == 6 ) THEN ! F-point pivot 223 tpol( 1 :jpiglo) = 0._wp 224 fpol(jpiglo/2+1:jpiglo) = 0._wp 225 ENDIF 202 CALL dom_uniq( tmask_h, 'T' ) 226 203 ! 227 204 ! ! interior mask : 2D ocean mask x halo mask 228 205 tmask_i(:,:) = ssmask(:,:) * tmask_h(:,:) 229 230 206 231 207 ! Lateral boundary conditions on velocity (modify fmask) … … 261 237 #if defined key_agrif 262 238 IF( .NOT. AGRIF_Root() ) THEN 263 IF ((nbondi == 1).OR.(nbondi == 2)) fmask( nlci-1 , :,jk) = 0.e0 ! east264 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , :,jk) = 0.e0 ! west265 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1,jk) = 0.e0 ! north266 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1,jk) = 0.e0 ! south239 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(jpi-1, : ,jk) = 0.e0 ! east 240 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 241 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,jpj-1,jk) = 0.e0 ! north 242 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 267 243 ENDIF 268 244 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/domutl.F90
r12766 r12807 1 MODULE dom ngb1 MODULE domutl 2 2 !!====================================================================== 3 !! *** MODULE dom ngb***4 !! Grid search: find the closest grid point from a given on/lat position3 !! *** MODULE domutl *** 4 !! Grid utilities: 5 5 !!====================================================================== 6 !! History : 3.2 ! 2009-11(S. Masson) Original code6 !! History : 4.2 ! 2020-04 (S. Masson) Original code 7 7 !!---------------------------------------------------------------------- 8 8 9 9 !!---------------------------------------------------------------------- 10 10 !! dom_ngb : find the closest grid point from a given lon/lat position 11 !! dom_uniq : identify unique point of a grid (TUVF) 11 12 !!---------------------------------------------------------------------- 13 ! 12 14 USE dom_oce ! ocean space and time domain 13 15 ! 14 16 USE in_out_manager ! I/O manager 17 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 15 18 USE lib_mpp ! for mppsum 16 19 … … 18 21 PRIVATE 19 22 20 PUBLIC dom_ngb ! routine called in iom.F90 module 23 PUBLIC dom_ngb ! routine called in iom.F90 module 24 PUBLIC dom_uniq ! Called by dommsk and domwri 21 25 22 26 !!---------------------------------------------------------------------- 23 !! NEMO/OCE 4. 0 , NEMO Consortium (2018)27 !! NEMO/OCE 4.2 , NEMO Consortium (2020) 24 28 !! $Id$ 25 29 !! Software governed by the CeCILL license (see ./LICENSE) … … 47 51 !!-------------------------------------------------------------------- 48 52 ! 49 zmask(:,:) = 0._wp50 53 ik = 1 51 54 IF ( PRESENT(kkk) ) ik=kkk 55 ! 56 CALL dom_uniq(zmask,cdgrid) 57 ! 52 58 SELECT CASE( cdgrid ) 53 CASE( 'U' ) ; zglam(:,:) = glamu(:,:) ; zgphi(:,:) = gphiu(:,:) ; zmask(nldi:nlei,nldj:nlej) = umask(nldi:nlei,nldj:nlej,ik)54 CASE( 'V' ) ; zglam(:,:) = glamv(:,:) ; zgphi(:,:) = gphiv(:,:) ; zmask(nldi:nlei,nldj:nlej) = vmask(nldi:nlei,nldj:nlej,ik)55 CASE( 'F' ) ; zglam(:,:) = glamf(:,:) ; zgphi(:,:) = gphif(:,:) ; zmask(nldi:nlei,nldj:nlej) = fmask(nldi:nlei,nldj:nlej,ik)56 CASE DEFAULT ; zglam(:,:) = glamt(:,:) ; zgphi(:,:) = gphit(:,:) ; zmask(nldi:nlei,nldj:nlej) = tmask(nldi:nlei,nldj:nlej,ik)59 CASE( 'U' ) ; zglam(:,:) = glamu(:,:) ; zgphi(:,:) = gphiu(:,:) ; zmask(:,:) = zmask(:,:) * umask(:,:,ik) 60 CASE( 'V' ) ; zglam(:,:) = glamv(:,:) ; zgphi(:,:) = gphiv(:,:) ; zmask(:,:) = zmask(:,:) * vmask(:,:,ik) 61 CASE( 'F' ) ; zglam(:,:) = glamf(:,:) ; zgphi(:,:) = gphif(:,:) ; zmask(:,:) = zmask(:,:) * fmask(:,:,ik) 62 CASE DEFAULT ; zglam(:,:) = glamt(:,:) ; zgphi(:,:) = gphit(:,:) ; zmask(:,:) = zmask(:,:) * tmask(:,:,ik) 57 63 END SELECT 58 64 ! 59 65 zlon = MOD( plon + 720., 360. ) ! plon between 0 and 360 60 66 zglam(:,:) = MOD( zglam(:,:) + 720., 360. ) ! glam between 0 and 360 … … 77 83 END SUBROUTINE dom_ngb 78 84 85 86 SUBROUTINE dom_uniq( puniq, cdgrd ) 87 !!---------------------------------------------------------------------- 88 !! *** ROUTINE dom_uniq *** 89 !! 90 !! ** Purpose : identify unique point of a grid (TUVF) 91 !! 92 !! ** Method : 1) aplly lbc_lnk on an array with different values for each element 93 !! 2) check which elements have been changed 94 !!---------------------------------------------------------------------- 95 CHARACTER(len=1) , INTENT(in ) :: cdgrd ! 96 REAL(wp), DIMENSION(:,:), INTENT(inout) :: puniq ! 97 ! 98 REAL(wp) :: zshift ! shift value link to the process number 99 INTEGER :: ji ! dummy loop indices 100 LOGICAL , DIMENSION(jpi,jpj,1) :: lluniq ! store whether each point is unique or not 101 REAL(wp), DIMENSION(jpi,jpj ) :: ztstref 102 !!---------------------------------------------------------------------- 103 ! 104 ! build an array with different values for each element 105 ! in mpp: make sure that these values are different even between process 106 ! -> apply a shift value according to the process number 107 zshift = jpimax * jpjmax * ( narea - 1 ) 108 ztstref(:,:) = RESHAPE( (/ (zshift + REAL(ji,wp), ji = 1, jpi*jpj) /), (/ jpi, jpj /) ) 109 ! 110 puniq(:,:) = ztstref(:,:) ! default definition 111 CALL lbc_lnk( 'domwri', puniq, cdgrd, 1. ) ! apply boundary conditions 112 lluniq(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have not been changed 113 ! 114 puniq(:,:) = REAL( COUNT( lluniq(:,:,:), dim = 3 ), wp ) 115 ! 116 END SUBROUTINE dom_uniq 117 79 118 !!====================================================================== 80 END MODULE dom ngb119 END MODULE domutl -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/domwri.F90
r12377 r12807 13 13 !!---------------------------------------------------------------------- 14 14 !! dom_wri : create and write mesh and mask file(s) 15 !! dom_uniq : identify unique point of a grid (TUVF)16 15 !! dom_stiff : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 17 16 !!---------------------------------------------------------------------- 18 17 ! 19 18 USE dom_oce ! ocean space and time domain 19 USE domutl ! 20 20 USE phycst , ONLY : rsmall 21 21 USE wet_dry, ONLY : ll_wd ! Wetting and drying … … 182 182 ! ! ============================ 183 183 END SUBROUTINE dom_wri 184 185 186 SUBROUTINE dom_uniq( puniq, cdgrd )187 !!----------------------------------------------------------------------188 !! *** ROUTINE dom_uniq ***189 !!190 !! ** Purpose : identify unique point of a grid (TUVF)191 !!192 !! ** Method : 1) aplly lbc_lnk on an array with different values for each element193 !! 2) check which elements have been changed194 !!----------------------------------------------------------------------195 CHARACTER(len=1) , INTENT(in ) :: cdgrd !196 REAL(wp), DIMENSION(:,:), INTENT(inout) :: puniq !197 !198 REAL(wp) :: zshift ! shift value link to the process number199 INTEGER :: ji ! dummy loop indices200 LOGICAL, DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) :: lldbl ! store whether each point is unique or not201 REAL(wp), DIMENSION(jpi,jpj) :: ztstref202 !!----------------------------------------------------------------------203 !204 ! build an array with different values for each element205 ! in mpp: make sure that these values are different even between process206 ! -> apply a shift value according to the process number207 zshift = jpi * jpj * ( narea - 1 )208 ztstref(:,:) = RESHAPE( (/ (zshift + REAL(ji,wp), ji = 1, jpi*jpj) /), (/ jpi, jpj /) )209 !210 puniq(:,:) = ztstref(:,:) ! default definition211 CALL lbc_lnk( 'domwri', puniq, cdgrd, 1. ) ! apply boundary conditions212 lldbl(:,:,1) = puniq(:,:) == ztstref(:,:) ! check which values have been changed213 !214 puniq(:,:) = 1. ! default definition215 ! fill only the inner part of the cpu with llbl converted into real216 puniq(nldi:nlei,nldj:nlej) = REAL( COUNT( lldbl(nldi:nlei,nldj:nlej,:), dim = 3 ) , wp )217 !218 END SUBROUTINE dom_uniq219 184 220 185 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/domzgr.F90
r12738 r12807 236 236 CALL iom_get( inum, jpdom_unknown, 'e3w_1d' , pe3w_1d ) 237 237 ! 238 CALL iom_get( inum, jpdom_global, 'e3t_0' , pe3t , cd_type = 'T', psgn = 1._wp ) ! 3D coordinate239 CALL iom_get( inum, jpdom_global, 'e3u_0' , pe3u , cd_type = 'U', psgn = 1._wp )240 CALL iom_get( inum, jpdom_global, 'e3v_0' , pe3v , cd_type = 'V', psgn = 1._wp )241 CALL iom_get( inum, jpdom_global, 'e3f_0' , pe3f , cd_type = 'F', psgn = 1._wp )242 CALL iom_get( inum, jpdom_global, 'e3w_0' , pe3w , cd_type = 'W', psgn = 1._wp )243 CALL iom_get( inum, jpdom_global, 'e3uw_0' , pe3uw, cd_type = 'U', psgn = 1._wp )244 CALL iom_get( inum, jpdom_global, 'e3vw_0' , pe3vw, cd_type = 'V', psgn = 1._wp )238 CALL iom_get( inum, jpdom_global, 'e3t_0' , pe3t , cd_type = 'T', psgn = 1._wp, kfill = jpfillcopy ) ! 3D coordinate 239 CALL iom_get( inum, jpdom_global, 'e3u_0' , pe3u , cd_type = 'U', psgn = 1._wp, kfill = jpfillcopy ) 240 CALL iom_get( inum, jpdom_global, 'e3v_0' , pe3v , cd_type = 'V', psgn = 1._wp, kfill = jpfillcopy ) 241 CALL iom_get( inum, jpdom_global, 'e3f_0' , pe3f , cd_type = 'F', psgn = 1._wp, kfill = jpfillcopy ) 242 CALL iom_get( inum, jpdom_global, 'e3w_0' , pe3w , cd_type = 'W', psgn = 1._wp, kfill = jpfillcopy ) 243 CALL iom_get( inum, jpdom_global, 'e3uw_0' , pe3uw, cd_type = 'U', psgn = 1._wp, kfill = jpfillcopy ) 244 CALL iom_get( inum, jpdom_global, 'e3vw_0' , pe3vw, cd_type = 'V', psgn = 1._wp, kfill = jpfillcopy ) 245 245 ! 246 246 ! !* depths … … 254 254 CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d ) 255 255 CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) 256 CALL iom_get( inum, jpdom_global , 'gdept_0' , pdept 257 CALL iom_get( inum, jpdom_global , 'gdepw_0' , pdepw 256 CALL iom_get( inum, jpdom_global , 'gdept_0' , pdept, kfill = jpfillcopy ) 257 CALL iom_get( inum, jpdom_global , 'gdepw_0' , pdepw, kfill = jpfillcopy ) 258 258 ! 259 259 ELSE !- depths computed from e3. scale factors -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DYN/divhor.F90
r12377 r12807 86 86 #if defined key_agrif 87 87 IF( .NOT. Agrif_Root() ) THEN 88 IF( nbondi == -1 .OR. nbondi == 2 ) hdiv( 2 , :,:) = 0._wp ! west89 IF( nbondi == 1 .OR. nbondi == 2 ) hdiv( nlci-1, :,:) = 0._wp ! east90 IF( nbondj == -1 .OR. nbondj == 2 ) hdiv( : , 2,:) = 0._wp ! south91 IF( nbondj == 1 .OR. nbondj == 2 ) hdiv( : ,nlcj-1,:) = 0._wp ! north88 IF( nbondi == -1 .OR. nbondi == 2 ) hdiv( 2 , : ,:) = 0._wp ! west 89 IF( nbondi == 1 .OR. nbondi == 2 ) hdiv(jpi-1, : ,:) = 0._wp ! east 90 IF( nbondj == -1 .OR. nbondj == 2 ) hdiv( : , 2 ,:) = 0._wp ! south 91 IF( nbondj == 1 .OR. nbondj == 2 ) hdiv( : ,jpj-1,:) = 0._wp ! north 92 92 ENDIF 93 93 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DYN/dynldf_lap_blp.F90
r12377 r12807 74 74 DO_2D_01_01 75 75 ! ! ahm * e3 * curl (computed from 1 to jpim1/jpjm1) 76 !!gm open question here : e3f at before or now ? probably now... 77 !!gm note that ahmf has already been multiplied by fmask 78 zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * e3f(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1) & 76 zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * e3f(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1) & ! ahmf already * by fmask 79 77 & * ( e2v(ji ,jj-1) * pv(ji ,jj-1,jk) - e2v(ji-1,jj-1) * pv(ji-1,jj-1,jk) & 80 78 & - e1u(ji-1,jj ) * pu(ji-1,jj ,jk) + e1u(ji-1,jj-1) * pu(ji-1,jj-1,jk) ) 81 79 ! ! ahm * div (computed from 2 to jpi/jpj) 82 !!gm note that ahmt has already been multiplied by tmask 83 zdiv(ji,jj) = ahmt(ji,jj,jk) * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kbb) & 80 zdiv(ji,jj) = ahmt(ji,jj,jk) * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kbb) & ! ahmt already * by tmask 84 81 & * ( e2u(ji,jj)*e3u(ji,jj,jk,Kbb) * pu(ji,jj,jk) - e2u(ji-1,jj)*e3u(ji-1,jj,jk,Kbb) * pu(ji-1,jj,jk) & 85 82 & + e1v(ji,jj)*e3v(ji,jj,jk,Kbb) * pv(ji,jj,jk) - e1v(ji,jj-1)*e3v(ji,jj-1,jk,Kbb) * pv(ji,jj-1,jk) ) … … 87 84 ! 88 85 DO_2D_00_00 89 pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * ( &86 pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * umask(ji,jj,jk) * ( & ! * by umask is mandatory for dyn_ldf_blp use 90 87 & - ( zcur(ji ,jj) - zcur(ji,jj-1) ) * r1_e2u(ji,jj) / e3u(ji,jj,jk,Kmm) & 91 & + ( zdiv(ji+1,jj) - zdiv(ji,jj ) ) * r1_e1u(ji,jj) )88 & + ( zdiv(ji+1,jj) - zdiv(ji,jj ) ) * r1_e1u(ji,jj) ) 92 89 ! 93 pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zsign * ( &90 pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zsign * vmask(ji,jj,jk) * ( & ! * by vmask is mandatory for dyn_ldf_blp use 94 91 & ( zcur(ji,jj ) - zcur(ji-1,jj) ) * r1_e1v(ji,jj) / e3v(ji,jj,jk,Kmm) & 95 & + ( zdiv(ji,jj+1) - zdiv(ji ,jj) ) * r1_e2v(ji,jj) )92 & + ( zdiv(ji,jj+1) - zdiv(ji ,jj) ) * r1_e2v(ji,jj) ) 96 93 END_2D 97 94 ! ! =============== -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DYN/sshwzv.F90
r12489 r12807 202 202 #if defined key_agrif 203 203 IF( .NOT. AGRIF_Root() ) THEN 204 IF ((nbondi == 1).OR.(nbondi == 2)) pww( nlci-1 , :,:) = 0.e0 ! east205 IF ((nbondi == -1).OR.(nbondi == 2)) pww( 2 , :,:) = 0.e0 ! west206 IF ((nbondj == 1).OR.(nbondj == 2)) pww( : ,nlcj-1,:) = 0.e0 ! north207 IF ((nbondj == -1).OR.(nbondj == 2)) pww( : ,2,:) = 0.e0 ! south204 IF ((nbondi == 1).OR.(nbondi == 2)) pww(jpi-1, : ,:) = 0.e0 ! east 205 IF ((nbondi == -1).OR.(nbondi == 2)) pww( 2 , : ,:) = 0.e0 ! west 206 IF ((nbondj == 1).OR.(nbondj == 2)) pww( : ,jpj-1,:) = 0.e0 ! north 207 IF ((nbondj == -1).OR.(nbondj == 2)) pww( : , 2 ,:) = 0.e0 ! south 208 208 ENDIF 209 209 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/FLO/floblk.F90
r12489 r12807 100 100 222 DO jfl = 1, jpnfl 101 101 # if defined key_mpp_mpi 102 IF( iil(jfl) >= mig( nldi) .AND. iil(jfl) <= mig(nlei) .AND. &103 ijl(jfl) >= mjg( nldj) .AND. ijl(jfl) <= mjg(nlej) ) THEN102 IF( iil(jfl) >= mig(Nis0) .AND. iil(jfl) <= mig(Nie0) .AND. & 103 ijl(jfl) >= mjg(Njs0) .AND. ijl(jfl) <= mjg(Nje0) ) THEN 104 104 iiloc(jfl) = iil(jfl) - mig(1) + 1 105 105 ijloc(jfl) = ijl(jfl) - mjg(1) + 1 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/FLO/flodom.F90
r12377 r12807 155 155 ikmfl(jfl) = 0 156 156 # if defined key_mpp_mpi 157 DO ji = MAX( nldi,2), nlei158 DO jj = MAX( nldj,2), nlej! NO vector opt.157 DO ji = MAX(Nis0,2), Nie0 158 DO jj = MAX(Njs0,2), Nje0 ! NO vector opt. 159 159 # else 160 160 DO ji = 2, jpi -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/FLO/florst.F90
r11536 r12807 98 98 IF( lk_mpp ) THEN 99 99 DO jfl = 1, jpnfl 100 IF( (INT(tpifl(jfl)) >= mig( nldi)) .AND. &101 &(INT(tpifl(jfl)) <= mig( nlei)) .AND. &102 &(INT(tpjfl(jfl)) >= mjg( nldj)) .AND. &103 &(INT(tpjfl(jfl)) <= mjg( nlej)) ) THEN100 IF( (INT(tpifl(jfl)) >= mig(Nis0)) .AND. & 101 &(INT(tpifl(jfl)) <= mig(Nie0)) .AND. & 102 &(INT(tpjfl(jfl)) >= mjg(Njs0)) .AND. & 103 &(INT(tpjfl(jfl)) <= mjg(Nje0)) ) THEN 104 104 iperproc(narea) = iperproc(narea)+1 105 105 ENDIF -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/FLO/flowri.F90
r12489 r12807 105 105 ibfloc = mj1( ibfl ) 106 106 107 IF( nldi <= iafloc .AND. iafloc <= nlei.AND. &108 & nldj <= ibfloc .AND. ibfloc <= nlej) THEN107 IF( Nis0 <= iafloc .AND. iafloc <= Nie0 .AND. & 108 & Njs0 <= ibfloc .AND. ibfloc <= Nje0 ) THEN 109 109 110 110 !the float is inside of current proc's area -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ICB/icbini.F90
r12738 r12807 133 133 ! first entry with narea for this processor is left hand interior index 134 134 ! last entry is right hand interior index 135 jj = nlcj/2135 jj = jpj/2 136 136 nicbdi = -1 137 137 nicbei = -1 … … 149 149 ! 150 150 ! repeat for j direction 151 ji = nlci/2151 ji = jpi/2 152 152 nicbdj = -1 153 153 nicbej = -1 … … 166 166 ! special for east-west boundary exchange we save the destination index 167 167 i1 = MAX( nicbdi-1, 1) 168 i3 = INT( src_calving(i1, nlcj/2) )168 i3 = INT( src_calving(i1,jpj/2) ) 169 169 jj = INT( i3/nicbpack ) 170 170 ricb_left = REAL( i3 - nicbpack*jj, wp ) 171 171 i1 = MIN( nicbei+1, jpi ) 172 i3 = INT( src_calving(i1, nlcj/2) )172 i3 = INT( src_calving(i1,jpj/2) ) 173 173 jj = INT( i3/nicbpack ) 174 174 ricb_right = REAL( i3 - nicbpack*jj, wp ) … … 203 203 WRITE(numicb,*) 'processor ', narea 204 204 WRITE(numicb,*) 'jpi, jpj ', jpi, jpj 205 WRITE(numicb,*) ' nldi, nlei ', nldi, nlei206 WRITE(numicb,*) ' nldj, nlej ', nldj, nlej205 WRITE(numicb,*) 'Nis0, Nie0 ', Nis0, Nie0 206 WRITE(numicb,*) 'Njs0, Nje0 ', Njs0, Nje0 207 207 WRITE(numicb,*) 'berg i interior ', nicbdi, nicbei 208 208 WRITE(numicb,*) 'berg j interior ', nicbdj, nicbej 209 209 WRITE(numicb,*) 'berg left ', ricb_left 210 210 WRITE(numicb,*) 'berg right ', ricb_right 211 jj = nlcj/2211 jj = jpj/2 212 212 WRITE(numicb,*) "central j line:" 213 213 WRITE(numicb,*) "i processor" … … 215 215 WRITE(numicb,*) "i point" 216 216 WRITE(numicb,*) (INT(src_calving(ji,jj)), ji=1,jpi) 217 ji = nlci/2217 ji = jpi/2 218 218 WRITE(numicb,*) "central i line:" 219 219 WRITE(numicb,*) "j processor" -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ICB/icbrst.F90
r12745 r12807 91 91 ij = INT( localpt%yj + 0.5 ) 92 92 ! Only proceed if this iceberg is on the local processor (excluding halos). 93 IF ( ii >= mig( nldi) .AND. ii <= mig(nlei) .AND. &94 & ij >= mjg( nldj) .AND. ij <= mjg(nlej) ) THEN93 IF ( ii >= mig(Nis0) .AND. ii <= mig(Nie0) .AND. & 94 & ij >= mjg(Njs0) .AND. ij <= mjg(Nje0) ) THEN 95 95 96 96 CALL iom_get( ncid, jpdom_unknown, 'number', zdata(:) , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) … … 226 226 227 227 ! Dimensions 228 nret = NF90_DEF_DIM(ncid, 'x', nlei-nldi+1, ix_dim)228 nret = NF90_DEF_DIM(ncid, 'x', Ni_0, ix_dim) 229 229 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim x failed') 230 230 231 nret = NF90_DEF_DIM(ncid, 'y', nlej-nldj+1, iy_dim)231 nret = NF90_DEF_DIM(ncid, 'y', Nj_0, iy_dim) 232 232 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_def_dim y failed') 233 233 … … 243 243 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number_total' , jpnij ) 244 244 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_number' , narea-1 ) 245 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/ 1 , 2/) )246 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global' , (/ jpiglo , jpjglo/) )247 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local' , (/ nlei - nldi + 1, nlej - nldj + 1/) )248 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/ mig( nldi) , mjg(nldj)/) )249 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last' , (/ mig( nlei) , mjg(nlej)/) )250 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/ 0 , 0/) )251 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end' , (/ 0 , 0/) )245 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_dimensions_ids' , (/ 1 , 2 /) ) 246 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_global' , (/ jpiglo , jpjglo /) ) 247 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_size_local' , (/ Ni_0 , Nj_0 /) ) 248 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_first' , (/ mig(Nis0), mjg(Njs0) /) ) 249 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_position_last' , (/ mig(Nie0), mjg(Nje0) /) ) 250 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_start', (/ 0 , 0 /) ) 251 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_halo_size_end' , (/ 0 , 0 /) ) 252 252 nret = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'DOMAIN_type' , 'BOX' ) 253 253 ENDIF … … 341 341 nstrt3(1) = 1 342 342 nstrt3(2) = 1 343 nlngth3(1) = nlei - nldi + 1344 nlngth3(2) = nlej - nldj + 1343 nlngth3(1) = Ni_0 344 nlngth3(2) = Nj_0 345 345 nlngth3(3) = 1 346 346 347 347 DO jn=1,nclasses 348 348 nstrt3(3) = jn 349 nret = NF90_PUT_VAR( ncid, nsiceid, berg_grid%stored_ice( nldi:nlei,nldj:nlej,jn), nstrt3, nlngth3 )349 nret = NF90_PUT_VAR( ncid, nsiceid, berg_grid%stored_ice(Nis0:Nie0,Njs0:Nje0,jn), nstrt3, nlngth3 ) 350 350 IF (nret .ne. NF90_NOERR) THEN 351 351 IF( lwp ) WRITE(numout,*) TRIM(NF90_STRERROR( nret )) … … 358 358 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var kount failed') 359 359 360 nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat( nldi:nlei,nldj:nlej) )360 nret = NF90_PUT_VAR( ncid, nsheatid, berg_grid%stored_heat(Nis0:Nie0,Njs0:Nje0) ) 361 361 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var stored_heat failed') 362 362 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: stored_heat written' 363 363 364 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving( nldi:nlei,nldj:nlej) )364 nret = NF90_PUT_VAR( ncid, ncalvid , src_calving(Nis0:Nie0,Njs0:Nje0) ) 365 365 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving failed') 366 nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx( nldi:nlei,nldj:nlej) )366 nret = NF90_PUT_VAR( ncid, ncalvhid, src_calving_hflx(Nis0:Nie0,Njs0:Nje0) ) 367 367 IF (nret .ne. NF90_NOERR) CALL ctl_stop('icebergs, write_restart: nf_put_var calving_hflx failed') 368 368 IF( lwp ) WRITE(numout,*) 'file: ',TRIM(cl_path)//TRIM(cl_filename),' var: calving written' -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom.F90
r12745 r12807 21 21 !!---------------------------------------------------------------------- 22 22 USE dom_oce ! ocean space and time domain 23 USE domutl ! 23 24 USE c1d ! 1D vertical configuration 24 25 USE flo_oce ! floats module declarations … … 34 35 USE ice , ONLY : jpl 35 36 #endif 36 USE domngb ! ocean space and time domain37 37 USE phycst ! physical constants 38 38 USE dianam ! build name of file … … 117 117 REAL(wp), DIMENSION(2,jpkam1) :: za_bnds ! ABL vertical boundaries 118 118 LOGICAL :: ll_tmppatch = .TRUE. !: seb: patch before we remove periodicity 119 INTEGER :: nldi_save, nlei_save !: and close boundaries in output files120 INTEGER :: nldj_save, nlej_save !:119 INTEGER :: Nis0_save, Nie0_save !: and close boundaries in output files 120 INTEGER :: Njs0_save, Nje0_save !: 121 121 LOGICAL :: ll_closedef = .TRUE. 122 122 !!---------------------------------------------------------------------- … … 127 127 ENDIF 128 128 IF ( ll_tmppatch ) THEN 129 nldi_save = nldi ; nlei_save = nlei130 nldj_save = nldj ; nlej_save = nlej131 IF( nimpp == 1 ) nldi= 1132 IF( nimpp + jpi - 1 == jpiglo ) nlei= jpi133 IF( njmpp == 1 ) nldj= 1134 IF( njmpp + jpj - 1 == jpjglo ) nlej= jpj129 Nis0_save = Nis0 ; Nie0_save = Nie0 130 Njs0_save = Njs0 ; Nje0_save = Nje0 131 IF( nimpp == 1 ) Nis0 = 1 132 IF( nimpp + jpi - 1 == jpiglo ) Nie0 = jpi 133 IF( njmpp == 1 ) Njs0 = 1 134 IF( njmpp + jpj - 1 == jpjglo ) Nje0 = jpj 135 135 ENDIF 136 136 IF ( PRESENT(ld_closedef) ) ll_closedef = ld_closedef … … 169 169 ! 170 170 IF( ln_cfmeta ) THEN ! Add additional grid metadata 171 CALL iom_set_domain_attr("grid_T", area = e1e2t( nldi:nlei, nldj:nlej))172 CALL iom_set_domain_attr("grid_U", area = e1e2u( nldi:nlei, nldj:nlej))173 CALL iom_set_domain_attr("grid_V", area = e1e2v( nldi:nlei, nldj:nlej))174 CALL iom_set_domain_attr("grid_W", area = e1e2t( nldi:nlei, nldj:nlej))171 CALL iom_set_domain_attr("grid_T", area = e1e2t(Nis0:Nie0, Njs0:Nje0)) 172 CALL iom_set_domain_attr("grid_U", area = e1e2u(Nis0:Nie0, Njs0:Nje0)) 173 CALL iom_set_domain_attr("grid_V", area = e1e2v(Nis0:Nie0, Njs0:Nje0)) 174 CALL iom_set_domain_attr("grid_W", area = e1e2t(Nis0:Nie0, Njs0:Nje0)) 175 175 CALL set_grid_bounds( "T", glamf, gphif, glamt, gphit ) 176 176 CALL set_grid_bounds( "U", glamv, gphiv, glamu, gphiu ) … … 192 192 ! 193 193 IF( ln_cfmeta .AND. .NOT. llrst_context) THEN ! Add additional grid metadata 194 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs( nldi:nlei, nldj:nlej))195 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej))196 CALL iom_set_domain_attr("grid_V", area = e1v_crs(nldi:nlei, nldj:nlej) * e2v_crs(nldi:nlei, nldj:nlej))197 CALL iom_set_domain_attr("grid_W", area = e1e2t_crs( nldi:nlei, nldj:nlej))194 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(Nis0:Nie0, Njs0:Nje0)) 195 CALL iom_set_domain_attr("grid_U", area = e1u_crs(Nis0:Nie0, Njs0:Nje0) * e2u_crs(Nis0:Nie0, Njs0:Nje0)) 196 CALL iom_set_domain_attr("grid_V", area = e1v_crs(Nis0:Nie0, Njs0:Nje0) * e2v_crs(Nis0:Nie0, Njs0:Nje0)) 197 CALL iom_set_domain_attr("grid_W", area = e1e2t_crs(Nis0:Nie0, Njs0:Nje0)) 198 198 CALL set_grid_bounds( "T", glamf_crs, gphif_crs, glamt_crs, gphit_crs ) 199 199 CALL set_grid_bounds( "U", glamv_crs, gphiv_crs, glamu_crs, gphiu_crs ) … … 283 283 ! 284 284 IF ( ll_tmppatch ) THEN 285 nldi = nldi_save ; nlei = nlei_save286 nldj = nldj_save ; nlej = nlej_save285 Nis0 = Nis0_save ; Nie0 = Nie0_save 286 Njs0 = Njs0_save ; Nje0 = Nje0_save 287 287 ENDIF 288 288 #endif … … 762 762 ENDIF 763 763 IF( llwrt ) THEN 764 idompar(:,1) = (/ nlei - nldi + 1, nlej - nldj + 1/)765 idompar(:,2) = (/ mig( nldi) , mjg(nldj)/)766 idompar(:,3) = (/ mig( nlei) , mjg(nlej)/)767 idompar(:,4) = (/ 0 , 0/)768 idompar(:,5) = (/ 0 , 0/)764 idompar(:,1) = (/ Ni_0 , Nj_0 /) 765 idompar(:,2) = (/ mig(Nis0), mjg(Njs0) /) 766 idompar(:,3) = (/ mig(Nie0), mjg(Nje0) /) 767 idompar(:,4) = (/ 0 , 0 /) 768 idompar(:,5) = (/ 0 , 0 /) 769 769 ENDIF 770 770 ! Open the NetCDF file … … 976 976 END SUBROUTINE iom_g1d 977 977 978 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, cd_type, psgn, k start, kcount, ldxios)978 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, cd_type, psgn, kfill, kstart, kcount, ldxios) 979 979 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 980 980 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 984 984 CHARACTER(len=1), INTENT(in ) , OPTIONAL :: cd_type ! nature of grid-points (T, U, V, F, W) 985 985 REAL(wp) , INTENT(in ) , OPTIONAL :: psgn ! -1.(1.): (not) change sign across the north fold 986 INTEGER , INTENT(in ) , OPTIONAL :: kfill ! value of kfillmode in lbc_lbk 986 987 INTEGER , INTENT(in ), DIMENSION(2), OPTIONAL :: kstart ! start axis position of the reading 987 988 INTEGER , INTENT(in ), DIMENSION(2), OPTIONAL :: kcount ! number of points in each axis … … 989 990 ! 990 991 IF( kiomid > 0 ) THEN 991 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r2d=pvar, &992 & ktime=ktime , cd_type = cd_type, psgn = psgn, &993 & kstart =kstart, kcount=kcount, ldxios=ldxios )992 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom, cdvar , pv_r2d = pvar , ktime = ktime, & 993 & cd_type = cd_type, psgn = psgn , kfill = kfill, & 994 & kstart = kstart , kcount = kcount, ldxios=ldxios ) 994 995 ENDIF 995 996 END SUBROUTINE iom_g2d 996 997 997 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, cd_type, psgn, k start, kcount, ldxios )998 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, cd_type, psgn, kfill, kstart, kcount, ldxios ) 998 999 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 999 1000 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 1003 1004 CHARACTER(len=1), INTENT(in ) , OPTIONAL :: cd_type ! nature of grid-points (T, U, V, F, W) 1004 1005 REAL(wp) , INTENT(in ) , OPTIONAL :: psgn ! -1.(1.) : (not) change sign across the north fold 1006 INTEGER , INTENT(in ) , OPTIONAL :: kfill ! value of kfillmode in lbc_lbk 1005 1007 INTEGER , INTENT(in ), DIMENSION(3), OPTIONAL :: kstart ! start axis position of the reading 1006 1008 INTEGER , INTENT(in ), DIMENSION(3), OPTIONAL :: kcount ! number of points in each axis … … 1008 1010 ! 1009 1011 IF( kiomid > 0 ) THEN 1010 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r3d=pvar, &1011 & ktime=ktime , cd_type = cd_type, psgn = psgn, &1012 & kstart =kstart, kcount=kcount, ldxios=ldxios )1012 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom, cdvar , pv_r3d = pvar , ktime = ktime, & 1013 & cd_type = cd_type, psgn = psgn , kfill = kfill, & 1014 & kstart = kstart , kcount = kcount, ldxios=ldxios ) 1013 1015 ENDIF 1014 1016 END SUBROUTINE iom_g3d 1015 1017 !!---------------------------------------------------------------------- 1016 1018 1017 SUBROUTINE iom_get_123d( kiomid , kdom , cdvar , pv_r1d, pv_r2d, pv_r3d, &1018 & ktime , cd_type, psgn, kstart, kcount, ldxios )1019 SUBROUTINE iom_get_123d( kiomid , kdom, cdvar, pv_r1d, pv_r2d, pv_r3d, ktime , & 1020 & cd_type, psgn, kfill, kstart, kcount, ldxios ) 1019 1021 !!----------------------------------------------------------------------- 1020 1022 !! *** ROUTINE iom_get_123d *** … … 1033 1035 CHARACTER(len=1) , INTENT(in ), OPTIONAL :: cd_type ! nature of grid-points (T, U, V, F, W) 1034 1036 REAL(wp) , INTENT(in ), OPTIONAL :: psgn ! -1.(1.) : (not) change sign across the north fold 1037 INTEGER , INTENT(in ), OPTIONAL :: kfill ! value of kfillmode in lbc_lbk 1035 1038 INTEGER , DIMENSION(:) , INTENT(in ), OPTIONAL :: kstart ! start position of the reading in each axis 1036 1039 INTEGER , DIMENSION(:) , INTENT(in ), OPTIONAL :: kcount ! number of points to be read in each axis … … 1158 1161 ENDIF 1159 1162 ELSE ! not a 1D array as pv_r1d requires jpdom_unknown 1160 ! we do not read the overlap and the extra-halos -> from nldi to nlei and from nldj to nlej1161 IF( idom == jpdom_global ) istart(1:2) = (/ mig( nldi), mjg(nldj)/)1162 icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1/)1163 ! we do not read the overlap and the extra-halos -> from Nis0 to Nie0 and from Njs0 to Nje0 1164 IF( idom == jpdom_global ) istart(1:2) = (/ mig(Nis0)-nn_hls, mjg(Njs0)-nn_hls /) 1165 icnt(1:2) = (/ Ni_0, Nj_0 /) 1163 1166 IF( PRESENT(pv_r3d) ) THEN 1164 1167 IF( idom == jpdom_auto_xy ) THEN … … 1191 1194 ELSE 1192 1195 IF( irankpv == 2 ) THEN 1193 ishape(1:2) = SHAPE(pv_r2d( nldi:nlei,nldj:nlej )) ; ctmp1 = 'd(nldi:nlei,nldj:nlej)'1196 ishape(1:2) = SHAPE(pv_r2d(Nis0:Nie0,Njs0:Nje0 )) ; ctmp1 = 'd(Nis0:Nie0,Njs0:Nje0)' 1194 1197 ENDIF 1195 1198 IF( irankpv == 3 ) THEN 1196 ishape(1:3) = SHAPE(pv_r3d( nldi:nlei,nldj:nlej,:)) ; ctmp1 = 'd(nldi:nlei,nldj:nlej,:)'1199 ishape(1:3) = SHAPE(pv_r3d(Nis0:Nie0,Njs0:Nje0,:)) ; ctmp1 = 'd(Nis0:Nie0,Njs0:Nje0,:)' 1197 1200 ENDIF 1198 1201 ENDIF … … 1209 1212 ! 1210 1213 ! find the right index of the array to be read 1211 IF( idom /= jpdom_unknown ) THEN ; ix1 = nldi ; ix2 = nlei ; iy1 = nldj ; iy2 = nlej1214 IF( idom /= jpdom_unknown ) THEN ; ix1 = Nis0 ; ix2 = Nie0 ; iy1 = Njs0 ; iy2 = Nje0 1212 1215 ELSE ; ix1 = 1 ; ix2 = icnt(1) ; iy1 = 1 ; iy2 = icnt(2) 1213 1216 ENDIF … … 1224 1227 !--- overlap areas and extra hallows (mpp) 1225 1228 IF( PRESENT(pv_r2d) .AND. idom /= jpdom_unknown ) THEN 1226 CALL lbc_lnk( 'iom', pv_r2d, cl_type, zsgn, kfillmode = jpfillnothing)1229 CALL lbc_lnk( 'iom', pv_r2d, cl_type, zsgn, kfillmode = kfill ) 1227 1230 ELSEIF( PRESENT(pv_r3d) .AND. idom /= jpdom_unknown ) THEN 1228 CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = jpfillnothing)1231 CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = kfill ) 1229 1232 ENDIF 1230 1233 ! … … 1863 1866 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: plat 1864 1867 ! 1865 INTEGER :: ni, nj1866 1868 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1867 1869 LOGICAL, INTENT(IN) :: ldxios, ldrxios 1868 1870 !!---------------------------------------------------------------------- 1869 1871 ! 1870 ni = nlei-nldi+1 1871 nj = nlej-nldj+1 1872 ! 1873 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1874 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1872 CALL iom_set_domain_attr("grid_"//cdgrd,ni_glo=jpiglo,nj_glo=jpjglo,ibegin=nimpp+Nis0-2,jbegin=njmpp+Njs0-2,ni=Ni_0,nj=Nj_0) 1873 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-Nis0, data_ni = jpi, data_jbegin = 1-Njs0, data_nj = jpj) 1875 1874 !don't define lon and lat for restart reading context. 1876 1875 IF ( .NOT.ldrxios ) & 1877 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon( nldi:nlei, nldj:nlej),(/ ni*nj/)), &1878 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj/)))1876 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)), & 1877 & latvalue = RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /))) 1879 1878 ! 1880 1879 IF ( ln_mskland .AND. (.NOT.ldxios) ) THEN … … 1887 1886 END SELECT 1888 1887 ! 1889 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask( nldi:nlei,nldj:nlej,1),(/ni*nj/)) /= 0. )1890 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask( nldi:nlei,nldj:nlej,:),(/ni,nj,jpk/)) /= 0. )1888 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(Nis0:Nie0,Njs0:Nje0,1),(/Ni_0*Nj_0 /)) /= 0. ) 1889 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask(Nis0:Nie0,Njs0:Nje0,:),(/Ni_0*Nj_0,jpk/)) /= 0. ) 1891 1890 ENDIF 1892 1891 ! … … 1905 1904 REAL(wp), DIMENSION(jpi,jpj), OPTIONAL, INTENT(in) :: plon_pnt, plat_pnt ! Lat/lon coord. of the point of cell (i,j) 1906 1905 ! 1907 INTEGER :: ji, jj, jn , ni, nj1906 INTEGER :: ji, jj, jn 1908 1907 INTEGER :: icnr, jcnr ! Offset such that the vertex coordinate (i+icnr,j+jcnr) 1909 1908 ! ! represents the bottom-left corner of cell (i,j) … … 1921 1920 CASE ('V') ; icnr = -1 ; jcnr = 0 1922 1921 END SELECT 1923 !1924 ni = nlei-nldi+1 ! Dimensions of subdomain interior1925 nj = nlej-nldj+11926 1922 ! 1927 1923 z_fld(:,:) = 1._wp … … 1958 1954 IF( (nbondi == 1 .OR. nbondi == 2) .AND. .NOT. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6) ) THEN 1959 1955 DO jn = 1, 4 ! (East or jpni = 1), closed E-W 1960 z_bnds(jn, nlci,:,1) = plat_pnt(nlci,:) ; z_bnds(jn,nlci,:,2) = plon_pnt(nlci,:)1956 z_bnds(jn,jpi,:,1) = plat_pnt(jpi,:) ; z_bnds(jn,jpi,:,2) = plon_pnt(jpi,:) 1961 1957 END DO 1962 1958 ENDIF … … 1968 1964 IF( (nbondj == 1 .OR. nbondj == 2) .AND. jperio < 3 ) THEN 1969 1965 DO jn = 1, 4 ! (North or jpnj = 1), no north fold 1970 z_bnds(jn,:, nlcj,1) = plat_pnt(:,nlcj) ; z_bnds(jn,:,nlcj,2) = plon_pnt(:,nlcj)1966 z_bnds(jn,:,jpj,1) = plat_pnt(:,jpj) ; z_bnds(jn,:,jpj,2) = plon_pnt(:,jpj) 1971 1967 END DO 1972 1968 ENDIF … … 1991 1987 ENDIF 1992 1988 ! 1993 CALL iom_set_domain_attr("grid_"//cdgrd, bounds_lat = RESHAPE(z_bnds(:, nldi:nlei,nldj:nlej,1),(/ 4,ni*nj/)), &1994 & bounds_lon = RESHAPE(z_bnds(:, nldi:nlei,nldj:nlej,2),(/ 4,ni*nj/)), nvertex=4 )1989 CALL iom_set_domain_attr("grid_"//cdgrd, bounds_lat = RESHAPE(z_bnds(:,Nis0:Nie0,Njs0:Nje0,1),(/ 4,Ni_0*Nj_0 /)), & 1990 & bounds_lon = RESHAPE(z_bnds(:,Nis0:Nie0,Njs0:Nje0,2),(/ 4,Ni_0*Nj_0 /)), nvertex=4 ) 1995 1991 ! 1996 1992 DEALLOCATE( z_bnds, z_fld, z_rot ) … … 2008 2004 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: plat 2009 2005 ! 2010 INTEGER :: ni, nj,ix, iy2006 INTEGER :: ix, iy 2011 2007 REAL(wp), DIMENSION(:), ALLOCATABLE :: zlon 2012 2008 !!---------------------------------------------------------------------- 2013 2009 ! 2014 ni=nlei-nldi+1 ! define zonal mean domain (jpj*jpk)2015 nj=nlej-nldj+12016 2010 ALLOCATE( zlon(ni*nj) ) ; zlon(:) = 0._wp 2017 2011 ! 2018 2012 ! CALL dom_ngb( -168.53, 65.03, ix, iy, 'T' ) ! i-line that passes through Bering Strait: Reference latitude (used in plots) 2019 2013 CALL dom_ngb( 180., 90., ix, iy, 'T' ) ! i-line that passes near the North Pole : Reference latitude (used in plots) 2020 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+ nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj)2021 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1- nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj)2014 CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+Nis0-2, jbegin=njmpp+Njs0-2, ni=Ni_0, nj=Nj_0) 2015 CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-Nis0, data_ni = jpi, data_jbegin = 1-Njs0, data_nj = jpj) 2022 2016 CALL iom_set_domain_attr("gznl", lonvalue = zlon, & 2023 & latvalue = RESHAPE(plat( nldi:nlei, nldj:nlej),(/ ni*nj/)))2017 & latvalue = RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /))) 2024 2018 CALL iom_set_zoom_domain_attr("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=jpjglo) 2025 2019 ! -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom_def.F90
r12738 r12807 14 14 15 15 INTEGER, PARAMETER, PUBLIC :: jpdom_global = 1 !: ( 1 :jpiglo, 1 :jpjglo) 16 INTEGER, PARAMETER, PUBLIC :: jpdom_local = 2 !: ( nldi:nlei ,nldj:nlej)16 INTEGER, PARAMETER, PUBLIC :: jpdom_local = 2 !: (Nis0: Nie0 ,Njs0: Nje0 ) 17 17 INTEGER, PARAMETER, PUBLIC :: jpdom_unknown = 3 !: No dimension checking 18 18 INTEGER, PARAMETER, PUBLIC :: jpdom_auto = 4 !: -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom_nf90.F90
r12377 r12807 134 134 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', jpk, idmy ), clinfo) 135 135 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 136 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'numcat', kdlev, idmy ), clinfo)136 IF( kdlev > 0 ) CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'numcat', kdlev, idmy ), clinfo) 137 137 ENDIF 138 138 ELSE … … 665 665 IF( PRESENT(pv_r2d) .OR. PRESENT(pv_r3d) ) THEN 666 666 idimsz(1:2) = iom_file(kiomid)%dimsz(1:2,idvar) 667 IF( idimsz(1) == (nlei - nldi + 1) .AND. idimsz(2) == (nlej - nldj + 1)) THEN668 ix1 = nldi ; ix2 = nlei ; iy1 = nldj ; iy2 = nlej669 ELSEIF( idimsz(1) == nlci .AND. idimsz(2) == nlcj) THEN670 ix1 = 1 ; ix2 = nlci ; iy1 = 1 ; iy2 = nlcj671 ELSEIF( idimsz(1) == jpi .AND. idimsz(2) == jpj) THEN667 IF( idimsz(1) == Ni_0 .AND. idimsz(2) == Nj_0 ) THEN 668 ix1 = Nis0 ; ix2 = Nie0 ; iy1 = Njs0 ; iy2 = Nje0 669 ELSEIF( idimsz(1) == jpi .AND. idimsz(2) == jpj ) THEN 670 ix1 = 1 ; ix2 = jpi ; iy1 = 1 ; iy2 = jpj 671 ELSEIF( idimsz(1) == jpi .AND. idimsz(2) == jpj ) THEN 672 672 ix1 = 1 ; ix2 = jpi ; iy1 = 1 ; iy2 = jpj 673 673 ELSE -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/prtctl.F90
r12377 r12807 18 18 19 19 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: numid 20 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: n lditl , nldjtl! first, last indoor index for each i-domain21 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: n leitl , nlejtl! first, last indoor index for each j-domain22 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: nimpptl,njmpptl ! i-, j-indexes for each processor23 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: nlcitl , nlcjtl! dimensions of every subdomain24 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: ibonitl,ibonjtl !20 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: nis0allp, njs0allp ! first, last indoor index for each i-domain 21 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: nie0allp, nje0allp ! first, last indoor index for each j-domain 22 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: nimpptl, njmpptl ! i-, j-indexes for each processor 23 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: jpiallp, jpjallp ! dimensions of every subdomain 24 INTEGER , DIMENSION(:), ALLOCATABLE, SAVE :: ibonitl, ibonjtl ! 25 25 26 26 REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: t_ctll , s_ctll ! previous tracer trend values … … 134 134 IF( .NOT. lsp_area ) THEN 135 135 IF (lk_mpp .AND. jpnij > 1) THEN 136 nictls = MAX( 1, n lditl(jn) )137 nictle = MIN(jpi, n leitl(jn) )138 njctls = MAX( 1, n ldjtl(jn) )139 njctle = MIN(jpj, n lejtl(jn) )136 nictls = MAX( 1, nis0allp(jn) ) 137 nictle = MIN(jpi, nie0allp(jn) ) 138 njctls = MAX( 1, njs0allp(jn) ) 139 njctle = MIN(jpj, nje0allp(jn) ) 140 140 ! Do not take into account the bound of the domain 141 141 IF( ibonitl(jn) == -1 .OR. ibonitl(jn) == 2 ) nictls = MAX(2, nictls) 142 142 IF( ibonjtl(jn) == -1 .OR. ibonjtl(jn) == 2 ) njctls = MAX(2, njctls) 143 IF( ibonitl(jn) == 1 .OR. ibonitl(jn) == 2 ) nictle = MIN(nictle, n leitl(jn) - 1)144 IF( ibonjtl(jn) == 1 .OR. ibonjtl(jn) == 2 ) njctle = MIN(njctle, n lejtl(jn) - 1)143 IF( ibonitl(jn) == 1 .OR. ibonitl(jn) == 2 ) nictle = MIN(nictle, nie0allp(jn) - 1) 144 IF( ibonjtl(jn) == 1 .OR. ibonjtl(jn) == 2 ) njctle = MIN(njctle, nje0allp(jn) - 1) 145 145 ELSE 146 nictls = MAX( 1, nimpptl(jn) - 1 + n lditl(jn) )147 nictle = MIN(jpi, nimpptl(jn) - 1 + n leitl(jn) )148 njctls = MAX( 1, njmpptl(jn) - 1 + n ldjtl(jn) )149 njctle = MIN(jpj, njmpptl(jn) - 1 + n lejtl(jn) )146 nictls = MAX( 1, nimpptl(jn) - 1 + nis0allp(jn) ) 147 nictle = MIN(jpi, nimpptl(jn) - 1 + nie0allp(jn) ) 148 njctls = MAX( 1, njmpptl(jn) - 1 + njs0allp(jn) ) 149 njctle = MIN(jpj, njmpptl(jn) - 1 + nje0allp(jn) ) 150 150 ! Do not take into account the bound of the domain 151 151 IF( ibonitl(jn) == -1 .OR. ibonitl(jn) == 2 ) nictls = MAX(2, nictls) 152 152 IF( ibonjtl(jn) == -1 .OR. ibonjtl(jn) == 2 ) njctls = MAX(2, njctls) 153 IF( ibonitl(jn) == 1 .OR. ibonitl(jn) == 2 ) nictle = MIN(nictle, nimpptl(jn) + n leitl(jn) - 2)154 IF( ibonjtl(jn) == 1 .OR. ibonjtl(jn) == 2 ) njctle = MIN(njctle, njmpptl(jn) + n lejtl(jn) - 2)153 IF( ibonitl(jn) == 1 .OR. ibonitl(jn) == 2 ) nictle = MIN(nictle, nimpptl(jn) + nie0allp(jn) - 2) 154 IF( ibonjtl(jn) == 1 .OR. ibonjtl(jn) == 2 ) njctle = MIN(njctle, njmpptl(jn) + nje0allp(jn) - 2) 155 155 ENDIF 156 156 ENDIF … … 277 277 278 278 ! Allocate arrays 279 ALLOCATE( n lditl(ijsplt) , nleitl(ijsplt) , nimpptl(ijsplt) , ibonitl(ijsplt) , &280 & n ldjtl(ijsplt) , nlejtl(ijsplt) , njmpptl(ijsplt) , ibonjtl(ijsplt) , &281 & nlcitl(ijsplt) , t_ctll(ijsplt) , u_ctll(ijsplt) , &282 & nlcjtl(ijsplt) , s_ctll(ijsplt) , v_ctll(ijsplt) )279 ALLOCATE( nis0allp(ijsplt) , nie0allp(ijsplt) , nimpptl(ijsplt) , ibonitl(ijsplt) , & 280 & njs0allp(ijsplt) , nje0allp(ijsplt) , njmpptl(ijsplt) , ibonjtl(ijsplt) , & 281 & jpiallp(ijsplt) , t_ctll(ijsplt) , u_ctll(ijsplt) , & 282 & jpjallp(ijsplt) , s_ctll(ijsplt) , v_ctll(ijsplt) ) 283 283 284 284 ! Initialization … … 295 295 cl_run = 'MULTI processor run' 296 296 ! use indices for each area computed by mpp_init subroutine 297 n lditl(1:jpnij) = nldit(:)298 n leitl(1:jpnij) = nleit(:)299 n ldjtl(1:jpnij) = nldjt(:)300 n lejtl(1:jpnij) = nlejt(:)297 nis0allp(1:jpnij) = nis0all(:) 298 nie0allp(1:jpnij) = nie0all(:) 299 njs0allp(1:jpnij) = njs0all(:) 300 nje0allp(1:jpnij) = nje0all(:) 301 301 ! 302 302 nimpptl(1:jpnij) = nimppt(:) 303 303 njmpptl(1:jpnij) = njmppt(:) 304 304 ! 305 nlcitl(1:jpnij) = nlcit(:)306 nlcjtl(1:jpnij) = nlcjt(:)305 jpiallp(1:jpnij) = jpiall(:) 306 jpjallp(1:jpnij) = jpjall(:) 307 307 ! 308 308 ibonitl(1:jpnij) = ibonit(:) … … 335 335 ! Print the SUM control indices 336 336 IF( .NOT. lsp_area ) THEN 337 nictls = nimpptl(jn) + n lditl(jn) - 1338 nictle = nimpptl(jn) + n leitl(jn) - 1339 njctls = njmpptl(jn) + n ldjtl(jn) - 1340 njctle = njmpptl(jn) + n lejtl(jn) - 1337 nictls = nimpptl(jn) + nis0allp(jn) - 1 338 nictle = nimpptl(jn) + nie0allp(jn) - 1 339 njctls = njmpptl(jn) + njs0allp(jn) - 1 340 njctle = njmpptl(jn) + nje0allp(jn) - 1 341 341 ENDIF 342 342 WRITE(j_id,*) … … 344 344 WRITE(j_id,*) '~~~~~~~' 345 345 WRITE(j_id,*) 346 WRITE(j_id,9000)' nlej = ', nlejtl(jn), ' '346 WRITE(j_id,9000)' Nje0 = ', nje0allp(jn), ' ' 347 347 WRITE(j_id,9000)' ------------- njctle = ', njctle, ' -------------' 348 348 WRITE(j_id,9001)' | |' … … 350 350 WRITE(j_id,9001)' | |' 351 351 WRITE(j_id,9002)' nictls = ', nictls, ' nictle = ', nictle 352 WRITE(j_id,9002)' nldi = ', nlditl(jn), ' nlei = ', nleitl(jn)352 WRITE(j_id,9002)' Nis0 = ', nis0allp(jn), ' Nie0 = ', nie0allp(jn) 353 353 WRITE(j_id,9001)' | |' 354 354 WRITE(j_id,9001)' | |' 355 355 WRITE(j_id,9001)' | |' 356 356 WRITE(j_id,9004)' njmpp = ',njmpptl(jn),' ------------- njctls = ', njctls, ' -------------' 357 WRITE(j_id,9003)' nimpp = ', nimpptl(jn), ' nldj = ', nldjtl(jn), ' '357 WRITE(j_id,9003)' nimpp = ', nimpptl(jn), ' Njs0 = ', njs0allp(jn), ' ' 358 358 WRITE(j_id,*) 359 359 WRITE(j_id,*) … … 392 392 !! njmpp : latitudinal index 393 393 !! narea : number for local area 394 !! nlcil : first dimension395 !! nlcjl : second dimension394 !! ipil : first dimension 395 !! ipjl : second dimension 396 396 !! nbondil : mark for "east-west local boundary" 397 397 !! nbondjl : mark for "north-south local boundary" … … 408 408 ii, ij, & ! temporary integers 409 409 irestil, irestjl, & ! " " 410 ijpi , ijpj, nlcil,& ! temporary logical unit411 nlcjl , nbondil, nbondjl,&412 nrecil, nrecjl, nldil, nleil, nldjl, nlejl413 414 INTEGER, DIMENSION(jpi,jpj) :: iimpptl, ijmpptl, i lcitl, ilcjtl ! workspace410 ijpi , ijpj, ipil, & ! temporary logical unit 411 ipjl , nbondil, nbondjl, & 412 nrecil, nrecjl, Nis0l, Nie0l, Njs0l, Nje0l 413 414 INTEGER, DIMENSION(jpi,jpj) :: iimpptl, ijmpptl, ijpitl, ijpjtl ! workspace 415 415 REAL(wp) :: zidom, zjdom ! temporary scalars 416 416 INTEGER :: inum ! local logical unit … … 421 421 ! 1. Dimension arrays for subdomains 422 422 ! ----------------------------------- 423 ! Computation of local domain sizes i lcitl() ilcjtl()423 ! Computation of local domain sizes ijpitl() ijpjtl() 424 424 ! These dimensions depend on global sizes isplt,jsplt and jpiglo,jpjglo 425 425 ! The subdomains are squares leeser than or equal to the global … … 448 448 DO jj = 1, jsplt 449 449 DO ji=1, isplt-1 450 i lcitl(ji,jj) = ijpi450 ijpitl(ji,jj) = ijpi 451 451 END DO 452 i lcitl(isplt,jj) = jpiglo - (isplt - 1) * (ijpi - nrecil)452 ijpitl(isplt,jj) = jpiglo - (isplt - 1) * (ijpi - nrecil) 453 453 END DO 454 454 … … 457 457 DO jj = 1, jsplt 458 458 DO ji = 1, irestil 459 i lcitl(ji,jj) = ijpi459 ijpitl(ji,jj) = ijpi 460 460 END DO 461 461 DO ji = irestil+1, isplt 462 i lcitl(ji,jj) = ijpi -1462 ijpitl(ji,jj) = ijpi -1 463 463 END DO 464 464 END DO … … 472 472 DO ji = 1, isplt 473 473 DO jj=1, jsplt-1 474 i lcjtl(ji,jj) = ijpj474 ijpjtl(ji,jj) = ijpj 475 475 END DO 476 i lcjtl(ji,jsplt) = jpjglo - (jsplt - 1) * (ijpj - nrecjl)476 ijpjtl(ji,jsplt) = jpjglo - (jsplt - 1) * (ijpj - nrecjl) 477 477 END DO 478 478 … … 481 481 DO ji = 1, isplt 482 482 DO jj = 1, irestjl 483 i lcjtl(ji,jj) = ijpj483 ijpjtl(ji,jj) = ijpj 484 484 END DO 485 485 DO jj = irestjl+1, jsplt 486 i lcjtl(ji,jj) = ijpj -1486 ijpjtl(ji,jj) = ijpj -1 487 487 END DO 488 488 END DO … … 491 491 zidom = nrecil 492 492 DO ji = 1, isplt 493 zidom = zidom + i lcitl(ji,1) - nrecil493 zidom = zidom + ijpitl(ji,1) - nrecil 494 494 END DO 495 495 IF(lwp) WRITE(numout,*) 496 IF(lwp) WRITE(numout,*)' sum i lcitl(i,1) = ', zidom, ' jpiglo = ', jpiglo496 IF(lwp) WRITE(numout,*)' sum ijpitl(i,1) = ', zidom, ' jpiglo = ', jpiglo 497 497 498 498 zjdom = nrecjl 499 499 DO jj = 1, jsplt 500 zjdom = zjdom + i lcjtl(1,jj) - nrecjl501 END DO 502 IF(lwp) WRITE(numout,*)' sum i lcitl(1,j) = ', zjdom, ' jpjglo = ', jpjglo500 zjdom = zjdom + ijpjtl(1,jj) - nrecjl 501 END DO 502 IF(lwp) WRITE(numout,*)' sum ijpitl(1,j) = ', zjdom, ' jpjglo = ', jpjglo 503 503 IF(lwp) WRITE(numout,*) 504 504 … … 513 513 DO jj = 1, jsplt 514 514 DO ji = 2, isplt 515 iimpptl(ji,jj) = iimpptl(ji-1,jj) + i lcitl(ji-1,jj) - nrecil515 iimpptl(ji,jj) = iimpptl(ji-1,jj) + ijpitl(ji-1,jj) - nrecil 516 516 END DO 517 517 END DO … … 521 521 DO jj = 2, jsplt 522 522 DO ji = 1, isplt 523 ijmpptl(ji,jj) = ijmpptl(ji,jj-1)+i lcjtl(ji,jj-1)-nrecjl523 ijmpptl(ji,jj) = ijmpptl(ji,jj-1)+ijpjtl(ji,jj-1)-nrecjl 524 524 END DO 525 525 END DO … … 534 534 nimpptl(jn) = iimpptl(ii,ij) 535 535 njmpptl(jn) = ijmpptl(ii,ij) 536 nlcitl (jn) = ilcitl (ii,ij)537 nlcil = nlcitl(jn)538 nlcjtl (jn) = ilcjtl (ii,ij)539 nlcjl = nlcjtl(jn)536 jpiallp(jn) = ijpitl (ii,ij) 537 ipil = jpiallp(jn) 538 jpjallp(jn) = ijpjtl (ii,ij) 539 ipjl = jpjallp(jn) 540 540 nbondjl = -1 ! general case 541 541 IF( jn > isplt ) nbondjl = 0 ! first row of processor … … 550 550 ibonitl(jn) = nbondil 551 551 552 nldil = 1 + nn_hls553 nleil = nlcil - nn_hls554 IF( nbondil == -1 .OR. nbondil == 2 ) nldil = 1555 IF( nbondil == 1 .OR. nbondil == 2 ) nleil = nlcil556 nldjl = 1 + nn_hls557 nlejl = nlcjl - nn_hls558 IF( nbondjl == -1 .OR. nbondjl == 2 ) nldjl = 1559 IF( nbondjl == 1 .OR. nbondjl == 2 ) nlejl = nlcjl560 n lditl(jn) = nldil561 n leitl(jn) = nleil562 n ldjtl(jn) = nldjl563 n lejtl(jn) = nlejl552 Nis0l = 1 + nn_hls 553 Nie0l = ipil - nn_hls 554 IF( nbondil == -1 .OR. nbondil == 2 ) Nis0l = 1 555 IF( nbondil == 1 .OR. nbondil == 2 ) Nie0l = ipil 556 Njs0l = 1 + nn_hls 557 Nje0l = ipjl - nn_hls 558 IF( nbondjl == -1 .OR. nbondjl == 2 ) Njs0l = 1 559 IF( nbondjl == 1 .OR. nbondjl == 2 ) Nje0l = ipjl 560 nis0allp(jn) = Nis0l 561 nie0allp(jn) = Nie0l 562 njs0allp(jn) = Njs0l 563 nje0allp(jn) = Nje0l 564 564 END DO 565 565 ! … … 567 567 IF(lwp) THEN 568 568 CALL ctl_opn( inum, 'layout_prtctl.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 569 WRITE(inum,'(a)') 'nproc nlcil nlcjl nldil nldjl nleil nlejl nimpptl njmpptl ibonitl ibonjtl'569 WRITE(inum,'(a)') 'nproc ipil ipjl Nis0l Njs0l Nie0l Nje0l nimpptl njmpptl ibonitl ibonjtl' 570 570 ! 571 571 DO jn = 1, ijsplt 572 WRITE(inum,'(i5,6i6,4i8)') jn-1, nlcitl(jn), nlcjtl(jn), &573 & n lditl(jn), nldjtl(jn), &574 & n leitl(jn), nlejtl(jn), &575 & nimpptl(jn),njmpptl(jn), &576 & ibonitl(jn),ibonjtl(jn)572 WRITE(inum,'(i5,6i6,4i8)') jn-1, jpiallp(jn), jpjallp(jn), & 573 & nis0allp(jn), njs0allp(jn), & 574 & nie0allp(jn), nje0allp(jn), & 575 & nimpptl(jn), njmpptl(jn), & 576 & ibonitl(jn), ibonjtl(jn) 577 577 END DO 578 578 CLOSE(inum) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ISF/isfcpl.F90
r12738 r12807 16 16 USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine 17 17 USE domvvl , ONLY: dom_vvl_zgr ! vertical scale factor interpolation 18 USE dom ngb, ONLY: dom_ngb ! find the closest grid point from a given lon/lat position18 USE domutl , ONLY: dom_ngb ! find the closest grid point from a given lon/lat position 19 19 ! 20 20 USE oce ! ocean dynamics and tracers … … 519 519 520 520 DO jk = 1,jpk-1 521 DO jj = nldj,nlej522 DO ji = nldi,nlei521 DO jj = Njs0,Nje0 522 DO ji = Nis0,Nie0 523 523 524 524 ! volume diff … … 552 552 nisfl(:)=0 553 553 DO jk = 1,jpk-1 554 DO jj = nldj,nlej555 DO ji = nldi,nlei554 DO jj = Njs0,Nje0 555 DO ji = Nis0,Nie0 556 556 jip1=MIN(ji+1,jpi) ; jim1=MAX(ji-1,1) ; jjp1=MIN(jj+1,jpj) ; jjm1=MAX(jj-1,1) ; 557 557 IF ( tmask(ji,jj,jk) == 0._wp .AND. ztmask_b(ji,jj,jk) == 1._wp ) nisfl(narea) = nisfl(narea) + MAX(SUM(tmask(jim1:jip1,jjm1:jjp1,jk)),1._wp) … … 572 572 jisf = 0 573 573 DO jk = 1,jpk-1 574 DO jj = nldj,nlej575 DO ji = nldi,nlei574 DO jj = Njs0,Nje0 575 DO ji = Nis0,Nie0 576 576 IF ( tmask(ji,jj,jk) == 0._wp .AND. ztmask_b(ji,jj,jk) == 1._wp ) THEN 577 577 -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ISF/isfutils.F90
r12738 r12807 15 15 USE lib_fortran , ONLY: glob_sum, glob_min, glob_max ! compute global value 16 16 USE par_oce , ONLY: jpi,jpj,jpk, jpnij ! domain size 17 USE dom_oce , ONLY: nldi, nlei, nldj, nlej, narea, tmask_h, tmask_i ! local domain17 USE dom_oce , ONLY: Nis0, Nie0, Njs0, Nje0, narea, tmask_h, tmask_i ! local domain 18 18 USE in_out_manager, ONLY: i8, wp, lwp, numout ! miscelenious 19 19 USE lib_mpp … … 84 84 ! 85 85 ! local MOD sum 86 DO jj= nldj,nlej87 DO ji= nldi,nlei86 DO jj=Njs0,Nje0 87 DO ji=Nis0,Nie0 88 88 idums = ABS(MOD(TRANSFER(pvar(ji,jj), ip),imodd)) 89 89 itmps(narea) = MOD(itmps(narea) + idums, imods) … … 138 138 ! local MOD sum 139 139 DO jk=1,jpk 140 DO jj= nldj,nlej141 DO ji= nldi,nlei140 DO jj=Njs0,Nje0 141 DO ji=Nis0,Nie0 142 142 idums = ABS(MOD(TRANSFER(pvar(ji,jj,jk), ip),imodd)) 143 143 itmps(narea) = MOD(itmps(narea) + idums, imods) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/halo_mng.F90
r12719 r12807 26 26 INTEGER :: jpi_1, jpj_1 27 27 INTEGER :: jpimax_1, jpjmax_1 28 INTEGER :: nlci_1, nlcj_1 29 INTEGER :: nldi_1, nldj_1 30 INTEGER :: nlei_1, nlej_1 28 INTEGER :: Nis0_1, Njs0_1 29 INTEGER :: Nie0_1, Nje0_1 31 30 CONTAINS 32 31 … … 36 35 jpj_1 = jpj 37 36 38 nlci_1 = nlci39 nlcj_1 = nlcj37 Nis0_1 = Nis0 38 Njs0_1 = Njs0 40 39 41 nldi_1 = nldi 42 nldj_1 = nldj 43 44 nlei_1 = nlei 45 nlej_1 = nlej 40 Nie0_1 = Nie0 41 Nje0_1 = Nje0 46 42 47 43 jpimax_1 = jpimax … … 59 55 jpj = jpj_1 + 2*khls -2 60 56 61 nlci = nlci_1 + 2*khls -262 nlcj = nlcj_1 + 2*khls -257 jpi = jpi_1 + 2*khls -2 58 jpj = jpj_1 + 2*khls -2 63 59 64 60 jpimax = jpimax_1 + 2*khls -2 65 61 jpjmax = jpjmax_1 + 2*khls -2 66 62 67 nldi = nldi_1 + khls - 168 nldj = nldj_1 + khls - 163 Nis0 = Nis0_1 + khls - 1 64 Njs0 = Njs0_1 + khls - 1 69 65 70 nlei = nlei_1 + khls - 171 nlej = nlej_1 + khls - 166 Nie0 = Nie0_1 + khls - 1 67 Nje0 = Nje0_1 + khls - 1 72 68 73 69 END SUBROUTINE halo_mng_set -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_ext_generic.h90
r10525 r12807 28 28 ! 29 29 SELECT CASE ( jpni ) 30 CASE ( 1 ) ; ipj = nlcj! 1 proc only along the i-direction30 CASE ( 1 ) ; ipj = jpj ! 1 proc only along the i-direction 31 31 CASE DEFAULT ; ipj = 4 ! several proc along the i-direction 32 32 END SELECT -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_generic.h90
r10425 r12807 65 65 ! 66 66 SELECT CASE ( jpni ) 67 CASE ( 1 ) ; ipj = nlcj! 1 proc only along the i-direction67 CASE ( 1 ) ; ipj = jpj ! 1 proc only along the i-direction 68 68 CASE DEFAULT ; ipj = 4 ! several proc along the i-direction 69 69 END SELECT -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_nogather_generic.h90
r12719 r12807 97 97 DO jl = 1, ipl; DO jk = 1, ipk 98 98 DO jj = 1, nn_hls 99 ijj = nlcj -jj +1100 DO ji = startloop, nlci99 ijj = jpj -jj +1 100 DO ji = startloop, jpi 101 101 ijt = jpiglo - (ji + nimpp-nn_hls+1 ) - nfiimpp(isendto(1),jpnj) + 4 102 102 ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf) … … 107 107 DO jl = 1, ipl; DO jk = 1, ipk 108 108 DO jj = 1, nn_hls 109 ijj = nlcj -jj +1109 ijj = jpj -jj +1 110 110 DO ii = 0, nn_hls-1 111 ARRAY_IN(ii+1,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii+1, nlcj-2*nn_hls+jj-1,jk,jl,jf)111 ARRAY_IN(ii+1,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii+1,jpj-2*nn_hls+jj-1,jk,jl,jf) 112 112 END DO 113 113 END DO … … 118 118 IF( nimpp >= jpiglo/2+1 ) THEN 119 119 startloop = 1 120 ELSEIF( nimpp+ nlci-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN120 ELSEIF( nimpp+jpi-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN 121 121 startloop = jpiglo/2+1 - nimpp + nn_hls 122 122 ELSE 123 startloop = nlci + 1124 ENDIF 125 IF( startloop <= nlci ) THEN123 startloop = jpi + 1 124 ENDIF 125 IF( startloop <= jpi ) THEN 126 126 DO jl = 1, ipl; DO jk = 1, ipk 127 DO ji = startloop, nlci127 DO ji = startloop, jpi 128 128 ijt = jpiglo - (ji + nimpp -nn_hls+1)- nfiimpp(isendto(1),jpnj) + 4 129 129 jia = ji + nimpp -nn_hls 130 130 ijta = jpiglo - jia + 2 131 131 IF( ijta >= startloop+nimpp-1 .AND. ijta < jia ) THEN 132 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijta-nimpp+nn_hls,nlcj-nn_hls,jk,jl,jf)132 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijta-nimpp+nn_hls,jpj-nn_hls,jk,jl,jf) 133 133 ELSE 134 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,nn_hls+1,jk,jl,jf)134 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,nn_hls+1,jk,jl,jf) 135 135 ENDIF 136 136 END DO … … 139 139 ENDIF 140 140 CASE ( 'U' ) ! U-point 141 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN142 endloop = nlci141 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 142 endloop = jpi 143 143 ELSE 144 endloop = nlci - nn_hls145 ENDIF 146 DO jl = 1, ipl; DO jk = 1, ipk 147 DO jj = 1, nn_hls 148 ijj = nlcj -jj +1144 endloop = jpi - nn_hls 145 ENDIF 146 DO jl = 1, ipl; DO jk = 1, ipk 147 DO jj = 1, nn_hls 148 ijj = jpj -jj +1 149 149 DO ji = 1, endloop 150 150 iju = jpiglo - (ji + nimpp -nn_hls+1)- nfiimpp(isendto(1),jpnj) + 3 … … 155 155 IF (nimpp .eq. 1) THEN 156 156 DO jj = 1, nn_hls 157 ijj = nlcj -jj +1157 ijj = jpj -jj +1 158 158 DO ii = 0, nn_hls-1 159 ARRAY_IN(ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii, nlcj-2*nn_hls+jj-1,:,:,jf)159 ARRAY_IN(ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii,jpj-2*nn_hls+jj-1,:,:,jf) 160 160 END DO 161 161 END DO 162 162 ENDIF 163 IF((nimpp + nlci - 2*nn_hls+1) .eq. jpiglo) THEN163 IF((nimpp + jpi - 2*nn_hls+1) .eq. jpiglo) THEN 164 164 DO jj = 1, nn_hls 165 ijj = nlcj -jj +1165 ijj = jpj -jj +1 166 166 DO ii = 1, nn_hls 167 ARRAY_IN( nlci-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls+jj-1,:,:,jf)167 ARRAY_IN(jpi-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(jpi-2*nn_hls+ii,jpj-2*nn_hls+jj-1,:,:,jf) 168 168 END DO 169 169 END DO … … 171 171 ! 172 172 IF ( .NOT. l_fast_exchanges ) THEN 173 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN174 endloop = nlci175 ELSE 176 endloop = nlci - nn_hls173 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 174 endloop = jpi 175 ELSE 176 endloop = jpi - nn_hls 177 177 ENDIF 178 178 IF( nimpp >= jpiglo/2 ) THEN 179 179 startloop = 1 180 ELSEIF( ( nimpp + nlci - 2*nn_hls+1 >= jpiglo/2 ) .AND. ( nimpp < jpiglo/2 ) ) THEN180 ELSEIF( ( nimpp + jpi - 2*nn_hls+1 >= jpiglo/2 ) .AND. ( nimpp < jpiglo/2 ) ) THEN 181 181 startloop = jpiglo/2 - (nimpp -nn_hls+1) +1 182 182 ELSE … … 190 190 ijua = jpiglo - jia + 1 191 191 IF( ijua >= startloop+nimpp-1 .AND. ijua < jia ) THEN 192 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijua-nimpp+nn_hls,nlcj-nn_hls,jk,jl,jf)192 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijua-nimpp+nn_hls,jpj-nn_hls,jk,jl,jf) 193 193 ELSE 194 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,nn_hls+1,jk,jl,jf)194 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,nn_hls+1,jk,jl,jf) 195 195 ENDIF 196 196 END DO … … 208 208 DO jl = 1, ipl; DO jk = 1, ipk 209 209 DO jj = 2, nn_hls+1 210 ijj = nlcj -jj +1211 DO ji = startloop, nlci210 ijj = jpj -jj +1 211 DO ji = startloop, jpi 212 212 ijt=jpiglo - (ji +nimpp -nn_hls+1)- nfiimpp(isendto(1),jpnj) + 4 213 213 ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf) … … 217 217 ENDIF 218 218 DO jl = 1, ipl; DO jk = 1, ipk 219 DO ji = startloop, nlci219 DO ji = startloop, jpi 220 220 ijt=jpiglo - (ji + nimpp -nn_hls+1)- nfiimpp(isendto(1),jpnj) + 4 221 ARRAY_IN(ji, nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,1,jk,jl,jf)221 ARRAY_IN(ji,jpj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,1,jk,jl,jf) 222 222 END DO 223 223 END DO; END DO 224 224 IF (nimpp .eq. 1) THEN 225 225 DO jj = 1, nn_hls 226 ijj = nlcj-jj+1226 ijj = jpj-jj+1 227 227 DO ii = 0, nn_hls-1 228 ARRAY_IN(ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii+1, nlcj-2*nn_hls+jj-1,:,:,jf)228 ARRAY_IN(ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii+1,jpj-2*nn_hls+jj-1,:,:,jf) 229 229 END DO 230 230 END DO 231 231 ENDIF 232 232 CASE ( 'F' ) ! F-point 233 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN234 endloop = nlci233 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 234 endloop = jpi 235 235 ELSE 236 endloop = nlci - nn_hls236 endloop = jpi - nn_hls 237 237 ENDIF 238 238 IF ( .NOT. l_fast_exchanges ) THEN 239 239 DO jl = 1, ipl; DO jk = 1, ipk 240 240 DO jj = 2, nn_hls+1 241 ijj = nlcj -jj +1241 ijj = jpj -jj +1 242 242 DO ji = 1, endloop 243 243 iju = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 3 … … 250 250 DO ji = 1, endloop 251 251 iju = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 3 252 ARRAY_IN(ji, nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,1,jk,jl,jf)252 ARRAY_IN(ji,jpj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,1,jk,jl,jf) 253 253 END DO 254 254 END DO; END DO 255 255 IF (nimpp .eq. 1) THEN 256 256 DO ii = 1, nn_hls 257 ARRAY_IN(ii+1, nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii,nlcj-2*nn_hls-1,:,:,jf)257 ARRAY_IN(ii+1,jpj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii,jpj-2*nn_hls-1,:,:,jf) 258 258 END DO 259 259 IF ( .NOT. l_fast_exchanges ) THEN 260 260 DO jj = 1, nn_hls 261 ijj = nlcj -jj261 ijj = jpj -jj 262 262 DO ii = 1, nn_hls 263 ARRAY_IN(2-ii,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii, nlcj-2*nn_hls+jj-1,:,:,jf)263 ARRAY_IN(2-ii,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2*nn_hls-ii,jpj-2*nn_hls+jj-1,:,:,jf) 264 264 END DO 265 265 END DO 266 266 ENDIF 267 267 ENDIF 268 IF((nimpp + nlci - 2*nn_hls+1 ) .eq. jpiglo) THEN268 IF((nimpp + jpi - 2*nn_hls+1 ) .eq. jpiglo) THEN 269 269 DO ii = 1, nn_hls 270 ARRAY_IN( nlci-ii+1,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls-1,:,:,jf)270 ARRAY_IN(jpi-ii+1,jpj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(jpi-2*nn_hls+ii,jpj-2*nn_hls-1,:,:,jf) 271 271 END DO 272 272 IF ( .NOT. l_fast_exchanges ) THEN 273 273 DO jj = 1, nn_hls 274 ijj = nlcj -jj274 ijj = jpj -jj 275 275 DO ii = 1, nn_hls 276 ARRAY_IN( nlci-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls+jj-1,:,:,jf)276 ARRAY_IN(jpi-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(jpi-2*nn_hls+ii,jpj-2*nn_hls+jj-1,:,:,jf) 277 277 END DO 278 278 END DO … … 288 288 DO jl = 1, ipl; DO jk = 1, ipk 289 289 DO jj = 1, nn_hls 290 ijj = nlcj-jj+1291 DO ji = 1, nlci290 ijj = jpj-jj+1 291 DO ji = 1, jpi 292 292 ijt = jpiglo - ( ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 3 293 293 ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf) … … 297 297 ! 298 298 CASE ( 'U' ) ! U-point 299 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN300 endloop = nlci299 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 300 endloop = jpi 301 301 ELSE 302 endloop = nlci - nn_hls303 ENDIF 304 DO jl = 1, ipl; DO jk = 1, ipk 305 DO jj = 1, nn_hls 306 ijj = nlcj-jj+1302 endloop = jpi - nn_hls 303 ENDIF 304 DO jl = 1, ipl; DO jk = 1, ipk 305 DO jj = 1, nn_hls 306 ijj = jpj-jj+1 307 307 DO ji = 1, endloop 308 308 iju = jpiglo- (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 2 … … 311 311 END DO 312 312 END DO; END DO 313 IF(nimpp + nlci - 2*nn_hls+1 .eq. jpiglo) THEN313 IF(nimpp + jpi - 2*nn_hls+1 .eq. jpiglo) THEN 314 314 DO jl = 1, ipl; DO jk = 1, ipk 315 315 DO jj = 1, nn_hls 316 ijj = nlcj-jj+1316 ijj = jpj-jj+1 317 317 DO ii = 1, nn_hls 318 iij = nlci-ii+1319 ARRAY_IN(iij,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN( nlci-2*nn_hls+ii-1,nlcj-2*nn_hls+jj,jk,jl,jf)318 iij = jpi-ii+1 319 ARRAY_IN(iij,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(jpi-2*nn_hls+ii-1,jpj-2*nn_hls+jj,jk,jl,jf) 320 320 END DO 321 321 END DO … … 326 326 DO jl = 1, ipl; DO jk = 1, ipk 327 327 DO jj = 1, nn_hls 328 ijj = nlcj -jj +1329 DO ji = 1, nlci328 ijj = jpj -jj +1 329 DO ji = 1, jpi 330 330 ijt = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 3 331 331 ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf) … … 337 337 IF( nimpp >= jpiglo/2+1 ) THEN 338 338 startloop = 1 339 ELSEIF( nimpp+ nlci-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN339 ELSEIF( nimpp+jpi-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN 340 340 startloop = jpiglo/2+1 - nimpp + nn_hls 341 341 ELSE 342 startloop = nlci + 1343 ENDIF 344 IF( startloop <= nlci ) THEN345 DO jl = 1, ipl; DO jk = 1, ipk 346 DO ji = startloop, nlci342 startloop = jpi + 1 343 ENDIF 344 IF( startloop <= jpi ) THEN 345 DO jl = 1, ipl; DO jk = 1, ipk 346 DO ji = startloop, jpi 347 347 ijt = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 3 348 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,nn_hls+1,jk,jl,jf)348 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,nn_hls+1,jk,jl,jf) 349 349 END DO 350 350 END DO; END DO … … 353 353 ! 354 354 CASE ( 'F' ) ! F-point 355 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN356 endloop = nlci355 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 356 endloop = jpi 357 357 ELSE 358 endloop = nlci - nn_hls359 ENDIF 360 DO jl = 1, ipl; DO jk = 1, ipk 361 DO jj = 1, nn_hls 362 ijj = nlcj -jj +1358 endloop = jpi - nn_hls 359 ENDIF 360 DO jl = 1, ipl; DO jk = 1, ipk 361 DO jj = 1, nn_hls 362 ijj = jpj -jj +1 363 363 DO ji = 1, endloop 364 364 iju = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 2 … … 367 367 END DO 368 368 END DO; END DO 369 IF((nimpp + nlci - 2*nn_hls+1) .eq. jpiglo) THEN369 IF((nimpp + jpi - 2*nn_hls+1) .eq. jpiglo) THEN 370 370 DO jl = 1, ipl; DO jk = 1, ipk 371 371 DO jj = 1, nn_hls 372 ijj = nlcj -jj +1372 ijj = jpj -jj +1 373 373 DO ii = 1, nn_hls 374 iij = nlci -ii+1375 ARRAY_IN(iij,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN( nlci-2*nn_hls+ii-1,nlcj-2*nn_hls+jj-1,jk,jl,jf)374 iij = jpi -ii+1 375 ARRAY_IN(iij,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(jpi-2*nn_hls+ii-1,jpj-2*nn_hls+jj-1,jk,jl,jf) 376 376 END DO 377 377 END DO … … 380 380 ! 381 381 IF ( .NOT. l_fast_exchanges ) THEN 382 IF( nimpp + nlci - 2*nn_hls+1 /= jpiglo ) THEN383 endloop = nlci384 ELSE 385 endloop = nlci - nn_hls382 IF( nimpp + jpi - 2*nn_hls+1 /= jpiglo ) THEN 383 endloop = jpi 384 ELSE 385 endloop = jpi - nn_hls 386 386 ENDIF 387 387 IF( nimpp >= jpiglo/2+1 ) THEN 388 388 startloop = 1 389 ELSEIF( nimpp+ nlci-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN389 ELSEIF( nimpp+jpi-2*nn_hls+1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN 390 390 startloop = jpiglo/2+1 - nimpp + nn_hls 391 391 ELSE … … 396 396 DO ji = startloop, endloop 397 397 iju = jpiglo - (ji + nimpp -nn_hls+1) - nfiimpp(isendto(1),jpnj) + 2 398 ARRAY_IN(ji, nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,nn_hls+1,jk,jl,jf)398 ARRAY_IN(ji,jpj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,nn_hls+1,jk,jl,jf) 399 399 END DO 400 400 END DO; END DO -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbclnk.F90
r12377 r12807 248 248 ! 249 249 INTEGER :: ji, jj, jr 250 INTEGER :: ierr, itaille, i ldi, ilei, iilb250 INTEGER :: ierr, itaille, iis0, iie0, iilb 251 251 INTEGER :: ipj, ij, iproc 252 252 ! … … 282 282 DO jr = 1, ndim_rank_north ! recover the global north array 283 283 iproc = nrank_north(jr) + 1 284 i ldi = nldit(iproc)285 i lei = nleit(iproc)284 iis0 = nis0all(iproc) 285 iie0 = nie0all(iproc) 286 286 iilb = nimppt(iproc) 287 287 DO jj = 1-kextj, ipj+kextj 288 DO ji = i ldi, ilei288 DO ji = iis0, iie0 289 289 ztab_e(ji+iilb-1,jj) = znorthgloio_e(ji,jj,jr) 290 290 END DO … … 396 396 SELECT CASE ( nbondi ) ! Read Dirichlet lateral conditions 397 397 CASE ( -1, 0, 1 ) ! all exept 2 (i.e. close case) 398 iihom = jpi -nreci-kexti398 iihom = jpi - (2 * nn_hls) - kexti 399 399 DO jl = 1, ipreci 400 400 r2dew(:,jl,1) = pt2d(nn_hls+jl,:) … … 453 453 ! 454 454 IF( nbondj /= 2 ) THEN ! Read Dirichlet lateral conditions 455 ijhom = jpj -nrecj-kextj455 ijhom = jpj - ( 2 * nn_hls ) -kextj 456 456 DO jl = 1, iprecj 457 457 r2dsn(:,jl,1) = pt2d(:,ijhom +jl) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_lnk_generic.h90
r12719 r12807 189 189 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 190 190 ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_we(ji,jj,jk,jl,jf) ! 1 -> nn_hls 191 END DO ; END DO ; END DO ; END DO ; END DO191 END DO ; END DO ; END DO ; END DO ; END DO 192 192 CASE ( jpfillperio ) ! use east-weast periodicity 193 193 ishift2 = jpi - 2 * nn_hls 194 194 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 195 195 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf) 196 END DO ; END DO ; END DO ; END DO ; END DO196 END DO ; END DO ; END DO ; END DO ; END DO 197 197 CASE ( jpfillcopy ) ! filling with inner domain values 198 DO jf = 1, ipf ! number of arrays to be treated 199 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 200 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 201 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(nn_hls+1,jj,jk,jl,jf) 202 END DO ; END DO ; END DO ; END DO 203 ENDIF 204 END DO 198 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 199 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(nn_hls+1,jj,jk,jl,jf) 200 END DO ; END DO ; END DO ; END DO ; END DO 205 201 CASE ( jpfillcst ) ! filling with constant value 206 DO jf = 1, ipf ! number of arrays to be treated 207 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 208 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 209 ARRAY_IN(ji,jj,jk,jl,jf) = zland 210 END DO; END DO ; END DO ; END DO 211 ENDIF 212 END DO 202 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 203 ARRAY_IN(ji,jj,jk,jl,jf) = zland 204 END DO ; END DO ; END DO ; END DO ; END DO 213 205 END SELECT 214 206 ! … … 234 226 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 235 227 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zland 236 END DO ; END DO ; END DO ; END DO ; END DO228 END DO ; END DO ; END DO ; END DO ; END DO 237 229 END SELECT 238 230 ! … … 303 295 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 304 296 ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_so(ji,jj,jk,jl,jf) ! 1 -> nn_hls 305 END DO ; END DO ; END DO ; END DO ; END DO297 END DO ; END DO ; END DO ; END DO ; END DO 306 298 CASE ( jpfillperio ) ! use north-south periodicity 307 299 ishift2 = jpj - 2 * nn_hls 308 300 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 309 301 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf) 310 END DO ; END DO ; END DO ; END DO ; END DO302 END DO ; END DO ; END DO ; END DO ; END DO 311 303 CASE ( jpfillcopy ) ! filling with inner domain values 312 DO jf = 1, ipf ! number of arrays to be treated 313 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 314 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 315 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,nn_hls+1,jk,jl,jf) 316 END DO ; END DO ; END DO ; END DO 317 ENDIF 318 END DO 304 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 305 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,nn_hls+1,jk,jl,jf) 306 END DO ; END DO ; END DO ; END DO ; END DO 319 307 CASE ( jpfillcst ) ! filling with constant value 320 DO jf = 1, ipf ! number of arrays to be treated 321 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 322 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 323 ARRAY_IN(ji,jj,jk,jl,jf) = zland 324 END DO; END DO ; END DO ; END DO 325 ENDIF 326 END DO 308 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 309 ARRAY_IN(ji,jj,jk,jl,jf) = zland 310 END DO ; END DO ; END DO ; END DO ; END DO 327 311 END SELECT 328 312 ! … … 340 324 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 341 325 ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf) 342 END DO ; END DO ; END DO ; END DO ; END DO326 END DO ; END DO ; END DO ; END DO ; END DO 343 327 CASE ( jpfillcopy ) ! filling with inner domain values 344 328 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 345 329 ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift,jk,jl,jf) 346 END DO ; END DO ; END DO ; END DO ; END DO330 END DO ; END DO ; END DO ; END DO ; END DO 347 331 CASE ( jpfillcst ) ! filling with constant value 348 332 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, nn_hls ; DO ji = 1, jpi 349 333 ARRAY_IN(ji,ishift+jj,jk,jl,jf) = zland 350 END DO ; END DO ; END DO ; END DO ; END DO334 END DO ; END DO ; END DO ; END DO ; END DO 351 335 END SELECT 352 336 ! -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90
r12719 r12807 56 56 INTEGER :: ipi, ipk, ipl, ipf ! dimension of the input array 57 57 INTEGER :: imigr, iihom, ijhom ! local integers 58 INTEGER :: ierr, ibuffsize, i lci, ildi, ilei, iilb58 INTEGER :: ierr, ibuffsize, ijpi, iis0, iie0, iilb 59 59 INTEGER :: ij, iproc 60 60 INTEGER, DIMENSION (jpmaxngh) :: ml_req_nf ! for mpi_isend when avoiding mpi_allgather … … 111 111 CASE ( 'T' , 'W' ,'U' ) ! T-, U-, W-point 112 112 DO ji = 1, nn_hls+1 113 jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1113 jj_s(jf,ji) = jpj - 2*nn_hls +ji -1 114 114 ENDDO 115 115 CASE ( 'V' , 'F' ) ! V-, F-point 116 116 DO ji = 1, nn_hls+1 117 jj_s(jf,ji) = nlcj - 2*nn_hls +ji - 2117 jj_s(jf,ji) = jpj - 2*nn_hls +ji - 2 118 118 ENDDO 119 119 END SELECT … … 124 124 CASE ( 'T' , 'W' ,'U' ) ! T-, U-, W-point 125 125 DO ji = 1, nn_hls 126 jj_s(jf,ji) = nlcj - 2*nn_hls + ji126 jj_s(jf,ji) = jpj - 2*nn_hls + ji 127 127 ENDDO 128 128 ipj_s(jf) = nn_hls ! need only one line anyway 129 129 CASE ( 'V' , 'F' ) ! V-, F-point 130 130 DO ji = 1, nn_hls+1 131 jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1131 jj_s(jf,ji) = jpj - 2*nn_hls +ji -1 132 132 ENDDO 133 133 END SELECT … … 175 175 iproc = nfipproc(isendto(jr),jpnj) 176 176 IF(iproc /= -1) THEN 177 iilb = nimppt(iproc+1)178 i lci = nlcit(iproc+1)179 i ldi = nldit(iproc+1) + nn_hls-1180 i lei = nleit(iproc+1) + nn_hls-1181 IF( iilb == 1 ) i ldi= nn_hls ! e-w boundary already done -> force to take 1st column182 IF( iilb + i lci - 1 == jpiglo ) ilei = nlei+1 ! e-w boundary already done -> force to take last column177 iilb = nimppt(iproc+1) 178 ijpi = jpiall(iproc+1) 179 iis0 = nis0all(iproc+1) + nn_hls-1 180 iie0 = nie0all(iproc+1) + nn_hls-1 181 IF( iilb == 1 ) iis0 = nn_hls ! e-w boundary already done -> force to take 1st column 182 IF( iilb + ijpi - 1 == jpiglo ) iie0 = Nie0+1 ! e-w boundary already done -> force to take last column 183 183 iilb = nfiimpp(isendto(jr),jpnj) - nfiimpp(isendto(1),jpnj) 184 184 ENDIF … … 190 190 DO jl = 1, ipl 191 191 DO jk = 1, ipk 192 DO ji = i ldi, ilei192 DO ji = iis0, iie0 193 193 ztabr(iilb-nn_hls+1+ji,jj,jk,jl,jf) = zfoldwk(ji,js,jk,jl,1) 194 194 END DO … … 200 200 DO jl = 1, ipl 201 201 DO jk = 1, ipk 202 DO ji = i ldi, ilei202 DO ji = iis0, iie0 203 203 ztabr(iilb-nn_hls+1+ji,jj,jk,jl,jf) = ARRAY_IN(ji,jj_s(jf,jj),jk,jl,jf) 204 204 END DO … … 233 233 DO jl = 1, ipl 234 234 DO jk = 1, ipk 235 DO jj = nlcj - ijpj +1, nlcj236 ij = jj - nlcj + ijpj235 DO jj = jpj - ijpj +1, jpj 236 ij = jj - jpj + ijpj 237 237 znorthloc(1:jpi,ij,jk,jl,jf) = ARRAY_IN(1:jpi,jj,jk,jl,jf) 238 238 END DO … … 262 262 DO jr = 1, ndim_rank_north ! recover the global north array 263 263 iproc = nrank_north(jr) + 1 264 iilb = nimppt(iproc)265 i lci = nlcit(iproc)266 i ldi = nldit(iproc)267 i lei = nleit(iproc)268 IF( iilb == 1 ) i ldi= 1 ! e-w boundary already done -> force to take 1st column269 IF( iilb + i lci - 1 == jpiglo ) ilei = ilci ! e-w boundary already done -> force to take last column264 iilb = nimppt(iproc) 265 ijpi = jpiall(iproc) 266 iis0 = nis0all(iproc) 267 iie0 = nie0all(iproc) 268 IF( iilb == 1 ) iis0 = 1 ! e-w boundary already done -> force to take 1st column 269 IF( iilb + ijpi - 1 == jpiglo ) iie0 = ijpi ! e-w boundary already done -> force to take last column 270 270 DO jf = 1, ipf 271 271 DO jl = 1, ipl 272 272 DO jk = 1, ipk 273 273 DO jj = 1, ijpj 274 DO ji = i ldi, ilei274 DO ji = iis0, iie0 275 275 ztab(ji+iilb-1,jj,jk,jl,jf) = znorthgloio(ji,jj,jk,jl,jf,jr) 276 276 END DO … … 287 287 DO jl = 1, ipl 288 288 DO jk = 1, ipk 289 DO jj = nlcj-ijpj+1, nlcj ! Scatter back to ARRAY_IN290 ij = jj - nlcj + ijpj291 DO ji= 1, nlci289 DO jj = jpj-ijpj+1, jpj ! Scatter back to ARRAY_IN 290 ij = jj - jpj + ijpj 291 DO ji= 1, jpi 292 292 ARRAY_IN(ji,jj,jk,jl,jf) = ztab(ji+nimpp-1,ij,jk,jl,jf) 293 293 END DO -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mppini.F90
r12760 r12807 59 59 !!---------------------------------------------------------------------- 60 60 ! 61 jpiglo = Ni0glo 62 jpjglo = Nj0glo 61 63 jpimax = jpiglo 62 64 jpjmax = jpjglo … … 76 78 nimpp = 1 ! 77 79 njmpp = 1 78 nlci = jpi79 nlcj = jpj80 nldi = 181 nldj = 182 nlei = jpi83 nlej = jpj84 80 nbondi = 2 85 81 nbondj = 2 … … 131 127 !! njmpp : latitudinal index 132 128 !! narea : number for local area 133 !! nlci : first dimension134 !! nlcj : second dimension135 129 !! nbondi : mark for "east-west local boundary" 136 130 !! nbondj : mark for "north-south local boundary" … … 158 152 INTEGER, ALLOCATABLE, DIMENSION(:) :: iin, ii_nono, ii_noea ! 1D workspace 159 153 INTEGER, ALLOCATABLE, DIMENSION(:) :: ijn, ii_noso, ii_nowe ! - - 160 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iimppt, i lci, ibondi, ipproc ! 2D workspace161 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ijmppt, i lcj, ibondj, ipolj ! - -162 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: i lei, ildi, iono, ioea ! - -163 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: i lej, ildj, ioso, iowe ! - -154 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iimppt, ijpi, ibondi, ipproc ! 2D workspace 155 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ijmppt, ijpj, ibondj, ipolj ! - - 156 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iie0, iis0, iono, ioea ! - - 157 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ije0, ijs0, ioso, iowe ! - - 164 158 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: llisoce ! - - 165 159 NAMELIST/nambdy/ ln_bdy, nb_bdy, ln_coords_file, cn_coords_file, & … … 194 188 ! 195 189 IF(lwm) WRITE( numond, nammpp ) 196 190 ! 191 !!!------------------------------------ 192 !!! nn_hls shloud be read in nammpp 193 !!!------------------------------------ 194 jpiglo = Ni0glo + 2 * nn_hls 195 jpjglo = Nj0glo + 2 * nn_hls 196 ! 197 197 ! do we need to take into account bdy_msk? 198 198 READ ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) … … 204 204 IF( ln_bdy .AND. ln_mask_file ) CALL iom_open( cn_mask_file, numbdy ) 205 205 ! 206 IF( ln_listonly ) CALL mpp_init_bestpartition( MAX(mppsize,jpni*jpnj), ldlist = .TRUE. ) ! must be done by all core206 IF( ln_listonly ) CALL bestpartition( MAX(mppsize,jpni*jpnj), ldlist = .TRUE. ) ! must be done by all core 207 207 ! 208 208 ! 1. Dimension arrays for subdomains 209 209 ! ----------------------------------- 210 210 ! 211 ! If dimensions of processor grid weren't specified in the namelist file211 ! If dimensions of processors grid weren't specified in the namelist file 212 212 ! then we calculate them here now that we have our communicator size 213 213 IF(lwp) THEN … … 217 217 ENDIF 218 218 IF( jpni < 1 .OR. jpnj < 1 ) THEN 219 CALL mpp_init_bestpartition( mppsize, jpni, jpnj ) ! best mpi decomposition for mppsize mpi processes219 CALL bestpartition( mppsize, jpni, jpnj ) ! best mpi decomposition for mppsize mpi processes 220 220 llauto = .TRUE. 221 221 llbest = .TRUE. 222 222 ELSE 223 223 llauto = .FALSE. 224 CALL mpp_init_bestpartition( mppsize, inbi, inbj, icnt2 ) ! best mpi decomposition for mppsize mpi processes224 CALL bestpartition( mppsize, inbi, inbj, icnt2 ) ! best mpi decomposition for mppsize mpi processes 225 225 ! largest subdomain size for mpi decoposition jpni*jpnj given in the namelist 226 CALL mpp_basic_decomposition(jpni, jpnj, jpimax, jpjmax )227 ! largest subdomain size for mpi decoposition inbi*inbj given by mpp_init_bestpartition228 CALL mpp_basic_decomposition(inbi, inbj, iimax, ijmax )226 CALL basic_decomposition( jpiglo, jpjglo, nn_hls, jpni, jpnj, jpimax, jpjmax ) 227 ! largest subdomain size for mpi decoposition inbi*inbj given by bestpartition 228 CALL basic_decomposition( jpiglo, jpjglo, nn_hls, inbi, inbj, iimax, ijmax ) 229 229 icnt1 = jpni*jpnj - mppsize ! number of land subdomains that should be removed to use mppsize mpi processes 230 230 IF(lwp) THEN … … 257 257 ! look for land mpi subdomains... 258 258 ALLOCATE( llisoce(jpni,jpnj) ) 259 CALL mpp_init_isoce( jpni, jpnj, llisoce )259 CALL is_ocean( jpni, jpnj, llisoce ) 260 260 inijmin = COUNT( llisoce ) ! number of oce subdomains 261 261 … … 266 266 WRITE(ctmp4,*) ' ==>>> There is the list of best domain decompositions you should use: ' 267 267 CALL ctl_stop( ctmp1, ctmp2, ctmp3, ' ', ctmp4, ' ' ) 268 CALL mpp_init_bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core268 CALL bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core 269 269 ENDIF 270 270 … … 290 290 WRITE(numout,*) 291 291 ENDIF 292 CALL mpp_init_bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core292 CALL bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core 293 293 ENDIF 294 294 … … 318 318 IF( numbdy /= -1 ) CALL iom_close( numbdy ) 319 319 320 ALLOCATE( nfiimpp(jpni,jpnj), nfipproc(jpni,jpnj), nfi lcit(jpni,jpnj) , &321 & nimppt(jpnij) , ibonit(jpnij) , nlcit(jpnij) , nlcjt(jpnij) , &322 & njmppt(jpnij) , ibonjt(jpnij) , n ldit(jpnij) , nldjt(jpnij) , &323 & n leit(jpnij) , nlejt(jpnij) , &320 ALLOCATE( nfiimpp(jpni,jpnj), nfipproc(jpni,jpnj), nfijpit(jpni,jpnj) , & 321 & nimppt(jpnij) , ibonit(jpnij) , jpiall(jpnij) , jpjall(jpnij) , & 322 & njmppt(jpnij) , ibonjt(jpnij) , nis0all(jpnij) , njs0all(jpnij) , & 323 & nie0all(jpnij) , nje0all(jpnij) , & 324 324 & iin(jpnij), ii_nono(jpnij), ii_noea(jpnij), & 325 325 & ijn(jpnij), ii_noso(jpnij), ii_nowe(jpnij), & 326 & iimppt(jpni,jpnj), i lci(jpni,jpnj), ibondi(jpni,jpnj), ipproc(jpni,jpnj), &327 & ijmppt(jpni,jpnj), i lcj(jpni,jpnj), ibondj(jpni,jpnj),ipolj(jpni,jpnj), &328 & ilei(jpni,jpnj), ildi(jpni,jpnj), iono(jpni,jpnj),ioea(jpni,jpnj), &329 & ilej(jpni,jpnj), ildj(jpni,jpnj), ioso(jpni,jpnj),iowe(jpni,jpnj), &326 & iimppt(jpni,jpnj), ijpi(jpni,jpnj), ibondi(jpni,jpnj), ipproc(jpni,jpnj), & 327 & ijmppt(jpni,jpnj), ijpj(jpni,jpnj), ibondj(jpni,jpnj), ipolj(jpni,jpnj), & 328 & iie0(jpni,jpnj), iis0(jpni,jpnj), iono(jpni,jpnj), ioea(jpni,jpnj), & 329 & ije0(jpni,jpnj), ijs0(jpni,jpnj), ioso(jpni,jpnj), iowe(jpni,jpnj), & 330 330 & STAT=ierr ) 331 331 CALL mpp_sum( 'mppini', ierr ) … … 345 345 ! ----------------------------------- 346 346 ! 347 nreci = 2 * nn_hls 348 nrecj = 2 * nn_hls 349 CALL mpp_basic_decomposition( jpni, jpnj, jpimax, jpjmax, iimppt, ijmppt, ilci, ilcj ) 347 CALL basic_decomposition( jpiglo, jpjglo, nn_hls, jpni, jpnj, jpimax, jpjmax, iimppt, ijmppt, ijpi, ijpj ) 350 348 nfiimpp(:,:) = iimppt(:,:) 351 nfi lcit(:,:) = ilci(:,:)349 nfijpit(:,:) = ijpi(:,:) 352 350 ! 353 351 IF(lwp) THEN … … 359 357 WRITE(numout,*) ' jpnj = ', jpnj 360 358 WRITE(numout,*) 361 WRITE(numout,*) ' sum i lci(i,1) = ', sum(ilci(:,1)), ' jpiglo = ', jpiglo362 WRITE(numout,*) ' sum i lcj(1,j) = ', sum(ilcj(1,:)), ' jpjglo = ', jpjglo359 WRITE(numout,*) ' sum ijpi(i,1) = ', sum(ijpi(:,1)), ' jpiglo = ', jpiglo 360 WRITE(numout,*) ' sum ijpj(1,j) = ', sum(ijpj(1,:)), ' jpjglo = ', jpjglo 363 361 ENDIF 364 362 … … 375 373 ii = 1 + MOD(iarea0,jpni) 376 374 ij = 1 + iarea0/jpni 377 ili = i lci(ii,ij)378 ilj = i lcj(ii,ij)375 ili = ijpi(ii,ij) 376 ilj = ijpj(ii,ij) 379 377 ibondi(ii,ij) = 0 ! default: has e-w neighbours 380 378 IF( ii == 1 ) ibondi(ii,ij) = -1 ! first column, has only e neighbour … … 391 389 ioea(ii,ij) = iarea0 + 1 392 390 iono(ii,ij) = iarea0 + jpni 393 i ldi(ii,ij) = 1 + nn_hls394 i lei(ii,ij) = ili - nn_hls395 i ldj(ii,ij) = 1 + nn_hls396 i lej(ii,ij) = ilj - nn_hls391 iis0(ii,ij) = 1 + nn_hls 392 iie0(ii,ij) = ili - nn_hls 393 ijs0(ii,ij) = 1 + nn_hls 394 ije0(ii,ij) = ilj - nn_hls 397 395 398 396 ! East-West periodicity: change ibondi, ioea, iowe … … 500 498 ENDIF 501 499 END DO 502 503 ! Update il[de][ij] according to modified ibond[ij]504 ! ----------------------505 DO jproc = 1, jpnij506 ii = iin(jproc)507 ij = ijn(jproc)508 IF( ibondi(ii,ij) == -1 .OR. ibondi(ii,ij) == 2 ) ildi(ii,ij) = 1509 IF( ibondi(ii,ij) == 1 .OR. ibondi(ii,ij) == 2 ) ilei(ii,ij) = ilci(ii,ij)510 IF( ibondj(ii,ij) == -1 .OR. ibondj(ii,ij) == 2 ) ildj(ii,ij) = 1511 IF( ibondj(ii,ij) == 1 .OR. ibondj(ii,ij) == 2 ) ilej(ii,ij) = ilcj(ii,ij)512 END DO513 500 514 501 ! 5. Subdomain print … … 523 510 DO jj = jpnj, 1, -1 524 511 WRITE(numout,9403) (' ',ji=il1,il2-1) 525 WRITE(numout,9402) jj, (i lci(ji,jj),ilcj(ji,jj),ji=il1,il2)512 WRITE(numout,9402) jj, (ijpi(ji,jj),ijpj(ji,jj),ji=il1,il2) 526 513 WRITE(numout,9404) (ipproc(ji,jj),ji=il1,il2) 527 514 WRITE(numout,9403) (' ',ji=il1,il2-1) … … 580 567 noea = ii_noea(narea) 581 568 nono = ii_nono(narea) 582 nlci = ilci(ii,ij)583 nldi = ildi(ii,ij)584 nlei = ilei(ii,ij)585 nlcj = ilcj(ii,ij)586 nldj = ildj(ii,ij)587 nlej = ilej(ii,ij)569 jpi = ijpi(ii,ij) 570 !!$ Nis0 = iis0(ii,ij) 571 !!$ Nie0 = iie0(ii,ij) 572 jpj = ijpj(ii,ij) 573 !!$ Njs0 = ijs0(ii,ij) 574 !!$ Nje0 = ije0(ii,ij) 588 575 nbondi = ibondi(ii,ij) 589 576 nbondj = ibondj(ii,ij) 590 577 nimpp = iimppt(ii,ij) 591 578 njmpp = ijmppt(ii,ij) 592 jpi = nlci593 jpj = nlcj594 579 jpk = jpkglo ! third dim 595 580 #if defined key_agrif … … 609 594 ii = iin(jproc) 610 595 ij = ijn(jproc) 611 nlcit(jproc) = ilci(ii,ij)612 n ldit(jproc) = ildi(ii,ij)613 n leit(jproc) = ilei(ii,ij)614 nlcjt(jproc) = ilcj(ii,ij)615 n ldjt(jproc) = ildj(ii,ij)616 n lejt(jproc) = ilej(ii,ij)596 jpiall (jproc) = ijpi(ii,ij) 597 nis0all(jproc) = iis0(ii,ij) 598 nie0all(jproc) = iie0(ii,ij) 599 jpjall (jproc) = ijpj(ii,ij) 600 njs0all(jproc) = ijs0(ii,ij) 601 nje0all(jproc) = ije0(ii,ij) 617 602 ibonit(jproc) = ibondi(ii,ij) 618 603 ibonjt(jproc) = ibondj(ii,ij) … … 628 613 WRITE(inum,'(6i8,a,3i8,a)') jpnij,jpimax,jpjmax,jpk,jpiglo,jpjglo,& 629 614 & ' ( local: ',narea,jpi,jpj,' )' 630 WRITE(inum,'(a)') 'nproc nlci nlcj nldi nldj nlei nlejnimp njmp nono noso nowe noea nbondi nbondj '615 WRITE(inum,'(a)') 'nproc jpi jpj Nis0 Njs0 Nie0 Nje0 nimp njmp nono noso nowe noea nbondi nbondj ' 631 616 632 617 DO jproc = 1, jpnij 633 WRITE(inum,'(13i5,2i7)') jproc-1, nlcit (jproc), nlcjt(jproc), &634 & n ldit (jproc), nldjt(jproc), &635 & n leit (jproc), nlejt(jproc), &618 WRITE(inum,'(13i5,2i7)') jproc-1, jpiall(jproc), jpjall(jproc), & 619 & nis0all(jproc), njs0all(jproc), & 620 & nie0all(jproc), nje0all(jproc), & 636 621 & nimppt (jproc), njmppt (jproc), & 637 622 & ii_nono(jproc), ii_noso(jproc), & … … 667 652 WRITE(numout,*) ' l_Iperio = ', l_Iperio 668 653 WRITE(numout,*) ' l_Jperio = ', l_Jperio 669 WRITE(numout,*) ' nlci = ', nlci670 WRITE(numout,*) ' nlcj = ', nlcj671 654 WRITE(numout,*) ' nimpp = ', nimpp 672 655 WRITE(numout,*) ' njmpp = ', njmpp 673 WRITE(numout,*) ' nreci = ', nreci674 WRITE(numout,*) ' nrecj = ', nrecj675 656 WRITE(numout,*) ' nn_hls = ', nn_hls 676 657 ENDIF … … 712 693 DEALLOCATE(iin, ijn, ii_nono, ii_noea, ii_noso, ii_nowe, & 713 694 & iimppt, ijmppt, ibondi, ibondj, ipproc, ipolj, & 714 & i lci, ilcj, ilei, ilej, ildi, ildj, &695 & ijpi, ijpj, iie0, ije0, iis0, ijs0, & 715 696 & iono, ioea, ioso, iowe, llisoce) 716 697 ! … … 718 699 719 700 720 SUBROUTINE mpp_basic_decomposition(knbi, knbj, kimax, kjmax, kimppt, kjmppt, klci, klcj)721 !!---------------------------------------------------------------------- 722 !! *** ROUTINE mpp_basic_decomposition ***701 SUBROUTINE basic_decomposition( kiglo, kjglo, khls, knbi, knbj, kimax, kjmax, kimppt, kjmppt, klci, klcj) 702 !!---------------------------------------------------------------------- 703 !! *** ROUTINE basic_decomposition *** 723 704 !! 724 705 !! ** Purpose : Lay out the global domain over processors. … … 732 713 !! klcj : second dimension 733 714 !!---------------------------------------------------------------------- 715 INTEGER, INTENT(in ) :: kiglo, kjglo 716 INTEGER, INTENT(in ) :: khls 734 717 INTEGER, INTENT(in ) :: knbi, knbj 735 718 INTEGER, INTENT( out) :: kimax, kjmax … … 738 721 ! 739 722 INTEGER :: ji, jj 723 INTEGER :: i2hls 740 724 INTEGER :: iresti, irestj, irm, ijpjmin 741 INTEGER :: ireci, irecj742 !!----------------------------------------------------------------------725 !!---------------------------------------------------------------------- 726 i2hls = 2*khls 743 727 ! 744 728 #if defined key_nemocice_decomp 745 kimax = ( nx_global+2- 2*nn_hls + (knbi-1) ) / knbi + 2*nn_hls ! first dim.746 kjmax = ( ny_global+2- 2*nn_hls + (knbj-1) ) / knbj + 2*nn_hls ! second dim.729 kimax = ( nx_global+2-i2hls + (knbi-1) ) / knbi + i2hls ! first dim. 730 kjmax = ( ny_global+2-i2hls + (knbj-1) ) / knbj + i2hls ! second dim. 747 731 #else 748 kimax = ( jpiglo - 2*nn_hls + (knbi-1) ) / knbi + 2*nn_hls ! first dim.749 kjmax = ( jpjglo - 2*nn_hls + (knbj-1) ) / knbj + 2*nn_hls ! second dim.732 kimax = ( kiglo - i2hls + (knbi-1) ) / knbi + i2hls ! first dim. 733 kjmax = ( kjglo - i2hls + (knbj-1) ) / knbj + i2hls ! second dim. 750 734 #endif 751 735 IF( .NOT. PRESENT(kimppt) ) RETURN … … 754 738 ! ----------------------------------- 755 739 ! Computation of local domain sizes klci() klcj() 756 ! These dimensions depend on global sizes knbi,knbj and jpiglo,jpjglo740 ! These dimensions depend on global sizes knbi,knbj and kiglo,kjglo 757 741 ! The subdomains are squares lesser than or equal to the global 758 742 ! dimensions divided by the number of processors minus the overlap array. 759 743 ! 760 ireci = 2 * nn_hls 761 irecj = 2 * nn_hls 762 iresti = 1 + MOD( jpiglo - ireci -1 , knbi ) 763 irestj = 1 + MOD( jpjglo - irecj -1 , knbj ) 744 iresti = 1 + MOD( kiglo - i2hls - 1 , knbi ) 745 irestj = 1 + MOD( kjglo - i2hls - 1 , knbj ) 764 746 ! 765 747 ! Need to use kimax and kjmax here since jpi and jpj not yet defined 766 748 #if defined key_nemocice_decomp 767 749 ! Change padding to be consistent with CICE 768 klci(1:knbi-1 ,:) = kimax769 klci( knbi ,:) = jpiglo - (knbi - 1) * (kimax - nreci)770 klcj(: ,1:knbj-1) = kjmax771 klcj(: , knbj) = jpjglo - (knbj - 1) * (kjmax - nrecj)750 klci(1:knbi-1,: ) = kimax 751 klci( knbi ,: ) = kiglo - (knbi - 1) * (kimax - i2hls) 752 klcj(: ,1:knbj-1) = kjmax 753 klcj(: , knbj ) = kjglo - (knbj - 1) * (kjmax - i2hls) 772 754 #else 773 755 klci(1:iresti ,:) = kimax 774 756 klci(iresti+1:knbi ,:) = kimax-1 775 IF( MINVAL(klci) < 3) THEN776 WRITE(ctmp1,*) ' mpp_basic_decomposition: minimum value of jpi must be >= 3'757 IF( MINVAL(klci) < 2*i2hls ) THEN 758 WRITE(ctmp1,*) ' basic_decomposition: minimum value of jpi must be >= ', 2*i2hls 777 759 WRITE(ctmp2,*) ' We have ', MINVAL(klci) 778 760 CALL ctl_stop( 'STOP', ctmp1, ctmp2 ) … … 780 762 IF( jperio == 3 .OR. jperio == 4 .OR. jperio == 5 .OR. jperio == 6 ) THEN 781 763 ! minimize the size of the last row to compensate for the north pole folding coast 782 IF( jperio == 3 .OR. jperio == 4 ) ijpjmin = 5 ! V and F folding involves line jpj-3 that must not be south boundary 783 IF( jperio == 5 .OR. jperio == 6 ) ijpjmin = 4 ! V and F folding involves line jpj-2 that must not be south boundary 784 irm = knbj - irestj ! total number of lines to be removed 785 klcj(:, knbj) = MAX( ijpjmin, kjmax-irm ) ! we must have jpj >= ijpjmin in the last row 786 irm = irm - ( kjmax - klcj(1,knbj) ) ! remaining number of lines to remove 787 irestj = knbj - 1 - irm 788 klcj(:, 1:irestj) = kjmax 764 IF( jperio == 3 .OR. jperio == 4 ) ijpjmin = 2+3*khls ! V and F folding must be outside of southern halos 765 IF( jperio == 5 .OR. jperio == 6 ) ijpjmin = 1+3*khls ! V and F folding must be outside of southern halos 766 irm = knbj - irestj ! total number of lines to be removed 767 klcj(:,knbj) = MAX( ijpjmin, kjmax-irm ) ! we must have jpj >= ijpjmin in the last row 768 irm = irm - ( kjmax - klcj(1,knbj) ) ! remaining number of lines to remove 769 irestj = knbj - 1 - irm 789 770 klcj(:, irestj+1:knbj-1) = kjmax-1 790 771 ELSE 791 ijpjmin = 3 792 klcj(:, 1:irestj) = kjmax 793 klcj(:, irestj+1:knbj) = kjmax-1 794 ENDIF 795 IF( MINVAL(klcj) < ijpjmin ) THEN 796 WRITE(ctmp1,*) ' mpp_basic_decomposition: minimum value of jpj must be >= ', ijpjmin 772 klcj(:, irestj+1:knbj ) = kjmax-1 773 ENDIF 774 klcj(:,1:irestj) = kjmax 775 IF( MINVAL(klcj) < 2*i2hls ) THEN 776 WRITE(ctmp1,*) ' basic_decomposition: minimum value of jpj must be >= ', 2*i2hls 797 777 WRITE(ctmp2,*) ' We have ', MINVAL(klcj) 798 778 CALL ctl_stop( 'STOP', ctmp1, ctmp2 ) … … 808 788 DO jj = 1, knbj 809 789 DO ji = 2, knbi 810 kimppt(ji,jj) = kimppt(ji-1,jj) + klci(ji-1,jj) - ireci790 kimppt(ji,jj) = kimppt(ji-1,jj) + klci(ji-1,jj) - 2 * nn_hls 811 791 END DO 812 792 END DO … … 816 796 DO jj = 2, knbj 817 797 DO ji = 1, knbi 818 kjmppt(ji,jj) = kjmppt(ji,jj-1) + klcj(ji,jj-1) - irecj798 kjmppt(ji,jj) = kjmppt(ji,jj-1) + klcj(ji,jj-1) - 2 * nn_hls 819 799 END DO 820 800 END DO 821 801 ENDIF 822 802 823 END SUBROUTINE mpp_basic_decomposition824 825 826 SUBROUTINE mpp_init_bestpartition( knbij, knbi, knbj, knbcnt, ldlist )827 !!---------------------------------------------------------------------- 828 !! *** ROUTINE mpp_init_bestpartition ***803 END SUBROUTINE basic_decomposition 804 805 806 SUBROUTINE bestpartition( knbij, knbi, knbj, knbcnt, ldlist ) 807 !!---------------------------------------------------------------------- 808 !! *** ROUTINE bestpartition *** 829 809 !! 830 810 !! ** Purpose : … … 877 857 iszitst = ( nx_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 878 858 #else 879 iszitst = ( jpiglo - 2*nn_hls+ (ji-1) ) / ji + 2*nn_hls859 iszitst = ( Ni0glo + (ji-1) ) / ji + 2*nn_hls 880 860 #endif 881 861 IF( iszitst < isziref ) THEN … … 888 868 iszjtst = ( ny_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 889 869 #else 890 iszjtst = ( jpjglo - 2*nn_hls+ (ji-1) ) / ji + 2*nn_hls870 iszjtst = ( Nj0glo + (ji-1) ) / ji + 2*nn_hls 891 871 #endif 892 872 IF( iszjtst < iszjref ) THEN … … 976 956 ji = isz0 ! initialization with the largest value 977 957 ALLOCATE( llisoce(inbi0(ji), inbj0(ji)) ) 978 CALL mpp_init_isoce( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum)958 CALL is_ocean( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum) 979 959 inbijold = COUNT(llisoce) 980 960 DEALLOCATE( llisoce ) 981 961 DO ji =isz0-1,1,-1 982 962 ALLOCATE( llisoce(inbi0(ji), inbj0(ji)) ) 983 CALL mpp_init_isoce( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum)963 CALL is_ocean( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum) 984 964 inbij = COUNT(llisoce) 985 965 DEALLOCATE( llisoce ) … … 1007 987 ii = ii -1 1008 988 ALLOCATE( llisoce(inbi0(ii), inbj0(ii)) ) 1009 CALL mpp_init_isoce( inbi0(ii), inbj0(ii), llisoce ) ! must be done by all core989 CALL is_ocean( inbi0(ii), inbj0(ii), llisoce ) ! must be done by all core 1010 990 inbij = COUNT(llisoce) 1011 991 DEALLOCATE( llisoce ) … … 1016 996 DEALLOCATE( inbi0, inbj0 ) 1017 997 ! 1018 END SUBROUTINE mpp_init_bestpartition998 END SUBROUTINE bestpartition 1019 999 1020 1000 … … 1025 1005 !! ** Purpose : the the proportion of land points in the surface land-sea mask 1026 1006 !! 1027 !! ** Method : read iproc strips (of length jpiglo) of the land-sea mask1007 !! ** Method : read iproc strips (of length Ni0glo) of the land-sea mask 1028 1008 !!---------------------------------------------------------------------- 1029 1009 REAL(wp), INTENT( out) :: propland ! proportion of land points in the global domain (between 0 and 1) … … 1042 1022 1043 1023 ! number of processes reading the bathymetry file 1044 iproc = MINVAL( (/mppsize, jpjglo/2, 100/) ) ! read a least 2 lines, no more that 100 processes reading at the same time1024 iproc = MINVAL( (/mppsize, Nj0glo/2, 100/) ) ! read a least 2 lines, no more that 100 processes reading at the same time 1045 1025 1046 1026 ! we want to read iproc strips of the land-sea mask. -> pick up iproc processes every idiv processes starting at 1 … … 1052 1032 IF( MOD( narea-1, idiv ) == 0 .AND. iarea < iproc ) THEN ! beware idiv can be = to 1 1053 1033 ! 1054 ijsz = jpjglo / iproc ! width of the stripe to read1055 IF( iarea < MOD( jpjglo,iproc) ) ijsz = ijsz + 11056 ijstr = iarea*( jpjglo/iproc) + MIN(iarea, MOD(jpjglo,iproc)) + 1 ! starting j position of the reading1057 ! 1058 ALLOCATE( lloce( jpiglo, ijsz) ) ! allocate the strip1059 CALL mpp_init_readbot_strip( ijstr, ijsz, lloce )1034 ijsz = Nj0glo / iproc ! width of the stripe to read 1035 IF( iarea < MOD(Nj0glo,iproc) ) ijsz = ijsz + 1 1036 ijstr = iarea*(Nj0glo/iproc) + MIN(iarea, MOD(Nj0glo,iproc)) + 1 ! starting j position of the reading 1037 ! 1038 ALLOCATE( lloce(Ni0glo, ijsz) ) ! allocate the strip 1039 CALL readbot_strip( ijstr, ijsz, lloce ) 1060 1040 inboce = COUNT(lloce) ! number of ocean point in the stripe 1061 1041 DEALLOCATE(lloce) … … 1066 1046 CALL mpp_sum( 'mppini', inboce ) ! total number of ocean points over the global domain 1067 1047 ! 1068 propland = REAL( jpiglo*jpjglo - inboce, wp ) / REAL( jpiglo*jpjglo, wp )1048 propland = REAL( Ni0glo*Nj0glo - inboce, wp ) / REAL( Ni0glo*Nj0glo, wp ) 1069 1049 ! 1070 1050 END SUBROUTINE mpp_init_landprop 1071 1051 1072 1052 1073 SUBROUTINE mpp_init_isoce( knbi, knbj, ldisoce )1053 SUBROUTINE is_ocean( knbi, knbj, ldisoce ) 1074 1054 !!---------------------------------------------------------------------- 1075 1055 !! *** ROUTINE mpp_init_nboce *** … … 1078 1058 !! subdomains contain at least 1 ocean point 1079 1059 !! 1080 !! ** Method : read knbj strips (of length jpiglo) of the land-sea mask1060 !! ** Method : read knbj strips (of length Ni0glo) of the land-sea mask 1081 1061 !!---------------------------------------------------------------------- 1082 1062 INTEGER, INTENT(in ) :: knbi, knbj ! domain decomposition … … 1088 1068 INTEGER :: ji, jn 1089 1069 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: lloce ! lloce(i,j) = .true. if the point (i,j) is ocean 1090 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iimppt, i lci1091 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ijmppt, i lcj1070 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iimppt, ijpi 1071 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ijmppt, ijpj 1092 1072 !!---------------------------------------------------------------------- 1093 1073 ! do nothing if there is no land-sea mask … … 1109 1089 IF( MOD( narea-1, idiv ) == 0 .AND. iarea < knbj ) THEN ! beware idiv can be = to 1 1110 1090 ! 1111 ALLOCATE( iimppt(knbi,knbj), ijmppt(knbi,knbj), i lci(knbi,knbj), ilcj(knbi,knbj) )1112 CALL mpp_basic_decomposition( knbi, knbj, iimax, ijmax, iimppt, ijmppt, ilci, ilcj )1091 ALLOCATE( iimppt(knbi,knbj), ijmppt(knbi,knbj), ijpi(knbi,knbj), ijpj(knbi,knbj) ) 1092 CALL basic_decomposition( Ni0glo, Nj0glo, 0, knbi, knbj, iimax, ijmax, iimppt, ijmppt, ijpi, ijpj ) 1113 1093 ! 1114 ALLOCATE( lloce( jpiglo, ilcj(1,iarea+1)) )! allocate the strip1115 CALL mpp_init_readbot_strip( ijmppt(1,iarea+1), ilcj(1,iarea+1), lloce ) ! read the strip1094 ALLOCATE( lloce(Ni0glo, ijpj(1,iarea+1)) ) ! allocate the strip 1095 CALL readbot_strip( ijmppt(1,iarea+1), ijpj(1,iarea+1), lloce ) ! read the strip 1116 1096 DO ji = 1, knbi 1117 inboce(ji,iarea+1) = COUNT( lloce(iimppt(ji,1):iimppt(ji,1)+i lci(ji,1)-1,:) ) ! number of ocean point in subdomain1097 inboce(ji,iarea+1) = COUNT( lloce(iimppt(ji,1):iimppt(ji,1)+ijpi(ji,1)-1,:) ) ! number of ocean point in subdomain 1118 1098 END DO 1119 1099 ! 1120 1100 DEALLOCATE(lloce) 1121 DEALLOCATE(iimppt, ijmppt, i lci, ilcj)1101 DEALLOCATE(iimppt, ijmppt, ijpi, ijpj) 1122 1102 ! 1123 1103 ENDIF … … 1129 1109 ldisoce(:,:) = inboce(:,:) /= 0 1130 1110 ! 1131 END SUBROUTINE mpp_init_isoce1111 END SUBROUTINE is_ocean 1132 1112 1133 1113 1134 SUBROUTINE mpp_init_readbot_strip( kjstr, kjcnt, ldoce )1135 !!---------------------------------------------------------------------- 1136 !! *** ROUTINE mpp_init_readbot_strip ***1114 SUBROUTINE readbot_strip( kjstr, kjcnt, ldoce ) 1115 !!---------------------------------------------------------------------- 1116 !! *** ROUTINE readbot_strip *** 1137 1117 !! 1138 1118 !! ** Purpose : Read relevant bathymetric information in order to … … 1140 1120 !! of land domains, in an mpp computation. 1141 1121 !! 1142 !! ** Method : read stipe of size ( jpiglo,...)1122 !! ** Method : read stipe of size (Ni0glo,...) 1143 1123 !!---------------------------------------------------------------------- 1144 1124 INTEGER , INTENT(in ) :: kjstr ! starting j position of the reading 1145 1125 INTEGER , INTENT(in ) :: kjcnt ! number of lines to read 1146 LOGICAL, DIMENSION( jpiglo,kjcnt), INTENT( out) :: ldoce ! ldoce(i,j) = .true. if the point (i,j) is ocean1126 LOGICAL, DIMENSION(Ni0glo,kjcnt), INTENT( out) :: ldoce ! ldoce(i,j) = .true. if the point (i,j) is ocean 1147 1127 ! 1148 1128 INTEGER :: inumsave ! local logical unit 1149 REAL(wp), DIMENSION( jpiglo,kjcnt) :: zbot, zbdy1129 REAL(wp), DIMENSION(Ni0glo,kjcnt) :: zbot, zbdy 1150 1130 !!---------------------------------------------------------------------- 1151 1131 ! 1152 1132 inumsave = numout ; numout = numnul ! redirect all print to /dev/null 1153 1133 ! 1154 IF( numbot /= -1 ) THEN 1155 CALL iom_get( numbot, jpdom_unknown, 'bottom_level', zbot, kstart = (/1,kjstr/), kcount = (/ jpiglo, kjcnt/) )1134 IF( numbot /= -1 ) THEN 1135 CALL iom_get( numbot, jpdom_unknown, 'bottom_level', zbot, kstart = (/1,kjstr/), kcount = (/Ni0glo, kjcnt/) ) 1156 1136 ELSE 1157 zbot(:,:) = 1. 1158 ENDIF 1159 1160 IF( numbdy /= -1 ) THEN! Adjust with bdy_msk if it exists1161 CALL iom_get ( numbdy, jpdom_unknown, 'bdy_msk', zbdy, kstart = (/1,kjstr/), kcount = (/jpiglo, kjcnt/) )1137 zbot(:,:) = 1._wp ! put a non-null value 1138 ENDIF 1139 ! 1140 IF( numbdy /= -1 ) THEN ! Adjust with bdy_msk if it exists 1141 CALL iom_get ( numbdy, jpdom_unknown, 'bdy_msk', zbdy, kstart = (/1,kjstr/), kcount = (/Ni0glo, kjcnt/) ) 1162 1142 zbot(:,:) = zbot(:,:) * zbdy(:,:) 1163 1143 ENDIF 1164 1144 ! 1165 ldoce(:,:) = zbot(:,:) > 0. 1145 ldoce(:,:) = zbot(:,:) > 0._wp 1166 1146 numout = inumsave 1167 1147 ! 1168 END SUBROUTINE mpp_init_readbot_strip1148 END SUBROUTINE readbot_strip 1169 1149 1170 1150 … … 1190 1170 iglo(1) = jpiglo 1191 1171 iglo(2) = jpjglo 1192 iloc(1) = nlci1193 iloc(2) = nlcj1172 iloc(1) = jpi 1173 iloc(2) = jpj 1194 1174 iabsf(1) = nimppt(narea) 1195 1175 iabsf(2) = njmppt(narea) 1196 1176 iabsl(:) = iabsf(:) + iloc(:) - 1 1197 ihals(1) = nldi- 11198 ihals(2) = nldj- 11199 ihale(1) = nlci - nlei1200 ihale(2) = nlcj - nlej1177 ihals(1) = Nis0 - 1 1178 ihals(2) = Njs0 - 1 1179 ihale(1) = jpi - Nie0 1180 ihale(2) = jpj - Nje0 1201 1181 idid(1) = 1 1202 1182 idid(2) = 2 … … 1239 1219 ! 1240 1220 !sxM is the first point (in the global domain) needed to compute the north-fold for the current process 1241 sxM = jpiglo - nimppt(narea) - nlcit(narea) + 11221 sxM = jpiglo - nimppt(narea) - jpiall(narea) + 1 1242 1222 !dxM is the last point (in the global domain) needed to compute the north-fold for the current process 1243 1223 dxM = jpiglo - nimppt(narea) + 2 … … 1249 1229 ! 1250 1230 sxT = nfiimpp(jn, jpnj) ! sxT = 1st point (in the global domain) of the jn process 1251 dxT = nfiimpp(jn, jpnj) + nfi lcit(jn, jpnj) - 1 ! dxT = last point (in the global domain) of the jn process1231 dxT = nfiimpp(jn, jpnj) + nfijpit(jn, jpnj) - 1 ! dxT = last point (in the global domain) of the jn process 1252 1232 ! 1253 1233 IF ( sxT < sxM .AND. sxM < dxT ) THEN … … 1281 1261 IF( nn_hls == 1 ) THEN !* halo size of 1 1282 1262 ! 1283 nIs_0 = 2 ; nIs_1 = 1 ; nIs_1nxt2 = nIs_0 ; nIs_2 = nIs_11284 nJs_0 = 2 ; nJs_1 = 1 ; nJs_1nxt2 = nJs_0 ; nJs_2 = nJs_11263 Nis0 = 2 ; Nis1 = 1 ; Nis1nxt2 = Nis0 ; Nis2 = Nis1 1264 Njs0 = 2 ; Njs1 = 1 ; Njs1nxt2 = Njs0 ; Njs2 = Njs1 1285 1265 ! 1286 nIe_0 = jpi-1 ; nIe_1 = jpi ; nIe_1nxt2 = nIe_0 ; nIe_2 = nIe_11287 nJe_0 = jpj-1 ; nJe_1 = jpj ; nJe_1nxt2 = nJe_0 ; nJe_2 = nJe_11266 Nie0 = jpi-1 ; Nie1 = jpi ; Nie1nxt2 = Nie0 ; Nie2 = Nie1 1267 Nje0 = jpj-1 ; Nje1 = jpj ; Nje1nxt2 = Nje0 ; Nje2 = Nje1 1288 1268 ! 1289 1269 ELSEIF( nn_hls == 2 ) THEN !* halo size of 2 1290 1270 ! 1291 nIs_0 = 3 ; nIs_1 = 2 ; nIs_1nxt2 = nIs_1 ; nIs_2 = 11292 nJs_0 = 3 ; nJs_1 = 2 ; nJs_1nxt2 = nJs_1 ; nJs_2 = 11271 Nis0 = 3 ; Nis1 = 2 ; Nis1nxt2 = Nis1 ; Nis2 = 1 1272 Njs0 = 3 ; Njs1 = 2 ; Njs1nxt2 = Njs1 ; Njs2 = 1 1293 1273 ! 1294 nIe_0 = jpi-2 ; nIe_1 = jpi-1 ; nIe_1nxt2 = nIe_1 ; nIe_2 = jpi1295 nJe_0 = jpj-2 ; nJe_1 = jpj-1 ; nJe_1nxt2 = nJe_1 ; nJe_2 = jpj1274 Nie0 = jpi-2 ; Nie1 = jpi-1 ; Nie1nxt2 = Nie1 ; Nie2 = jpi 1275 Nje0 = jpj-2 ; Nje1 = jpj-1 ; Nje1nxt2 = Nje1 ; Nje2 = jpj 1296 1276 ! 1297 1277 ELSE !* unexpected halo size 1298 1278 CALL ctl_stop( 'STOP', 'ini_mpp: wrong value of halo size : nn_hls= 1 or 2 only !') 1299 1279 ENDIF 1280 ! 1281 Ni_0 = Nie0 - Nis0 + 1 1282 Nj_0 = Nje0 - Njs0 + 1 1283 Ni_1 = Nie1 - Nis1 + 1 1284 Nj_1 = Nje1 - Njs1 + 1 1285 Ni_2 = Nie2 - Nis2 + 1 1286 Nj_2 = Nje2 - Njs2 + 1 1300 1287 ! 1301 1288 END SUBROUTINE init_doloop -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/OBS/find_obs_proc.h90
r10068 r12807 41 41 ! first and last indoor i- and j-indexes kldi, klei, kldj, klej 42 42 ! exclude any obs in the bottom-left overlap region 43 ! also any obs outside to whole region (defined by nlci and nlcj)43 ! also any obs outside to whole region (defined by jpi and jpj) 44 44 ! I am assuming that kobsp does not need to be the correct processor 45 45 ! number -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/OBS/mpp_map.F90
r10068 r12807 12 12 USE par_kind, ONLY : wp ! Precision variables 13 13 USE par_oce , ONLY : jpi, jpj ! Ocean parameters 14 USE dom_oce , ONLY : mig, mjg, nldi, nlei, nldj, nlej, nlci, nlcj, narea ! Ocean space and time domain variables14 USE dom_oce , ONLY : mig, mjg, Nis0, Nie0, Njs0, Nje0, jpi, jpj, narea ! Ocean space and time domain variables 15 15 #if defined key_mpp_mpi 16 16 USE lib_mpp, ONLY : mpi_comm_oce ! MPP library … … 65 65 66 66 ! ! Setup local grid points 67 imppmap(mig(1):mig( nlci),mjg(1):mjg(nlcj)) = narea67 imppmap(mig(1):mig(jpi),mjg(1):mjg(jpj)) = narea 68 68 69 69 ! Get global data -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/OBS/obs_grid.F90
r10068 r12807 129 129 IF ( cdgrid == 'T' ) THEN 130 130 CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 131 & 1, nlci, 1, nlcj,&131 & 1, jpi, 1, jpj, & 132 132 & nproc, jpnij, & 133 133 & glamt, gphit, tmask, & … … 136 136 ELSEIF ( cdgrid == 'U' ) THEN 137 137 CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 138 & 1, nlci, 1, nlcj,&138 & 1, jpi, 1, jpj, & 139 139 & nproc, jpnij, & 140 140 & glamu, gphiu, umask, & … … 143 143 ELSEIF ( cdgrid == 'V' ) THEN 144 144 CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 145 & 1, nlci, 1, nlcj,&145 & 1, jpi, 1, jpj, & 146 146 & nproc, jpnij, & 147 147 & glamv, gphiv, vmask, & … … 150 150 ELSEIF ( cdgrid == 'F' ) THEN 151 151 CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 152 & 1, nlci, 1, nlcj,&152 & 1, jpi, 1, jpj, & 153 153 & nproc, jpnij, & 154 154 & glamf, gphif, fmask, & … … 279 279 zmskg(:,:) = -1.e+10 280 280 ! Add various grids here. 281 DO jj = 1, nlcj282 DO ji = 1, nlci281 DO jj = 1, jpj 282 DO ji = 1, jpi 283 283 zlamg(mig(ji),mjg(jj)) = glamt(ji,jj) 284 284 zphig(mig(ji),mjg(jj)) = gphit(ji,jj) … … 816 816 817 817 CALL obs_grd_bruteforce( jpi, jpj, jpiglo, jpjglo, & 818 & 1, nlci, 1, nlcj,&818 & 1, jpi, 1, jpj, & 819 819 & nproc, jpnij, & 820 820 & glamt, gphit, tmask, & -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/SBC/cpl_oasis3.F90
r12527 r12807 70 70 INTEGER, PUBLIC, PARAMETER :: nmaxcpl=5 ! Maximum number of coupling fields 71 71 LOGICAL, PARAMETER :: ltmp_wapatch = .TRUE. ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 72 INTEGER :: nldi_save, nlei_save73 INTEGER :: nldj_save, nlej_save72 INTEGER :: Nis0_save, Nie0_save 73 INTEGER :: Njs0_save, Nje0_save 74 74 75 75 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information … … 150 150 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 151 151 IF( ltmp_wapatch ) THEN 152 nldi_save = nldi ; nlei_save = nlei153 nldj_save = nldj ; nlej_save = nlej154 IF( nimpp == 1 ) nldi= 1155 IF( nimpp + jpi - 1 == jpiglo ) nlei= jpi156 IF( njmpp == 1 ) nldj= 1157 IF( njmpp + jpj - 1 == jpjglo ) nlej= jpj152 Nis0_save = Nis0 ; Nie0_save = Nie0 153 Njs0_save = Njs0 ; Nje0_save = Nje0 154 IF( nimpp == 1 ) Nis0 = 1 155 IF( nimpp + jpi - 1 == jpiglo ) Nie0 = jpi 156 IF( njmpp == 1 ) Njs0 = 1 157 IF( njmpp + jpj - 1 == jpjglo ) Nje0 = jpj 158 158 ENDIF 159 159 IF(lwp) WRITE(numout,*) … … 182 182 ! 183 183 ishape(1) = 1 184 ishape(2) = nlei-nldi+1184 ishape(2) = Ni_0 185 185 ishape(3) = 1 186 ishape(4) = nlej-nldj+1186 ishape(4) = Nj_0 187 187 ! 188 188 ! ... Allocate memory for data exchange 189 189 ! 190 ALLOCATE(exfld( nlei-nldi+1, nlej-nldj+1), stat = nerror)190 ALLOCATE(exfld(Ni_0, Nj_0), stat = nerror) 191 191 IF( nerror > 0 ) THEN 192 192 CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in allocating exfld') ; RETURN … … 198 198 199 199 paral(1) = 2 ! box partitioning 200 paral(2) = jpiglo * ( nldj-1+njmpp-1) + (nldi-1+nimpp-1) ! NEMO lower left corner global offset201 paral(3) = nlei-nldi+1! local extent in i202 paral(4) = nlej-nldj+1! local extent in j200 paral(2) = jpiglo * (Njs0-1+njmpp-1) + (Nis0-1+nimpp-1) ! NEMO lower left corner global offset 201 paral(3) = Ni_0 ! local extent in i 202 paral(4) = Nj_0 ! local extent in j 203 203 paral(5) = jpiglo ! global extent in x 204 204 … … 206 206 WRITE(numout,*) ' multiexchg: paral (1:5)', paral 207 207 WRITE(numout,*) ' multiexchg: jpi, jpj =', jpi, jpj 208 WRITE(numout,*) ' multiexchg: nldi, nlei, nimpp =', nldi, nlei, nimpp209 WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp208 WRITE(numout,*) ' multiexchg: Nis0, Nie0, nimpp =', Nis0, Nie0, nimpp 209 WRITE(numout,*) ' multiexchg: Njs0, Nje0, njmpp =', Njs0, Nje0, njmpp 210 210 ENDIF 211 211 … … 317 317 ! 318 318 IF( ltmp_wapatch ) THEN 319 nldi = nldi_save ; nlei = nlei_save320 nldj = nldj_save ; nlej = nlej_save319 Nis0 = Nis0_save ; Nie0 = Nie0_save 320 Njs0 = Njs0_save ; Nje0 = Nje0_save 321 321 ENDIF 322 322 END SUBROUTINE cpl_define … … 339 339 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 340 340 IF( ltmp_wapatch ) THEN 341 nldi_save = nldi ; nlei_save = nlei342 nldj_save = nldj ; nlej_save = nlej343 IF( nimpp == 1 ) nldi= 1344 IF( nimpp + jpi - 1 == jpiglo ) nlei= jpi345 IF( njmpp == 1 ) nldj= 1346 IF( njmpp + jpj - 1 == jpjglo ) nlej= jpj341 Nis0_save = Nis0 ; Nie0_save = Nie0 342 Njs0_save = Njs0 ; Nje0_save = Nje0 343 IF( nimpp == 1 ) Nis0 = 1 344 IF( nimpp + jpi - 1 == jpiglo ) Nie0 = jpi 345 IF( njmpp == 1 ) Njs0 = 1 346 IF( njmpp + jpj - 1 == jpjglo ) Nje0 = jpj 347 347 ENDIF 348 348 ! … … 353 353 354 354 IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN 355 CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata( nldi:nlei, nldj:nlej,jc), kinfo )355 CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(Nis0:Nie0, Njs0:Nje0,jc), kinfo ) 356 356 357 357 IF ( sn_cfctl%l_oasout ) THEN … … 363 363 WRITE(numout,*) 'oasis_put: kstep ', kstep 364 364 WRITE(numout,*) 'oasis_put: info ', kinfo 365 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata( nldi:nlei,nldj:nlej,jc))366 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata( nldi:nlei,nldj:nlej,jc))367 WRITE(numout,*) ' - Sum value is ', SUM(pdata( nldi:nlei,nldj:nlej,jc))365 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 366 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 367 WRITE(numout,*) ' - Sum value is ', SUM(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 368 368 WRITE(numout,*) '****************' 369 369 ENDIF … … 375 375 ENDDO 376 376 IF( ltmp_wapatch ) THEN 377 nldi = nldi_save ; nlei = nlei_save378 nldj = nldj_save ; nlej = nlej_save377 Nis0 = Nis0_save ; Nie0 = Nie0_save 378 Njs0 = Njs0_save ; Nje0 = Nje0_save 379 379 ENDIF 380 380 ! … … 400 400 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 401 401 IF( ltmp_wapatch ) THEN 402 nldi_save = nldi ; nlei_save = nlei403 nldj_save = nldj ; nlej_save = nlej402 Nis0_save = Nis0 ; Nie0_save = Nie0 403 Njs0_save = Njs0 ; Nje0_save = Nje0 404 404 ENDIF 405 405 ! … … 410 410 DO jc = 1, srcv(kid)%nct 411 411 IF( ltmp_wapatch ) THEN 412 IF( nimpp == 1 ) nldi= 1413 IF( nimpp + jpi - 1 == jpiglo ) nlei= jpi414 IF( njmpp == 1 ) nldj= 1415 IF( njmpp + jpj - 1 == jpjglo ) nlej= jpj412 IF( nimpp == 1 ) Nis0 = 1 413 IF( nimpp + jpi - 1 == jpiglo ) Nie0 = jpi 414 IF( njmpp == 1 ) Njs0 = 1 415 IF( njmpp + jpj - 1 == jpjglo ) Nje0 = jpj 416 416 ENDIF 417 417 llfisrt = .TRUE. … … 432 432 kinfo = OASIS_Rcv 433 433 IF( llfisrt ) THEN 434 pdata( nldi:nlei,nldj:nlej,jc) = exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm)434 pdata(Nis0:Nie0,Njs0:Nje0,jc) = exfld(:,:) * pmask(Nis0:Nie0,Njs0:Nje0,jm) 435 435 llfisrt = .FALSE. 436 436 ELSE 437 pdata(nldi:nlei,nldj:nlej,jc) = pdata(nldi:nlei,nldj:nlej,jc) + exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm) 437 pdata(Nis0:Nie0,Njs0:Nje0,jc) = pdata(Nis0:Nie0,Njs0:Nje0,jc) & 438 & + exfld(:,:) * pmask(Nis0:Nie0,Njs0:Nje0,jm) 438 439 ENDIF 439 440 … … 444 445 WRITE(numout,*) 'oasis_get: kstep', kstep 445 446 WRITE(numout,*) 'oasis_get: info ', kinfo 446 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata( nldi:nlei,nldj:nlej,jc))447 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata( nldi:nlei,nldj:nlej,jc))448 WRITE(numout,*) ' - Sum value is ', SUM(pdata( nldi:nlei,nldj:nlej,jc))447 WRITE(numout,*) ' - Minimum value is ', MINVAL(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 448 WRITE(numout,*) ' - Maximum value is ', MAXVAL(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 449 WRITE(numout,*) ' - Sum value is ', SUM(pdata(Nis0:Nie0,Njs0:Nje0,jc)) 449 450 WRITE(numout,*) '****************' 450 451 ENDIF … … 457 458 458 459 IF( ltmp_wapatch ) THEN 459 nldi = nldi_save ; nlei = nlei_save460 nldj = nldj_save ; nlej = nlej_save460 Nis0 = Nis0_save ; Nie0 = Nie0_save 461 Njs0 = Njs0_save ; Nje0 = Nje0_save 461 462 ENDIF 462 463 !--- Fill the overlap areas and extra hallows (mpp) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/SBC/sbccpl.F90
r12489 r12807 1036 1036 xcplmask(:,:,:) = 0. 1037 1037 CALL iom_open( 'cplmask', inum ) 1038 CALL iom_get( inum, jpdom_unknown, 'cplmask', xcplmask(1: nlci,1:nlcj,1:nn_cplmodel), &1039 & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,nn_cplmodel /) )1038 CALL iom_get( inum, jpdom_unknown, 'cplmask', xcplmask(1:jpi,1:jpj,1:nn_cplmodel), & 1039 & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ jpi,jpj,nn_cplmodel /) ) 1040 1040 CALL iom_close( inum ) 1041 1041 ELSE -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/SBC/sbcice_cice.F90
r12489 r12807 872 872 ! pcg(:,:)=0.0 873 873 DO jn=1,jpnij 874 DO jj=n ldjt(jn),nlejt(jn)875 DO ji=n ldit(jn),nleit(jn)874 DO jj=njs0all(jn),nje0all(jn) 875 DO ji=nis0all(jn),nie0all(jn) 876 876 png2(ji+nimppt(jn)-1,jj+njmppt(jn)-1)=png(ji,jj,jn) 877 877 ENDDO … … 993 993 png(:,:,:)=0.0 994 994 DO jn=1,jpnij 995 DO jj=n ldjt(jn),nlejt(jn)996 DO ji=n ldit(jn),nleit(jn)995 DO jj=njs0all(jn),nje0all(jn) 996 DO ji=nis0all(jn),nie0all(jn) 997 997 png(ji,jj,jn)=pcg(ji+nimppt(jn)-1-ji_off,jj+njmppt(jn)-1-jj_off) 998 998 ENDDO -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/SBC/sbcwave.F90
r12377 r12807 212 212 #if defined key_agrif 213 213 IF( .NOT. Agrif_Root() ) THEN 214 IF( nbondi == -1 .OR. nbondi == 2 ) ze3divh( 2:nbghostcells+1,: 215 IF( nbondi == 1 .OR. nbondi == 2 ) ze3divh( nlci-nbghostcells:nlci-1,:,:) = 0._wp ! east216 IF( nbondj == -1 .OR. nbondj == 2 ) ze3divh( :,2:nbghostcells+1 217 IF( nbondj == 1 .OR. nbondj == 2 ) ze3divh( :, nlcj-nbghostcells:nlcj-1,:) = 0._wp ! north214 IF( nbondi == -1 .OR. nbondi == 2 ) ze3divh( 2:nbghostcells+1,: ,:) = 0._wp ! west 215 IF( nbondi == 1 .OR. nbondi == 2 ) ze3divh( jpi-nbghostcells:jpi-1,:,:) = 0._wp ! east 216 IF( nbondj == -1 .OR. nbondj == 2 ) ze3divh( :,2:nbghostcells+1 ,:) = 0._wp ! south 217 IF( nbondj == 1 .OR. nbondj == 2 ) ze3divh( :,jpj-nbghostcells:jpj-1,:) = 0._wp ! north 218 218 ENDIF 219 219 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/do_loop_substitute.h90
r12760 r12807 50 50 ! includes the possibility of strides for which an extra set of DO_3DS macros are defined. 51 51 ! 52 ! In the following definitions the inner PE domain is defined by start indices of (_ nIs_0, nJs_0) and end indices of (nIe_0, nJs_0)53 ! The following macros are defined just below: _ nIs_0, nJs_0, _nIs_1, nJs_1, _nIe_0, nJs_0, _nIe_1, nJe_1.52 ! In the following definitions the inner PE domain is defined by start indices of (_Nis0, Njs0) and end indices of (Nie0, Njs0) 53 ! The following macros are defined just below: _Nis0, Njs0, _Nis1, Njs1, _Nie0, Njs0, _Nie1, Nje1. 54 54 ! These names are chosen to, hopefully, avoid any future, unintended matches elsewhere in the code. 55 55 ! … … 58 58 ! -0- fortran code : defined in par_oce.F90 the folowwing valiables : 59 59 !!# 60 !!# INTEGER, PUBLIC :: nIs_0, nIs_1, nIs_2 !: start I-index (_0: no halo, _1 & _2: 1 & 2-halos)61 !!# INTEGER, PUBLIC :: nIe_0, nIe_1, nIe_2 !: end I-index (_0: no halo, _1 & _2: 1 & 2-halos)62 !!# INTEGER, PUBLIC :: nJs_0, nJs_1, nJs_2 !: start J-index (_0: no halo, _1 & _2: 1 & 2-halos)63 !!# INTEGER, PUBLIC :: nJe_0, nJe_1, nJe_2 !: end J-index (_0: no halo, _1 & _2: 1 & 2-halos)60 !!# INTEGER, PUBLIC :: Nis0, Nis1, Nis2 !: start I-index (_0: no halo, _1 & _2: 1 & 2-halos) 61 !!# INTEGER, PUBLIC :: Nie0, Nie1, Nie2 !: end I-index (_0: no halo, _1 & _2: 1 & 2-halos) 62 !!# INTEGER, PUBLIC :: Njs0, Njs1, Njs2 !: start J-index (_0: no halo, _1 & _2: 1 & 2-halos) 63 !!# INTEGER, PUBLIC :: Nje0, Nje1, Nje2 !: end J-index (_0: no halo, _1 & _2: 1 & 2-halos) 64 64 !!# 65 65 ! -1- fortran code put in mppinit.F90 : … … 76 76 !!# IF( nn_hls == 1 ) THEN !* halo size of 1 77 77 !!# ! 78 !!# nIs_0 = 2 ; nIs_1 = 1 ; nIs_2 = nIs_179 !!# nJs_0 = nIs_0 ; nJs_1 = nIs_1 ; nJs_2 = nIs_180 !!# ! 81 !!# nIe_0 = jpi-1 ; nJe_1 = jpi ; nIe_2 = nIe_182 !!# nJe_0 = jpj-1 ; nJe_1 = jpj-1 ; nJe_2 = nIe_178 !!# Nis0 = 2 ; Nis1 = 1 ; Nis2 = Nis1 79 !!# Njs0 = Nis0 ; Njs1 = Nis1 ; Njs2 = Nis1 80 !!# ! 81 !!# Nie0 = jpi-1 ; Nje1 = jpi ; Nie2 = Nie1 82 !!# Nje0 = jpj-1 ; Nje1 = jpj-1 ; Nje2 = Nie1 83 83 !!# ! 84 84 !!# ELSEIF( nn_hls == 2 ) THEN !* halo size of 2 85 85 !!# ! 86 !!# nIs_0 = 3 ; nIs_1 = 2 ; nIs_2 = 187 !!# nJs_0 = nIs_0 ; nJs_1 = nIs_1 ; nJs_2 = nIs_288 !!# ! 89 !!# nIe_0 = jpi-2 ; nJe_1 = jpi-1 ; nIe_2 = jpi90 !!# nJe_0 = jpj-2 ; nJe_1 = jpj-1 ; nJe_2 = jpj86 !!# Nis0 = 3 ; Nis1 = 2 ; Nis2 = 1 87 !!# Njs0 = Nis0 ; Njs1 = Nis1 ; Njs2 = Nis2 88 !!# ! 89 !!# Nie0 = jpi-2 ; Nje1 = jpi-1 ; Nie2 = jpi 90 !!# Nje0 = jpj-2 ; Nje1 = jpj-1 ; Nje2 = jpj 91 91 !!# ! 92 92 !!# ELSE !* unexpected halo size … … 103 103 ! 2D loops with 1 104 104 105 #define DO_2D_00_00 DO jj = nJs_0, nJe_0 ; DO ji = nIs_0, nIe_0106 #define DO_2D_00_01 DO jj = nJs_0, nJe_0 ; DO ji = nIs_0, nIe_1107 #define DO_2D_00_10 DO jj = nJs_0, nJe_0 ; DO ji = nIs_1, nIe_0108 #define DO_2D_00_11 DO jj = nJs_0, nJe_0 ; DO ji = nIs_1, nIe_1109 110 #define DO_2D_01_00 DO jj = nJs_0, nJe_1 ; DO ji = nIs_0, nIe_0111 #define DO_2D_01_01 DO jj = nJs_0, nJe_1 ; DO ji = nIs_0, nIe_1112 #define DO_2D_01_10 DO jj = nJs_0, nJe_1 ; DO ji = nIs_1, nIe_0113 #define DO_2D_01_11 DO jj = nJs_0, nJe_1 ; DO ji = nIs_1, nIe_1114 115 #define DO_2D_10_00 DO jj = nJs_1, nJe_0 ; DO ji = nIs_0, nIe_0116 #define DO_2D_10_01 DO jj = nJs_1, nJe_0 ; DO ji = nIs_0, nIe_1 ! not used ?117 #define DO_2D_10_10 DO jj = nJs_1, nJe_0 ; DO ji = nIs_1, nIe_0118 #define DO_2D_10_11 DO jj = nJs_1, nJe_0 ; DO ji = nIs_1, nIe_1119 120 #define DO_2D_11_00 DO jj = nJs_1, nJe_1 ; DO ji = nIs_0, nIe_0121 #define DO_2D_11_01 DO jj = nJs_1, nJe_1 ; DO ji = nIs_0, nIe_1122 #define DO_2D_11_10 DO jj = nJs_1, nJe_1 ; DO ji = nIs_1, nIe_0123 #define DO_2D_11_11 DO jj = nJs_1, nJe_1 ; DO ji = nIs_1, nIe_1105 #define DO_2D_00_00 DO jj = Njs0, Nje0 ; DO ji = Nis0, Nie0 106 #define DO_2D_00_01 DO jj = Njs0, Nje0 ; DO ji = Nis0, Nie1 107 #define DO_2D_00_10 DO jj = Njs0, Nje0 ; DO ji = Nis1, Nie0 108 #define DO_2D_00_11 DO jj = Njs0, Nje0 ; DO ji = Nis1, Nie1 109 110 #define DO_2D_01_00 DO jj = Njs0, Nje1 ; DO ji = Nis0, Nie0 111 #define DO_2D_01_01 DO jj = Njs0, Nje1 ; DO ji = Nis0, Nie1 112 #define DO_2D_01_10 DO jj = Njs0, Nje1 ; DO ji = Nis1, Nie0 113 #define DO_2D_01_11 DO jj = Njs0, Nje1 ; DO ji = Nis1, Nie1 114 115 #define DO_2D_10_00 DO jj = Njs1, Nje0 ; DO ji = Nis0, Nie0 116 #define DO_2D_10_01 DO jj = Njs1, Nje0 ; DO ji = Nis0, Nie1 ! not used ? 117 #define DO_2D_10_10 DO jj = Njs1, Nje0 ; DO ji = Nis1, Nie0 118 #define DO_2D_10_11 DO jj = Njs1, Nje0 ; DO ji = Nis1, Nie1 119 120 #define DO_2D_11_00 DO jj = Njs1, Nje1 ; DO ji = Nis0, Nie0 121 #define DO_2D_11_01 DO jj = Njs1, Nje1 ; DO ji = Nis0, Nie1 122 #define DO_2D_11_10 DO jj = Njs1, Nje1 ; DO ji = Nis1, Nie0 123 #define DO_2D_11_11 DO jj = Njs1, Nje1 ; DO ji = Nis1, Nie1 124 124 125 125 ! 2D loops with 1 following a 2/3D loop with 2 126 126 127 #define DO_2D_00_01nxt2 DO jj = nJs_0 , nJe_0 ; DO ji = nIs_0 , nIe_1nxt2128 #define DO_2D_00_10nxt2 DO jj = nJs_0 , nJe_0 ; DO ji = nIs_1nxt2, nIe_0129 #define DO_2D_00_11nxt2 DO jj = nJs_0 , nJe_0 ; DO ji = nIs_1nxt2, nIe_1nxt2130 131 #define DO_2D_01_00nxt2 DO jj = nJs_0 , nJe_1nxt2 ; DO ji = nIs_0 , nIe_0132 #define DO_2D_01_01nxt2 DO jj = nJs_0 , nJe_1nxt2 ; DO ji = nIs_0 , nIe_1nxt2133 #define DO_2D_01_10nxt2 DO jj = nJs_0 , nJe_1nxt2 ; DO ji = nIs_1nxt2, nIe_0134 #define DO_2D_01_11nxt2 DO jj = nJs_0 , nJe_1nxt2 ; DO ji = nIs_1nxt2, nIe_1nxt2135 136 #define DO_2D_10_00nxt2 DO jj = nJs_1nxt2, nJe_0 ; DO ji = nIs_0 , nIe_0137 #define DO_2D_10_01nxt2 DO jj = nJs_1nxt2, nJe_0 ; DO ji = nIs_0 , nIe_1nxt2 ! not used ?138 #define DO_2D_10_10nxt2 DO jj = nJs_1nxt2, nJe_0 ; DO ji = nIs_1nxt2, nIe_0139 #define DO_2D_10_11nxt2 DO jj = nJs_1nxt2, nJe_0 ; DO ji = nIs_1nxt2, nIe_1nxt2140 141 #define DO_2D_11_00nxt2 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_0 , nIe_0142 #define DO_2D_11_01nxt2 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_0 , nIe_1nxt2143 #define DO_2D_11_10nxt2 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_1nxt2, nIe_0144 #define DO_2D_11_11nxt2 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_1nxt2, nIe_1nxt2127 #define DO_2D_00_01nxt2 DO jj = Njs0 , Nje0 ; DO ji = Nis0 , Nie1nxt2 128 #define DO_2D_00_10nxt2 DO jj = Njs0 , Nje0 ; DO ji = Nis1nxt2, Nie0 129 #define DO_2D_00_11nxt2 DO jj = Njs0 , Nje0 ; DO ji = Nis1nxt2, Nie1nxt2 130 131 #define DO_2D_01_00nxt2 DO jj = Njs0 , Nje1nxt2 ; DO ji = Nis0 , Nie0 132 #define DO_2D_01_01nxt2 DO jj = Njs0 , Nje1nxt2 ; DO ji = Nis0 , Nie1nxt2 133 #define DO_2D_01_10nxt2 DO jj = Njs0 , Nje1nxt2 ; DO ji = Nis1nxt2, Nie0 134 #define DO_2D_01_11nxt2 DO jj = Njs0 , Nje1nxt2 ; DO ji = Nis1nxt2, Nie1nxt2 135 136 #define DO_2D_10_00nxt2 DO jj = Njs1nxt2, Nje0 ; DO ji = Nis0 , Nie0 137 #define DO_2D_10_01nxt2 DO jj = Njs1nxt2, Nje0 ; DO ji = Nis0 , Nie1nxt2 ! not used ? 138 #define DO_2D_10_10nxt2 DO jj = Njs1nxt2, Nje0 ; DO ji = Nis1nxt2, Nie0 139 #define DO_2D_10_11nxt2 DO jj = Njs1nxt2, Nje0 ; DO ji = Nis1nxt2, Nie1nxt2 140 141 #define DO_2D_11_00nxt2 DO jj = Njs1nxt2, Nje1nxt2 ; DO ji = Nis0 , Nie0 142 #define DO_2D_11_01nxt2 DO jj = Njs1nxt2, Nje1nxt2 ; DO ji = Nis0 , Nie1nxt2 143 #define DO_2D_11_10nxt2 DO jj = Njs1nxt2, Nje1nxt2 ; DO ji = Nis1nxt2, Nie0 144 #define DO_2D_11_11nxt2 DO jj = Njs1nxt2, Nje1nxt2 ; DO ji = Nis1nxt2, Nie1nxt2 145 145 146 146 ! 2D loops with 2 147 147 148 #define DO_2D_11_12 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_1nxt2, nIe_2149 #define DO_2D_11_21 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_2 , nIe_1nxt2150 #define DO_2D_11_22 DO jj = nJs_1nxt2, nJe_1nxt2 ; DO ji = nIs_2 , nIe_2151 152 #define DO_2D_12_11 DO jj = nJs_1nxt2, nJe_2 ; DO ji = nIs_1nxt2, nIe_1nxt2153 #define DO_2D_12_12 DO jj = nJs_1nxt2, nJe_2 ; DO ji = nIs_1nxt2, nIe_2