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

# Changeset 2240

Ignore:
Timestamp:
2010-10-13T10:48:48+02:00 (14 years ago)
Message:

Suppression of key_zco everywhere in the code

Location:
branches/DEV_r2106_LOCEAN2010/NEMO
Files:
23 edited

Unmodified
Removed
• ## branches/DEV_r2106_LOCEAN2010/NEMO/NST_SRC/agrif_opa_interp.F90

 r1605 DO jj=1,jpj ua(1:2,jj,jk) = (zua(1:2,jj,jk)/(rhoy*e2u(1:2,jj))) #if ! defined key_zco ua(1:2,jj,jk) = ua(1:2,jj,jk) / fse3u(1:2,jj,jk) #endif END DO END DO DO jj=1,jpj va(2,jj,jk) = (zva(2,jj,jk)/(zrhox*e1v(2,jj)))*vmask(2,jj,jk) #if ! defined key_zco va(2,jj,jk) = va(2,jj,jk) / fse3v(2,jj,jk) #endif END DO END DO ua(nlci-2:nlci-1,jj,jk) = (zua(nlci-2:nlci-1,jj,jk)/(rhoy*e2u(nlci-2:nlci-1,jj))) #if ! defined key_zco ua(nlci-2:nlci-1,jj,jk) = ua(nlci-2:nlci-1,jj,jk) / fse3u(nlci-2:nlci-1,jj,jk) #endif END DO DO jj=1,jpj-1 va(nlci-1,jj,jk) = (zva(nlci-1,jj,jk)/(zrhox*e1v(nlci-1,jj)))*vmask(nlci-1,jj,jk) #if ! defined key_zco va(nlci-1,jj,jk) = va(nlci-1,jj,jk) / fse3v(nlci-1,jj,jk) #endif END DO END DO DO ji=1,jpi va(ji,1:2,jk) = (zva(ji,1:2,jk)/(zrhox*e1v(ji,1:2))) #if ! defined key_zco va(ji,1:2,jk) = va(ji,1:2,jk) / fse3v(ji,1:2,jk) #endif END DO END DO DO ji=1,jpi ua(ji,2,jk) = (zua(ji,2,jk)/(rhoy*e2u(ji,2)))*umask(ji,2,jk) #if ! defined key_zco ua(ji,2,jk) = ua(ji,2,jk) / fse3u(ji,2,jk) #endif END DO END DO DO ji=1,jpi va(ji,nlcj-2:nlcj-1,jk) = (zva(ji,nlcj-2:nlcj-1,jk)/(zrhox*e1v(ji,nlcj-2:nlcj-1))) #if ! defined key_zco va(ji,nlcj-2:nlcj-1,jk) = va(ji,nlcj-2:nlcj-1,jk) / fse3v(ji,nlcj-2:nlcj-1,jk) #endif END DO END DO DO ji=1,jpi ua(ji,nlcj-1,jk) = (zua(ji,nlcj-1,jk)/(rhoy*e2u(ji,nlcj-1)))*umask(ji,nlcj-1,jk) #if ! defined key_zco ua(ji,nlcj-1,jk) = ua(ji,nlcj-1,jk) / fse3u(ji,nlcj-1,jk) #endif END DO END DO DO ji=i1,i2 tabres(ji,jj,jk) = e2u(ji,jj) * un(ji,jj,jk) #if ! defined key_zco tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3u(ji,jj,jk) #endif END DO END DO DO ji=i1,i2 tabres(ji,jj,jk) = e1v(ji,jj) * vn(ji,jj,jk) #if ! defined key_zco tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3v(ji,jj,jk) #endif END DO END DO
