- Timestamp:
- 2018-05-30T17:44:50+02:00 (7 years ago)
- Location:
- utils/tools/NESTING
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/tools/NESTING/nordic1
r9688 r9694 11 11 new_topo = true 12 12 elevation_database = 'GEBCO_2014_2D.nc' 13 elevation_name = 'elevation' 14 smoothing = true 15 smoothing_factor = 0.6 16 nb_connection_pts = 2 17 removeclosedseas = true 18 type_bathy_interp = 2 19 rn_hmin = -3 13 elevation_name = 'elevation' 14 smoothing = true 15 smoothing_factor = 0.6 16 npt_connect = 1 ! default = 3 17 npt_copy = 1 ! default = 2 18 removeclosedseas = true 19 type_bathy_interp = 2 20 rn_hmin = -3 20 21 / 21 22 … … 27 28 rho = 4 28 29 rhot = 4 29 bathy_update = true30 bathy_update = true 30 31 updated_parent_file = 'bathy_updated.nc' 31 32 / … … 33 34 &vertical_grid 34 35 ln_e3_dep = .true. 35 ppkth = 21.433361979380036 ppacr = 337 ppdzmin = 038 pphmax = 039 psur = -4762.9614354630040 pa0 = 255.5804907044041 pa1 = 245.5813223249042 N = 3143 ldbletanh 44 pa2 45 ppkth2 46 ppacr2 36 ppkth = 21.4333619793800 37 ppacr = 3 38 ppdzmin = 0 39 pphmax = 0 40 psur = -4762.96143546300 41 pa0 = 255.58049070440 42 pa1 = 245.58132232490 43 N = 31 44 ldbletanh = .FALSE. 45 pa2 = 0 46 ppkth2 = 0 47 ppacr2 = 0 47 48 / 48 49 49 50 &partial_cells 50 partial_steps = true51 partial_steps = true 51 52 parent_bathy_meter = 'bathy_meter.nc' 52 53 parent_batmet_name = 'Bathymetry' 53 e3zps_min = 20.54 e3zps_rat = 0.154 e3zps_min = 20. 55 e3zps_rat = 0.1 55 56 / 56 57 -
utils/tools/NESTING/nordic1_update
r9688 r9694 11 11 new_topo = true 12 12 elevation_database = '1_bathy_updated.nc' 13 elevation_name = 'Bathymetry' 14 smoothing = true 15 smoothing_factor = 0.6 16 nb_connection_pts = 2 17 removeclosedseas = true 18 type_bathy_interp = 2 19 rn_hmin = -3 13 elevation_name = 'Bathymetry' 14 smoothing = true 15 smoothing_factor = 0.6 16 npt_connect = 1 17 npt_copy = 1 18 removeclosedseas = true 19 type_bathy_interp = 2 20 rn_hmin = -3 20 21 / 21 22 … … 33 34 &vertical_grid 34 35 ln_e3_dep = .true. 35 ppkth = 21.433361979380036 ppacr = 337 ppdzmin = 038 pphmax = 039 psur = -4762.9614354630040 pa0 = 255.5804907044041 pa1 = 245.5813223249042 N = 3143 ldbletanh 44 pa2 45 ppkth2 46 ppacr2 36 ppkth = 21.4333619793800 37 ppacr = 3 38 ppdzmin = 0 39 pphmax = 0 40 psur = -4762.96143546300 41 pa0 = 255.58049070440 42 pa1 = 245.58132232490 43 N = 31 44 ldbletanh = .FALSE. 45 pa2 = 0 46 ppkth2 = 0 47 ppacr2 = 0 47 48 / 48 49 49 50 &partial_cells 50 partial_steps = true51 partial_steps = true 51 52 parent_bathy_meter = 'bathy_updated.nc' 52 53 parent_batmet_name = 'Bathymetry' 53 e3zps_min = 20.54 e3zps_rat = 0.154 e3zps_min = 20. 55 e3zps_rat = 0.1 55 56 / 56 57 -
utils/tools/NESTING/nordic2
r9688 r9694 9 9 10 10 &bathymetry 11 new_topo = true11 new_topo = true 12 12 elevation_database = 'GEBCO_2014_2D.nc' 13 elevation_name = 'elevation' 14 smoothing = true 15 smoothing_factor = 0.6 16 nb_connection_pts = 2 17 removeclosedseas = true 18 type_bathy_interp = 2 19 rn_hmin = -3 13 elevation_name = 'elevation' 14 smoothing = true 15 smoothing_factor = 0.6 16 npt_connect = 1 17 npt_copy = 1 18 removeclosedseas = true 19 type_bathy_interp = 2 20 rn_hmin = -3 20 21 / 21 22 … … 33 34 &vertical_grid 34 35 ln_e3_dep = .true. 35 ppkth = 21.433361979380036 ppacr = 337 ppdzmin = 038 pphmax = 039 psur = -4762.9614354630040 pa0 = 255.5804907044041 pa1 = 245.5813223249042 N = 3143 ldbletanh 44 pa2 45 ppkth2 46 ppacr2 36 ppkth = 21.4333619793800 37 ppacr = 3 38 ppdzmin = 0 39 pphmax = 0 40 psur = -4762.96143546300 41 pa0 = 255.58049070440 42 pa1 = 245.58132232490 43 N = 31 44 ldbletanh = .FALSE. 45 pa2 = 0 46 ppkth2 = 0 47 ppacr2 = 0 47 48 / 48 49 49 50 &partial_cells 50 partial_steps = true51 partial_steps = true 51 52 parent_bathy_meter = '1_bathy_meter.nc' 52 53 parent_batmet_name = 'Bathymetry' 53 e3zps_min = 20.54 e3zps_rat = 0.154 e3zps_min = 20. 55 e3zps_rat = 0.1 55 56 / 56 57 -
utils/tools/NESTING/src/agrif_connect_topo.f90
r9166 r9694 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 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 915 ! 916 compt = compt + 1 917 ! 918 ! ENDIF 904 G0%Bathy_meter(ipt,jpt) = SUM(G1%Bathy_meter(ji-irafx/2+diff:ji+irafx/2,jj-irafy/2+diff:jj+irafy/2))/(irafx*irafy) 905 IF(G0%Bathy_meter(ipt,jpt).GT.0.) G0%Bathy_meter(ipt,jpt) = MAX(G0%Bathy_meter(ipt,jpt),zmin) 906 ! 907 compt = compt + 1 919 908 ! 920 909 ENDDO -
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,:) -
utils/tools/NESTING/src/agrif_partial_steps.f90
r9166 r9694 361 361 ! 362 362 363 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,2+nbghostcellsfine+ connectionsize*irafx-1, &363 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,2+nbghostcellsfine+(npt_copy+npt_connect)*irafx-1, & 364 364 1,nyfin) 365 365 … … 368 368 ! 369 369 370 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,nxfin-1-nbghostcellsfine-( connectionsize*irafx-1),nxfin, &370 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,nxfin-1-nbghostcellsfine-((npt_copy+npt_connect)*irafx-1),nxfin, & 371 371 1,nyfin) 372 372 … … 376 376 377 377 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,nxfin, & 378 nyfin-1 - nbghostcellsfine -( connectionsize*irafy-1),nyfin )378 nyfin-1 - nbghostcellsfine -((npt_copy+npt_connect)*irafy-1),nyfin ) 379 379 380 380 ! … … 382 382 ! 383 383 CALL correct_level( gdepwchild,ParentGrid,gdepw,e3t,1,nxfin, & 384 1,2+nbghostcellsfine+ connectionsize*irafy-1 )384 1,2+nbghostcellsfine+(npt_copy+npt_connect)*irafy-1 ) 385 385 386 386 ! -
utils/tools/NESTING/src/agrif_types.f90
r9628 r9694 50 50 INTEGER N,type_bathy_interp 51 51 ! 52 INTEGER jpizoom,jpjzoom,n b_connection_pts52 INTEGER jpizoom,jpjzoom,npt_connect,npt_copy 53 53 ! 54 54 REAL*8 rn_hmin … … 73 73 ! 74 74 NAMELIST /bathymetry/new_topo,elevation_database,elevation_name,smoothing,smoothing_factor, & 75 n b_connection_pts,removeclosedseas,type_bathy_interp,rn_hmin75 npt_connect,npt_copy,removeclosedseas,type_bathy_interp,rn_hmin 76 76 ! 77 77 NAMELIST /nesting/imin,imax,jmin,jmax,rho,rhot,bathy_update,updated_parent_file … … 90 90 91 91 NAMELIST /restart_trc/ restart_trc_file,interp_type 92 93 INTEGER :: connectionsize = 294 92 ! 95 93 CONTAINS … … 154 152 FORM = 'FORMATTED' , & 155 153 ACTION = 'READ' , & 156 ACCESS = 'SEQUENTIAL' ) 154 ACCESS = 'SEQUENTIAL' ) 157 155 ! 158 156 REWIND(unit_nml) 159 157 READ (unit_nml , NML = input_output) 160 158 READ (unit_nml , NML = coarse_grid_files) 161 READ (unit_nml , NML = bathymetry) 159 READ (unit_nml , NML = bathymetry) 162 160 READ (unit_nml , NML = nesting) 163 161 READ (unit_nml , NML = vertical_grid)
Note: See TracChangeset
for help on using the changeset viewer.