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 8333 – NEMO

Changeset 8333


Ignore:
Timestamp:
2017-07-14T10:14:31+02:00 (7 years ago)
Author:
timgraham
Message:

GMED ticket #336 - fix for bug in Asselin filter trend when TOP is enabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r8104 r8333  
    334334      ENDIF 
    335335      ! 
    336       IF( l_trdtra )   THEN 
     336      IF( ( l_trdtra .and. cdtype == 'TRA' ) .OR. ( l_trdtrc .and. cdtype == 'TRC' ) )   THEN 
    337337         CALL wrk_alloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 
    338338         ztrd_atf(:,:,:,:) = 0.0_wp 
     
    395395                     pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
    396396                  ENDIF 
    397                   IF( l_trdtra ) THEN 
     397                  IF( ( l_trdtra .and. cdtype == 'TRA' ) .OR. ( l_trdtrc .and. cdtype == 'TRC' ) ) THEN 
    398398                     ztrd_atf(ji,jj,jk,jn) = (ztc_f - ztc_n) * zfact/ze3t_n 
    399399                  ENDIF 
     
    404404      END DO 
    405405      ! 
    406       IF( l_trdtra ) THEN 
    407          CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrd_atf(:,:,:,jp_tem) ) 
    408          CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrd_atf(:,:,:,jp_sal) ) 
     406      IF( l_trdtra .and. cdtype == 'TRA' ) THEN  
     407         CALL trd_tra( kt, cdtype, jp_tem, jptra_atf, ztrd_atf(:,:,:,jp_tem) ) 
     408         CALL trd_tra( kt, cdtype, jp_sal, jptra_atf, ztrd_atf(:,:,:,jp_sal) ) 
     409         CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 
     410      ENDIF 
     411      IF( l_trdtrc .and. cdtype == 'TRC' ) THEN 
     412         DO jn = 1, kjpt 
     413            CALL trd_tra( kt, cdtype, jn, jptra_atf, ztrd_atf(:,:,:,jn) ) 
     414         END DO 
    409415         CALL wrk_dealloc( jpi, jpj, jpk, kjpt, ztrd_atf ) 
    410416      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.