Changeset 9166
- Timestamp:
- 2017-12-22T16:45:51+01:00 (7 years ago)
- Location:
- branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_connect_topo.f90
r9149 r9166 57 57 indx = 2 + CEILING(irafx/2.0) + diff 58 58 indy = 2 + CEILING(irafy/2.0) + diff 59 bornex = nbghostcellsfine + CEILING(irafx/2.0) + diff - irafx60 borney = nbghostcellsfine + CEILING(irafy/2.0) + diff - irafy61 bornex2 = nxfin - (nbghostcellsfine -1) + irafx - CEILING(irafx/2.0)62 borney2 = nyfin - (nbghostcellsfine -1) + irafy - CEILING(irafy/2.0)59 bornex = 1+nbghostcellsfine + CEILING(irafx/2.0) + diff - irafx 60 borney = 1+nbghostcellsfine + CEILING(irafy/2.0) + diff - irafy 61 bornex2 = nxfin - (nbghostcellsfine) + irafx - CEILING(irafx/2.0) 62 borney2 = nyfin - (nbghostcellsfine) + irafy - CEILING(irafy/2.0) 63 63 ! 64 64 ALLOCATE(bathy_fin_constant(bornex-FLOOR(irafx/2.0):bornex2+FLOOR(irafx/2.0), & … … 902 902 ipt = imin + 3 - 1 + (ji - ideb) / irafx 903 903 ! 904 IF( G0%Bathy_meter(ipt,jpt) .LE. 0. .AND. & 905 MAXVAL(G1%Bathy_meter(ji-irafx/2+diff:ji+irafx/2, & 906 jj-irafy/2+diff:jj+irafy/2)).GT. 0. ) THEN 907 G0%Bathy_meter(ipt,jpt) = zmin 904 ! IF( G0%Bathy_meter(ipt,jpt) .LE. 0. .AND. & 905 ! MAXVAL(G1%Bathy_meter(ji-irafx/2+diff:ji+irafx/2, & 906 ! jj-irafy/2+diff:jj+irafy/2)).GT. 0. ) THEN 907 ! G0%Bathy_meter(ipt,jpt) = zmin 908 G0%Bathy_meter(ipt,jpt) =& 909 SUM(G1%Bathy_meter(ji-irafx/2+diff:ji+irafx/2, & 910 jj-irafy/2+diff:jj+irafy/2))& 911 /irafx/irafy 912 IF(G0%Bathy_meter(ipt,jpt).GT.0.) THEN 913 G0%Bathy_meter(ipt,jpt) = MAX( G0%Bathy_meter(ipt,jpt),zmin) 914 ENDIF 908 915 ! 909 916 compt = compt + 1 910 917 ! 911 ENDIF918 ! ENDIF 912 919 ! 913 920 ENDDO -
branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_create_bathy.f90
r9149 r9166 173 173 CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 174 174 ! 175 boundary = connectionsize*irafx + nbghostcellsfine 175 boundary = connectionsize*irafx + nbghostcellsfine + 1 176 176 ! 177 177 ! connection carried out by copying parent grid values for the fine points … … 459 459 CALL Check_interp(G0,gdepw_ps_interp) ! interpolation in connection zone (3 coarse grid cells) 460 460 ! 461 boundary = connectionsize*irafx + nbghostcellsfine 461 boundary = connectionsize*irafx + nbghostcellsfine + 1 462 462 G1%gdepw_ps(1:boundary,:) = gdepw_ps_interp(1:boundary,:) 463 463 G1%gdepw_ps(:,1:boundary) = gdepw_ps_interp(:,1:boundary) … … 531 531 ! Smoothing to connect the connection zone (3 + nb_connection_pts coarse grid cells) and the interior domain 532 532 ! 533 boundary = (connectionsize+nb_connection_pts)*irafx + nbghostcellsfine 533 boundary = (connectionsize+nb_connection_pts)*irafx + nbghostcellsfine + 1 534 534 CALL smooth_topo(G1%gdepw_ps(boundary:nxfin-boundary+1,boundary:nyfin-boundary+1),nbiter) 535 535 G1%bathy_meter = G1%gdepw_ps … … 611 611 CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 612 612 ! 613 boundary = connectionsize*irafx + nbghostcellsfine 613 boundary = connectionsize*irafx + nbghostcellsfine + 1 614 614 ! 615 615 G1%bathy_meter(1:boundary,:) = bathy_fin_constant(1:boundary,:) -
branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_interpolation.f90
r2455 r9166 103 103 104 104 IF (typevar .EQ. 'F') THEN 105 ptx = 2106 pty = 2105 ptx = 1 + nbghostcellsfine 106 pty = 1 + nbghostcellsfine 107 107 decalxc = 0. 108 108 decalyc = 0. … … 110 110 decalyf = 0. 111 111 ELSEIF (typevar .EQ. 'T') THEN 112 ptx = 3113 pty = 3112 ptx = 2 + nbghostcellsfine 113 pty = 2 + nbghostcellsfine 114 114 decalxc = dxc/2. 115 115 decalyc = dyc/2. … … 117 117 decalyf = dyf/2. 118 118 ELSEIF (typevar .EQ. 'U') THEN 119 ptx = 2120 pty = 3119 ptx = 1 + nbghostcellsfine 120 pty = 2 + nbghostcellsfine 121 121 decalxc = 0. 122 122 decalyc = dyc/2. … … 124 124 decalyf = dyf/2. 125 125 ELSEIF (typevar .EQ. 'V') THEN 126 ptx = 3127 pty = 2126 ptx = 2 + nbghostcellsfine 127 pty = 1 + nbghostcellsfine 128 128 decalxc = dxc/2. 129 129 decalyc = 0. -
branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_partial_steps.f90
r9149 r9166 352 352 IF ( MOD(irafx,2) .EQ. 0 ) diff = 1 353 353 ! 354 bornex = nbghostcellsfine + CEILING(irafx/2.0) + diff - irafx355 borney = nbghostcellsfine + CEILING(irafy/2.0) + diff - irafy356 bornex2 = nxfin - (nbghostcellsfine-1)- irafx - CEILING(irafx/2.0)357 borney2 = nyfin - (nbghostcellsfine-1)- irafy - CEILING(irafy/2.0)354 bornex = nbghostcellsfine + 1 + CEILING(irafx/2.0) + diff - irafx 355 borney = nbghostcellsfine + 1 + CEILING(irafy/2.0) + diff - irafy 356 bornex2 = nxfin - nbghostcellsfine - irafx - CEILING(irafx/2.0) 357 borney2 = nyfin - nbghostcellsfine - irafy - CEILING(irafy/2.0) 358 358 ! 359 359 ! … … 361 361 ! 362 362 363 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1, 3+connectionsize*irafx-1, &363 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,2+nbghostcellsfine+connectionsize*irafx-1, & 364 364 1,nyfin) 365 365 … … 368 368 ! 369 369 370 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,nxfin- 2-(connectionsize*irafx-1),nxfin, &370 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,nxfin-1-nbghostcellsfine-(connectionsize*irafx-1),nxfin, & 371 371 1,nyfin) 372 372 … … 376 376 377 377 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,nxfin, & 378 nyfin- 2-(connectionsize*irafy-1),nyfin )378 nyfin-1 - nbghostcellsfine -(connectionsize*irafy-1),nyfin ) 379 379 380 380 ! … … 382 382 ! 383 383 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,nxfin, & 384 1, 3+connectionsize*irafy-1 )384 1,2+nbghostcellsfine+connectionsize*irafy-1 ) 385 385 386 386 ! … … 430 430 dyfin = 1./irafy 431 431 432 ptx = 3433 pty = 3432 ptx = 1 + nbghostcellsfine + 1 433 pty = 1 + nbghostcellsfine + 1 434 434 435 435 xmin = (imin-1) * 1 … … 526 526 DO ii = i-FLOOR(irafx/2.0)+diff,i+FLOOR(irafx/2.0) 527 527 x = ii-i - xdiff/2. 528 val = parentgrid%gdepw_ps(ipt,jpt)+slopex * x528 !! val = parentgrid%gdepw_ps(ipt,jpt)+slopex * x 529 529 !! chanut: uncomment this to get nearest neighbor interpolation 530 !!val = parentgrid%gdepw_ps(ipt,jpt)530 val = parentgrid%gdepw_ps(ipt,jpt) 531 531 gdepwtemp(ii,j) = val 532 532 IF (gdepwtemp(ii,j) < mindepth) THEN … … 585 585 DO jj = j-FLOOR(irafy/2.0)+diff,j+FLOOR(irafy/2.0) 586 586 y = jj-j - xdiff/2. 587 val = gdepwtemp(i,j) + slopey*y587 !! val = gdepwtemp(i,j) + slopey*y 588 588 !! chanut: uncomment this to get nearest neighbor interpolation 589 !!val = gdepwtemp(i,j)589 val = gdepwtemp(i,j) 590 590 gdepwtemp(i,jj) = val 591 591 ENDDO -
branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_types.f90
r9149 r9166 42 42 INTEGER irafx,irafy 43 43 INTEGER nxfin,nyfin 44 INTEGER, PARAMETER :: nbghostcellsfine = 244 INTEGER, PARAMETER :: nbghostcellsfine = 1 45 45 INTEGER, PARAMETER :: nbghostcellscoarse = 1 46 46 ! … … 176 176 jmax = jmax + jpjzoom - 1 177 177 ! 178 nxfin = (imax-imin)*irafx+ nbghostcellsfine*2179 nyfin = (jmax-jmin)*irafy+ nbghostcellsfine*2178 nxfin = (imax-imin)*irafx+2*nbghostcellsfine+2 179 nyfin = (jmax-jmin)*irafy+2*nbghostcellsfine+2 180 180 ! 181 181 ELSE
Note: See TracChangeset
for help on using the changeset viewer.