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/trcnxt.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/trcnxt.F90

    r1152 r1175  
    44   !! Ocean passive tracers:  time stepping on passives tracers 
    55   !!====================================================================== 
     6   !!====================================================================== 
     7   !! History :  7.0  !  91-11  (G. Madec)  Original code 
     8   !!                 !  93-03  (M. Guyon)  symetrical conditions 
     9   !!                 !  95-02  (M. Levy)   passive tracers 
     10   !!                 !  96-02  (G. Madec & M. Imbard)  opa release 8.0 
     11   !!            8.0  !  96-04  (A. Weaver)  Euler forward step 
     12   !!            8.2  !  99-02  (G. Madec, N. Grima)  semi-implicit pressure grad. 
     13   !!            8.5  !  02-08  (G. Madec)  F90: Free form and module 
     14   !!                 !  02-11  (C. Talandier, A-M Treguier) Open boundaries 
     15   !!            9.0  !  04-03  (C. Ethe) passive tracers 
     16   !!                 !  07-02  (C. Deltel) Diagnose ML trends for passive tracers 
     17   !!---------------------------------------------------------------------- 
    618#if defined key_top 
    719   !!---------------------------------------------------------------------- 
     
    1628   USE trctrp_lec      ! pasive tracers transport 
    1729   USE prtctl_trc      ! Print control for debbuging 
     30   USE trdmld_trc 
     31   USE trdmld_trc_oce 
    1832   USE agrif_top_update 
    1933   USE agrif_top_interp 
     
    5569      !! 
    5670      !! ** Action  : - update trb, trn 
    57       !! 
    58       !! History : 
    59       !!   7.0  !  91-11  (G. Madec)  Original code 
    60       !!        !  93-03  (M. Guyon)  symetrical conditions 
    61       !!        !  95-02  (M. Levy)   passive tracers  
    62       !!        !  96-02  (G. Madec & M. Imbard)  opa release 8.0 
    63       !!   8.0  !  96-04  (A. Weaver)  Euler forward step 
    64       !!   8.2  !  99-02  (G. Madec, N. Grima)  semi-implicit pressure grad. 
    65       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    66       !!        !  02-11  (C. Talandier, A-M Treguier) Open boundaries 
    67       !!   9.0  !  04-03  (C. Ethe) passive tracers  
    6871      !!---------------------------------------------------------------------- 
    6972      !! * Arguments 
     73      USE oce_trc, ONLY : ztrtrd => ua      ! use ua as a 3D workspace 
    7074      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index 
    7175      !! * Local declarations 
     
    130134                     END DO 
    131135                  END DO 
     136                  IF( l_trdtrc )   ztrtrd(:,:,:) = 0.e0           !    no trend 
    132137               ELSE 
     138                  IF( l_trdtrc ) THEN                             !    Asselin trend 
     139                     DO jj = 1, jpj 
     140                        DO ji = 1, jpi 
     141                           ztrtrd(ji,jj,jk) = atfp * ( trb(ji,jj,jk,jn) - 2*trn(ji,jj,jk,jn) + tra(ji,jj,jk,jn) ) 
     142                        END DO 
     143                     END DO 
     144                  ENDIF 
     145 
    133146                  DO jj = 1, jpj 
    134147                     DO ji = 1, jpi 
     
    139152                  END DO 
    140153               ENDIF 
    141  
    142             ELSE 
    143 !  case of smolar scheme or muscl 
     154            ELSE                                                  ! >> EULER-FORWARD schemes (SMOLAR, MUSCL) 
     155               IF( l_trdtrc ) ztrtrd(:,:,:) = 0.e0                !    no trend 
     156 
    144157               DO jj = 1, jpj 
    145158                  DO ji = 1, jpi 
     
    154167         END DO                                           !   End of slab 
    155168         !                                                ! =============== 
    156       END DO 
     169 
     170         IF( l_trdtrc ) THEN                                      ! trends 
     171            DO jk = 1, jpk 
     172               zfact = 2. * rdttra(jk) * FLOAT(ndttrc) 
     173               ztrtrd(:,:,jk) = ztrtrd(:,:,jk) / zfact            ! n.b. ztrtrd=0 in Euler-forward case 
     174            END DO 
     175            IF (luttrd(jn)) CALL trd_mod_trc( ztrtrd, jn, jptrc_trd_atf, kt ) 
     176         ENDIF 
     177         !                                                        ! =========== 
     178      END DO                                                      ! tracer loop 
     179      !                                                           ! =========== 
    157180 
    158181      IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.