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 8698 for trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90 – NEMO

Ignore:
Timestamp:
2017-11-13T15:24:50+01:00 (6 years ago)
Author:
davestorkey
Message:

Bug fixes for tracer trends diagnostics in trunk. See ticket #1877.
These fixes correspond to the changes to the 3.6 branch at revisions 8102 and 8305.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r7753 r8698  
    8989      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
    9090         DO jk = 1, jpkm1 
    91             ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk) 
    92             ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk) 
     91            ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_tem)*e3t_b(:,:,jk) ) & 
     92                 & / (e3t_n(:,:,jk)*r2dt) ) - ztrdt(:,:,jk) 
     93            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_sal)*e3t_b(:,:,jk) ) & 
     94                 & / (e3t_n(:,:,jk)*r2dt) ) - ztrds(:,:,jk) 
    9395         END DO 
    9496!!gm this should be moved in trdtra.F90 and done on all trends 
Note: See TracChangeset for help on using the changeset viewer.