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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90

    • Property svn:eol-style deleted
    r1708 r2528  
    44   !! Ocean diagnostics:  ocean tracers and dynamic trends 
    55   !!===================================================================== 
    6    !! History :       !  91-12 (G. Madec) 
    7    !!                 !  92-06 (M. Imbard) add time step frequency 
    8    !!                 !  96-01 (G. Madec)  terrain following coordinates 
    9    !!            8.5  !  02-06 (G. Madec)  F90: Free form and module 
    10    !!            9.0  !  04-08 (C. Talandier) New trends organization 
     6   !! History :  1.0  !  2004-08 (C. Talandier) New trends organization 
    117   !!---------------------------------------------------------------------- 
    128#if  defined key_trdtra   ||   defined key_trddyn   ||   defined key_esopa 
     
    1410   !!   'key_trdtra'  or                  active tracers trends diagnostics 
    1511   !!   'key_trddyn'                            momentum trends diagnostics 
    16    !!---------------------------------------------------------------------- 
    1712   !!---------------------------------------------------------------------- 
    1813   !!   trd_icp          : compute the basin averaged properties for tra/dyn  
     
    4843#  include "vectopt_loop_substitute.h90" 
    4944   !!---------------------------------------------------------------------- 
    50    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    51    !! $Id$  
    52    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     45   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     46   !! $Id$ 
     47   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    5348   !!---------------------------------------------------------------------- 
    5449 
    5550CONTAINS 
    5651 
    57    SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype, clpas ) 
     52   SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype ) 
    5853      !!--------------------------------------------------------------------- 
    5954      !!                  ***  ROUTINE trd_2d  *** 
     
    6661      INTEGER                     , INTENT(in   ) ::   ktrd                ! tracer trend index 
    6762      CHARACTER(len=3)            , INTENT(in   ) ::   ctype               ! momentum ('DYN') or tracers ('TRA') trends 
    68       CHARACTER(len=3)            , INTENT(in   ), OPTIONAL ::   clpas     ! number of passage 
    6963      !! 
    7064      INTEGER  ::   ji, jj                                                 ! loop indices 
    71       CHARACTER(len=3) ::   cpas                                           ! number of passage 
    7265      REAL(wp) ::   zmsku, zbtu, zbt                                       ! temporary scalars 
    7366      REAL(wp) ::   zmskv, zbtv                                            !    "         " 
    7467      !!---------------------------------------------------------------------- 
    7568 
    76       ! Control of optional arguments 
    77       cpas = 'fst' 
    78       IF( PRESENT(clpas) )  cpas = clpas 
    7969 
    8070      ! 1. Mask trends 
     
    123113         ! 
    124114      CASE( 'TRA' )              ! Tracers 
    125          IF( cpas == 'fst' )   THEN 
    126             tmo(ktrd) = 0.e0 
    127             smo(ktrd) = 0.e0 
    128          ENDIF 
     115         tmo(ktrd) = 0.e0 
     116         smo(ktrd) = 0.e0 
    129117         DO jj = 1, jpj 
    130118            DO ji = 1, jpi 
     
    156144         ! 
    157145      CASE( 'TRA' )              ! Tracers 
    158          IF( cpas == 'fst' )   THEN 
    159             t2(ktrd) = 0.e0 
    160             s2(ktrd) = 0.e0 
    161          ENDIF 
     146         t2(ktrd) = 0.e0 
     147         s2(ktrd) = 0.e0 
    162148         DO jj = 1, jpj 
    163149            DO ji = 1, jpi 
     
    173159 
    174160 
    175    SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd, ctype, clpas ) 
     161   SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd, ctype ) 
    176162      !!--------------------------------------------------------------------- 
    177163      !!                  ***  ROUTINE trd_3d  *** 
     
    184170      INTEGER,                          INTENT(in   ) ::   ktrd               ! momentum or tracer trend index 
    185171      CHARACTER(len=3),                 INTENT(in   ) ::   ctype              ! momentum ('DYN') or tracers ('TRA') trends 
    186       CHARACTER(len=3),                 INTENT(in   ), OPTIONAL ::   clpas    ! number of passage 
    187172      !! 
    188173      INTEGER ::   ji, jj, jk 
    189       CHARACTER(len=3) ::   cpas                                              ! number of passage 
    190174      REAL(wp) ::   zbt, zbtu, zbtv, zmsku, zmskv                             ! temporary scalars 
    191175      !!---------------------------------------------------------------------- 
    192  
    193       ! Control of optional arguments 
    194       cpas = 'fst' 
    195       IF( PRESENT(clpas) )  cpas = clpas 
    196176 
    197177      ! 1. Mask the trends 
     
    242222         ! 
    243223      CASE( 'TRA' )              ! Tracers 
    244          IF( cpas == 'fst' )   THEN 
    245             tmo(ktrd) = 0.e0 
    246             smo(ktrd) = 0.e0 
    247          ENDIF 
     224         tmo(ktrd) = 0.e0 
     225         smo(ktrd) = 0.e0 
    248226         DO jk = 1, jpkm1 
    249227            DO jj = 1, jpj 
     
    279257         ! 
    280258      CASE( 'TRA' )              ! Tracers 
    281          IF( cpas == 'fst' )   THEN 
    282             t2(ktrd) = 0.e0 
    283             s2(ktrd) = 0.e0 
    284          ENDIF 
     259         t2(ktrd) = 0.e0 
     260         s2(ktrd) = 0.e0 
    285261         DO jk = 1, jpk 
    286262            DO jj = 1, jpj 
     
    389365         zkepe(:,:,:) = 0.e0 
    390366    
    391          CALL eos( tn, sn, rhd, rhop )       ! now potential and in situ densities 
     367         CALL eos( tsn, rhd, rhop )       ! now potential and in situ densities 
    392368 
    393369         ! Density flux at w-point 
     
    600576            WRITE (numout,*) 
    601577            WRITE (numout,9400) kt 
    602             WRITE (numout,9401) (tmo(jpicpt_xad)+tmo(jpicpt_yad))/ tvolt, (smo(jpicpt_xad)+smo(jpicpt_yad))/ tvolt 
     578            WRITE (numout,9401)  tmo(jpicpt_xad) / tvolt, smo(jpicpt_xad) / tvolt 
     579            WRITE (numout,9411)  tmo(jpicpt_yad) / tvolt, smo(jpicpt_yad) / tvolt 
    603580            WRITE (numout,9402)  tmo(jpicpt_zad) / tvolt, smo(jpicpt_zad) / tvolt 
    604581            WRITE (numout,9403)  tmo(jpicpt_ldf) / tvolt, smo(jpicpt_ldf) / tvolt 
     
    6175949400     FORMAT(' tracer trend at it= ',i6,' :     temperature',   & 
    618595              '              salinity',/' ============================') 
    619 9401     FORMAT(' horizontal advection        ',e20.13,'     ',e20.13) 
     5969401     FORMAT(' zonal      advection        ',e20.13,'     ',e20.13) 
     5979411     FORMAT(' meridional advection        ',e20.13,'     ',e20.13) 
    6205989402     FORMAT(' vertical advection          ',e20.13,'     ',e20.13) 
    6215999403     FORMAT(' horizontal diffusion        ',e20.13,'     ',e20.13) 
     
    633611            WRITE (numout,*) 
    634612            WRITE (numout,9420) kt 
    635             WRITE (numout,9421) ( t2(jpicpt_xad)+t2(jpicpt_yad) )/ tvolt, ( s2(jpicpt_xad)+s2(jpicpt_yad) )/ tvolt 
     613            WRITE (numout,9421)   t2(jpicpt_xad) / tvolt, s2(jpicpt_xad) / tvolt 
     614            WRITE (numout,9431)   t2(jpicpt_yad) / tvolt, s2(jpicpt_yad) / tvolt 
    636615            WRITE (numout,9422)   t2(jpicpt_zad) / tvolt, s2(jpicpt_zad) / tvolt 
    637616            WRITE (numout,9423)   t2(jpicpt_ldf) / tvolt, s2(jpicpt_ldf) / tvolt 
     
    6506299420     FORMAT(' tracer**2 trend at it= ', i6, ' :      temperature',   & 
    651630            '               salinity', /, ' ===============================') 
    652 9421     FORMAT(' horizontal advection      * t   ', e20.13, '     ', e20.13) 
     6319421     FORMAT(' zonal      advection      * t   ', e20.13, '     ', e20.13) 
     6329431     FORMAT(' meridional advection      * t   ', e20.13, '     ', e20.13) 
    6536339422     FORMAT(' vertical advection        * t   ', e20.13, '     ', e20.13) 
    6546349423     FORMAT(' horizontal diffusion      * t   ', e20.13, '     ', e20.13) 
     
    705685 
    706686CONTAINS 
    707    SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype, clpas )       ! Empty routine 
     687   SUBROUTINE trd_2d( ptrd2dx, ptrd2dy, ktrd , ctype )       ! Empty routine 
    708688      REAL, DIMENSION(:,:) ::   ptrd2dx, ptrd2dy 
    709689      INTEGER                     , INTENT(in   ) ::   ktrd         ! tracer trend index 
    710690      CHARACTER(len=3)            , INTENT(in   ) ::   ctype        ! momentum ('DYN') or tracers ('TRA') trends 
    711       CHARACTER(len=3), INTENT(in), OPTIONAL ::   clpas             ! number of passage 
    712691      WRITE(*,*) 'trd_2d: You should not have seen this print! error ?', & 
    713           &       ptrd2dx(1,1), ptrd2dy(1,1), ktrd, ctype, clpas 
     692          &       ptrd2dx(1,1), ptrd2dy(1,1), ktrd, ctype 
    714693   END SUBROUTINE trd_2d 
    715    SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd , ctype, clpas )       ! Empty routine 
     694   SUBROUTINE trd_3d( ptrd3dx, ptrd3dy, ktrd , ctype )       ! Empty routine 
    716695      REAL, DIMENSION(:,:,:) ::   ptrd3dx, ptrd3dy 
    717696      INTEGER                     , INTENT(in   ) ::   ktrd         ! tracer trend index 
    718697      CHARACTER(len=3)            , INTENT(in   ) ::   ctype        ! momentum ('DYN') or tracers ('TRA') trends 
    719       CHARACTER(len=3), INTENT(in), OPTIONAL ::   clpas             ! number of passage 
    720698      WRITE(*,*) 'trd_3d: You should not have seen this print! error ?', & 
    721           &       ptrd3dx(1,1,1), ptrd3dy(1,1,1), ktrd, ctype, clpas 
     699          &       ptrd3dx(1,1,1), ptrd3dy(1,1,1), ktrd, ctype 
    722700   END SUBROUTINE trd_3d 
    723701   SUBROUTINE trd_icp_init               ! Empty routine 
Note: See TracChangeset for help on using the changeset viewer.