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

    r3 r216  
    1212   USE oce             ! ocean dynamics and active tracers  
    1313   USE dom_oce         ! ocean space and time domain 
    14    USE trdtra_oce     ! ocean active tracer trends 
    15    USE in_out_manager  ! I/O manager 
    16  
     14   USE trdmod          ! ocean active tracer trends 
     15   USE trdmod_oce      ! ocean variables trends 
    1716   USE eosbn2          ! equation of state (eos routine)  
    1817   USE lbclnk          ! lateral boundary conditions (or mpp link) 
     18   USE in_out_manager  ! I/O manager 
    1919 
    2020   IMPLICIT NONE 
     
    2222 
    2323   !! * Routine accessibility 
    24    PUBLIC tra_npc    ! routine called by step.F90 
     24   PUBLIC tra_npc      ! routine called by step.F90 
    2525 
    2626   !! * Module variable 
    27    INTEGER ::      & 
    28       nnpc1 =   1,      &  ! nnpc1   non penetrative convective scheme frequency 
    29       nnpc2 =  15          ! nnpc2   non penetrative convective scheme print frequency 
     27   INTEGER ::       & 
     28      nnpc1 =   1,  &  ! nnpc1   non penetrative convective scheme frequency 
     29      nnpc2 =  15      ! nnpc2   non penetrative convective scheme print frequency 
    3030 
    3131   !! * Substitutions 
     
    6868      !!                                  suppression of common work arrays 
    6969      !!   8.5  !  02-06  (G. Madec)  free form F90 
    70       !!---------------------------------------------------------------------- 
     70      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     71      !!---------------------------------------------------------------------- 
     72      !! * Modules used      
     73      USE oce, ONLY :    ztdta => ua,   & ! use ua as 3D workspace    
     74                         ztdsa => va      ! use va as 3D workspace    
     75 
    7176      !! * Arguments 
    7277      INTEGER, INTENT( in ) ::   kt       ! ocean time-step index 
     
    7580      INTEGER ::   ji, jj, jk             ! dummy loop indices 
    7681      INTEGER ::   & 
    77          inpcc ,      & ! number of statically instable water column 
    78          inpci ,      & ! number of iteration for npc scheme 
    79          jiter, jkdown, jkp,   & 
    80          ikbot, ik, ikup, ikdown 
    81       REAL(wp) ::   &           ! temporary arrays 
     82         inpcc ,                        & ! number of statically instable water column 
     83         inpci ,                        & ! number of iteration for npc scheme 
     84         jiter, jkdown, jkp,            & ! ??? 
     85         ikbot, ik, ikup, ikdown          ! ??? 
     86      REAL(wp) ::   &                     ! temporary arrays 
    8287         ze3tot, zta, zsa, zraua, ze3dwn 
    8388      REAL(wp), DIMENSION(jpi,jpk) ::   & 
     
    100105         CALL eos( tn, sn, rhd, zrhop ) 
    101106 
     107         ! Save tn and sn trends 
     108         IF( l_trdtra )   THEN 
     109            ztdta(:,:,:) = tn(:,:,:)  
     110            ztdsa(:,:,:) = sn(:,:,:)  
     111         ENDIF 
     112 
    102113         !                                                ! =============== 
    103114         DO jj = 1, jpj                                   !  Vertical slab 
     
    144155            inpcc = inpcc + NINT( zwz(1,1) ) 
    145156 
    146 #   if defined key_trdtra 
    147             ! save the tracer trends 
    148             DO jk = 1, jpk 
    149                DO ji = 1, jpi 
    150                   ttrd(ji,jj,jk,5) = tn(ji,jj,jk) 
    151                   strd(ji,jj,jk,5) = sn(ji,jj,jk) 
    152                END DO 
    153             END DO 
    154 #   endif 
    155157 
    156158            ! 2. Vertical mixing for each instable portion of the density profil 
     
    226228 
    227229            ENDIF 
    228  
    229 #   if defined key_trdtra 
    230             ! Non penetrative mixing trends 
    231             ! ----------------------------- 
    232             DO jk = 1, jpk 
    233                DO ji = 1, jpi 
    234                   ttrd(ji,jj,jk,5) = tn(ji,jj,jk) - ttrd(ji,jj,jk,5) 
    235                   strd(ji,jj,jk,5) = sn(ji,jj,jk) - strd(ji,jj,jk,5) 
    236                END DO 
    237             END DO 
    238 #   endif 
    239  
    240230            !                                             ! =============== 
    241231         END DO                                           !   End of slab 
    242232         !                                                ! =============== 
     233 
     234 
     235         ! save the trends for diagnostic 
     236         ! Non penetrative mixing trends 
     237         IF( l_trdtra )   THEN 
     238            ztdta(:,:,:) = tn(:,:,:) - ztdta(:,:,:) 
     239            ztdsa(:,:,:) = sn(:,:,:) - ztdsa(:,:,:) 
     240 
     241            CALL trd_mod(ztdta, ztdsa, jpttdnpc, 'TRA', kt) 
     242         ENDIF 
    243243       
    244244         ! Lateral boundary conditions on ( tn, sn )   ( Unchanged sign) 
Note: See TracChangeset for help on using the changeset viewer.