- Timestamp:
- 2019-02-14T14:11:43+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/fix_ticket2238_solution2
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/fix_ticket2238_solution2/src/OCE/ICB/icblbc.F90
r10570 r10679 56 56 57 57 INTEGER, PARAMETER, PRIVATE :: jp_delta_buf = 25 ! Size by which to increment buffers 58 INTEGER, PARAMETER, PRIVATE :: jp_buffer_width = 15+nkounts ! items to store for each berg58 INTEGER, PARAMETER, PRIVATE :: jp_buffer_width = 47+nkounts ! items to store for each berg 59 59 60 60 #endif … … 90 90 DO WHILE( ASSOCIATED(this) ) 91 91 pt => this%current_point 92 iine = INT( pt%xi + 0.5 )92 iine = INT( pt%xi + 0.5_wp ) 93 93 IF( iine > mig(nicbei) ) THEN 94 94 pt%xi = ricb_right + MOD(pt%xi, 1._wp ) - 1._wp … … 125 125 DO WHILE( ASSOCIATED(this) ) 126 126 pt => this%current_point 127 ijne = INT( pt%yj + 0.5 )127 ijne = INT( pt%yj + 0.5_wp ) 128 128 IF( ijne .GT. mjg(nicbej) ) THEN 129 129 ! 130 iine = INT( pt%xi + 0.5 )130 iine = INT( pt%xi + 0.5_wp ) 131 131 ipts = nicbfldpts (mi1(iine)) 132 132 ! … … 232 232 DO WHILE (ASSOCIATED(this)) 233 233 pt => this%current_point 234 iine = INT( pt%xi + 0.5 )234 iine = INT( pt%xi + 0.5_wp ) 235 235 IF( ipe_E >= 0 .AND. iine > mig(nicbei) ) THEN 236 236 tmpberg => this … … 242 242 ENDIF 243 243 ! deal with periodic case 244 tmpberg%current_point%xi = ricb_right + MOD(tmpberg%current_point%xi, 1._wp ) - 1._wp 244 tmpberg%current_point%xi = ricb_right + MOD(tmpberg%current_point%xi, 1._wp ) - 1._wp 245 tmpberg%current_point%xRK1(1) = ricb_right + MOD(tmpberg%current_point%xRK1(1), 1._wp ) - 1._wp 246 tmpberg%current_point%xRK2(1) = ricb_right + MOD(tmpberg%current_point%xRK2(1), 1._wp ) - 1._wp 247 tmpberg%current_point%xRK3(1) = ricb_right + MOD(tmpberg%current_point%xRK3(1), 1._wp ) - 1._wp 248 tmpberg%current_point%xRK4(1) = ricb_right + MOD(tmpberg%current_point%xRK4(1), 1._wp ) - 1._wp 245 249 ! now pack it into buffer and delete from list 246 250 CALL icb_pack_into_buffer( tmpberg, obuffer_e, ibergs_to_send_e) … … 255 259 ENDIF 256 260 ! deal with periodic case 257 tmpberg%current_point%xi = ricb_left + MOD(tmpberg%current_point%xi, 1._wp ) 261 tmpberg%current_point%xi = ricb_left + MOD(tmpberg%current_point%xi, 1._wp ) 262 tmpberg%current_point%xRK1(1) = ricb_left + MOD(tmpberg%current_point%xRK1(1), 1._wp ) 263 tmpberg%current_point%xRK2(1) = ricb_left + MOD(tmpberg%current_point%xRK2(1), 1._wp ) 264 tmpberg%current_point%xRK3(1) = ricb_left + MOD(tmpberg%current_point%xRK3(1), 1._wp ) 265 tmpberg%current_point%xRK4(1) = ricb_left + MOD(tmpberg%current_point%xRK4(1), 1._wp ) 258 266 ! now pack it into buffer and delete from list 259 267 CALL icb_pack_into_buffer( tmpberg, obuffer_w, ibergs_to_send_w) … … 370 378 DO WHILE (ASSOCIATED(this)) 371 379 pt => this%current_point 372 ijne = INT( pt%yj + 0.5 )380 ijne = INT( pt%yj + 0.5_wp ) 373 381 IF( ipe_N >= 0 .AND. ijne .GT. mjg(nicbej) ) THEN 374 382 tmpberg => this … … 537 545 DO WHILE (ASSOCIATED(this)) 538 546 pt => this%current_point 539 iine = INT( pt%xi + 0.5 )540 ijne = INT( pt%yj + 0.5 )547 iine = INT( pt%xi + 0.5_wp ) 548 ijne = INT( pt%yj + 0.5_wp ) 541 549 IF( iine .LT. mig(nicbdi) .OR. & 542 550 iine .GT. mig(nicbei) .OR. & … … 544 552 ijne .GT. mjg(nicbej)) THEN 545 553 i = i + 1 546 WRITE(numicb,*) 'berg lost in halo: ', this%number(:),iine,ijne 547 WRITE(numicb,*) ' ', nimpp, njmpp 548 WRITE(numicb,*) ' ', nicbdi, nicbei, nicbdj, nicbej 554 WRITE(numicb,*) 'berg lost in halo: ', this%number(:),iine,ijne, pt%xi, pt%yj 555 WRITE(numicb,*) 'nimpp, njmpp ', nimpp, njmpp 556 WRITE(numicb,*) 'nicb di, ei, dj, ej ', nicbdi , nicbei , nicbdj , nicbej 557 WRITE(numicb,*) 'mijg di, ei, dj, ej ', mig(nicbdi), mig(nicbei), mjg(nicbdj), mjg(nicbej) 549 558 CALL flush( numicb ) 550 559 ENDIF … … 611 620 DO WHILE (ASSOCIATED(this)) 612 621 pt => this%current_point 613 iine = INT( pt%xi + 0.5 )614 ijne = INT( pt%yj + 0.5 )622 iine = INT( pt%xi + 0.5_wp ) 623 ijne = INT( pt%yj + 0.5_wp ) 615 624 iproc = nicbflddest(mi1(iine)) 616 625 IF( ijne .GT. mjg(nicbej) ) THEN … … 691 700 DO WHILE (ASSOCIATED(this)) 692 701 pt => this%current_point 693 iine = INT( pt%xi + 0.5 )694 ijne = INT( pt%yj + 0.5 )702 iine = INT( pt%xi + 0.5_wp ) 703 ijne = INT( pt%yj + 0.5_wp ) 695 704 ipts = nicbfldpts (mi1(iine)) 696 705 iproc = nicbflddest(mi1(iine)) … … 791 800 IF( .NOT. ASSOCIATED(pbuff) ) CALL icb_increase_buffer( pbuff, jp_delta_buf ) 792 801 IF( kb .GT. pbuff%size ) CALL icb_increase_buffer( pbuff, jp_delta_buf ) 802 IF( kb .GT. pbuff%size ) PRINT *, 'SHOULD NOT SEE THIS' 793 803 794 804 !! pack points into buffer … … 809 819 pbuff%data(14,kb) = berg%current_point%heat_density 810 820 811 pbuff%data(15,kb) = berg%mass_scaling 821 pbuff%data(15:18,kb) = berg%current_point%xRK1 822 pbuff%data(19:22,kb) = berg%current_point%xRK2 823 pbuff%data(23:26,kb) = berg%current_point%xRK3 824 pbuff%data(27:30,kb) = berg%current_point%xRK4 825 826 pbuff%data(31:34,kb) = berg%current_point%yRK1 827 pbuff%data(35:38,kb) = berg%current_point%yRK2 828 pbuff%data(39:42,kb) = berg%current_point%yRK3 829 pbuff%data(43:46,kb) = berg%current_point%yRK4 830 831 pbuff%data(47,kb) = berg%mass_scaling 812 832 DO k=1,nkounts 813 pbuff%data( 15+k,kb) = REAL( berg%number(k), wp )833 pbuff%data(47+k,kb) = REAL( berg%number(k), wp ) 814 834 END DO 815 835 ! … … 844 864 pt%heat_density = pbuff%data(14,kb) 845 865 846 currentberg%mass_scaling = pbuff%data(15,kb) 866 pt%xRK1 = pbuff%data(15:18,kb) 867 pt%xRK2 = pbuff%data(19:22,kb) 868 pt%xRK3 = pbuff%data(23:26,kb) 869 pt%xRK4 = pbuff%data(27:30,kb) 870 871 pt%yRK1 = pbuff%data(31:34,kb) 872 pt%yRK2 = pbuff%data(35:38,kb) 873 pt%yRK3 = pbuff%data(39:42,kb) 874 pt%yRK4 = pbuff%data(43:46,kb) 875 876 currentberg%mass_scaling = pbuff%data(47,kb) 847 877 DO ik = 1, nkounts 848 currentberg%number(ik) = INT( pbuff%data( 15+ik,kb) )878 currentberg%number(ik) = INT( pbuff%data(47+ik,kb) ) 849 879 END DO 850 880 !
Note: See TracChangeset
for help on using the changeset viewer.