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 7555 for branches/2015/nemo_v3_6_STABLE/NEMOGCM – NEMO

Ignore:
Timestamp:
2017-01-13T14:31:43+01:00 (7 years ago)
Author:
davestorkey
Message:

Fix two bugs in tracer trends diagnostics. Ticket #1823.

Location:
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC
Files:
2 edited

Legend:

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

    r7550 r7555  
    127127 
    128128      ! trends computation initialisation 
    129       IF( l_trdtra )   THEN                    ! store now fields before applying the Asselin filter 
     129      IF( l_trdtra )   THEN                     
    130130         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 
    131          ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
    132          ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     131         ztrdt(:,:,jk) = 0._wp 
     132         ztrds(:,:,jk) = 0._wp 
    133133         IF( ln_traldf_iso ) THEN              ! diagnose the "pure" Kz diffusive trend  
    134134            CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) 
     
    136136         ENDIF 
    137137         ! total trend for the non-time-filtered variables.  
    138          ztrdt(:,:,:) = 0._wp 
    139          ztrds(:,:,:) = 0._wp 
    140138         DO jk = 1, jpkm1 
    141139            zfact = 1.0 / rdttra(jk) 
     
    145143         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 
    146144         CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds ) 
     145         ! Store now fields before applying the Asselin filter  
     146         ! in order to calculate Asselin filter trend later. 
     147         ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
     148         ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
    147149      ENDIF 
    148150 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r7494 r7555  
    130130            zwt(:,:,jpk) = 0._wp   ;   zws(:,:,jpk) = 0._wp 
    131131            DO jk = 2, jpk 
    132                zwt(:,:,jk) = avt_k(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / fse3w(:,:,jk) * tmask(:,:,jk) 
     132               zwt(:,:,jk) = avt(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / fse3w(:,:,jk) * tmask(:,:,jk) 
    133133               zws(:,:,jk) = fsavs(:,:,jk) * ( tsa(:,:,jk-1,jp_sal) - tsa(:,:,jk,jp_sal) ) / fse3w(:,:,jk) * tmask(:,:,jk) 
    134134            END DO 
Note: See TracChangeset for help on using the changeset viewer.