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 3432 for branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90 – NEMO

Ignore:
Timestamp:
2012-07-11T13:22:58+02:00 (12 years ago)
Author:
trackstand2
Message:

Merge branch 'ksection_partition'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90

    r3211 r3432  
    7171      !!             - save the trends  
    7272      !!---------------------------------------------------------------------- 
     73      USE timing,   ONLY: timing_start, timing_stop 
    7374      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    7475      USE oce     , ONLY:   zwx => ua        , zwy => va          ! (ua,va) used as workspace 
     
    108109      !!---------------------------------------------------------------------- 
    109110 
     111      CALL timing_start('tra_adv_tvd') 
     112 
    110113      IF( wrk_in_use(3, 12,13) ) THEN 
    111114         CALL ctl_stop('tra_adv_tvd: requested workspace arrays unavailable')   ;   RETURN 
     
    140143         ! -------------------------------------------------------------------- 
    141144         ! upstream tracer flux in the i and j direction 
     145         CALL timing_start('tvd_upstream') 
    142146#if defined key_z_first 
    143147         DO jj = 1, jpjm1 
     
    159163            END DO 
    160164         END DO 
     165         CALL timing_stop('tvd_upstream','section') 
    161166 
    162167         ! upstream tracer flux in the k direction 
    163168         ! Surface value 
     169         CALL timing_start('tvd_upstreamk') 
    164170         IF( lk_vvl ) THEN   ;   zwz(:,:, 1 ) = 0.e0                         ! volume variable 
    165171         ELSE                ;   zwz(:,:, 1 ) = pwn(:,:,1) * ptb(:,:,1,jn)   ! linear free surface  
     
    181187            END DO 
    182188         END DO 
     189         CALL timing_stop('tvd_upstreamk','section') 
    183190 
    184191         ! total advective trend 
     192         CALL timing_start('tvd_tot') 
    185193#if defined key_z_first 
    186194         DO jj = 2, jpjm1 
     
    205213            END DO 
    206214         END DO 
     215         CALL timing_stop('tvd_tot','section') 
     216 
    207217         !                             ! Lateral boundary conditions on zwi  (unchanged sign) 
     218         CALL timing_start('tvd_lbc') 
    208219         CALL lbc_lnk( zwi, 'T', 1. )   
     220         CALL timing_stop('tvd_lbc','section') 
    209221 
    210222         !                                 ! trend diagnostics (contribution of upstream fluxes) 
     
    222234         ! -------------------------------------------------- 
    223235         ! antidiffusive flux on i and j 
     236         CALL timing_start('tvd_antidiff') 
    224237#if defined key_z_first 
    225238         DO jj = 1, jpjm1 
     
    236249            END DO 
    237250         END DO 
     251         CALL timing_stop('tvd_antidiff','section') 
    238252       
    239253         ! antidiffusive flux on k 
     254         CALL timing_start('tvd_antidiffk') 
    240255#if defined key_z_first 
    241256         DO jj = 1, jpj 
     
    254269            END DO 
    255270         END DO 
     271         CALL timing_stop('tvd_antidiffk','section') 
     272 
     273         CALL timing_start('tvd_lbc') 
    256274         CALL lbc_lnk( zwx, 'U', -1. )   ;   CALL lbc_lnk( zwy, 'V', -1. )         ! Lateral bondary conditions 
    257275         CALL lbc_lnk( zwz, 'W',  1. ) 
     276         CALL timing_stop('tvd_lbc','section') 
    258277 
    259278         ! 4. monotonicity algorithm 
    260279         ! ------------------------- 
     280         CALL timing_start('tvd_nonosc') 
    261281         CALL nonosc( ptb(:,:,:,jn), zwx, zwy, zwz, zwi, p2dt ) 
     282         CALL timing_stop('tvd_nonosc','section') 
    262283 
    263284 
    264285         ! 5. final trend with corrected fluxes 
    265286         ! ------------------------------------ 
     287         CALL timing_start('tvd_finaltr') 
    266288#if defined key_z_first 
    267289         DO jj = 2, jpjm1 
     
    300322         ENDIF 
    301323         ! 
     324         CALL timing_stop('tvd_finaltr','section') 
     325 
    302326      END DO 
    303327      ! 
     
    308332      IF( wrk_not_released(3, 12,13) )   CALL ctl_stop('tra_adv_tvd: failed to release workspace arrays') 
    309333      ! 
     334      CALL timing_stop('tra_adv_tvd','section') 
    310335 
    311336      !! * Reset control of array index permutation 
     
    334359      USE wrk_nemo, ONLY:   zbetup => wrk_3d_8  , zbetdo => wrk_3d_9    ! 3D workspace 
    335360      USE wrk_nemo, ONLY:   zbup   => wrk_3d_10 , zbdo   => wrk_3d_11   !  -     - 
     361      USE timing,   ONLY:   timing_start, timing_stop 
    336362 
    337363      !! DCSE_NEMO: need additional directives for renamed module variables 
     
    418444         END DO 
    419445      END DO 
     446      CALL timing_start('tvd_lbc') 
    420447      CALL lbc_lnk( zbetup, 'T', 1. )   ;   CALL lbc_lnk( zbetdo, 'T', 1. )   ! lateral boundary cond. (unchanged sign) 
     448      CALL timing_stop('tvd_lbc','section') 
    421449 
    422450 
     
    452480         END DO 
    453481      END DO 
     482      CALL timing_start('tvd_lbc') 
    454483      CALL lbc_lnk( paa, 'U', -1. )   ;   CALL lbc_lnk( pbb, 'V', -1. )   ! lateral boundary condition (changed sign) 
     484      CALL timing_stop('tvd_lbc','section') 
     485 
    455486      ! 
    456487      IF( wrk_not_released(3, 8,9,10,11) )   CALL ctl_stop('nonosc: failed to release workspace arrays') 
Note: See TracChangeset for help on using the changeset viewer.