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

    r163 r216  
    1717   USE oce             ! ocean dynamics and tracers variables 
    1818   USE dom_oce         ! ocean space and time domain variables 
    19    USE trdtra_oce      ! ocean active tracer trend variables 
     19   USE trdmod          ! ocean active tracers trends  
     20   USE trdmod_oce      ! ocean variables trends 
    2021   USE zdf_oce         ! ocean vertical physics 
    2122   USE in_out_manager  ! I/O manager 
     
    2425   USE dtasal          ! salinity data 
    2526   USE zdfmxl          ! mixed layer depth 
    26    USE lib_mpp         ! ??? 
     27   USE lib_mpp         ! distribued memory computing 
    2728 
    2829   IMPLICIT NONE 
     
    8586      !!        !  97-05  (G. Madec)  macro-tasked on jk-slab 
    8687      !!   8.5  !  02-08  (G. Madec)  free form + modules 
    87       !!---------------------------------------------------------------------- 
     88      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     89      !!---------------------------------------------------------------------- 
     90      !! * Modules used      
     91      USE oce, ONLY :    ztdta => ua,   & ! use ua as 3D workspace    
     92                         ztdsa => va      ! use va as 3D workspace    
     93 
    8894      !! * Arguments 
    89       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
     95      INTEGER, INTENT( in ) ::   kt       ! ocean time-step index 
    9096 
    9197      !! * Local declarations 
    92       INTEGER  ::   ji, jj, jk         ! dummy loop indices 
    93       REAL(wp) ::   ztest, zta, zsa    ! temporary scalars 
     98      INTEGER  ::   ji, jj, jk            ! dummy loop indices 
     99      REAL(wp) ::   ztest, zta, zsa       ! temporary scalars 
    94100      !!---------------------------------------------------------------------- 
    95101 
     
    97103      !    -------------- 
    98104      IF( kt == nit000 ) CALL tra_dmp_init 
     105 
     106      ! Save ta and sa trends 
     107      IF( l_trdtra )   THEN 
     108         ztdta(:,:,:) = ta(:,:,:)  
     109         ztdsa(:,:,:) = sa(:,:,:)  
     110      ENDIF 
    99111 
    100112      ! 1. Newtonian damping trends on tracer fields 
     
    115127                  ! save the salinity trend (used in flx to close the salt budget) 
    116128                  strdmp(ji,jj,jk) = zsa 
    117 #    if defined key_trdtra 
    118                   ! save the trends for diagnostics 
    119                   ttrd(ji,jj,jk,6) = zta 
    120                   strd(ji,jj,jk,6) = zsa 
    121 #    endif 
    122129               END DO 
    123130            END DO 
     
    141148                  ! save the salinity trend (used in flx to close the salt budget) 
    142149                  strdmp(ji,jj,jk) = zsa 
    143 #    if defined key_trdtra 
    144                   ! save the trends for diagnostics 
    145                   ttrd(ji,jj,jk,6) = zta 
    146                   strd(ji,jj,jk,6) = zsa 
    147 #    endif 
    148150               END DO 
    149151            END DO 
     
    166168                  ! save the salinity trend (used in flx to close the salt budget) 
    167169                  strdmp(ji,jj,jk) = zsa 
    168 #    if defined key_trdtra 
    169                   ! save the trends for diagnostics 
    170                   ttrd(ji,jj,jk,6) = zta 
    171                   strd(ji,jj,jk,6) = zsa 
    172 #    endif 
    173170               END DO 
    174171            END DO 
     
    176173 
    177174      END SELECT 
     175 
     176      ! save the trends for diagnostic 
     177      ! damping salinity trends 
     178      IF( l_trdtra )   THEN 
     179         ztdta(:,:,:) = ta(:,:,:) - ztdta(:,:,:) 
     180         ztdsa(:,:,:) = sa(:,:,:) - ztdsa(:,:,:) 
     181         CALL trd_mod(ztdta, ztdsa, jpttddoe, 'TRA', kt) 
     182      ENDIF 
    178183 
    179184      IF(l_ctl) THEN         ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.