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

Changeset 1639


Ignore:
Timestamp:
2009-10-05T19:06:17+02:00 (15 years ago)
Author:
rblod
Message:

Fix some bigs in s-coordinate, see ticket #366 and #380

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DOM/domzgr.F90

    r1632 r1639  
    11391139      !                                        ! Define the envelop bathymetry   (hbatt) 
    11401140      !                                        ! ============================= 
    1141       ! Smooth the bathymetry (if required) 
    1142       scosrf(:,:) = 0.e0              ! ocean surface depth (here zero: no under ice-shelf sea) 
    1143       scobot(:,:) = bathy(:,:)        ! ocean bottom  depth 
    1144       ! 
    11451141      ! use r-value to create hybrid coordinates 
    11461142      DO jj = 1, jpj 
     
    11491145         END DO 
    11501146      END DO 
     1147      !  
     1148      ! Smooth the bathymetry (if required) 
     1149      scosrf(:,:) = 0.e0              ! ocean surface depth (here zero: no under ice-shelf sea) 
     1150      scobot(:,:) = bathy(:,:)        ! ocean bottom  depth 
     1151      ! 
    11511152      jl = 0 
    11521153      zrmax = 1.e0 
     
    13371338                esigw3(ji,jj,jk+1) = gsigt3(ji,jj,jk+1) - gsigt3(ji,jj,jk) 
    13381339             END DO 
    1339              esigw3(ji,jj,1) = esigw3(ji,jj,2) 
    1340              esigt3(ji,jj,jpk) = esigt3(ji,jj,jpkm1) 
     1340             esigw3(ji,jj,1  ) = 2.0_wp * (gsigt3(ji,jj,1  ) - gsigw3(ji,jj,1  )) 
     1341             esigt3(ji,jj,jpk) = 2.0_wp * (gsigt3(ji,jj,jpk) - gsigw3(ji,jj,jpk)) 
    13411342 
    13421343             ! Coefficients for vertical depth as the sum of e3w scale factors 
     
    13511352                gdept (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsigt3(ji,jj,jk)+rn_hc*zcoeft) 
    13521353                gdepw (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsigw3(ji,jj,jk)+rn_hc*zcoefw) 
    1353                 gdep3w(ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsi3w3(ji,jj,jk)+rn_hc*zcoefw) 
     1354                gdep3w(ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsi3w3(ji,jj,jk)+rn_hc*zcoeft) 
    13541355             END DO 
    13551356 
     
    14021403            esigw(jk+1) = gsigt(jk+1) - gsigt(jk) 
    14031404         END DO 
    1404          esigw( 1 ) = esigw(  2  ) 
    1405          esigt(jpk) = esigt(jpkm1) 
     1405         esigw( 1 ) = 2.0_wp * (gsigt(1) - gsigw(1))  
     1406         esigt(jpk) = 2.0_wp * (gsigt(jpk) - gsigw(jpk)) 
    14061407 
    14071408!!gm  original form 
     
    14231424            gdept (:,:,jk) = (scosrf(:,:)+(hbatt(:,:)-hift(:,:))*gsigt(jk)+hift(:,:)*zcoeft) 
    14241425            gdepw (:,:,jk) = (scosrf(:,:)+(hbatt(:,:)-hift(:,:))*gsigw(jk)+hift(:,:)*zcoefw) 
    1425             gdep3w(:,:,jk) = (scosrf(:,:)+(hbatt(:,:)-hift(:,:))*gsi3w(jk)+hift(:,:)*zcoefw) 
     1426            gdep3w(:,:,jk) = (scosrf(:,:)+(hbatt(:,:)-hift(:,:))*gsi3w(jk)+hift(:,:)*zcoeft) 
    14261427         END DO 
    14271428!!gm: e3uw, e3vw can be suppressed  (modif in dynzdf, dynzdf_iso, zdfbfr) (save 2 3D arrays) 
Note: See TracChangeset for help on using the changeset viewer.