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 7061 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90 – NEMO

Ignore:
Timestamp:
2016-10-21T13:32:54+02:00 (8 years ago)
Author:
davestorkey
Message:

Enable 3D tracer trends diagnostics ,ie. diagnostics obtained for ln_tra_trd=T, in UKMO/dev_r5518_GO6_package branch.
Remove error check for VVL and implement thickness weighting.
Also implement new diagnostics:
ttrd_totad : the total trend due to advection (correct alternative to ttrd_ad!)
ttrd_iso_x/y/z1 : individual components of trend due to isopycnal diffusion. Note the "z1" diagnostic is only part of the vertical trend. The other part is ttrd_zdf minus ttrd_zdfp.
ttrd_evd : the trend due to the EVD convection term (which is contained in ttrd_zdf and ttrd_zdfp).
ttrd_tot : the total model trend.
u/v/weiv_masstr3d : the components of the mass transport due to the Gent-McWilliams? scheme.
u/v/weiv_heattr3d : the components of the heat transport due to the Gent-McWilliams? scheme.
u/v/weiv_salttr3d : the components of the salt transport due to the Gent-McWilliams? scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r6486 r7061  
    2626   USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine) 
    2727   USE ldftra_oce      ! lateral diffusion coefficient on tracers 
     28   USE trd_oce 
     29   USE trdtra 
    2830   USE prtctl_trc      ! Print control 
    2931 
     
    7476      CHARACTER (len=22) ::   charout 
    7577      REAL(wp), POINTER, DIMENSION(:,:,:) :: zun, zvn, zwn  ! effective velocity 
     78      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd 
    7679      !!---------------------------------------------------------------------- 
    7780      ! 
     
    111114      IF( ln_mle    )   CALL tra_adv_mle( kt, nittrc000, zun, zvn, zwn, 'TRC' )    ! add the mle transport (if necessary) 
    112115      ! 
     116      IF( l_trdtrc )  THEN 
     117         CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 
     118         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
     119      ENDIF 
     120      ! 
    113121      SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==! 
    114122      CASE ( 1 )   ;    CALL tra_adv_cen2  ( kt, nittrc000, 'TRC',       zun, zvn, zwn, trb, trn, tra, jptra )   !  2nd order centered 
     
    140148         ! 
    141149      END SELECT 
     150      ! 
     151      IF( l_trdtrc )   THEN                      ! save the advective trends for further diagnostics 
     152        DO jn = 1, jptra 
     153           ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn) 
     154           CALL trd_tra( kt, 'TRC', jn, jptra_totad, ztrtrd(:,:,:,jn) ) 
     155        END DO 
     156        CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) 
     157      ENDIF 
    142158 
    143159      !                                              ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.