Changeset 1200 for trunk/AGRIF/AGRIF_FILES/modinterp.F
- Timestamp:
- 2008-09-24T15:05:20+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AGRIF/AGRIF_FILES/modinterp.F
r898 r1200 54 54 C 55 55 Subroutine Agrif_Interp_1d(TypeInterp,parent,child,tab, 56 & torestore,nbdim )56 & torestore,nbdim,procname) 57 57 C 58 58 CCC Description: … … 74 74 LOGICAL :: torestore 75 75 REAL, DIMENSION( 76 & lbound(child%var%array1,1):ubound(child%var%array1,1)76 & child%var%lb(1):child%var%ub(1) 77 77 & ), Target :: tab ! Result 78 External :: procname 79 Optional :: procname 78 80 C 79 81 C … … 88 90 C Tab is the result of the interpolation 89 91 childtemp % var % array1 => tab 92 93 childtemp % var % lb = child % var % lb 94 childtemp % var % ub = child % var % ub 95 90 96 C 91 97 if (torestore) then … … 108 114 childtemp % var % list_interp => child % var% list_interp 109 115 C 116 if (present(procname)) then 117 Call Agrif_InterpVariable 118 & (TypeInterp,parent,childtemp,torestore,procname) 119 else 110 120 Call Agrif_InterpVariable 111 121 & (TypeInterp,parent,childtemp,torestore) 122 endif 112 123 child % var % list_interp => childtemp % var %list_interp 113 124 C … … 124 135 C 125 136 Subroutine Agrif_Interp_2d(TypeInterp,parent,child,tab, 126 & torestore,nbdim )137 & torestore,nbdim,procname) 127 138 C 128 139 CCC Description: … … 144 155 LOGICAL :: torestore 145 156 REAL, DIMENSION( 146 & lbound(child%var%array2,1):ubound(child%var%array2,1),147 & lbound(child%var%array2,2):ubound(child%var%array2,2)157 & child%var%lb(1):child%var%ub(1), 158 & child%var%lb(2):child%var%ub(2) 148 159 & ), Target :: tab ! Result 160 External :: procname 161 Optional :: procname 149 162 C 150 163 C … … 159 172 C Tab is the result of the interpolation 160 173 childtemp % var % array2 => tab 161 C 174 175 childtemp % var % lb = child % var % lb 176 childtemp % var % ub = child % var % ub 177 178 C 162 179 if (torestore) then 163 180 C 164 childtemp % var % array2 = child % var % array2 181 childtemp % var % array2 = child % var % array2 165 182 C 166 183 childtemp % var % restore2D => child % var % restore2D … … 179 196 childtemp % var % list_interp => child % var% list_interp 180 197 C 198 if (present(procname)) then 199 Call Agrif_InterpVariable 200 & (TypeInterp,parent,childtemp,torestore,procname) 201 else 181 202 Call Agrif_InterpVariable 182 203 & (TypeInterp,parent,childtemp,torestore) 204 endif 205 183 206 child % var % list_interp => childtemp % var %list_interp 184 207 C … … 195 218 C 196 219 Subroutine Agrif_Interp_3d(TypeInterp,parent,child,tab, 197 & torestore,nbdim )220 & torestore,nbdim,procname) 198 221 C 199 222 CCC Description: … … 215 238 LOGICAL :: torestore 216 239 REAL, DIMENSION( 217 & lbound(child%var%array3,1):ubound(child%var%array3,1),218 & lbound(child%var%array3,2):ubound(child%var%array3,2),219 & lbound(child%var%array3,3):ubound(child%var%array3,3)240 & child%var%lb(1):child%var%ub(1), 241 & child%var%lb(2):child%var%ub(2), 242 & child%var%lb(3):child%var%ub(3) 220 243 & ), Target :: tab ! Results 244 External :: procname 245 Optional :: procname 221 246 C 222 247 C … … 231 256 C Tab is the result of the interpolation 232 257 childtemp % var % array3 => tab 258 259 childtemp % var % lb = child % var % lb 260 childtemp % var % ub = child % var % ub 233 261 C 234 262 if (torestore) then … … 251 279 childtemp % var % list_interp => child % var% list_interp 252 280 C 281 282 if (present(procname)) then 283 Call Agrif_InterpVariable 284 & (TypeInterp,parent,childtemp,torestore,procname) 285 else 253 286 Call Agrif_InterpVariable 254 287 & (TypeInterp,parent,childtemp,torestore) 288 endif 289 290 255 291 child % var % list_interp => childtemp % var %list_interp 256 292 C … … 267 303 C 268 304 Subroutine Agrif_Interp_4d(TypeInterp,parent,child,tab, 269 & torestore,nbdim )305 & torestore,nbdim,procname) 270 306 C 271 307 CCC Description: … … 287 323 LOGICAL :: torestore 288 324 REAL, DIMENSION( 289 & lbound(child%var%array4,1):ubound(child%var%array4,1),290 & lbound(child%var%array4,2):ubound(child%var%array4,2),291 & lbound(child%var%array4,3):ubound(child%var%array4,3),292 & lbound(child%var%array4,4):ubound(child%var%array4,4)325 & child%var%lb(1):child%var%ub(1), 326 & child%var%lb(2):child%var%ub(2), 327 & child%var%lb(3):child%var%ub(3), 328 & child%var%lb(4):child%var%ub(4) 293 329 & ), Target :: tab ! Results 330 External :: procname 331 Optional :: procname 294 332 C 295 333 C … … 304 342 C Tab is the result of the interpolation 305 343 childtemp % var % array4 => tab 344 345 childtemp % var % lb = child % var % lb 346 childtemp % var % ub = child % var % ub 347 306 348 C 307 349 if (torestore) then … … 324 366 childtemp % var % list_interp => child % var% list_interp 325 367 C 368 if (present(procname)) then 369 Call Agrif_InterpVariable 370 & (TypeInterp,parent,childtemp,torestore,procname) 371 else 326 372 Call Agrif_InterpVariable 327 373 & (TypeInterp,parent,childtemp,torestore) 374 endif 375 376 328 377 child % var % list_interp => childtemp % var %list_interp 329 378 C … … 340 389 C 341 390 Subroutine Agrif_Interp_5d(TypeInterp,parent,child,tab, 342 & torestore,nbdim )391 & torestore,nbdim,procname) 343 392 C 344 393 CCC Description: … … 360 409 LOGICAL :: torestore 361 410 REAL, DIMENSION( 362 & lbound(child%var%array5,1):ubound(child%var%array5,1),363 & lbound(child%var%array5,2):ubound(child%var%array5,2),364 & lbound(child%var%array5,3):ubound(child%var%array5,3),365 & lbound(child%var%array5,4):ubound(child%var%array5,4),366 & lbound(child%var%array5,5):ubound(child%var%array5,5)411 & child%var%lb(1):child%var%ub(1), 412 & child%var%lb(2):child%var%ub(2), 413 & child%var%lb(3):child%var%ub(3), 414 & child%var%lb(4):child%var%ub(4), 415 & child%var%lb(5):child%var%ub(5) 367 416 & ), Target :: tab ! Results 417 External :: procname 418 Optional :: procname 368 419 C 369 420 C … … 378 429 C Tab is the result of the interpolation 379 430 childtemp % var % array5 => tab 431 432 childtemp % var % lb = child % var % lb 433 childtemp % var % ub = child % var % ub 434 380 435 C 381 436 if (torestore) then … … 398 453 childtemp % var % list_interp => child % var% list_interp 399 454 C 455 if (present(procname)) then 456 Call Agrif_InterpVariable 457 & (TypeInterp,parent,childtemp,torestore,procname) 458 else 400 459 Call Agrif_InterpVariable 401 460 & (TypeInterp,parent,childtemp,torestore) 461 endif 462 402 463 403 464 child % var % list_interp => childtemp % var %list_interp … … 415 476 C 416 477 Subroutine Agrif_Interp_6d(TypeInterp,parent,child,tab, 417 & torestore,nbdim )478 & torestore,nbdim,procname) 418 479 C 419 480 CCC Description: … … 435 496 LOGICAL :: torestore 436 497 REAL, DIMENSION( 437 & lbound(child%var%array6,1):ubound(child%var%array6,1),438 & lbound(child%var%array6,2):ubound(child%var%array6,2),439 & lbound(child%var%array6,3):ubound(child%var%array6,3),440 & lbound(child%var%array6,4):ubound(child%var%array6,4),441 & lbound(child%var%array6,5):ubound(child%var%array6,5),442 & lbound(child%var%array6,6):ubound(child%var%array6,6)498 & child%var%lb(1):child%var%ub(1), 499 & child%var%lb(2):child%var%ub(2), 500 & child%var%lb(3):child%var%ub(3), 501 & child%var%lb(4):child%var%ub(4), 502 & child%var%lb(5):child%var%ub(5), 503 & child%var%lb(6):child%var%ub(6) 443 504 & ), Target :: tab ! Results 505 External :: procname 506 Optional :: procname 444 507 C 445 508 C … … 454 517 C Tab is the result of the interpolation 455 518 childtemp % var % array6 => tab 519 520 childtemp % var % lb = child % var % lb 521 childtemp % var % ub = child % var % ub 522 456 523 C 457 524 if (torestore) then … … 475 542 childtemp % var % list_interp => child % var% list_interp 476 543 C 544 545 if (present(procname)) then 546 Call Agrif_InterpVariable 547 & (TypeInterp,parent,childtemp,torestore,procname) 548 else 477 549 Call Agrif_InterpVariable 478 550 & (TypeInterp,parent,childtemp,torestore) 551 endif 552 553 479 554 C 480 555 child % var % list_interp => childtemp % var %list_interp … … 490 565 C ************************************************************************** 491 566 C 492 Subroutine Agrif_InterpVariable(TYPEinterp,parent,child,torestore) 567 Subroutine Agrif_InterpVariable(TYPEinterp,parent,child,torestore, 568 & procname) 493 569 C 494 570 CCC Description: … … 521 597 REAL ,DIMENSION(6) :: s_child,s_parent 522 598 REAL ,DIMENSION(6) :: ds_child,ds_parent 599 External :: procname 600 Optional :: procname 601 523 602 C 524 603 Call PreProcessToInterpOrUpdate(parent,child, … … 533 612 C the grid variable 534 613 C 614 615 if (present(procname)) then 616 call Agrif_InterpnD 617 & (TYPEinterp,parent,child, 618 & pttab_Child(1:nbdim),petab_Child(1:nbdim), 619 & pttab_Child(1:nbdim),pttab_Parent(1:nbdim), 620 & s_Child(1:nbdim),s_Parent(1:nbdim), 621 & ds_Child(1:nbdim),ds_Parent(1:nbdim), 622 & child,torestore,nbdim,procname) 623 else 535 624 call Agrif_InterpnD 536 625 & (TYPEinterp,parent,child, … … 540 629 & ds_Child(1:nbdim),ds_Parent(1:nbdim), 541 630 & child,torestore,nbdim) 631 632 endif 542 633 C 543 634 Return … … 633 724 INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t 634 725 LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall 635 LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1 726 LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1 636 727 LOGICAL, DIMENSION(1) :: memberin1 637 728 C 638 729 #endif 639 730 C 731 640 732 C 641 733 C Boundaries of the current grid where interpolation is done 642 734 643 644 645 646 735 IF (Associated(child%var%list_interp)) THEN 647 736 Call Agrif_Find_list_interp(child%var%list_interp,pttab,petab, … … 659 748 660 749 IF (.not.find_list_interp) THEN 750 661 751 Call Agrif_nbdim_Get_bound_dimension(child % var, 662 752 & lowerbound,upperbound,nbdim) 663 753 664 754 Call Agrif_Childbounds(nbdim,lowerbound,upperbound, 665 755 & pttab,petab, … … 667 757 668 758 C 669 C670 671 759 Call Agrif_Parentbounds(TYPEinterp,nbdim,indminglob,indmaxglob, 672 760 & s_Parent_temp,s_Child_temp, … … 677 765 & child%var%root_var%posvar, 678 766 & child % var % root_var % interptab) 679 680 767 681 768 #ifdef AGRIF_MPI 682 769 IF (memberin) THEN … … 689 776 & child%var%root_var%posvar, 690 777 & child % var % root_var % interptab) 691 ENDIF 692 778 ENDIF 779 693 780 Call Agrif_nbdim_Get_bound_dimension(parent%var, 694 781 & lowerbound,upperbound,nbdim) 695 782 696 783 Call Agrif_ChildGrid_to_ParentGrid() 697 784 C … … 739 826 740 827 ENDIF 741 742 743 828 744 829 IF (member) THEN … … 855 940 #endif 856 941 & ) 857 endif 858 942 endif 859 943 C 860 944 C … … 945 1029 946 1030 947 C948 C949 C Special values on the child grid950 if (Agrif_UseSpecialValueFineGrid) then951 C952 #ifdef AGRIF_MPI953 C954 Call GiveAgrif_SpecialValueToTab_mpi(child%var,tempC%var,955 & childarray,956 & pttruetab,cetruetab,957 & Agrif_SpecialValueFineGrid,nbdim)958 C959 #else960 C961 Call GiveAgrif_SpecialValueToTab(child%var,tempC%var,962 & pttruetab,cetruetab,963 & Agrif_SpecialValueFineGrid,nbdim)964 C965 #endif966 C967 C968 endif969 1031 C 970 1032 … … 987 1049 #endif 988 1050 1051 1052 C 1053 C 1054 C Special values on the child grid 1055 if (Agrif_UseSpecialValueFineGrid) then 1056 C 1057 1058 Call GiveAgrif_SpecialValueToTab_mpi(child%var,tempC%var, 1059 & childarray, 1060 & pttruetab,cetruetab, 1061 & Agrif_SpecialValueFineGrid,nbdim) 1062 1063 C 1064 endif 1065 989 1066 endif 990 1067 … … 1089 1166 CASE (2) 1090 1167 do j = pttruetab(2),cetruetab(2) 1091 do i = pttruetab(1),cetruetab(1) 1168 do i = pttruetab(1),cetruetab(1) 1092 1169 if (restore%var%restore2D(i,j) == 0) 1093 1170 & child % var % array2(i,j) = … … 2096 2173 ENDIF 2097 2174 EndDo 2098 C print *,'ok trouve' 2175 2099 2176 indmin = parcours%interp_loc%indmin(1:nbdim) 2100 2177 indmax = parcours%interp_loc%indmax(1:nbdim)
Note: See TracChangeset
for help on using the changeset viewer.