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 2128 for branches/devukmo2010/NEMO/OPA_SRC/TRA/tradmp.F90 – NEMO

Ignore:
Timestamp:
2010-09-28T14:29:51+02:00 (14 years ago)
Author:
rfurner
Message:

merged branches OBS, ASM, Rivers, BDY & mixed_dynldf ready for vn3.3 merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devukmo2010/NEMO/OPA_SRC/TRA/tradmp.F90

    r1601 r2128  
    4747   LOGICAL, PUBLIC            ::   lk_tradmp = .TRUE.     !: internal damping flag 
    4848#endif 
     49   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   strdmp   !: damping salinity trend (psu/s) 
     50   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   ttrdmp   !: damping temperature trend (Centigrade/s) 
    4951   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   resto    !: restoring coeff. on T and S (s-1) 
    5052    
     
    9193      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    9294      !! 
     95      REAL(wp) ::   zta, zsa       ! temporary scalars 
    9396      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    9497      !!---------------------------------------------------------------------- 
     
    107110            DO jj = 2, jpjm1 
    108111               DO ji = fs_2, fs_jpim1   ! vector opt. 
    109                   ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
    110                   sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     112                  zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
     113                  zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     114                  ! add the trends to the general tracer trends 
     115                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta 
     116                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa 
     117                  ! save the salinity trend (used in asmtrj) 
     118                  strdmp(ji,jj,jk) = zsa 
     119                  ttrdmp(ji,jj,jk) = zta 
    111120               END DO 
    112121            END DO 
     
    118127               DO ji = fs_2, fs_jpim1   ! vector opt. 
    119128                  IF( avt(ji,jj,jk) <= 5.e-4 ) THEN 
    120                      ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
    121                      sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     129                     zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
     130                     zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     131                  ELSE 
     132                     zta = 0.e0 
     133                     zsa = 0.e0    
    122134                  ENDIF 
     135                  ! add the trends to the general tracer trends 
     136                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta 
     137                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa 
     138                  ! save the salinity trend (used in asmtrj) 
     139                  strdmp(ji,jj,jk) = zsa 
     140                  ttrdmp(ji,jj,jk) = zta 
    123141               END DO 
    124142            END DO 
     
    130148               DO ji = fs_2, fs_jpim1   ! vector opt. 
    131149                  IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN 
    132                      ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
    133                      sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     150                     zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) ) 
     151                     zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) ) 
     152                  ELSE 
     153                     zta = 0.e0 
     154                     zsa = 0.e0    
    134155                  ENDIF 
     156                  ! add the trends to the general tracer trends 
     157                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta 
     158                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa 
     159                  ! save the salinity trend (used in asmtrj) 
     160                  strdmp(ji,jj,jk) = zsa 
     161                  ttrdmp(ji,jj,jk) = zta 
    135162               END DO 
    136163            END DO 
     
    199226         &   CALL ctl_stop( 'no temperature and/or salinity data define key_dtatem and key_dtasal' ) 
    200227 
     228      strdmp(:,:,:) = 0.e0       ! internal damping salinity trend (used in asmtrj) 
     229      ttrdmp(:,:,:) = 0.e0 
    201230      !                          ! Damping coefficients initialization 
    202231      IF( lzoom ) THEN   ;   CALL dtacof_zoom 
Note: See TracChangeset for help on using the changeset viewer.