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 – NEMO

Changeset 9753 for utils


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

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

Location:
utils/tools/NESTING/src
Files:
2 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) 
  • utils/tools/NESTING/src/agrif_create_bathy.f90

    r9749 r9753  
    335335                 WHERE( vardep(:,:) .GT. 0. )  mask_oce = 1 
    336336 
    337                  IF( SUM(mask_oce) == 0 ) THEN 
     337!                 IF( SUM(mask_oce) == 0 ) THEN 
     338                 IF( SUM(mask_oce) < 0.5*(nxhr*nyhr) ) THEN 
    338339                    G1%bathy_meter(ji,jj) = 0. 
    339340                 ELSE 
     
    562563            END DO 
    563564        END DO 
    564  
    565         G1%gdepw_ps(:,:) = (1.-G1%wgt(:,:)) * G1%gdepw_ps(:,:) + gdepw_ps_interp(:,:)*G1%wgt(:,:) 
     565        IF (.NOT.identical_grids) THEN 
     566           G1%gdepw_ps(:,:) = (1.-G1%wgt(:,:)) * G1%gdepw_ps(:,:) + gdepw_ps_interp(:,:)*G1%wgt(:,:) 
     567        ENDIF 
    566568 
    567569        G1%bathy_meter = G1%gdepw_ps 
Note: See TracChangeset for help on using the changeset viewer.