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 13077 for NEMO/branches/2020/r4.0-HEAD_ticket2425/src/OCE/TRD/trdtra.F90 – NEMO

Ignore:
Timestamp:
2020-06-09T17:00:38+02:00 (4 years ago)
Author:
davestorkey
Message:

branches/2020/r4.0-HEAD_ticket2425: update to r13076 of r4.0-HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_ticket2425/src/OCE/TRD/trdtra.F90

    r10425 r13077  
    8181      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   ptra    ! now tracer variable 
    8282      ! 
    83       INTEGER ::   jk   ! loop indices 
     83      INTEGER ::   jk    ! loop indices 
     84      INTEGER ::   i01   ! 0 or 1 
    8485      REAL(wp),        DIMENSION(jpi,jpj,jpk) ::   ztrds             ! 3D workspace 
    8586      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zwt, zws, ztrdt   ! 3D workspace 
     
    8990         IF( trd_tra_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trd_tra : unable to allocate arrays' ) 
    9091      ENDIF 
    91  
     92      ! 
     93      i01 = COUNT( (/ PRESENT(pun) .OR. ( ktrd /= jptra_xad .AND. ktrd /= jptra_yad .AND. ktrd /= jptra_zad ) /) ) 
     94      ! 
    9295      IF( ctype == 'TRA' .AND. ktra == jp_tem ) THEN   !==  Temperature trend  ==! 
    9396         ! 
    94          SELECT CASE( ktrd ) 
     97         SELECT CASE( ktrd*i01 ) 
    9598         !                            ! advection: transform the advective flux into a trend 
    9699         CASE( jptra_xad )   ;   CALL trd_tra_adv( ptrd, pun, ptra, 'X', trdtx )  
     
    111114      IF( ctype == 'TRA' .AND. ktra == jp_sal ) THEN      !==  Salinity trends  ==! 
    112115         ! 
    113          SELECT CASE( ktrd ) 
     116         SELECT CASE( ktrd*i01 ) 
    114117         !                            ! advection: transform the advective flux into a trend 
    115118         !                            !            and send T & S trends to trd_tra_mng 
     
    162165      IF( ctype == 'TRC' ) THEN                           !==  passive tracer trend  ==! 
    163166         ! 
    164          SELECT CASE( ktrd ) 
     167         SELECT CASE( ktrd*i01 ) 
    165168         !                            ! advection: transform the advective flux into a masked trend 
    166169         CASE( jptra_xad )   ;   CALL trd_tra_adv( ptrd , pun , ptra, 'X', ztrds )  
Note: See TracChangeset for help on using the changeset viewer.