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 1175 for trunk/NEMO/TOP_SRC/TRP/trcldf_bilap.F90 – NEMO

Ignore:
Timestamp:
2008-09-11T18:26:34+02:00 (16 years ago)
Author:
cetlod
Message:

update transport modules to take into account new trends organization, see ticket:248

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/TRP/trcldf_bilap.F90

    r1152 r1175  
    11MODULE trcldf_bilap 
    2    !!============================================================================== 
     2   !!====================================================================== 
    33   !!                   ***  MODULE  trcldf_bilap  *** 
    4    !! TOP :  horizontal component of the lateral tracer mixing trend 
    5    !!============================================================================== 
     4   !! Ocean passive tracers:  horiz. component of the lateral tracer mixing trend 
     5   !!====================================================================== 
     6   !! History :       !  91-11  (G. Madec)  Original code 
     7   !!                 !  93-03  (M. Guyon)  symetrical conditions 
     8   !!                 !  95-11  (G. Madec)  suppress volumetric scale factors 
     9   !!                 !  96-01  (G. Madec)  statement function for e3 
     10   !!                 !  96-01  (M. Imbard)  mpp exchange 
     11   !!                 !  97-07  (G. Madec)  optimization, and ahtt 
     12   !!                 !  00-05  (MA Foujols) add lbc for tracer trends 
     13   !!                 !  00-10  (MA Foujols E. Kestenare) use passive tracer coefficient 
     14   !!            8.5  !  02-08  (G. Madec)  F90: Free form and module 
     15   !!            9.0  !  04-03  (C. Ethe )  F90: Free form and module 
     16   !!                 !  07-02  (C. Deltel)  Diagnose ML trends for passive tracers 
     17   !!---------------------------------------------------------------------- 
    618#if defined key_top 
    7    !!---------------------------------------------------------------------- 
    8    !!   'key_top'                                                TOP models 
    919   !!---------------------------------------------------------------------- 
    1020   !!   trc_ldf_bilap : update the tracer trend with the horizontal diffusion 
    1121   !!                   using a iso-level biharmonic operator 
    1222   !!---------------------------------------------------------------------- 
    13    !! * Modules used 
    1423   USE oce_trc         ! ocean dynamics and active tracers variables 
    15    USE trp_trc             ! ocean passive tracers variables 
     24   USE trp_trc         ! ocean passive tracers variables 
    1625   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    1726   USE prtctl_trc      ! Print control for debbuging 
     27   USE trdmld_trc 
     28   USE trdmld_trc_oce      
    1829 
    1930   IMPLICIT NONE 
    2031   PRIVATE 
    2132 
    22    !! * Routine accessibility 
    2333   PUBLIC trc_ldf_bilap   ! routine called by step.F90 
    2434 
     
    2737   !!---------------------------------------------------------------------- 
    2838   !!   TOP 1.0 , LOCEAN-IPSL (2005)  
    29    !! $Id$  
     39   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcldf_bilap.F90,v 1.10 2006/09/12 11:10:14 opalod Exp $  
    3040   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    3141   !!---------------------------------------------------------------------- 
     
    7080      !! ** Action : - Update tra arrays with the before iso-level 
    7181      !!               biharmonic mixing trend. 
    72       !!             - Save the trends in trtrd ('key_trc_diatrd') 
    73       !! 
    74       !! History : 
    75       !!        !  91-11  (G. Madec)  Original code 
    76       !!        !  93-03  (M. Guyon)  symetrical conditions 
    77       !!        !  95-11  (G. Madec)  suppress volumetric scale factors 
    78       !!        !  96-01  (G. Madec)  statement function for e3 
    79       !!        !  96-01  (M. Imbard)  mpp exchange 
    80       !!        !  97-07  (G. Madec)  optimization, and ahtt 
    81       !!        !  00-05  (MA Foujols) add lbc for tracer trends 
    82       !!        !  00-10  (MA Foujols E. Kestenare) use passive tracer coefficient 
    83       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    84       !!   9.0  !  04-03  (C. Ethe )  F90: Free form and module 
     82      !!             - Save the trends ('key_trdmld_trc') 
    8583      !!---------------------------------------------------------------------- 
    86       !! * Arguments 
    87       INTEGER, INTENT( in ) ::   kt       ! ocean time-step index 
    88  
    89       !! * Local declarations 
    90       INTEGER ::   ji, jj, jk, jn             ! dummy loop indices 
    91       INTEGER ::   iku, ikv                   ! temporary integers 
    92  
    93       REAL(wp) ::   ztra     ! temporary scalars 
    94  
    95       REAL(wp), DIMENSION(jpi,jpj) ::   &  
    96          zeeu, zeev, zbtr, zlt                 ! workspace 
    97       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &  
    98          ztu, ztv                              ! workspace 
     84      USE oce_trc,   ztrtrd => ua        ! use ua as workspace 
     85      !! 
     86      INTEGER, INTENT( in ) ::   kt                             ! ocean time-step index 
     87      INTEGER ::   ji, jj, jk, jn                               ! dummy loop indices 
     88      INTEGER ::   iku, ikv                                     ! temporary integers 
     89      REAL(wp) ::   ztra                                        ! temporary scalars 
     90      REAL(wp), DIMENSION(jpi,jpj) ::   zeeu, zeev, zbtr, zlt   ! workspace 
     91      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ztu, ztv            ! workspace 
    9992      CHARACTER (len=22) :: charout 
    10093      !!---------------------------------------------------------------------- 
     
    10598         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~' 
    10699      ENDIF 
    107       !  
    108  
    109       DO jn = 1, jptra 
     100      !                                                          ! =========== 
     101      DO jn = 1, jptra                                           ! tracer loop 
     102         !                                                       ! =========== 
     103         IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn)   ! save trends 
     104 
    110105                                                          ! =============== 
    111106         DO jk = 1, jpkm1                                 ! Horizontal slab 
     
    199194                  IF (luttrd(jn)) trtrd(ji,jj,jk,ikeep(jn),5) = (  ztv(ji,jj,jk) - ztv(ji-1,jj,jk) ) * zbtr(ji,jj) 
    200195#endif 
     196 
    201197               END DO 
    202198            END DO 
     
    206202#if defined key_trc_diatrd 
    207203         ! Lateral boundary conditions on the laplacian zlt   (unchanged sgn) 
    208          IF (luttrd(jn)) CALL lbc_lnk( trtrd(:,:,:,ikeep(jn),5), 'T', 1. )   
    209 #endif 
    210       END DO 
    211  
    212      IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     204         IF (luttrd(jn)) CALL lbc_lnk( trtrd(:,:,:,ikeep(jn),5), 'T', 1. ) 
     205#endif 
     206 
     207         IF( l_trdtrc ) THEN 
     208            ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 
     209            IF (luttrd(jn)) CALL trd_mod_trc( ztrtrd, jn, jptrc_trd_ldf, kt )    ! trends diags 
     210         END IF 
     211         !                                                       ! =========== 
     212      END DO                                                     ! tracer loop                 
     213      !                                                          ! =========== 
     214 
     215      IF( ln_ctl ) THEN    ! print mean trends (used for debugging) 
    213216         WRITE(charout, FMT="('ldf - bilap')") 
    214          CALL prt_ctl_trc_info(charout) 
    215          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
     217         CALL prt_ctl_trc_info( charout ) 
     218         CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd' ) 
    216219      ENDIF 
    217220 
Note: See TracChangeset for help on using the changeset viewer.