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 7250 for branches/2016/dev_r7233_CMIP6_diags_trunk_version/NEMOGCM/NEMO/OPA_SRC/TRA – NEMO

Ignore:
Timestamp:
2016-11-17T12:52:25+01:00 (8 years ago)
Author:
timgraham
Message:

Added code for extra trend diagnostics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r7233_CMIP6_diags_trunk_version/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90

    r6140 r7250  
    2626   USE ldftra         ! lateral diffusion: eddy diffusivity & EIV coeff. 
    2727   USE ldfslp         ! Lateral diffusion: slopes of neutral surfaces 
     28   USE trd_oce         ! trends: ocean variables 
     29   USE trdtra          ! trends manager: tracers  
    2830   ! 
    2931   USE in_out_manager ! I/O manager 
     
    128130!!gm ??? 
    129131      ! 
     132      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
     133         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 
     134         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
     135         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     136      ENDIF 
     137      ! 
    130138      SELECT CASE ( nadv )                      !==  compute advection trend and add it to general trend  ==! 
    131139      ! 
     
    145153      END SELECT 
    146154      ! 
    147       !                                         ! print mean trends (used for debugging) 
     155      IF( l_trdtra )   THEN                      ! save the advective trends for further diagnostics 
     156         DO jk = 1, jpkm1 
     157            ztrdt(:,:,jk) = tsa(:,:,jk,jp_tem) - ztrdt(:,:,jk) 
     158            ztrds(:,:,jk) = tsa(:,:,jk,jp_sal) - ztrds(:,:,jk) 
     159         END DO 
     160         CALL trd_tra( kt, 'TRA', jp_tem, jptra_totad, ztrdt ) 
     161         CALL trd_tra( kt, 'TRA', jp_sal, jptra_totad, ztrds ) 
     162         CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 
     163      ENDIF 
     164      !                                              ! print mean trends (used for debugging) 
    148165      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv  - Ta: ', mask1=tmask,               & 
    149166         &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
Note: See TracChangeset for help on using the changeset viewer.