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 9753 for utils/tools/NESTING/src/agrif_connect_topo.f90 – NEMO

Ignore:
Timestamp:
2018-06-06T15:28:47+02:00 (6 years ago)
Author:
jchanut
Message:

Modify arithmetic and median bathymetry average near land so that coastline is more realistic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/tools/NESTING/src/agrif_connect_topo.f90

    r9749 r9753  
    791791    INTEGER :: i,j 
    792792    INTEGER :: k1 
    793     INTEGER :: compt 
     793    INTEGER :: compt, compt_oce 
    794794    REAL*8, POINTER, DIMENSION(:) :: gdepw,gdept,e3w,e3t 
    795795    !                      
     
    906906          G0%Bathy_meter(ipt,jpt) = 0. 
    907907          compt = 0  
     908          compt_oce = 0 
    908909          DO jj = j-FLOOR(irafy/2.0),j+FLOOR(irafy/2.0)-diff 
    909910             DO ii = i-FLOOR(irafx/2.0),i+FLOOR(irafx/2.0)-diff 
    910911                G0%Bathy_meter(ipt,jpt) = G0%Bathy_meter(ipt,jpt) + G1%Bathy_meter(ii,jj) 
     912                IF (G1%Bathy_meter(ii,jj)>0.) compt_oce = compt_oce + 1 
    911913                compt = compt + 1 
    912914             END DO 
    913915          END DO 
     916!          IF (compt_oce > 0.5*irafx*irafy)    G0%Bathy_meter(ipt,jpt) = G0%Bathy_meter(ipt,jpt) / FLOAT(compt) 
    914917          G0%Bathy_meter(ipt,jpt) = G0%Bathy_meter(ipt,jpt) / FLOAT(compt) 
    915918          IF(G0%Bathy_meter(ipt,jpt).GT.0.)   G0%Bathy_meter(ipt,jpt) = MAX(G0%Bathy_meter(ipt,jpt),zmin) 
Note: See TracChangeset for help on using the changeset viewer.