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 7923 for branches/UKMO/dev_r5518_GO6_package_XIOS_read/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2017-04-18T15:26:56+02:00 (7 years ago)
Author:
andmirek
Message:

merge changes up to 7573

File:
1 edited

Legend:

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

    r6487 r7923  
    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(:,:,jpk) = 0._wp 
     132         ztrds(:,:,jpk) = 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 ) 
    135135            CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdfp, ztrds ) 
    136136         ENDIF 
     137         ! total trend for the non-time-filtered variables.  
     138         DO jk = 1, jpkm1 
     139            zfact = 1.0 / rdttra(jk) 
     140            ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact  
     141            ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact  
     142         END DO 
     143         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 
     144         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) 
    137149      ENDIF 
    138150 
Note: See TracChangeset for help on using the changeset viewer.