New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9166 for branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_create_bathy.f90 – NEMO

Ignore:
Timestamp:
2017-12-22T16:45:51+01:00 (6 years ago)
Author:
jchanut
Message:

NESTING TOOLS:
Fixes to account for user defined number of ghostcells - still set to 1 to be consistent with NEMO
Set child grid bathymetry near boundaries to nearest neighbor interpolation from parent
Update Coarse grid bathymetry so that each cell volume matches child grid average

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_create_bathy.f90

    r9149 r9166  
    173173     CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 
    174174     ! 
    175      boundary = connectionsize*irafx + nbghostcellsfine  
     175     boundary = connectionsize*irafx + nbghostcellsfine + 1  
    176176     ! 
    177177     ! connection carried out by copying parent grid values for the fine points 
     
    459459        CALL Check_interp(G0,gdepw_ps_interp)      ! interpolation in connection zone (3 coarse grid cells) 
    460460        ! 
    461         boundary = connectionsize*irafx + nbghostcellsfine                      
     461        boundary = connectionsize*irafx + nbghostcellsfine + 1                      
    462462        G1%gdepw_ps(1:boundary,:) = gdepw_ps_interp(1:boundary,:) 
    463463        G1%gdepw_ps(:,1:boundary) = gdepw_ps_interp(:,1:boundary) 
     
    531531           ! Smoothing to connect the connection zone (3 + nb_connection_pts coarse grid cells) and the interior domain 
    532532           ! 
    533            boundary = (connectionsize+nb_connection_pts)*irafx + nbghostcellsfine  
     533           boundary = (connectionsize+nb_connection_pts)*irafx + nbghostcellsfine + 1  
    534534           CALL smooth_topo(G1%gdepw_ps(boundary:nxfin-boundary+1,boundary:nyfin-boundary+1),nbiter) 
    535535           G1%bathy_meter = G1%gdepw_ps                          
     
    611611     CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant) 
    612612     ! 
    613      boundary = connectionsize*irafx + nbghostcellsfine    
     613     boundary = connectionsize*irafx + nbghostcellsfine + 1    
    614614     !              
    615615     G1%bathy_meter(1:boundary,:) = bathy_fin_constant(1:boundary,:) 
Note: See TracChangeset for help on using the changeset viewer.