• ## branches/DEV_r2106_LOCEAN2010/NEMO/NST_SRC/agrif_opa_sponge.F90

 r1300 DO jj = 1, jpjm1 DO ji = 1, jpim1 #if defined key_zco zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) #else zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk) zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk) #endif ztu(ji,jj,jk) = zabe1 * ( tbdiff(ji+1,jj  ,jk) - tbdiff(ji,jj,jk) ) zsu(ji,jj,jk) = zabe1 * ( sbdiff(ji+1,jj  ,jk) - sbdiff(ji,jj,jk) ) DO jj = 2,jpjm1 DO ji = 2,jpim1 #if defined key_zco zbtr = spbtr2(ji,jj) #else zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk) #endif ! horizontal diffusive trends zta = zbtr * (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)   & DO jj = 2, jpjm1 DO ji = 2, jpim1   ! vector opt. #if defined key_zco zbtr = spbtr2(ji,jj) hdivdiff(ji,jj,jk) = (  e2u(ji,jj) * ubdiff(ji,jj,jk) & - e2u(ji-1,jj  ) * ubdiff(ji-1,jj  ,jk)      & &               + e1v(ji,jj) * vbdiff(ji,jj,jk) - & &              e1v(ji  ,jj-1) * vbdiff(ji  ,jj-1,jk)  ) * zbtr #else zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk) hdivdiff(ji,jj,jk) =   & vbdiff(ji,jj,jk) - e1v(ji  ,jj-1)* & fse3v(ji  ,jj-1,jk)  * vbdiff(ji  ,jj-1,jk)  ) * zbtr #endif END DO END DO DO jj = 1, jpjm1 DO ji = 1, jpim1   ! vector opt. #if defined key_zco zbtr = spbtr3(ji,jj) rotdiff(ji,jj,jk) = (  e2v(ji+1,jj  ) * vbdiff(ji+1,jj  ,jk) - e2v(ji,jj) * vbdiff(ji,jj,jk)    & &              - e1u(ji  ,jj+1) * ubdiff(ji  ,jj+1,jk) + e1u(ji,jj) * ubdiff(ji,jj,jk)  ) & &           * fmask(ji,jj,jk) * zbtr #else zbtr = spbtr3(ji,jj) * fse3f(ji,jj,jk) rotdiff(ji,jj,jk) = (  e2v(ji+1,jj  ) * vbdiff(ji+1,jj  ,jk) - e2v(ji,jj) * vbdiff(ji,jj,jk)    & &              - e1u(ji  ,jj+1) * ubdiff(ji  ,jj+1,jk) + e1u(ji,jj) * ubdiff(ji,jj,jk)  ) & &           * fmask(ji,jj,jk) * zbtr #endif END DO END DO DO jj = 2, jpjm1 DO ji = 2, jpim1   ! vector opt. #if defined key_zco ! horizontal diffusive trends ze2u = rotdiff (ji,jj,jk) ze1v = hdivdiff(ji,jj,jk) zua = - (                ze2u                  - & rotdiff (ji,jj-1,jk) ) / e2u(ji,jj)   & + ( hdivdiff(ji+1,jj,jk) -     & ze1v                  ) / e1u(ji,jj) zva = + (                ze2u                  - & rotdiff (ji-1,jj,jk) ) / e1v(ji,jj)   & + ( hdivdiff(ji,jj+1,jk) -       & ze1v                  ) / e2v(ji,jj) #else ze2u = rotdiff (ji,jj,jk) ze1v = hdivdiff(ji,jj,jk) + ( hdivdiff(ji,jj+1,jk) - ze1v    & ) / e2v(ji,jj) #endif ! add it to the general momentum trends
• ## branches/DEV_r2106_LOCEAN2010/NEMO/NST_SRC/agrif_opa_update.F90

 r1587 DO ji=i1,i2 tabres(ji,jj,jk) = e2u(ji,jj) * un(ji,jj,jk) #if ! defined key_zco tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3u(ji,jj,jk) #endif END DO END DO un(ji,jj,jk) = tabres(ji,jj,jk) / (e2u(ji,jj)) un(ji,jj,jk) = un(ji,jj,jk) * umask(ji,jj,jk) #if ! defined key_zco un(ji,jj,jk) = un(ji,jj,jk) / fse3u(ji,jj,jk) #endif END DO END DO DO ji=i1,i2 tabres(ji,jj,jk) = e1v(ji,jj) * vn(ji,jj,jk) #if ! defined key_zco tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3v(ji,jj,jk) #endif END DO END DO vn(ji,jj,jk) = tabres(ji,jj,jk) / (e1v(ji,jj)) vn(ji,jj,jk) = vn(ji,jj,jk) * vmask(ji,jj,jk) #if ! defined key_zco vn(ji,jj,jk) = vn(ji,jj,jk) / fse3v(ji,jj,jk) #endif END DO END DO
