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 1566 for trunk/NEMO/OPA_SRC/DOM/domzgr.F90 – NEMO

Ignore:
Timestamp:
2009-07-31T16:34:08+02:00 (15 years ago)
Author:
rblod
Message:

Cosmetic changes: suppress useless variables and code review of the code changed when suppressing rigid-lid, see ticket #508

File:
1 edited

Legend:

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

    r1528 r1566  
    44   !! Ocean initialization : domain initialization 
    55   !!============================================================================== 
    6    !! History :  OPA  !  1995-12  (G. Madec)  Original code : s vertical coordinate 
    7    !!                 !  1997-07  (G. Madec)  lbc_lnk call 
    8    !!                 !  1997-04  (J.-O. Beismann)  
    9    !!            8.5  !  2002-09 (A. Bozec, G. Madec)  F90: Free form and module 
    10    !!             -   !  2002-09 (A. de Miranda)  rigid-lid + islands 
    11    !!  NEMO      1.0  !  2003-08  (G. Madec)  F90: Free form and module 
    12    !!             -   !  2005-10  (A. Beckmann)  modifications for hybrid s-ccordinates & new stretching function 
    13    !!            2.0  !  2006-04  (R. Benshila, G. Madec)  add zgr_zco 
    14    !!            3.0  !  2008-06  (G. Madec)  insertion of domzgr_zps.h90 & conding style 
     6   !! History :  OPA  ! 1995-12  (G. Madec)  Original code : s vertical coordinate 
     7   !!                 ! 1997-07  (G. Madec)  lbc_lnk call 
     8   !!                 ! 1997-04  (J.-O. Beismann)  
     9   !!            8.5  ! 2002-09 (A. Bozec, G. Madec)  F90: Free form and module 
     10   !!             -   ! 2002-09 (A. de Miranda)  rigid-lid + islands 
     11   !!  NEMO      1.0  ! 2003-08  (G. Madec)  F90: Free form and module 
     12   !!             -   ! 2005-10  (A. Beckmann)  modifications for hybrid s-ccordinates & new stretching function 
     13   !!            2.0  ! 2006-04  (R. Benshila, G. Madec)  add zgr_zco 
     14   !!            3.0  ! 2008-06  (G. Madec)  insertion of domzgr_zps.h90 & conding style 
     15   !!            3.2  ! 2009-07  (R. Benshila) Suppression of rigid-lid option 
    1516   !!---------------------------------------------------------------------- 
    1617 
     
    623624      ENDIF 
    624625 
    625       ! Set to zero mbathy over islands if necessary 
    626       IF(lwp) WRITE(numout,*) 
    627       IF(lwp) WRITE(numout,*) '         mbathy set to 0 over islands' 
    628       IF(lwp) WRITE(numout,*) '         ----------------------------' 
    629       ! 
    630       mbathy(:,:) = MAX( 0, mbathy(:,:) ) 
    631       ! 
    632626      !  Boundary condition on mbathy 
    633627      IF( .NOT.lk_mpp ) THEN  
     
    655649      ENDIF 
    656650 
    657       ! control print 
    658       IF( lwp .AND. nprint == 1 ) THEN 
     651      IF( lwp .AND. nprint == 1 ) THEN      ! control print 
    659652         WRITE(numout,*) 
    660653         WRITE(numout,*) ' bathymetric field :   number of non-zero T-levels ' 
     
    10271020      REAL(wp), INTENT(in   ) ::   bb    ! Stretching coefficient 
    10281021      REAL(wp)                ::   pf1   ! sigma value 
    1029  
    1030       !!---------------------------------------------------------------------- 
    1031       ! 
    1032       IF ( theta == 0 ) then   !uniform sigma 
    1033          pf1 = -(pk1-0.5)/REAL(jpkm1) 
    1034       ELSE    ! stretched sigma 
     1022      !!---------------------------------------------------------------------- 
     1023      ! 
     1024      IF ( theta == 0 ) then      ! uniform sigma 
     1025         pf1 = -(pk1-0.5) / REAL( jpkm1 ) 
     1026      ELSE                        ! stretched sigma 
    10351027         pf1 =   (1.0-bb) * (sinh( theta*(-(pk1-0.5)/REAL(jpkm1)) ) ) / sinh(theta) + & 
    1036                  bb * ( (tanh( theta*( (-(pk1-0.5)/REAL(jpkm1)) + 0.5) ) - tanh(0.5*theta) ) / & 
    1037                  (2*tanh(0.5*theta) ) ) 
    1038       ENDIF 
    1039  
     1028            &    bb * ( (tanh( theta*( (-(pk1-0.5)/REAL(jpkm1)) + 0.5) ) - tanh(0.5*theta) ) / & 
     1029            &    (2*tanh(0.5*theta) ) ) 
     1030      ENDIF 
     1031      ! 
    10401032   END FUNCTION fssig1 
    10411033 
     
    10781070      REAL(wp), DIMENSION(jpi,jpj) ::   zenv, ztmp, zmsk    ! 2D workspace 
    10791071      REAL(wp), DIMENSION(jpi,jpj) ::   zri , zrj , zhbat   !  -     - 
    1080  
    1081       LOGICAL :: ln_s_sigma = .false. !use hybrid s_sigma coordinates & stretching function fssig1,used with ln_sco = .true. 
     1072      !! 
     1073      LOGICAL  :: ln_s_sigma = .false. !use hybrid s_sigma coordinates & stretching function fssig1,used with ln_sco = .true. 
    10821074      REAL(wp) :: bb = 0.8   ! stretching parameter for song and haidvogel stretching, bb=0; top only, bb =1; top and bottom 
    10831075      REAL(wp) :: hc = 150   ! Critical depth for s-sigma coordinates 
    1084  
     1076!!gm never do that !!!!   ==> Pb at compilation phase on several computer 
    10851077      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   gsigw3 = 0.0d0 
    10861078      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   gsigt3 = 0.0d0 
     
    10931085      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   esigwu3 = 0.0d0 
    10941086      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   esigwv3 = 0.0d0 
     1087!!gm end 
    10951088      !! 
    10961089      NAMELIST/nam_zgr_sco/ sbot_max, sbot_min, theta, thetb, r_max, ln_s_sigma, bb, hc 
Note: See TracChangeset for help on using the changeset viewer.