Changeset 902


Ignore:
Timestamp:
2008-04-22T21:41:39+02:00 (13 years ago)
Author:
rblod
Message:

Correct a bug with key_ldf_slp and ln_traldf_iso = .FALSE., see ticket #118

Location:
trunk/NEMO/OPA_SRC/TRA
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/traldf.F90

    r719 r902  
    3333   PUBLIC   tra_ldf    ! called by step.F90  
    3434 
    35    INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_traldf_... namlist logicals) 
     35   INTEGER, PUBLIC ::   nldf = 0   ! type of lateral diffusion used defined from ln_traldf_... namlist logicals) 
     36                                   ! (need to be public to be used in vertical diffusion routine) 
    3637#if defined key_traldf_ano 
    3738   REAL, DIMENSION(jpi,jpj,jpk) ::   t0_ldf, s0_ldf   ! lateral diffusion trends of T & S 
     
    159160 
    160161      ! defined the type of lateral diffusion from ln_traldf_... logicals 
     162      ! CAUTION : nldf = 1 is used in trazdf_imp, change it carefully 
    161163      ierr = 0 
    162164      IF( ln_traldf_lap ) THEN       ! laplacian operator 
  • trunk/NEMO/OPA_SRC/TRA/trazdf_imp.F90

    r789 r902  
    3131   USE prtctl          ! Print control 
    3232   USE domvvl          ! variable volume 
     33   USE traldf          ! lateral mixing type 
    3334 
    3435   IMPLICIT NONE 
     
    138139#if defined key_ldfslp 
    139140      ! update and save of avt (and avs if double diffusive mixing) 
    140       DO jk = 2, jpkm1 
    141          DO jj = 2, jpjm1 
    142             DO ji = fs_2, fs_jpim1   ! vector opt. 
    143                zavi = fsahtw(ji,jj,jk)                       &   ! vertical mixing coef. due to lateral mixing 
    144                   & * (  wslpi(ji,jj,jk) * wslpi(ji,jj,jk)   & 
    145                   &    + wslpj(ji,jj,jk) * wslpj(ji,jj,jk)  ) 
    146                zwt(ji,jj,jk) = avt(ji,jj,jk) + zavi              ! zwt=avt+zavi (total vertical mixing coef. on temperature) 
     141      IF( nldf == 1) THEN 
     142         DO jk = 2, jpkm1 
     143            DO jj = 2, jpjm1 
     144               DO ji = fs_2, fs_jpim1   ! vector opt. 
     145                  zavi = fsahtw(ji,jj,jk)                       &   ! vertical mixing coef. due to lateral mixing 
     146                     & * (  wslpi(ji,jj,jk) * wslpi(ji,jj,jk)   & 
     147                     &    + wslpj(ji,jj,jk) * wslpj(ji,jj,jk)  ) 
     148                  zwt(ji,jj,jk) = avt(ji,jj,jk) + zavi              ! zwt=avt+zavi (total vertical mixing coef. on temperature) 
    147149# if defined key_zdfddm 
    148                zavsi(ji,jj,jk) = fsavs(ji,jj,jk) + zavi          ! dd mixing: zavsi = total vertical mixing coef. on salinity 
     150                  zavsi(ji,jj,jk) = fsavs(ji,jj,jk) + zavi          ! dd mixing: zavsi = total vertical mixing coef. on salinity 
    149151# endif 
    150             END DO 
    151          END DO 
    152       END DO 
     152               END DO 
     153            END DO 
     154         END DO 
     155      ENDIF    
    153156 
    154157#else 
Note: See TracChangeset for help on using the changeset viewer.