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 8471 for branches/2017/nemo_v3_6_STABLE_trdtrc/NEMOGCM/NEMO/OPA_SRC – NEMO

Ignore:
Timestamp:
2017-08-29T18:12:42+02:00 (7 years ago)
Author:
jpalmier
Message:

JPALM -- #1933 -- add and correct passive tracer trends - needs improvements and testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/nemo_v3_6_STABLE_trdtrc/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r8102 r8471  
    2020   USE trd_oce        ! trends: ocean variables 
    2121   USE trdtrc         ! ocean passive mixed layer tracers trends  
     22   USE trc,           ONLY: tra    ! tracer definitions (trn, trb, tra, etc.)  
    2223   USE trdglo         ! trends: global domain averaged 
    2324   USE trdpen         ! trends: Potential ENergy 
     
    170171         CASE( jptra_yad )   ;   CALL trd_tra_adv( ptrd , pun , ptra, 'Y', ztrds )  
    171172         CASE( jptra_zad )   ;   CALL trd_tra_adv( ptrd , pun , ptra, 'Z', ztrds )  
     173         CASE( jptra_zdfp )           ! diagnose the "PURE" Kz trend (here: just before the swap) 
     174            !                         ! iso-neutral diffusion case otherwise 
     175            !                         jptra_zdf is "PURE" 
     176            CALL wrk_alloc( jpi, jpj, jpk, zws ) 
     177            ! 
     178            zws(:,:, 1 ) = 0._wp                        ! vertical diffusive fluxes 
     179            zws(:,:,jpk) = 0._wp   
     180            DO jk = 2, jpk 
     181               zws(:,:,jk) = avt(:,:,jk) * (tra(:,:,jk-1,ktra) - tra(:,:,jk,ktra) ) / fse3w(:,:,jk) * tmask(:,:,jk) 
     182            END DO 
     183            ! 
     184            ztrds(:,:,jpk) = 0._wp    
     185            DO jk = 1, jpkm1 
     186               ztrds(:,:,jk) = ( zws(:,:,jk) - zws(:,:,jk+1) ) / fse3t(:,:,jk) 
     187            END DO 
     188            CALL wrk_dealloc( jpi, jpj, jpk, zws ) 
     189            ! 
    172190         CASE DEFAULT                 ! other trends: just masked  
    173191                                 ztrds(:,:,:) = ptrd(:,:,:) * tmask(:,:,:) 
Note: See TracChangeset for help on using the changeset viewer.