• ## branches/DEV_r2106_LOCEAN2010/NEMO/NST_SRC/agrif_top_sponge.F90

 r1271 DO jj = 1, jpjm1 DO ji = 1, jpim1 #if defined key_zco zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) #else zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk) zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk) #endif ztru(ji,jj,jk,jl) = zabe1 * ( trbdiff(ji+1,jj  ,jk,jl) - trbdiff(ji,jj,jk,jl) ) ztrv(ji,jj,jk,jl) = zabe2 * ( trbdiff(ji  ,jj+1,jk,jl) - trbdiff(ji,jj,jk,jl) ) DO jj = 2,jpjm1 DO ji = 2,jpim1 #if defined key_zco zbtr = spbtr2(ji,jj) #else zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk) #endif ! horizontal diffusive trends ztra = zbtr * (  ztru(ji,jj,jk,jl) - ztru(ji-1,jj,jk,jl)   &
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OFF_SRC/domain.F90

 r2053 !!              - vertical coordinate (gdep., e3.) depending on the !!                coordinate chosen : !!                   ln_zco=T   z-coordinate   (forced if lk_zco) !!                   ln_zco=T   z-coordinate !!                   ln_zps=T   z-coordinate with partial steps !!                   ln_zco=T   s-coordinate IF( ln_sco ) ioptio = ioptio + 1 IF ( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' ) IF( lk_zco ) THEN IF(lwp) WRITE(numout,*) '          z-coordinate with reduced incore memory requirement' IF( ln_zps .OR. ln_sco )   CALL ctl_stop( ' reduced memory with zps or sco option is impossible' ) ENDIF IF( nprint == 1 .AND. lwp )   THEN
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OFF_SRC/domrea.F90

 r2053 REAL(wp), DIMENSION(jpi,jpj) :: & zprt #if ! defined key_zco INTEGER :: ik #endif !!---------------------------------------------------------------------- ENDDO ENDDO #if ! defined key_zco IF( ln_sco ) THEN                                         ! s-coordinate ENDIF # endif IF( ln_zco ) THEN ! Vertical coordinates and scales factors
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OFF_SRC/domrea_dimg.h90

 r2053 mbathy=zprt*tmask(:,:,1)+1 #if ! defined key_zco IF( ln_sco ) THEN                                         ! s-coordinate ! READ(inum4,REC=irec) e3w_0(:) ENDIF #else ! ! gdep irec =  irecv(inum4) + (narea - 1 ) READ(inum4,REC=irec) gdept_0(:) irecv(inum4) = irecv(inum4) + jpnij irec =  irecv(inum4) + (narea - 1 ) READ(inum4,REC=irec) gdepw_0(:) irecv(inum4) = irecv(inum4) + jpnij ! ! e3 irec =  irecv(inum4) + (narea - 1 ) READ(inum4,REC=irec) e3t_0(:) irecv(inum4) = irecv(inum4) + jpnij irec =  irecv(inum4) + (narea - 1 ) READ(inum4,REC=irec) e3w_0(:) irecv(inum4) = irecv(inum4) + jpnij ! #endif !                                     ! ============================ !                                     !        close the files

 r2082 DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. #if defined key_zco zu  = pu(ji  ,jj  ,jk) * umask(ji  ,jj  ,jk) * e2u(ji  ,jj  ) zu1 = pu(ji-1,jj  ,jk) * umask(ji-1,jj  ,jk) * e2u(ji-1,jj  ) zv  = pv(ji  ,jj  ,jk) * vmask(ji  ,jj  ,jk) * e1v(ji  ,jj  ) zv1 = pv(ji  ,jj-1,jk) * vmask(ji  ,jj-1,jk) * e1v(ji  ,jj-1) zet = 1. / ( e1t(ji,jj) * e2t(ji,jj) ) #else zu  = pu(ji  ,jj  ,jk) * umask(ji  ,jj  ,jk) * e2u(ji  ,jj  ) * fse3u(ji  ,jj  ,jk) zu1 = pu(ji-1,jj  ,jk) * umask(ji-1,jj  ,jk) * e2u(ji-1,jj  ) * fse3u(ji-1,jj  ,jk) zv1 = pv(ji  ,jj-1,jk) * vmask(ji  ,jj-1,jk) * e1v(ji  ,jj-1) * fse3v(ji  ,jj-1,jk) zet = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) #endif phdiv(ji,jj,jk) = ( zu - zu1 + zv - zv1 ) * zet END DO
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dom_oce.F90

 r2239 LOGICAL, PUBLIC ::   ln_zps     =  .FALSE.   !: z-coordinate - partial step LOGICAL, PUBLIC ::   ln_sco     =  .FALSE.   !: s-coordinate or hybrid z-s coordinate #if defined key_zco LOGICAL, PUBLIC, PARAMETER ::   lk_zco = .TRUE.    !: z-coordinate flag (1D arrays) #else LOGICAL, PUBLIC, PARAMETER ::   lk_zco = .FALSE.   !: z-coordinate flag (3D arrays) !! All coordinates REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3vw            !: analytical vertical scale factors at  VW-- REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3w   , e3uw    !:                                        W--UW  points (m) #endif #if defined key_vvl LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .TRUE.    !: variable grid flag
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domvvl.F90

 r2236 ENDIF IF( lk_zco )   CALL ctl_stop( 'dom_vvl : key_zco is incompatible with variable volume option key_vvl') fsdept(:,:,:) = gdept (:,:,:)
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domwri.F90

 r2004 CALL iom_rstput( 0, 0, inum4, 'mbathy', zprt, ktype = jp_i2 ) #if ! defined key_zco IF( ln_sco ) THEN                                         ! s-coordinate CALL iom_rstput( 0, 0, inum4, 'hbatt', hbatt )         !    ! depth ENDIF #endif IF( ln_zco ) THEN
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr.F90

 r2236 !!              - vertical coordinate (gdep., e3.) depending on the !!                coordinate chosen : !!                   ln_zco=T   z-coordinate   (forced if lk_zco) !!                   ln_zco=T   z-coordinate !!                   ln_zps=T   z-coordinate with partial steps !!                   ln_zco=T   s-coordinate IF( ln_sco ) ioptio = ioptio + 1 IF ( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' ) IF( lk_zco ) THEN IF(lwp) WRITE(numout,*) '          z-coordinate with reduced incore memory requirement' IF( ln_zps .OR. ln_sco )   CALL ctl_stop( ' reduced memory with zps or sco option is impossible' ) ENDIF ! Build the vertical coordinate system !! ** Purpose :   define the z-coordinate system !! !! ** Method  :   set 3D coord. arrays to reference 1D array if lk_zco=T !! ** Method  :   set 3D coord. arrays to reference 1D array !!---------------------------------------------------------------------- INTEGER  ::   jk !!---------------------------------------------------------------------- ! IF( .NOT.lk_zco ) THEN DO jk = 1, jpk fsdept(:,:,jk) = gdept_0(jk) fsdepw(:,:,jk) = gdepw_0(jk) fsde3w(:,:,jk) = gdepw_0(jk) fse3t (:,:,jk) = e3t_0(jk) fse3u (:,:,jk) = e3t_0(jk) fse3v (:,:,jk) = e3t_0(jk) fse3f (:,:,jk) = e3t_0(jk) fse3w (:,:,jk) = e3w_0(jk) fse3uw(:,:,jk) = e3w_0(jk) fse3vw(:,:,jk) = e3w_0(jk) END DO ENDIF DO jk = 1, jpk fsdept(:,:,jk) = gdept_0(jk) fsdepw(:,:,jk) = gdepw_0(jk) fsde3w(:,:,jk) = gdepw_0(jk) fse3t (:,:,jk) = e3t_0(jk) fse3u (:,:,jk) = e3t_0(jk) fse3v (:,:,jk) = e3t_0(jk) fse3f (:,:,jk) = e3t_0(jk) fse3w (:,:,jk) = e3w_0(jk) fse3uw(:,:,jk) = e3w_0(jk) fse3vw(:,:,jk) = e3w_0(jk) END DO ! END SUBROUTINE zgr_zco #if defined key_zco !!---------------------------------------------------------------------- !!   'key_zco' :                                              "pure" zco (gdep & e3 are 1D arrays) !!---------------------------------------------------------------------- SUBROUTINE zgr_zps      ! Empty routine END SUBROUTINE zgr_zps SUBROUTINE zgr_sco      ! Empty routine END SUBROUTINE zgr_sco #else !!---------------------------------------------------------------------- !!   Default option :                      zco, zps and/or sco available (gedp & e3 are 3D arrays) END SUBROUTINE zgr_sco #endif !!======================================================================
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr_substitute.h90

 r2236 !!            3.1  !  2009-02  (G. Madec, M. Leclair)  pure z* coordinate !!---------------------------------------------------------------------- #if defined key_zco ! reference for pure z-coordinate (1D - no i,j and time dependency) #   define  fsdept_0(i,j,k)  gdept_0(k) #   define  fsdepw_0(i,j,k)  gdepw_0(k) #   define  fsde3w_0(i,j,k)  gdepw_0(k) #   define  fse3t_0(i,j,k)   e3t_0(k) #   define  fse3u_0(i,j,k)   e3t_0(k) #   define  fse3v_0(i,j,k)   e3t_0(k) #   define  fse3f_0(i,j,k)   e3t_0(k) #   define  fse3w_0(i,j,k)   e3w_0(k) #   define  fse3uw_0(i,j,k)  e3w_0(k) #   define  fse3vw_0(i,j,k)  e3w_0(k) #else ! reference for s- or zps-coordinate (3D no time dependency) #   define  fsdept_0(i,j,k)  gdept(i,j,k) #   define  fse3uw_0(i,j,k)  e3uw(i,j,k) #   define  fse3vw_0(i,j,k)  e3vw(i,j,k) #endif #if defined key_vvl ! s* or z*-coordinate (3D + time dependency) + use of additional now arrays (..._1)
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DYN/divcur.F90

 r2236 !!         - compute the now divergence given by : !!         hdivn = 1/(e1t*e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] ) !!      Note: if lk_zco=T, e3u=e3v=e3t, they are simplified in the !!      above expression !!         - apply lateral boundary conditions on hdivn DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. #if defined key_zco hdivn(ji,jj,jk) = (  e2u(ji,jj) * un(ji,jj,jk) - e2u(ji-1,jj  ) * un(ji-1,jj  ,jk)      & &               + e1v(ji,jj) * vn(ji,jj,jk) - e1v(ji  ,jj-1) * vn(ji  ,jj-1,jk)  )   & &            / ( e1t(ji,jj) * e2t(ji,jj) ) #else hdivn(ji,jj,jk) =   & (  e2u(ji,jj)*fse3u(ji,jj,jk) * un(ji,jj,jk) - e2u(ji-1,jj  )*fse3u(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)       & + e1v(ji,jj)*fse3v(ji,jj,jk) * vn(ji,jj,jk) - e1v(ji  ,jj-1)*fse3v(ji  ,jj-1,jk) * vn(ji  ,jj-1,jk)  )    & / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) #endif END DO END DO !!      - compute the now divergence given by : !!         hdivn = 1/(e1t*e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] ) !!      Note: if lk_zco=T, e3u=e3v=e3t, they are simplified in the !!      above expression !!      - apply lateral boundary conditions on hdivn DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. #if defined key_zco hdivn(ji,jj,jk) = (  e2u(ji,jj) * un(ji,jj,jk) - e2u(ji-1,jj  ) * un(ji-1,jj  ,jk)      & &               + e1v(ji,jj) * vn(ji,jj,jk) - e1v(ji  ,jj-1) * vn(ji  ,jj-1,jk)  )   & / ( e1t(ji,jj) * e2t(ji,jj) ) #else hdivn(ji,jj,jk) =   & (  e2u(ji,jj)*fse3u(ji,jj,jk) * un(ji,jj,jk) - e2u(ji-1,jj  )*fse3u(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)       & + e1v(ji,jj)*fse3v(ji,jj,jk) * vn(ji,jj,jk) - e1v(ji  ,jj-1)*fse3v(ji  ,jj-1,jk) * vn(ji  ,jj-1,jk)  )    & / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) #endif END DO END DO
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DYN/dynldf_bilap.F90

 r1152 zuf(ji,jj,jk) = fmask(ji,jj,jk) * (  zcv(ji+1,jj  ) - zcv(ji,jj)      & &                            - zcu(ji  ,jj+1) + zcu(ji,jj)  )   & #if defined key_zco &                         / ( e1f(ji,jj)*e2f(ji,jj) ) #else &       * fse3f(ji,jj,jk) / ( e1f(ji,jj)*e2f(ji,jj) ) #endif END DO END DO DO jj = 1, jpjm1 DO ji = 1, fs_jpim1   ! vector opt. #if defined key_zco zlu(ji,jj,jk) = e2u(ji,jj) * zlu(ji,jj,jk) zlv(ji,jj,jk) = e1v(ji,jj) * zlv(ji,jj,jk) #else zlu(ji,jj,jk) = e2u(ji,jj) * fse3u(ji,jj,jk) * zlu(ji,jj,jk) zlv(ji,jj,jk) = e1v(ji,jj) * fse3v(ji,jj,jk) * zlv(ji,jj,jk) #endif END DO END DO DO jj = 2, jpj DO ji = fs_2, jpi   ! vector opt. #if defined key_zco zbt = e1t(ji,jj) * e2t(ji,jj) #else zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) #endif zut(ji,jj,jk) = (  zlu(ji,jj,jk) - zlu(ji-1,jj  ,jk)   & &             + zlv(ji,jj,jk) - zlv(ji  ,jj-1,jk) ) / zbt DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. #if defined key_zco ze2u = e2u(ji,jj) ze2v = e1v(ji,jj) #else ze2u = e2u(ji,jj) * fse3u(ji,jj,jk) ze2v = e1v(ji,jj) * fse3v(ji,jj,jk) #endif ! horizontal biharmonic diffusive trends zua = - ( zuf(ji  ,jj,jk) - zuf(ji,jj-1,jk) ) / ze2u   &
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DYN/dynldf_lap.F90

 r1954 !!         difu = 1/e1u di[ahmt hdivb] - 1/(e2u*e3u) dj-1[e3f ahmf rotb] !!         difv = 1/e2v dj[ahmt hdivb] + 1/(e1v*e3v) di-1[e3f ahmf rotb] !!      If lk_zco=T, e3f=e3u=e3v, the vertical scale factor are simplified !!      in the rotational part of the diffusion. !!      Add this before trend to the general trend (ua,va): DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. #if defined key_zco ! horizontal diffusive trends ze2u = rotb (ji,jj,jk)*fsahmf(ji,jj,jk) ze1v = hdivb(ji,jj,jk)*fsahmt(ji,jj,jk) zua = - ( ze2u - rotb (ji,jj-1,jk)*fsahmf(ji,jj-1,jk)                   ) / e2u(ji,jj)   & + ( hdivb(ji+1,jj,jk)*fsahmt(ji+1,jj,jk) - ze1v                   ) / e1u(ji,jj) zva = + ( ze2u - rotb (ji-1,jj,jk)*fsahmf(ji-1,jj,jk)                   ) / e1v(ji,jj)   & + ( hdivb(ji,jj+1,jk)*fsahmt(ji,jj+1,jk) - ze1v                   ) / e2v(ji,jj) #else ze2u = rotb (ji,jj,jk)*fsahmf(ji,jj,jk)*fse3f(ji,jj,jk) ze1v = hdivb(ji,jj,jk)*fsahmt(ji,jj,jk) zva = + ( ze2u - rotb (ji-1,jj,jk)*fsahmf(ji-1,jj,jk)*fse3f(ji-1,jj,jk) ) / ( e1v(ji,jj) * fse3v(ji,jj,jk) )   & + ( hdivb(ji,jj+1,jk)*fsahmt(ji,jj+1,jk) - ze1v                   ) / e2v(ji,jj) #endif ! add it to the general momentum trends
• ## branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90

 r2236 END DO ELSE                            ! partial steps or s-ccordinate # if defined key_zco zc = gdept_0(jpkm1) # else zc = MAXVAL( fsdept(:,:,jpkm1) ) # endif IF( lk_mpp )   CALL mpp_max( zc )   ! max over the global domain

 r2236 !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes) IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nf_ptr ) == 0 ) ) THEN IF( lk_zco ) THEN DO jk = 1, jpkm1 DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. zwy(ji,jj,jk) = zwy(ji,jj,jk) * fse3v(ji,jj,jk) END DO END DO END DO ENDIF IF( jn == jp_tem )  pht_adv(:) = ptr_vj( zwy(:,:,:) ) IF( jn == jp_sal )  pst_adv(:) = ptr_vj( zwy(:,:,:) )

 r2236 !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes) IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nf_ptr ) == 0 ) ) THEN IF( lk_zco ) THEN DO jk = 1, jpkm1 DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. zwy(ji,jj,jk) = zwy(ji,jj,jk) * fse3v(ji,jj,jk) END DO END DO END DO ENDIF IF( jn == jp_tem )  pht_adv(:) = ptr_vj( zwy(:,:,:) ) IF( jn == jp_sal )  pst_adv(:) = ptr_vj( zwy(:,:,:) )