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 216 for trunk/NEMO/OPA_SRC/TRA/traldf_bilapg.F90 – NEMO

Ignore:
Timestamp:
2005-03-17T15:02:38+01:00 (19 years ago)
Author:
opalod
Message:

CT : UPDATE151 : New trends organization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/traldf_bilapg.F90

    r132 r216  
    1616   USE dom_oce         ! ocean space and time domain variables 
    1717   USE ldftra_oce      ! ocean active tracers: lateral physics 
    18    USE trdtra_oce      ! ocean active tracers: trend variables 
     18   USE trdmod          ! ocean active tracers trends  
     19   USE trdmod_oce      ! ocean variables trends 
    1920   USE in_out_manager  ! I/O manager 
    2021   USE ldfslp          ! iso-neutral slopes available 
     
    6162      !! ** Action : - Update (ta,sa) arrays with the before geopotential  
    6263      !!               biharmonic mixing trend. 
    63       !!             - Save the trends  in (ttrd,strd) ('key_diatrends') 
     64      !!             - Save the trends  in (ztdta,ztdsa) ('key_trdtra') 
    6465      !! 
    6566      !! History : 
    6667      !!   8.0  !  97-07  (G. Madec)  Original code 
    6768      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
     69      !!   9.0  !  04-08  (C. Talandier) New trends organization 
    6870      !!---------------------------------------------------------------------- 
    6971      !! * Modules used 
     
    7678      !! * Local declarations 
    7779      INTEGER ::   ji, jj, jk                 ! dummy loop indices 
     80      REAL(wp) ::   zta, zsa                  ! temporary scalars  
    7881      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   & 
    7982         wk3, wk4                ! work array used for rotated biharmonic 
     
    116119               ta(ji,jj,jk) = ta(ji,jj,jk) + wk3(ji,jj,jk) 
    117120               sa(ji,jj,jk) = sa(ji,jj,jk) + wk4(ji,jj,jk) 
    118 #if defined key_trdtra || defined key_trdmld 
    119                ! save the horizontal diffusive trends 
    120                ttrd(ji,jj,jk,3) = wk3(ji,jj,jk) 
    121                strd(ji,jj,jk,3) = wk4(ji,jj,jk) 
    122 #endif 
    123121            END DO 
    124122         END DO 
     
    126124      END DO                                           !   End of slab 
    127125      !                                                ! =============== 
     126 
     127      ! save the trends for diagnostic 
     128      ! save the horizontal diffusive trends 
     129      IF( l_trdtra )   THEN 
     130 
     131         CALL trd_mod(wk3, wk4, jpttdldf, 'TRA', kt) 
     132      ENDIF 
     133 
     134      IF(l_ctl) THEN         ! print mean trends (used for debugging) 
     135         zta = SUM( ta(2:nictl,2:njctl,1:jpkm1) * tmask(2:nictl,2:njctl,1:jpkm1) ) 
     136         zsa = SUM( sa(2:nictl,2:njctl,1:jpkm1) * tmask(2:nictl,2:njctl,1:jpkm1) ) 
     137         WRITE(numout,*) ' ldf  - Ta: ', zta-t_ctl, ' Sa: ', zsa-s_ctl 
     138         t_ctl = zta   ;   s_ctl = zsa 
     139      ENDIF 
     140 
    128141   END SUBROUTINE tra_ldf_bilapg 
    129142 
Note: See TracChangeset for help on using the changeset viewer.