Changeset 9749
 Timestamp:
 20180606T12:00:04+02:00 (6 years ago)
 Location:
 utils/tools/NESTING/src
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

utils/tools/NESTING/src/agrif_connect_topo.f90
r9694 r9749 55 55 IF(MOD(rho,2) .EQ. 0) diff = 1 56 56 ! 57 indx = 2+ CEILING(irafx/2.0) + diff58 indy = 2+ CEILING(irafy/2.0) + diff57 indx = 1 + nbghostcellsfine + CEILING(irafx/2.0) + diff 58 indy = 1 + nbghostcellsfine + CEILING(irafy/2.0) + diff 59 59 bornex = 1+nbghostcellsfine + CEILING(irafx/2.0) + diff  irafx 60 60 borney = 1+nbghostcellsfine + CEILING(irafy/2.0) + diff  irafy … … 67 67 DO j = borney,borney2,irafy 68 68 69 jpt = jmin + 3  1+ (jindy)/irafy69 jpt = jmin + 1 + nbghostcellsfine + (jindy)/irafy 70 70 IF(j<=1) jpt = jmin + 1 71 71 72 72 DO i = bornex,bornex2,irafx 73 73 74 ipt = imin + 3  1+ (iindx)/irafx74 ipt = imin + 1 + nbghostcellsfine + (iindx)/irafx 75 75 IF(i<=1) ipt = imin + 1 76 76 ! … … 786 786 787 787 TYPE(coordinates) :: G0,G1 788 INTEGER :: ji,jj,jk,ipt,jpt,diff,indx,indy,bornex,borney,bornex2,borney2 789 ! 790 INTEGER :: ideb,jdeb,ifin,jfin 788 INTEGER :: ii,jj,jk,ipt,jpt,diff,indx,indy,bornex,borney,bornex2,borney2 789 ! 791 790 REAL*8 :: za2,za1,za0,zsur,zacr,zkth,zacr2,zkth2,zmin 792 791 INTEGER :: i,j … … 886 885 diff = 0 887 886 IF(MOD(rho,2) .EQ. 0) diff = 1 888 889 ideb = 3 + (irafx  1)/2 890 jdeb = 3 + (irafy  1)/2 891 892 jfin = nyfin  2  (irafy)/2 893 ifin = nxfin  2  (irafx)/2 894 ! 895 WRITE(*,*) '' 896 WRITE(*,*) 'Parent grid bathymetry update ...' 897 compt = 0 898 ! 899 DO jj = jdeb,jfin,irafy 900 jpt = jmin + 3  1 + (jj  jdeb) / irafy 901 DO ji = ideb,ifin,irafx 902 ipt = imin + 3  1 + (ji  ideb) / irafx 903 ! 904 G0%Bathy_meter(ipt,jpt) = SUM(G1%Bathy_meter(jiirafx/2+diff:ji+irafx/2,jjirafy/2+diff:jj+irafy/2))/(irafx*irafy) 887 ! 888 indx = 1+nbghostcellsfine + CEILING(irafx/2.0) + diff 889 indy = 1+nbghostcellsfine + CEILING(irafy/2.0) + diff 890 bornex = 1+nbghostcellsfine + CEILING(irafx/2.0) + diff 891 borney = 1+nbghostcellsfine + CEILING(irafy/2.0) + diff 892 bornex2 = nxfin  (nbghostcellsfine)  CEILING(irafx/2.0) 893 borney2 = nyfin  (nbghostcellsfine)  CEILING(irafy/2.0) 894 ! 895 DO j = borney,borney2,irafy 896 897 jpt = jmin + 1 + nbghostcellsfine + (jindy)/irafy 898 IF(j<=1) jpt = jmin + 1 899 900 DO i = bornex,bornex2,irafx 901 902 ipt = imin + 1 + nbghostcellsfine + (iindx)/irafx 903 IF(i<=1) ipt = imin + 1 904 IF ((i==bornex).AND.(j==borney)) print *, 'Coarse grid Corner', ipt,jpt 905 ! 906 G0%Bathy_meter(ipt,jpt) = 0. 907 compt = 0 908 DO jj = jFLOOR(irafy/2.0),j+FLOOR(irafy/2.0)diff 909 DO ii = iFLOOR(irafx/2.0),i+FLOOR(irafx/2.0)diff 910 G0%Bathy_meter(ipt,jpt) = G0%Bathy_meter(ipt,jpt) + G1%Bathy_meter(ii,jj) 911 compt = compt + 1 912 END DO 913 END DO 914 G0%Bathy_meter(ipt,jpt) = G0%Bathy_meter(ipt,jpt) / FLOAT(compt) 905 915 IF(G0%Bathy_meter(ipt,jpt).GT.0.) G0%Bathy_meter(ipt,jpt) = MAX(G0%Bathy_meter(ipt,jpt),zmin) 906 916 ! 907 compt = compt + 1908 !909 ENDDO910 ENDDO 917 G0%wgt(ipt,jpt) = 1. ! Flag for output 918 END DO 919 END DO 920 911 921 ! 912 922 WRITE(*,*) ' Number of coarse grid points updated = ',compt 
utils/tools/NESTING/src/agrif_create_bathy.f90
r9694 r9749 463 463 ALLOCATE(G1%wgt(SIZE(G1%bathy_meter,1),SIZE(G1%bathy_meter,2))) 464 464 G1%wgt(:,:) = 0. 465 IF ((.NOT.ASSOCIATED(G0%wgt)).AND.bathy_update) THEN 466 ALLOCATE(G0%wgt(SIZE(G0%nav_lat,1),SIZE(G0%nav_lat,2))) 467 G0%wgt(:,:) = 0. 468 ENDIF 465 469 466 470 DO jj=1,nyfin … … 623 627 CALL get_partial_steps(G1) ! compute gdepw_ps for G1 624 628 625 IF(bathy_update) CALL Update_Parent_Bathy( G0,G1 ) 629 IF(bathy_update) CALL Update_Parent_Bathy( G0,G1 ) 626 630 ! 627 631 CALL set_child_name(parent_bathy_meter,child_ps)
Note: See TracChangeset
for help on using the changeset viewer.