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 7806 for branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2017-03-17T08:46:30+01:00 (7 years ago)
Author:
cbricaud
Message:

phaze dev_r5003_MERCATOR6_CRS branch with rev7805 of 3.6_stable branch

File:
1 edited

Legend:

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

    r7256 r7806  
    129129 
    130130      ! trends computation initialisation 
    131       IF( l_trdtra )   THEN                    ! store now fields before applying the Asselin filter 
     131      IF( l_trdtra )   THEN                     
    132132         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 
    133          ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
    134          ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     133         ztrdt(:,:,jk) = 0._wp 
     134         ztrds(:,:,jk) = 0._wp 
    135135         IF( ln_traldf_iso ) THEN              ! diagnose the "pure" Kz diffusive trend  
    136136            CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) 
    137137            CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdfp, ztrds ) 
    138138         ENDIF 
     139         ! total trend for the non-time-filtered variables.  
     140         DO jk = 1, jpkm1 
     141            zfact = 1.0 / rdttra(jk) 
     142            ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact  
     143            ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact  
     144         END DO 
     145         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 
     146         CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds ) 
     147         ! Store now fields before applying the Asselin filter  
     148         ! in order to calculate Asselin filter trend later. 
     149         ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
     150         ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
    139151      ENDIF 
    140152 
Note: See TracChangeset for help on using the changeset viewer.