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 255 for trunk/NEMO/OPA_SRC – NEMO

Changeset 255 for trunk/NEMO/OPA_SRC


Ignore:
Timestamp:
2005-09-02T17:06:49+02:00 (19 years ago)
Author:
opalod
Message:

nemo_v1_update_002 : CT : Integration of the KPP turbulent closure scheme

Location:
trunk/NEMO/OPA_SRC
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DIA/diawri.F90

    r247 r255  
    358358         CALL histdef( nid_W, "votkeavt", "Vertical Eddy Diffusivity"          , "m2/s"   ,   &  ! avt 
    359359            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     360 
     361         CALL histdef( nid_W, "votkeevd", "Enhanced Vertical Diffusivity",       "m2/s"   ,   &  ! avt_evd 
     362            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     363         ! 
     364         CALL histdef( nid_W, "votkeavm", "Vertical Eddy Viscosity"             , "m2/s"  ,   &  ! avmu 
     365            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     366 
     367         CALL histdef( nid_W, "votkeevm", "Enhanced Vertical Viscosity",         "m2/s"   ,   &  ! avmu_evd 
     368            &          jpi, jpj, nh_W, ipk, 1, ipk, nz_W, 32, clop, zsto, zout ) 
     369 
    360370         IF( lk_zdfddm ) THEN 
    361371            CALL histdef( nid_W,"voddmavs","Salt Vertical Eddy Diffusivity"    , "m2/s"   ,   &  ! avs 
     
    472482#   endif 
    473483      CALL histwrite( nid_W, "votkeavt", it, avt            , ndim_T, ndex_T )    ! T vert. eddy diff. coef. 
     484      CALL histwrite( nid_W, "votkeevd", it, avt_evd        , ndim_T, ndex_T )    ! T enhan. vert. eddy diff. coef. 
     485      CALL histwrite( nid_W, "votkeavm", it, avmu           , ndim_T, ndex_T )    ! T vert. eddy visc. coef. 
     486      CALL histwrite( nid_W, "votkeevm", it, avmu_evd       , ndim_T, ndex_T )    ! T enhan. vert. eddy visc. coef. 
    474487      IF( lk_zdfddm ) THEN 
    475488         CALL histwrite( nid_W, "voddmavs", it, fsavs(:,:,:), ndim_T, ndex_T )    ! S vert. eddy diff. coef. 
  • trunk/NEMO/OPA_SRC/DOM/dommsk.F90

    r247 r255  
    174174 
    175175 
     176#if defined key_zdfkpp 
     177      ! land point on Bab el Mandeb zonal section 
     178      ij0 =  87   ;   ij1 =  88 
     179      ii0 = 160   ;   ii1 = 161 
     180      tmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 1:jpk ) = 0.e0 
     181#endif 
    176182      ! Interior domain mask (used for global sum) 
    177183      ! -------------------- 
  • trunk/NEMO/OPA_SRC/TRA/trazdf_imp.F90

    r247 r255  
    1515   USE ldftra_oce      ! ocean active tracers: lateral physics 
    1616   USE zdfddm          ! ocean vertical physics: double diffusion 
     17   USE zdfkpp          ! KPP parameterisation 
    1718   USE trdmod          ! ocean active tracers trends  
    1819   USE trdmod_oce      ! ocean variables trends 
     
    7172      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    7273      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     74      !!   9.0  !  05-01  (C. Ethe )  non-local flux in KPP vertical mixing scheme 
    7375      !!--------------------------------------------------------------------- 
    7476      !! * Modules used      
     
    132134 
    133135         ! Second member construction 
    134          DO jk = 1, jpkm1 
    135             DO ji = 2, jpim1 
     136#if defined key_zdfkpp 
     137         ! add non-local temperature flux ( in convective case only) 
     138         DO jk = 1, jpkm1 
     139            DO ji = 2, jpim1   
     140               zwy(ji,jk) = tb(ji,jj,jk) + r2dt(jk) * ta(ji,jj,jk)  & 
     141                  &  - r2dt(jk) * ( ghats(ji,jj,jk) * avt(ji,jj,jk) - ghats(ji,jj,jk+1) * avt(ji,jj,jk+1) ) & 
     142                  &               * wt0(ji,jj) / fse3t(ji,jj,jk)  
     143            END DO 
     144         END DO 
     145#else 
     146         DO jk = 1, jpkm1 
     147            DO ji = 2, jpim1              
    136148               zwy(ji,jk) = tb(ji,jj,jk) + r2dt(jk) * ta(ji,jj,jk) 
    137149            END DO 
    138150         END DO 
     151#endif 
    139152 
    140153         ! Matrix inversion from the first level 
     
    178191#endif 
    179192         ! Second member construction 
    180          DO jk = 1, jpkm1 
    181             DO ji = 2, jpim1 
     193#if defined key_zdfkpp 
     194         ! add non-local salinity flux ( in convective case only) 
     195         DO jk = 1, jpkm1 
     196            DO ji = 2, jpim1   
     197               zwy(ji,jk) = sb(ji,jj,jk) + r2dt(jk) * sa(ji,jj,jk)  & 
     198                  &  - r2dt(jk) * ( ghats(ji,jj,jk) * fsavs(ji,jj,jk) - ghats(ji,jj,jk+1) * fsavs(ji,jj,jk+1) ) & 
     199                  &               * ws0(ji,jj) / fse3t(ji,jj,jk)  
     200            END DO 
     201         END DO 
     202#else 
     203         DO jk = 1, jpkm1 
     204            DO ji = 2, jpim1              
    182205               zwy(ji,jk) = sb(ji,jj,jk) + r2dt(jk) * sa(ji,jj,jk) 
    183206            END DO 
    184207         END DO 
    185  
     208#endif 
     209  
    186210         ! Matrix inversion from the first level 
    187211         ikst = 1 
  • trunk/NEMO/OPA_SRC/TRA/trazdf_iso.F90

    r247 r255  
    2323   USE in_out_manager  ! I/O manager 
    2424   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     25   USE zdfkpp          ! KPP parameterisation 
    2526 
    2627   IMPLICIT NONE 
     
    114115      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    115116      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     117      !!   9.0  !  05-06  (C. Ethe )  non-local flux in KPP vertical mixing scheme 
    116118      !!--------------------------------------------------------------------- 
    117119      !! * Modules used 
     
    450452 
    451453         ! Second member construction 
     454#if defined key_zdfkpp 
     455         ! add non-local temperature flux ( in convective case only) 
     456         DO jk = 1, jpkm1 
     457            DO ji = 2, jpim1 
     458               ! zrhs=right hand side  
     459               zwy(ji,jk) = tb(ji,jj,jk) + z2dt(jk) * ta(ji,jj,jk) & 
     460                  &  - z2dt(jk) * ( ghats(ji,jj,jk) * avt(ji,jj,jk) - ghats(ji,jj,jk+1) * avt(ji,jj,jk+1) ) & 
     461                  &               * wt0(ji,jj) / fse3t(ji,jj,jk)  
     462            END DO 
     463         END DO 
     464#else 
    452465         DO jk = 1, jpkm1 
    453466            DO ji = 2, jpim1 
     
    455468            END DO 
    456469         END DO 
     470#endif 
    457471 
    458472         ! Matrix inversion from the first level 
     
    495509#endif 
    496510         ! Second member construction 
     511 
     512#if defined key_zdfkpp 
     513         ! add non-local temperature flux ( in convective case only) 
     514         DO jk = 1, jpkm1 
     515            DO ji = 2, jpim1 
     516               ! zrhs=right hand side  
     517               zwy(ji,jk) = sb(ji,jj,jk) + z2dt(jk) * sa(ji,jj,jk) & 
     518                  &  - z2dt(jk) * ( ghats(ji,jj,jk) * fsavs(ji,jj,jk) - ghats(ji,jj,jk+1) * fsavs(ji,jj,jk+1) ) & 
     519                  &               * ws0(ji,jj) / fse3t(ji,jj,jk)  
     520            END DO 
     521         END DO 
     522#else 
    497523         DO jk = 1, jpkm1 
    498524            DO ji = 2, jpim1 
     
    500526            END DO 
    501527         END DO 
     528#endif 
    502529 
    503530         ! Matrix inversion from the first level 
  • trunk/NEMO/OPA_SRC/TRA/trazdf_iso_vopt.F90

    r247 r255  
    2626   USE in_out_manager  ! I/O manager 
    2727   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     28   USE zdfkpp          ! KPP parameterisation 
    2829 
    2930   IMPLICIT NONE 
     
    6566      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    6667      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     68      !!   9.0  !  05-06  (C. Ethe) KPP parameterization 
    6769      !!--------------------------------------------------------------------- 
    6870      !! * Arguments 
     
    162164      !!   8.5  !  02-08 (G. Madec)  F90: Free form and module 
    163165      !!   9.0  !  04-08 (C. Talandier) New trends organization 
     166      !!   9.0  !  05-06 (C. Ethe )  non-local flux in KPP vertical mixing scheme 
    164167      !!--------------------------------------------------------------------- 
    165168      !! * Modules used 
     
    281284 
    282285      ! second recurrence:    Zk = Yk - Ik / Tk-1  Zk-1 
     286#if defined key_zdfkpp 
     287         ! add non-local temperature flux ( in convective case only) 
     288      DO jj = 2, jpjm1 
     289         DO ji = fs_2, fs_jpim1 
     290            ta(ji,jj,1) = tb(ji,jj,1) + r2dt(1) * ta(ji,jj,1) & 
     291                  &  - r2dt(1) * ( ghats(ji,jj,1) * avt(ji,jj,1) - ghats(ji,jj,2) * avt(ji,jj,2) ) & 
     292                  &               * wt0(ji,jj) / fse3t(ji,jj,2)  
     293         END DO 
     294      END DO 
     295 
     296      DO jk = 2, jpkm1 
     297         DO jj = 2, jpjm1 
     298            DO ji = fs_2, fs_jpim1 
     299               ! zrhs=right hand side  
     300               zrhs = tb(ji,jj,jk) + r2dt(jk) * ta(ji,jj,jk)  & 
     301                  &  - r2dt(jk) * ( ghats(ji,jj,jk) * avt(ji,jj,jk) - ghats(ji,jj,jk+1) * avt(ji,jj,jk+1) ) & 
     302                  &               * wt0(ji,jj) / fse3t(ji,jj,jk)  
     303               ta(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) *ta(ji,jj,jk-1) 
     304            END DO 
     305         END DO 
     306      END DO 
     307#else 
    283308      DO jj = 2, jpjm1 
    284309         DO ji = fs_2, fs_jpim1 
     
    294319         END DO 
    295320      END DO 
     321#endif 
    296322 
    297323      ! third recurrence: Xk = (Zk - Sk Xk+1 ) / Tk 
     
    371397 
    372398      ! second recurrence:    Zk = Yk - Ik / Tk-1  Zk-1 
     399 
     400#if defined key_zdfkpp 
     401         ! add non-local temperature flux ( in convective case only) 
     402      DO jj = 2, jpjm1 
     403         DO ji = fs_2, fs_jpim1 
     404            sa(ji,jj,1) = sb(ji,jj,1) + r2dt(1) * sa(ji,jj,1) & 
     405                  &  - r2dt(1) * ( ghats(ji,jj,1) * fsavs(ji,jj,1) - ghats(ji,jj,2) * fsavs(ji,jj,2) ) & 
     406                  &               * ws0(ji,jj) / fse3t(ji,jj,2)  
     407         END DO 
     408      END DO 
     409 
     410      DO jk = 2, jpkm1 
     411         DO jj = 2, jpjm1 
     412            DO ji = fs_2, fs_jpim1 
     413               ! zrhs=right hand side  
     414               zrhs = sb(ji,jj,jk) + r2dt(jk) * sa(ji,jj,jk)  & 
     415                  &  - r2dt(jk) * ( ghats(ji,jj,jk) * fsavs(ji,jj,jk) - ghats(ji,jj,jk+1) * fsavs(ji,jj,jk+1) ) & 
     416                  &               * ws0(ji,jj) / fse3t(ji,jj,jk)  
     417               sa(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) *sa(ji,jj,jk-1) 
     418            END DO 
     419         END DO 
     420      END DO 
     421#else 
    373422      DO jj = 2, jpjm1 
    374423         DO ji = fs_2, fs_jpim1 
     
    384433         END DO 
    385434      END DO 
     435#endif 
    386436 
    387437      ! third recurrence: Xk = (Zk - Sk Xk+1 ) / Tk 
  • trunk/NEMO/OPA_SRC/ZDF/zdf_oce.F90

    r247 r255  
    4848      avmu,              &  !: vertical viscosity coeff. at uw-, vw-points 
    4949      avmv,              &  !: vertical viscosity coeff. at uw-, vw-points 
    50       avt                   !: vertical diffusivity coeff. at w-point 
     50      avt ,              &  !: vertical diffusivity coeff. at w-point 
     51      avt_evd,           &  !: convection: enhanced vertical diffusivity coeff. at w-point 
     52      avmu_evd              !: convection: enhanced vertical viscosity   coeff. at w-point 
    5153  
    5254   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &   !: 
  • trunk/NEMO/OPA_SRC/ZDF/zdfevd.F90

    r247 r255  
    1515   USE dom_oce         ! ocean space and time domain variables 
    1616   USE zdf_oce         ! ocean vertical physics variables 
     17   USE zdfkpp          ! KPP vertical mixing 
    1718   USE in_out_manager  ! I/O manager 
    1819   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     
    2425   PUBLIC zdf_evd      ! called by step.F90 
    2526 
     27   !! * Substitutions 
     28#  include "domzgr_substitute.h90" 
    2629   !!---------------------------------------------------------------------- 
    2730   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     
    4447      !! 
    4548      !! ** Action  :   Update avt, avmu, avmv in statically instable cases 
    46       !! 
     49      !!                and avt_evd which is avt due to convection 
    4750      !! References : 
    4851      !!      Lazar, A., these de l'universite Paris VI, France, 1997 
     
    5053      !!   7.0  !  97-06  (G. Madec, A. Lazar)  Original code 
    5154      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
     55      !!   9.0  !  05-06  (C. Ethe) KPP parameterization 
    5256      !!---------------------------------------------------------------------- 
    5357      !! * Arguments 
     
    6569      ENDIF 
    6670 
     71      ! Initialisation of avt_evd (vertical diffusion due to convection) to avt and avmu_evd to avmu 
     72      avt_evd  (:,:,:) = avt(:,:,:)  
     73      avmu_evd (:,:,:) = avmu(:,:,:)  
     74 
    6775      SELECT CASE ( nevdm ) 
    6876  
     
    7583            jj = 1                     ! big loop forced 
    7684            DO ji = jpi+2, jpij    
     85#   if defined key_zdfkpp 
     86!! no implicit mixing in the boundary layer with KPP 
     87               IF( ( rn2(ji,jj,jk) <= -1.e-12 ) .AND. ( fsdepw(ji,jj,jk) > hkpp(ji,jj) ) ) THEN 
     88#   else 
    7789               IF( rn2(ji,jj,jk) <= -1.e-12 ) THEN 
     90#   endif 
    7891                  avt (ji  ,jj  ,jk) = avevd * tmask(ji  ,jj  ,jk) 
    7992                  avmu(ji  ,jj  ,jk) = avevd * umask(ji  ,jj  ,jk) 
     
    8699            DO jj = 2, jpj             ! no vector opt. 
    87100               DO ji = 2, jpi 
    88                   IF( rn2(ji,jj,jk) <= -1.e-12 ) THEN 
     101#   if defined key_zdfkpp 
     102!! no implicit mixing in the boundary layer with KPP 
     103               IF( ( rn2(ji,jj,jk) <= -1.e-12 ) .AND. ( fsdepw(ji,jj,jk) > hkpp(ji,jj) ) ) THEN 
     104#   else 
     105               IF( rn2(ji,jj,jk) <= -1.e-12 ) THEN 
     106#   endif 
    89107                     avt (ji  ,jj  ,jk) = avevd * tmask(ji  ,jj  ,jk) 
    90108                     avmu(ji  ,jj  ,jk) = avevd * umask(ji  ,jj  ,jk) 
     
    114132            jj = 1                     ! big loop forced 
    115133            DO ji = 1, jpij    
     134#   if defined key_zdfkpp 
     135!! no implicit mixing in the boundary layer with KPP 
     136               IF( ( rn2(ji,jj,jk) <= -1.e-12 ) .AND. ( fsdepw(ji,jj,jk) > hkpp(ji,jj) ) ) &               
     137                  avt(ji,jj,jk) = avevd * tmask(ji,jj,jk) 
     138#   else 
    116139               IF( rn2(ji,jj,jk) <= -1.e-12 )   avt(ji,jj,jk) = avevd * tmask(ji,jj,jk) 
     140#   endif 
    117141            END DO 
    118142#   else 
    119143            DO jj = 1, jpj             ! loop over the whole domain (no lbc_lnk call) 
    120144               DO ji = 1, jpi 
     145#   if defined key_zdfkpp 
     146!! no implicit mixing in the boundary layer with KPP 
     147               IF( ( rn2(ji,jj,jk) <= -1.e-12 ) .AND. ( fsdepw(ji,jj,jk) > hkpp(ji,jj) ) ) &           
     148                  avt(ji,jj,jk) = avevd * tmask(ji,jj,jk) 
     149#   else 
    121150                  IF( rn2(ji,jj,jk) <= -1.e-12 )   avt(ji,jj,jk) = avevd * tmask(ji,jj,jk) 
     151#   endif 
    122152               END DO 
    123153            END DO 
     
    128158      END SELECT  
    129159 
     160      ! update of avt_evd and avmu_evd 
     161      avt_evd  (:,:,:) = avt (:,:,:)  - avt_evd  (:,:,:)  
     162      avmu_evd (:,:,:) = avmu(:,:,:)  - avmu_evd (:,:,:)  
     163 
    130164   END SUBROUTINE zdf_evd 
    131165 
  • trunk/NEMO/OPA_SRC/ZDF/zdfini.F90

    r247 r255  
    1010   !! * Modules used 
    1111   USE par_oce         ! mesh and scale factors 
    12    USE ldftra_oce      ! ??? 
    13    USE ldfdyn_oce      ! ??? 
     12   USE ldftra_oce      ! ocean active tracers: lateral physics 
     13   USE ldfdyn_oce      ! ocean dynamics lateral physics 
    1414   USE zdf_oce         ! TKE vertical mixing           
    15    USE zdftke          ! TKE vertical mixing           
     15   USE lib_mpp         ! distribued memory computing 
     16   USE zdftke          ! TKE vertical mixing   
     17   USE zdfkpp          ! KPP vertical mixing           
    1618   USE zdfddm          ! double diffusion mixing       
    1719   USE zdfevd          ! enhanced vertical diffusion   
    1820   USE zdfric          ! Richardson vertical mixing    
    1921   USE tranpc          ! convection: non penetrative adjustment 
    20    USE ldfslp          ! ??? 
     22   USE ldfslp          ! iso-neutral slopes 
    2123 
    2224   USE in_out_manager  ! I/O manager 
     
    4648      !!        !  97-06  (G. Madec)  Original code from inimix 
    4749      !!   8.5  !  02-08  (G. Madec)  F90 : free form 
     50      !!   9.0  !  05-06  (C. Ethe) KPP parameterization 
    4851      !!---------------------------------------------------------------------- 
    4952      !! * Local declarations 
     
    8487      ! ------------------------ 
    8588      ! ... vertical mixing 
    86       ! time stepping scheme (N.B. TKE scheme => force the use of implicit scheme) 
    87       IF( ln_zdfexp .AND. .NOT.lk_zdftke ) THEN   
     89      ! time stepping scheme (N.B. TKE or KPP schemes => force the use of implicit scheme) 
     90      IF( ( ln_zdfexp .AND. .NOT.lk_zdftke ) .OR. ( ln_zdfexp .AND. .NOT.lk_zdfkpp ) ) THEN   
    8891         l_trazdf_exp = .TRUE.           ! use explicit scheme 
    8992         l_trazdf_imp = .FALSE. 
     
    135138         ioptio = ioptio+1 
    136139      ENDIF 
     140      IF( lk_zdfkpp ) THEN 
     141         IF(lwp) WRITE(numout,*) '             KPP dependent eddy coef.' 
     142         ioptio = ioptio+1 
     143      ENDIF 
    137144      IF( ioptio == 0 .OR. ioptio > 1 .AND. .NOT. lk_esopa ) THEN 
    138145          IF(lwp) WRITE(numout,cform_err) 
     
    156163         IF(lwp) WRITE(numout,*) '             use the 1.5 turbulent closure' 
    157164      ENDIF 
     165      IF( lk_zdfkpp ) THEN 
     166         IF(lwp) WRITE(numout,*) '             use the KPP closure scheme' 
     167         IF(lk_mpp) THEN 
     168            IF(lwp) WRITE(numout,cform_err) 
     169            IF(lwp) WRITE(numout,*) '             The KPP scheme is not ready to run in MPI' 
     170         ENDIF 
     171      ENDIF 
    158172      IF ( ioptio > 1 .AND. .NOT. lk_esopa ) THEN 
    159173          IF(lwp) WRITE(numout,cform_err) 
  • trunk/NEMO/OPA_SRC/step.F90

    r247 r255  
    9191   USE zdfbfr          ! bottom friction                  (zdf_bfr routine) 
    9292   USE zdftke          ! TKE vertical mixing              (zdf_tke routine) 
     93   USE zdfkpp          ! KPP vertical mixing              (zdf_kpp routine) 
    9394   USE zdfddm          ! double diffusion mixing          (zdf_ddm routine) 
    9495   USE zdfevd          ! enhanced vertical diffusion      (zdf_evd routine) 
     
    163164      !!   9.0  !  02-06  (G. Madec)  free form, suppress macro-tasking 
    164165      !!    "   !  04-08  (C. Talandier) New trends organization 
     166      !!    "   !  05-01  (C. Ethe) Add the KPP closure scheme 
    165167      !!---------------------------------------------------------------------- 
    166168      !! * Arguments 
     
    237239      IF( lk_zdfric )   CALL zdf_ric( kstp )                       ! Richardson number dependent Kz 
    238240      IF( lk_zdftke )   CALL zdf_tke( kstp )                       ! TKE closure scheme for Kz 
     241      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                       ! KPP closure scheme for Kz 
    239242      IF( lk_zdfcst )   avt (:,:,:) = avt0 * tmask(:,:,:)          ! Constant Kz (reset avt to the background value) 
    240243 
     
    248251      IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity 
    249252 
    250       IF( lk_zdfddm )   CALL zdf_ddm( kstp )                 ! double diffusive mixing 
     253      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp)   & 
     254         &              CALL zdf_ddm( kstp )                 ! double diffusive mixing 
    251255 
    252256                        CALL zdf_bfr( kstp )                 ! bottom friction 
Note: See TracChangeset for help on using the changeset viewer.