Changeset 9694 for utils/tools/NESTING/src/agrif_create_bathy.f90
- Timestamp:
- 2018-05-30T17:44:50+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/tools/NESTING/src/agrif_create_bathy.f90
r9628 r9694 172 172 CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 173 173 ! 174 boundary = connectionsize*irafx + nbghostcellsfine + 1174 boundary = npt_copy*irafx + nbghostcellsfine + 1 175 175 ! 176 176 ! connection carried out by copying parent grid values for the fine points … … 285 285 Cell_lonmax = MAX(G1%glamf(ji-1,jj-1),G1%glamf(ji,jj-1),G1%glamf(ji,jj),G1%glamf(ji-1,jj)) 286 286 Cell_latmin = MIN(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj)) 287 Cell_latmax = MAX(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj)) 287 Cell_latmax = MAX(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj)) 288 288 ! 289 289 ! SEARCH FOR ALL POINTS CONTAINED IN THIS CELL … … 329 329 ALLOCATE( vardep(nxhr,nyhr) ) 330 330 ALLOCATE( mask_oce(nxhr,nyhr) ) 331 mask_oce = 0 331 mask_oce = 0 332 332 333 333 vardep(:,:) = G0%bathy_meter(iimin:iimax,jjmin:jjmax) … … 356 356 G1%bathy_meter(ji,jj) = ( vardep1d(SUM(mask_oce)/2) + vardep1d(SUM(mask_oce)/2+1) )/2.0 357 357 END IF 358 DEALLOCATE(vardep1d) 358 DEALLOCATE(vardep1d) 359 359 ENDIF 360 360 ENDIF … … 458 458 CALL Check_interp(G0,gdepw_ps_interp) ! interpolation in connection zone (3 coarse grid cells) 459 459 ! 460 boundary = connectionsize*irafx + nbghostcellsfine + 1460 boundary = npt_copy*irafx + nbghostcellsfine + 1 461 461 ! J chanut: exclude matching if no open boundaries 462 462 IF (.NOT.ASSOCIATED(G1%wgt)) & … … 504 504 505 505 IF(.NOT. smoothing) WRITE(*,*) 'No smoothing process only connection is carried out' 506 WRITE(*,*) ' linear connection on ',nb_connection_pts,'coarse grid points' 507 508 connectionsize = 2 + nb_connection_pts 506 WRITE(*,*) ' linear connection on ',npt_connect,'coarse grid points' 507 509 508 ! 510 509 gdepw_ps_interp = 0. … … 521 520 ! 522 521 wghts = 1. 523 DO ji = boundary + 1 , boundary + n b_connection_pts* irafx524 wghts = wghts - (1. / (n b_connection_pts*irafx - 1. ) )522 DO ji = boundary + 1 , boundary + npt_connect * irafx 523 wghts = wghts - (1. / (npt_connect*irafx - 1. ) ) 525 524 DO jj=1,nyfin 526 525 IF (G1%gdepw_ps(nbghostcellsfine+1,jj) > 0.) THEN … … 531 530 532 531 wghts = 1. 533 DO ji = nxfin - boundary , nxfin - boundary - n b_connection_pts* irafx +1 , -1534 wghts = wghts - (1. / (n b_connection_pts*irafx - 1. ) )532 DO ji = nxfin - boundary , nxfin - boundary - npt_connect * irafx +1 , -1 533 wghts = wghts - (1. / (npt_connect*irafx - 1. ) ) 535 534 DO jj=1,nyfin 536 535 IF (G1%gdepw_ps(nxfin-nbghostcellsfine,jj) > 0.) THEN … … 541 540 542 541 wghts = 1. 543 DO jj = boundary + 1 , boundary + n b_connection_pts* irafy544 wghts = wghts - (1. / (n b_connection_pts*irafy - 1. ) )542 DO jj = boundary + 1 , boundary + npt_connect * irafy 543 wghts = wghts - (1. / (npt_connect*irafy - 1. ) ) 545 544 DO ji=1,nxfin 546 545 IF (G1%gdepw_ps(ji,nbghostcellsfine+1) > 0.) THEN … … 551 550 552 551 wghts = 1. 553 DO jj = nyfin - boundary , nyfin - boundary - n b_connection_pts* irafy +1, -1554 wghts = wghts - (1. / (n b_connection_pts*irafy - 1. ) )552 DO jj = nyfin - boundary , nyfin - boundary - npt_connect * irafy +1, -1 553 wghts = wghts - (1. / (npt_connect*irafy - 1. ) ) 555 554 DO ji=1,nxfin 556 555 IF (G1%gdepw_ps(ji,nyfin-nbghostcellsfine) > 0.) THEN … … 564 563 G1%bathy_meter = G1%gdepw_ps 565 564 ! 566 connectionsize = 2567 565 ! 568 566 ! Chanut: remove smoothing if child grid bathymetry is found to already exist … … 570 568 571 569 ! 572 ! Smoothing to connect the connection zone (3 + n b_connection_ptscoarse grid cells) and the interior domain570 ! Smoothing to connect the connection zone (3 + npt_connect coarse grid cells) and the interior domain 573 571 ! 574 572 ! Chanut: smoothing everywhere then discard result in connection zone 575 573 CALL smooth_topo(G1%gdepw_ps(1:nxfin,1:nyfin),nbiter) 576 574 WHERE (G1%wgt(:,:)==0.) G1%bathy_meter(:,:) = G1%gdepw_ps(:,:) 577 ! boundary = ( connectionsize+nb_connection_pts)*irafx + nbghostcellsfine + 1575 ! boundary = (npt_copy+npt_connect)*irafx + nbghostcellsfine + 1 578 576 ! CALL smooth_topo(G1%gdepw_ps(boundary:nxfin-boundary+1,boundary:nyfin-boundary+1),nbiter) 579 577 ! G1%bathy_meter = G1%gdepw_ps … … 658 656 CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 659 657 ! 660 boundary = connectionsize*irafx + nbghostcellsfine + 1658 boundary = npt_copy*irafx + nbghostcellsfine + 1 661 659 ! 662 660 G1%bathy_meter(1:boundary,:) = bathy_fin_constant(1:boundary,:)
Note: See TracChangeset
for help on using the changeset viewer.