Changeset 8305


Ignore:
Timestamp:
2017-07-10T11:33:34+02:00 (2 months ago)
Author:
Dave Storkey
Message:

3.6_stable: fix for bug in Asselin filter trend diagnostic. See comment on ticket #1877.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r8102 r8305  
    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.