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

    r3187 r3432  
    3737#endif 
    3838   USE asminc           ! assimilation increments    (tra_asm_inc, dyn_asm_inc routines) 
    39  
     39   USE timing, ONLY: timing_start, timing_stop, timing_reset, timing_disable 
    4040   IMPLICIT NONE 
    4141   PRIVATE 
     
    8888#endif 
    8989      !! --------------------------------------------------------------------- 
     90                         CALL timing_start('Step')  
    9091 
    9192#if defined key_agrif 
     
    104105      ! Update data, open boundaries, surface boundary condition (including sea-ice) 
    105106      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     107                         CALL timing_start('Boundaries')  
    106108      IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data 
    107109      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! update 3D salinity data 
     
    110112      IF( lk_obc     )   CALL obc_rad( kstp )         ! compute phase velocities at open boundaries 
    111113      IF( lk_bdy     )   CALL bdy_dta_frs( kstp )     ! update dynamic and tracer data for FRS conditions (BDY) 
     114                         ! ARP - no 'section' arg here so the time taken 
     115                         ! in this region (which can involve IO) is  
     116                         ! subtracted from the time 
     117                         ! taken to do the whole step. 
     118                         CALL timing_stop('Boundaries')  
    112119 
    113120      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    114121      !  Ocean dynamics : ssh, wn, hdiv, rot                                 ! 
    115122      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     123                         CALL timing_start('Ocean Dyn.')  
    116124                         CALL ssh_wzv( kstp )         ! after ssh & vertical velocity 
     125                         CALL timing_stop('Ocean Dyn.','section')  
    117126 
    118127      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    119128      ! Ocean physics update                (ua, va, ta, sa used as workspace) 
    120129      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     130                         CALL timing_start('Ocean Phys.')  
    121131                         CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency 
    122132                         CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
    123       ! 
    124       !  VERTICAL PHYSICS    
     133                         CALL timing_stop('Ocean Phys.','section')  
     134      ! 
     135      !  VERTICAL PHYSICS   
     136                         CALL timing_start('Vert. Phys.')  
    125137                         CALL zdf_bfr( kstp )         ! bottom friction 
    126138                          
     
    162174      IF( lrst_oce .AND. lk_zdftke )   CALL tke_rst( kstp, 'WRITE' ) 
    163175      IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' ) 
     176 
     177                         CALL timing_stop('Vert. Phys.','section')  
    164178      ! 
    165179      !  LATERAL  PHYSICS  
     180      ! 
     181                         CALL timing_start('Lateral Phys.')  
    166182      ! 
    167183      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
     
    178194      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient 
    179195#endif 
     196                         CALL timing_stop('Lateral Phys.','section')  
    180197 
    181198      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    182199      ! diagnostics and outputs             (ua, va, ta, sa used as workspace) 
    183200      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     201                         CALL timing_start('Diagnostics')  
    184202      IF( lk_floats  )   CALL flo_stp( kstp )         ! drifting Floats 
    185203      IF( lk_diahth  )   CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth) 
     
    188206      IF( lk_diaar5  )   CALL dia_ar5( kstp )         ! ar5 diag 
    189207                         CALL dia_wri( kstp )         ! ocean model: outputs 
     208                         CALL timing_stop('Diagnostics','section')  
    190209 
    191210#if defined key_top 
     
    199218      ! Active tracers                              (ua, va used as workspace) 
    200219      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     220                             CALL timing_start('Active tracers')  
     221 
    201222                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
    202223 
     
    233254      ENDIF  
    234255                             CALL tra_unswap                ! udate T & S 3D arrays  (to be suppressed) 
     256                             CALL timing_stop('Active tracers','section')  
    235257 
    236258      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    237259      ! Dynamics                                    (ta, sa used as workspace) 
    238260      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     261                               CALL timing_start('Dynamics')  
     262 
    239263                               ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
    240264                               va(:,:,:) = 0.e0 
     
    242266      IF(  ln_asmiau .AND. & 
    243267         & ln_dyninc       )   CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
     268                               !CALL timing_start('dyn_adv')  
    244269                               CALL dyn_adv( kstp )         ! advection (vector or flux form) 
     270                               !CALL timing_stop('dyn_adv','section')  
     271 
     272                               !CALL timing_start('dyn_vor')  
    245273                               CALL dyn_vor( kstp )         ! vorticity term including Coriolis 
     274                               !CALL timing_stop('dyn_vor','section')  
     275 
     276                               !CALL timing_start('dyn_ldf')  
    246277                               CALL dyn_ldf( kstp )         ! lateral mixing 
     278                               !CALL timing_stop('dyn_ldf','section')  
     279 
    247280#if defined key_agrif 
    248281      IF(.NOT. Agrif_Root())   CALL Agrif_Sponge_dyn        ! momemtum sponge 
    249282#endif 
     283                               !CALL timing_start('dyn_hpg')  
    250284                               CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
     285                               !CALL timing_stop('dyn_hpg','section')  
     286 
     287                               !CALL timing_start('dyn_bfr')  
    251288                               CALL dyn_bfr( kstp )         ! bottom friction    
     289                               !CALL timing_stop('dyn_bfr','section')  
     290 
     291                               !CALL timing_start('dyn_zdf')  
    252292                               CALL dyn_zdf( kstp )         ! vertical diffusion 
     293                               !CALL timing_stop('dyn_zdf','section')  
     294 
     295                               !CALL timing_start('dyn_spg')  
    253296                               CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
     297                               !CALL timing_stop('dyn_spg','section')  
     298 
     299                               !CALL timing_start('dyn_nxt')  
    254300                               CALL dyn_nxt( kstp )         ! lateral velocity at next time step 
    255  
     301                               !CALL timing_stop('dyn_nxt','section')  
     302 
     303                               !CALL timing_start('ssh_nxt')  
    256304                               CALL ssh_nxt( kstp )         ! sea surface height at next time step 
     305                               !CALL timing_stop('ssh_nxt','section')  
    257306 
    258307      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    259308      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics 
    260309                               !                            ! (call after dynamics update) 
     310                               CALL timing_stop('Dynamics','section')  
    261311 
    262312      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    263313      ! Control and restarts 
    264314      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     315                               CALL timing_start('Control')  
     316 
    265317                               CALL stp_ctl( kstp, indic ) 
    266318      IF( indic < 0        )   THEN 
     
    271323      IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file 
    272324      IF( lk_obc           )   CALL obc_rst_write( kstp )   ! write open boundary restart file 
    273  
     325                               ! ARP - no 'section' arg here so the time taken 
     326                               ! in this region (which can involve IO) is  
     327                               ! subtracted from the time 
     328                               ! taken to do the whole step. 
     329                               CALL timing_stop('Control')  
    274330      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    275331      ! Trends                              (ua, va, ta, sa used as workspace) 
     
    287343      IF( lk_cpl           )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    288344      ! 
    289       ! 
     345                               CALL timing_stop('Step', 'section')  
     346 
     347      ! 
     348      IF( kstp == nit000   )   CALL timing_reset            ! Exclude first step from timing 
     349      IF( kstp == (nitend-2) ) CALL timing_disable()        ! Turn off timing two steps from end to avoid the IO 
     350      ! 
     351 
    290352   END SUBROUTINE stp 
    291353 
Note: See TracChangeset for help on using the changeset viewer.