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 9149 for branches/2017/dev_merge_2017/NEMOGCM/TOOLS/NESTING/src/agrif_connect_topo.f90 – NEMO

Ignore:
Timestamp:
2017-12-20T16:38:27+01:00 (6 years ago)
Author:
jchanut
Message:

NESTING TOOLS
Add new e3t definition, #1981
Correct transition weights, #1998
Correct arithmetic and median average interpolations, #1999
Changed number of coarse grid bathymetry points inside child grid domain (2 now, instead of 3)

File:
1 edited

Legend:

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

    r5656 r9149  
    188188    ! 
    189189    gdepw(1) = 0.0 
     190    ! 
     191    IF ( ln_e3_dep ) THEN      ! e3. = dk[gdep]    
     192       ! 
     193       DO i = 1, N-1  
     194          e3t(i) = gdepw(i+1)-gdepw(i) 
     195       END DO 
     196       e3t(N) = e3t(N-1) 
     197 
     198       DO i = 2, N  
     199          e3w(i) = gdept(i) - gdept(i-1) 
     200       END DO 
     201       e3w(1  ) = 2. * (gdept(1) - gdepw(1)) 
     202    END IF   
     203    ! 
    190204    zmax = gdepw(N) + e3t(N) 
    191205    IF( rn_hmin < 0. ) THEN  ;   i = - INT( rn_hmin )                                  ! from a nb of level 
     
    342356    ! 
    343357    gdepw(1) = 0.0   
     358    ! 
     359    IF ( ln_e3_dep ) THEN      ! e3. = dk[gdep]    
     360       ! 
     361       DO i = 1, N-1 
     362          e3t(i) = gdepw(i+1)-gdepw(i) 
     363       END DO 
     364       e3t(N) = e3t(N-1) 
     365 
     366       DO i = 2, N 
     367          e3w(i) = gdept(i) - gdept(i-1) 
     368       END DO 
     369       e3w(1  ) = 2. * (gdept(1) - gdepw(1)) 
     370    END IF 
    344371    ! 
    345372    IF(.NOT. ASSOCIATED(Grid%bathy_meter)) THEN 
     
    838865    ENDIF 
    839866    ! 
     867    gdepw(1)=0.  
     868    IF ( ln_e3_dep ) THEN      ! e3. = dk[gdep]    
     869       ! 
     870       DO i = 1, N-1 
     871          e3t(i) = gdepw(i+1)-gdepw(i) 
     872       END DO 
     873       e3t(N) = e3t(N-1) 
     874 
     875       DO i = 2, N 
     876          e3w(i) = gdept(i) - gdept(i-1) 
     877       END DO 
     878       e3w(1  ) = 2. * (gdept(1) - gdepw(1)) 
     879    END IF 
     880    ! 
    840881    IF( rn_hmin < 0. ) THEN  ;   i = - INT( rn_hmin )                                  ! from a nb of level 
    841882    ELSE                     ;   i = MINLOC( gdepw, mask = gdepw > rn_hmin, dim = 1 )  ! from a depth 
Note: See TracChangeset for help on using the changeset viewer.