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 7556 – NEMO

Changeset 7556


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

Updates for tracer trends diagnostics in dev_merge_2016:

  1. Add in calls for total trend diagnostics in tra_nxt.
  2. Fix bug in calculation of trd_zdfp as detailed in ticket #1823.
Location:
branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r7412 r7556  
    119119 
    120120      ! trends computation initialisation 
    121       IF( l_trdtra )   THEN                    ! store now fields before applying the Asselin filter 
     121      IF( l_trdtra )   THEN                     
    122122         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 
    123          ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
    124          ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     123         ztrdt(:,:,jk) = 0._wp 
     124         ztrds(:,:,jk) = 0._wp 
    125125         IF( ln_traldf_iso ) THEN              ! diagnose the "pure" Kz diffusive trend  
    126126            CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) 
    127127            CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdfp, ztrds ) 
    128128         ENDIF 
     129         ! total trend for the non-time-filtered variables.  
     130         DO jk = 1, jpkm1 
     131            zfact = 1.0 / rdttra(jk) 
     132            ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact  
     133            ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact  
     134         END DO 
     135         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 
     136         CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds ) 
     137         ! Store now fields before applying the Asselin filter  
     138         ! in order to calculate Asselin filter trend later. 
     139         ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
     140         ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
    129141      ENDIF 
    130142 
  • branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r7403 r7556  
    128128            zwt(:,:,jpk) = 0._wp   ;   zws(:,:,jpk) = 0._wp 
    129129            DO jk = 2, jpk 
    130                zwt(:,:,jk) = avt_k(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / e3w_n(:,:,jk) * tmask(:,:,jk) 
     130               zwt(:,:,jk) = avt(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / e3w_n(:,:,jk) * tmask(:,:,jk) 
    131131               zws(:,:,jk) = fsavs(:,:,jk) * ( tsa(:,:,jk-1,jp_sal) - tsa(:,:,jk,jp_sal) ) / e3w_n(:,:,jk) * tmask(:,:,jk) 
    132132            END DO 
Note: See TracChangeset for help on using the changeset viewer.