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 9124 – NEMO

Changeset 9124


Ignore:
Timestamp:
2017-12-19T09:26:25+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: ln_timing instead of nn_timing + restricted timing to nemo_init and routine called by step in OPA_SRC

Location:
branches/2017/dev_merge_2017/NEMOGCM
Files:
176 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90

    r6960 r9124  
    2020   USE in_out_manager  ! I/O manager 
    2121   USE lib_mpp         ! MPP library 
    22    USE timing          ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    6766      !!------------------------------------------------------------------------------- 
    6867      ! 
    69       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    70       ! 
    7168      IF(lwp) WRITE(numout,*) 
    7269      IF(lwp) WRITE(numout,*) 'usr_def_hgr : LOCK_EXCHANGE configuration bassin' 
     
    107104      pff_t(:,:) = 0._wp 
    108105      ! 
    109       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    110       ! 
    111106   END SUBROUTINE usr_def_hgr 
    112107 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/MY_SRC/usrdef_hgr.F90

    r6960 r9124  
    2020   USE in_out_manager  ! I/O manager 
    2121   USE lib_mpp         ! MPP library 
    22    USE timing          ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    6766      !!------------------------------------------------------------------------------- 
    6867      ! 
    69       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    70       ! 
    7168      IF(lwp) WRITE(numout,*) 
    7269      IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin' 
     
    107104      pff_t(:,:) = 0._wp 
    108105      ! 
    109       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    110       ! 
    111106   END SUBROUTINE usr_def_hgr 
    112107 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/MY_SRC/usrdef_hgr.F90

    r7819 r9124  
    2020   USE in_out_manager  ! I/O manager 
    2121   USE lib_mpp         ! MPP library 
    22    USE timing          ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    2928   !!---------------------------------------------------------------------- 
    3029   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    31    !! $Id$  
     30   !! $Id:$  
    3231   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3332   !!---------------------------------------------------------------------- 
     
    6867      REAL(wp) ::   ztj, zuj, zvj, zfj   !   -      - 
    6968      !!------------------------------------------------------------------------------- 
    70       ! 
    71       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    7269      ! 
    7370      IF(lwp) WRITE(numout,*) 
     
    152149      pff_t(:,:) = 0._wp 
    153150      ! 
    154       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    155       ! 
    156       END SUBROUTINE usr_def_hgr 
     151   END SUBROUTINE usr_def_hgr 
    157152 
    158153   !!====================================================================== 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/MY_SRC/usrdef_zgr.F90

    r9019 r9124  
    2020   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2121   USE lib_mpp        ! distributed memory computing library 
    22    USE wrk_nemo       ! Memory allocation 
    23    USE timing         ! Timing 
    2422 
    2523   IMPLICIT NONE 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/VORTEX/MY_SRC/usrdef_hgr.F90

    r9113 r9124  
    2020   USE in_out_manager  ! I/O manager 
    2121   USE lib_mpp         ! MPP library 
    22    USE timing          ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    6665      REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars 
    6766      !!------------------------------------------------------------------------------- 
    68       ! 
    69       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    7067      ! 
    7168      IF(lwp) WRITE(numout,*) 
     
    129126      pff_t(:,:) = zf0 + zbeta * pphit(:,:) * 1.e+3 
    130127      ! 
    131       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    132       ! 
    133       END SUBROUTINE usr_def_hgr 
     128   END SUBROUTINE usr_def_hgr 
    134129 
    135130   !!====================================================================== 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/VORTEX/MY_SRC/usrdef_zgr.F90

    r8703 r9124  
    2424   USE lib_mpp        ! distributed memory computing library 
    2525   USE wrk_nemo       ! Memory allocation 
    26    USE timing         ! Timing 
    2726 
    2827   IMPLICIT NONE 
     
    131130      !!---------------------------------------------------------------------- 
    132131      ! 
    133       IF( nn_timing == 1 )  CALL timing_start('zgr_z') 
    134       ! 
    135132      zd = 5000._wp/FLOAT(jpkm1) 
    136133      ! 
     
    168165      ENDIF 
    169166      ! 
    170       IF( nn_timing == 1 )  CALL timing_stop('zgr_z') 
    171       ! 
    172167   END SUBROUTINE zgr_z 
    173168 
     
    226221      INTEGER  ::   jk 
    227222      !!---------------------------------------------------------------------- 
    228       ! 
    229       IF( nn_timing == 1 )  CALL timing_start('zgr_zco') 
    230223      ! 
    231224      DO jk = 1, jpk 
     
    241234      END DO 
    242235      ! 
    243       IF( nn_timing == 1 )  CALL timing_stop('zgr_zco') 
    244       ! 
    245236   END SUBROUTINE zgr_zco 
    246237 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/bdyini.F90

    r9019 r9124  
    3030   USE iom            ! I/O 
    3131   USE wrk_nemo       ! Memory Allocation 
    32    USE timing         ! Timing 
    3332 
    3433   IMPLICIT NONE 
     
    4645   INTEGER, DIMENSION(jp_nseg) ::   jpjnob, jpindt, jpinft, npckgn   ! 
    4746   INTEGER, DIMENSION(jp_nseg) ::   jpjsob, jpisdt, jpisft, npckgs   ! 
     47 
    4848   !!---------------------------------------------------------------------- 
    4949   !! NEMO/OPA 3.7 , NEMO Consortium (2015) 
     
    7575      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    7676      !!---------------------------------------------------------------------- 
    77       ! 
    78       IF( nn_timing == 1 )   CALL timing_start('bdy_init') 
    7977 
    8078      ! ------------------------ 
     
    114112      ENDIF 
    115113      ! 
    116       IF( nn_timing == 1 )   CALL timing_stop('bdy_init') 
    117       ! 
    118114   END SUBROUTINE bdy_init 
     115 
    119116    
    120117   SUBROUTINE bdy_segs 
     
    159156      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    160157      !!---------------------------------------------------------------------- 
    161       ! 
    162       IF( nn_timing == 1 )   CALL timing_start('bdy_segs') 
    163158      ! 
    164159      cgrid = (/'t','u','v'/) 
     
    13251320      CALL wrk_dealloc(jpi,jpj,   zfmask )  
    13261321      ! 
    1327       IF( nn_timing == 1 )   CALL timing_stop('bdy_segs') 
    1328       ! 
    13291322   END SUBROUTINE bdy_segs 
     1323 
    13301324 
    13311325   SUBROUTINE bdy_ctl_seg 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/domain.F90

    r9024 r9124  
    4646   USE lib_mpp        ! distributed memory computing library 
    4747   USE wrk_nemo       ! Memory Allocation 
    48    USE timing         ! Timing 
    4948 
    5049   IMPLICIT NONE 
     
    8281      REAL(wp), DIMENSION(jpi,jpj) ::   z1_hu_0, z1_hv_0 
    8382      !!---------------------------------------------------------------------- 
    84       ! 
    85       IF( nn_timing == 1 )   CALL timing_start('dom_init') 
    8683      ! 
    8784      IF(lwp) THEN         ! Ocean domain Parameters (control print) 
     
    198195      ! 
    199196      IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
    200       ! 
    201       IF( nn_timing == 1 )   CALL timing_stop('dom_init') 
    202197      ! 
    203198   END SUBROUTINE dom_init 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/usrdef_hgr.F90

    r7467 r9124  
    2020   USE in_out_manager  ! I/O manager 
    2121   USE lib_mpp         ! MPP library 
    22    USE timing          ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    6766      !!------------------------------------------------------------------------------- 
    6867      ! 
    69       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    70       ! 
    7168      IF(lwp) WRITE(numout,*) 
    7269      IF(lwp) WRITE(numout,*) 'usr_def_hgr : WAD_TEST_CASES configuration basin' 
     
    107104      pff_t(:,:) = 0._wp 
    108105      ! 
    109       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    110       ! 
    111106   END SUBROUTINE usr_def_hgr 
    112107 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/usrdef_zgr.F90

    r9024 r9124  
    2525   USE lib_mpp        ! distributed memory computing library 
    2626   USE wrk_nemo       ! Memory allocation 
    27    USE timing         ! Timing 
    2827 
    2928   IMPLICIT NONE 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icealb.F90

    r9019 r9124  
    112112      !!--------------------------------------------------------------------- 
    113113      ! 
    114       IF( nn_timing == 1 )   CALL timing_start('icealb') 
     114      IF( ln_timing )   CALL timing_start('icealb') 
    115115      ! 
    116116      z1_href_pnd = 0.05 
     
    173173      palb_cs(:,:,:) = palb_os(:,:,:) - ( - 0.1010 * palb_os(:,:,:) * palb_os(:,:,:) + 0.1933 * palb_os(:,:,:) - 0.0148 ) 
    174174      ! 
    175       IF( nn_timing == 1 )   CALL timing_stop('icealb') 
     175      IF( ln_timing )   CALL timing_stop('icealb') 
    176176      ! 
    177177   END SUBROUTINE ice_alb 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icecor.F90

    r9019 r9124  
    5757      !!---------------------------------------------------------------------- 
    5858      ! controls 
    59       IF( nn_timing == 1 )   CALL timing_start('icecor')                                                             ! timing 
    60       IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icecor', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     59      IF( ln_timing    )   CALL timing_start('icecor')                                                             ! timing 
     60      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icecor', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    6161      ! 
    6262      IF( kt == nit000 .AND. lwp .AND. kn == 2 ) THEN 
     
    178178      IF( ln_ctl         )   CALL ice_prt3D   ('icecor')                                                             ! prints 
    179179      IF( ln_icectl .AND. kn == 2 )   CALL ice_prt( kt, iiceprt, jiceprt, 2, ' - Final state - ' )                   ! prints 
    180       IF( nn_timing == 1 )   CALL timing_stop ('icecor')                                                             ! timing 
     180      IF( ln_timing      )   CALL timing_stop ('icecor')                                                             ! timing 
    181181      ! 
    182182   END SUBROUTINE ice_cor 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icedia.F90

    r9019 r9124  
    7272      REAL(wp)   ::   zdiff_vol, zdiff_sal, zdiff_tem   
    7373      !!--------------------------------------------------------------------------- 
    74       IF( nn_timing == 1 )   CALL timing_start('ice_dia') 
     74      IF( ln_timing )   CALL timing_start('ice_dia') 
    7575 
    7676      IF( kt == nit000 .AND. lwp ) THEN 
     
    156156      IF( lrst_ice )   CALL ice_dia_rst( 'WRITE', kt_ice ) 
    157157      ! 
    158       IF( nn_timing == 1 )   CALL timing_stop('ice_dia') 
     158      IF( ln_timing )   CALL timing_stop('ice_dia') 
    159159      ! 
    160160   END SUBROUTINE ice_dia 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn.F90

    r9076 r9124  
    7272      !!-------------------------------------------------------------------- 
    7373      ! 
    74       IF( nn_timing == 1 )   CALL timing_start('icedyn') 
     74      IF( ln_timing )   CALL timing_start('icedyn') 
    7575      ! 
    7676      IF( kt == nit000 .AND. lwp ) THEN 
     
    123123      END SELECT 
    124124      ! 
    125       IF( nn_timing == 1 )   CALL timing_stop('icedyn') 
     125      IF( ln_timing )   CALL timing_stop('icedyn') 
    126126      ! 
    127127   END SUBROUTINE ice_dyn 
     128 
    128129 
    129130   SUBROUTINE Hbig( phmax ) 
     
    171172   END SUBROUTINE Hbig 
    172173 
     174 
    173175   SUBROUTINE Hpiling 
    174176      !!------------------------------------------------------------------- 
     
    221223      REWIND( numnam_ice_cfg )         ! Namelist namdyn in configuration namelist : Ice dynamics 
    222224      READ  ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) 
    223 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn in configuration namelist', lwp ) 
     225902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn in configuration namelist', lwp ) 
    224226      IF(lwm) WRITE ( numoni, namdyn ) 
    225227      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn_adv.F90

    r9019 r9124  
    7070      !!--------------------------------------------------------------------- 
    7171      ! 
    72       IF( nn_timing == 1 )  CALL timing_start('icedyn_adv') 
     72      IF( ln_timing )   CALL timing_start('icedyn_adv') 
    7373      ! 
    7474      IF( kt == nit000 .AND. lwp ) THEN 
     
    112112 
    113113      ! controls 
    114       IF( ln_icediachk   )   CALL ice_cons_hsm(1, 'icedyn_adv', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    115       IF( ln_icectl      )   CALL ice_prt     (kt, iiceprt, jiceprt,-1, ' - ice dyn & trp - ')                           ! prints 
    116       IF( nn_timing == 1 )   CALL timing_stop ('icedyn_adv')                                                             ! timing 
     114      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_adv', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     115      IF( ln_icectl    )   CALL ice_prt     (kt, iiceprt, jiceprt,-1, ' - ice dyn & trp - ')                           ! prints 
     116      IF( ln_timing    )   CALL timing_stop ('icedyn_adv')                                                             ! timing 
    117117      ! 
    118118   END SUBROUTINE ice_dyn_adv 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn_rdgrft.F90

    r9019 r9124  
    138138      !!------------------------------------------------------------------- 
    139139      ! controls 
    140       IF( nn_timing == 1 )   CALL timing_start('icedyn_rdgrft')                                                             ! timing 
    141       IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icedyn_rdgrft', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     140      IF( ln_timing    )   CALL timing_start('icedyn_rdgrft')                                                             ! timing 
     141      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icedyn_rdgrft', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    142142 
    143143      IF( kt == nit000 ) THEN 
     
    338338 
    339339      ! controls 
    340       IF( ln_icediachk   )   CALL ice_cons_hsm(1, 'icedyn_rdgrft', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    341       IF( ln_ctl         )   CALL ice_prt3D   ('icedyn_rdgrft')                                                             ! prints 
    342       IF( nn_timing == 1 )   CALL timing_stop ('icedyn_rdgrft')                                                             ! timing 
     340      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_rdgrft', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     341      IF( ln_ctl       )   CALL ice_prt3D   ('icedyn_rdgrft')                                                             ! prints 
     342      IF( ln_timing    )   CALL timing_stop ('icedyn_rdgrft')                                                             ! timing 
    343343      ! 
    344344   END SUBROUTINE ice_dyn_rdgrft 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icedyn_rhg.F90

    r9019 r9124  
    6262      !!-------------------------------------------------------------------- 
    6363      ! controls 
    64       IF( nn_timing == 1 )   CALL timing_start('icedyn_rhg')                                                             ! timing 
    65       IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     64      IF( ln_timing    )   CALL timing_start('icedyn_rhg')                                                             ! timing 
     65      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    6666      ! 
    6767      IF( kt == nit000 .AND. lwp ) THEN 
     
    8787      ! 
    8888      ! controls 
    89       IF( ln_icediachk   )   CALL ice_cons_hsm(1, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    90       IF( ln_ctl         )   CALL ice_prt3D   ('icedyn_rhg')                                                             ! prints 
    91       IF( nn_timing == 1 )   CALL timing_stop ('icedyn_rhg')                                                             ! timing 
     89      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     90      IF( ln_ctl       )   CALL ice_prt3D   ('icedyn_rhg')                                                             ! prints 
     91      IF( ln_timing    )   CALL timing_stop ('icedyn_rhg')                                                             ! timing 
    9292      ! 
    9393   END SUBROUTINE ice_dyn_rhg 
     94 
    9495 
    9596   SUBROUTINE ice_dyn_rhg_init 
     
    116117      REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics 
    117118      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 ) 
    118 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist', lwp ) 
     119902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist', lwp ) 
    119120      IF(lwm) WRITE ( numoni, namdyn_rhg ) 
    120121      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/iceforcing.F90

    r9076 r9124  
    6262      !!------------------------------------------------------------------- 
    6363 
    64       IF( nn_timing == 1 )   CALL timing_start('ice_forcing') 
     64      IF( ln_timing )   CALL timing_start('ice_forcing') 
    6565 
    6666      IF( kt == nit000 .AND. lwp ) THEN 
     
    8787      ENDIF 
    8888 
    89       IF( nn_timing == 1 )   CALL timing_stop('ice_forcing') 
     89      IF( ln_timing )   CALL timing_stop('ice_forcing') 
    9090      ! 
    9191   END SUBROUTINE ice_forcing_tau 
     
    120120      !!-------------------------------------------------------------------- 
    121121      ! 
    122       IF( nn_timing == 1 )   CALL timing_start('ice_forcing_flx') 
     122      IF( ln_timing )   CALL timing_start('ice_forcing_flx') 
    123123 
    124124      IF( kt == nit000 .AND. lwp ) THEN 
     
    165165      ENDIF 
    166166      ! 
    167       IF( nn_timing == 1 )   CALL timing_stop('ice_forcing_flx') 
     167      IF( ln_timing )   CALL timing_stop('ice_forcing_flx') 
    168168      ! 
    169169   END SUBROUTINE ice_forcing_flx 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90

    r9118 r9124  
    102102      !!---------------------------------------------------------------------- 
    103103      ! 
    104       IF( nn_timing == 1 )   CALL timing_start('ice_stp') 
     104      IF( ln_timing )   CALL timing_start('ice_stp') 
    105105      ! 
    106106      !                                      !-----------------------! 
     
    201201!!gm   remark, the ocean-ice stress is not saved in ice diag call above .....  find a solution!!! 
    202202      ! 
    203       IF( nn_timing == 1 )   CALL timing_stop('ice_stp') 
     203      IF( ln_timing )   CALL timing_stop('ice_stp') 
    204204      ! 
    205205   END SUBROUTINE ice_stp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90

    r9076 r9124  
    9898      !!------------------------------------------------------------------- 
    9999      ! controls 
    100       IF( nn_timing == 1 )   CALL timing_start('icethd')                                                             ! timing 
    101       IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     100      IF( ln_timing    )   CALL timing_start('icethd')                                                             ! timing 
     101      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
    102102 
    103103      IF( kt == nit000 .AND. lwp ) THEN 
     
    271271      !                                                    !     & make sure at_i=SUM(a_i) & ato_i=1 where at_i=0 
    272272      !                    
    273       IF( jpl > 1 )        CALL ice_itd_rem( kt )          ! --- Transport ice between thickness categories --- ! 
    274       ! 
    275       IF( ln_icedO )       CALL ice_thd_do                 ! --- frazil ice growing in leads --- ! 
     273      IF( jpl > 1      )   CALL ice_itd_rem( kt )          ! --- Transport ice between thickness categories --- ! 
     274      ! 
     275      IF( ln_icedO     )   CALL ice_thd_do                 ! --- frazil ice growing in leads --- ! 
    276276      ! 
    277277      ! controls 
    278       IF( ln_icectl      )   CALL ice_prt    (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints 
    279       IF( ln_ctl         )   CALL ice_prt3D  ('icethd')                                        ! prints 
    280       IF( nn_timing == 1 )   CALL timing_stop('icethd')                                        ! timing 
     278      IF( ln_icectl )   CALL ice_prt    (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints 
     279      IF( ln_ctl    )   CALL ice_prt3D  ('icethd')                                        ! prints 
     280      IF( ln_timing )   CALL timing_stop('icethd')                                        ! timing 
    281281      ! 
    282282   END SUBROUTINE ice_thd  
     
    568568      REWIND( numnam_ice_cfg )              ! Namelist namthd in configuration namelist : Ice thermodynamics 
    569569      READ  ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) 
    570 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp ) 
     570902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp ) 
    571571      IF(lwm) WRITE ( numoni, namthd ) 
    572572      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icethd_zdf.F90

    r9119 r9124  
    5656      !!              of vertical diffusion 
    5757      !!------------------------------------------------------------------- 
    58     
     58      ! 
    5959      SELECT CASE ( nice_zdf )      ! Choose the vertical heat diffusion solver 
    6060      ! 
     
    7777         ! 
    7878      END SELECT 
    79        
     79      ! 
    8080   END SUBROUTINE ice_thd_zdf 
    8181    
     
    104104      REWIND( numnam_ice_cfg )              ! Namelist namthd_zdf in configuration namelist : Ice thermodynamics 
    105105      READ  ( numnam_ice_cfg, namthd_zdf, IOSTAT = ios, ERR = 902 ) 
    106 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd_zdf in configuration namelist', lwp ) 
     106902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namthd_zdf in configuration namelist', lwp ) 
    107107      IF(lwm) WRITE ( numoni, namthd_zdf ) 
    108108      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/iceupdate.F90

    r9071 r9124  
    105105      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_cs, zalb_os     ! 3D workspace 
    106106      !!--------------------------------------------------------------------- 
    107       IF( nn_timing == 1 )  CALL timing_start('ice_update') 
     107      IF( ln_timing )   CALL timing_start('ice_update') 
    108108 
    109109      IF( kt == nit000 .AND. lwp ) THEN 
     
    297297      IF( ln_icectl                      )   CALL ice_prt       (kt, iiceprt, jiceprt, 3, 'Final state ice_update') ! prints 
    298298      IF( ln_ctl                         )   CALL ice_prt3D     ('iceupdate')                                       ! prints 
    299       IF( nn_timing == 1                 )   CALL timing_stop   ('ice_update')                                      ! timing 
     299      IF( ln_timing                      )   CALL timing_stop   ('ice_update')                                      ! timing 
    300300      ! 
    301301   END SUBROUTINE ice_update_flx 
     
    334334      REAL(wp) ::   zat_v, zvtau_ice, zv_t, zrhoco  !   -      - 
    335335      !!--------------------------------------------------------------------- 
    336  
    337       IF( nn_timing == 1 )  CALL timing_start('ice_update_tau') 
     336      IF( ln_timing )   CALL timing_start('ice_update_tau') 
    338337 
    339338      IF( kt == nit000 .AND. lwp ) THEN 
     
    381380      CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. )   ! lateral boundary condition 
    382381      ! 
    383       IF( nn_timing == 1 )  CALL timing_stop('ice_update_tau') 
     382      IF( ln_timing )   CALL timing_stop('ice_update_tau') 
    384383      !   
    385384   END SUBROUTINE ice_update_tau 
     
    400399      IF(lwp) WRITE(numout,*) 'ice_update_init: ???? ' 
    401400      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~' 
    402  
     401      ! 
    403402      !                                      ! allocate ice_update array 
    404403      IF( ice_update_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'ice_update_init : unable to allocate standard arrays' ) 
     
    407406      ! 
    408407   END SUBROUTINE ice_update_init 
     408 
    409409 
    410410   SUBROUTINE update_rst( cdrw, kt ) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/LIM_SRC_3/icewri.F90

    r9118 r9124  
    5858      !!------------------------------------------------------------------- 
    5959 
    60       IF( nn_timing == 1 )   CALL timing_start('icewri') 
     60      IF( ln_timing )   CALL timing_start('icewri') 
    6161 
    6262      !---------------------------------------- 
     
    220220!!gm  idem for the ocean...  Ask Seb how to get read of ioipsl.... 
    221221      ! 
    222       IF( nn_timing == 1 )  CALL timing_stop('icewri') 
     222      IF( ln_timing )  CALL timing_stop('icewri') 
    223223      ! 
    224224   END SUBROUTINE ice_wri 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90

    r9019 r9124  
    105105      !!             - interpolates data if needed 
    106106      !!---------------------------------------------------------------------- 
    107       ! 
    108107      USE oce, ONLY:  zhdivtr => ua 
    109108      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    110109      INTEGER             ::   ji, jj, jk 
    111110      REAL(wp), POINTER, DIMENSION(:,:)   :: zemp 
    112       ! 
    113       !!---------------------------------------------------------------------- 
    114        
    115       ! 
    116       IF( nn_timing == 1 )  CALL timing_start( 'dta_dyn') 
     111      !!---------------------------------------------------------------------- 
     112      ! 
     113      IF( ln_timing )   CALL timing_start( 'dta_dyn') 
    117114      ! 
    118115      nsecdyn = nsec_year + nsec1jan000   ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 
     
    195192      ENDIF 
    196193      ! 
    197       IF( nn_timing == 1 )  CALL timing_stop( 'dta_dyn') 
     194      IF( ln_timing )   CALL timing_stop( 'dta_dyn') 
    198195      ! 
    199196   END SUBROUTINE dta_dyn 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r9019 r9124  
    130130      ENDIF 
    131131      ! 
    132       IF( nn_timing == 1 )   CALL timing_finalize 
     132      IF( ln_timing )   CALL timing_finalize 
    133133      ! 
    134134      CALL nemo_closefile 
     
    380380      isplt     = nn_isplt 
    381381      jsplt     = nn_jsplt 
    382 !!gm to be remove at the end of the 2017 merge party 
    383       if( ln_timing ) then  ;  nn_timing = 1 
    384       else                  ;  nn_timing = 0 
    385       endif 
    386 !!gm end 
    387  
    388382 
    389383      IF(lwp) THEN                  ! control print 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90

    r9019 r9124  
    8787      !!--------------------------------------------------------------------------- 
    8888      ! 
    89       IF( nn_timing == 1 )   CALL timing_start('bdy_dta') 
     89      IF( ln_timing )   CALL timing_start('bdy_dta') 
    9090      ! 
    9191      ! Initialise data arrays once for all from initial conditions where required 
     
    395395      ENDIF 
    396396      ! 
    397       IF( nn_timing == 1 ) CALL timing_stop('bdy_dta') 
     397      IF( ln_timing )  CALL timing_stop('bdy_dta') 
    398398      ! 
    399399   END SUBROUTINE bdy_dta 
     
    441441      !!--------------------------------------------------------------------------- 
    442442      ! 
    443       IF( nn_timing == 1 )   CALL timing_start('bdy_dta_init') 
    444       ! 
    445443      IF(lwp) WRITE(numout,*) 
    446444      IF(lwp) WRITE(numout,*) 'bdy_dta_ini : initialization of data at the open boundaries' 
     
    827825      END DO ! jbdy  
    828826      ! 
    829       IF( nn_timing == 1 ) CALL timing_stop('bdy_dta_init') 
    830       ! 
    831827   END SUBROUTINE bdy_dta_init 
    832828 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90

    r7646 r9124  
    1717   !!---------------------------------------------------------------------- 
    1818   USE wrk_nemo        ! Memory Allocation 
    19    USE timing          ! Timing 
    2019   USE oce             ! ocean dynamics and tracers  
    2120   USE dom_oce         ! ocean space and time domain 
     
    5352      REAL(wp), POINTER, DIMENSION(:,:) :: pua2d, pva2d     ! after barotropic velocities 
    5453      !!---------------------------------------------------------------------- 
    55       ! 
    56       IF( nn_timing == 1 )   CALL timing_start('bdy_dyn') 
    5754      ! 
    5855      ll_dyn2d = .true. 
     
    129126      CALL wrk_dealloc( jpi,jpj,  pua2d, pva2d )  
    130127      ! 
    131       IF( nn_timing == 1 )   CALL timing_stop('bdy_dyn') 
    132       ! 
    133128   END SUBROUTINE bdy_dyn 
    134129 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90

    r9023 r9124  
    1414   !!   bdy_ssh            : Duplicate sea level across open boundaries 
    1515   !!---------------------------------------------------------------------- 
    16    USE timing          ! Timing 
    1716   USE oce             ! ocean dynamics and tracers  
    1817   USE dom_oce         ! ocean space and time domain 
     
    9594      !!---------------------------------------------------------------------- 
    9695      ! 
    97       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn2d_frs') 
    98       ! 
    9996      igrd = 2                      ! Relaxation of zonal velocity 
    10097      DO jb = 1, idx%nblen(igrd) 
     
    115112      CALL lbc_bdy_lnk( pva2d, 'V', -1., ib_bdy)   ! Boundary points should be updated 
    116113      ! 
    117       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn2d_frs') 
    118       ! 
    119  
    120114   END SUBROUTINE bdy_dyn2d_frs 
    121115 
     
    153147      REAL(wp) ::   zflag, z1_2                      !    "        " 
    154148      !!---------------------------------------------------------------------- 
    155  
    156       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn2d_fla') 
    157149 
    158150      z1_2 = 0.5_wp 
     
    218210      CALL lbc_bdy_lnk( pva2d, 'V', -1., ib_bdy )   ! 
    219211      ! 
    220       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn2d_fla') 
    221       ! 
    222212   END SUBROUTINE bdy_dyn2d_fla 
    223213 
     
    244234      INTEGER  ::   ii, ij, iibm1, ijbm1                   ! indices 
    245235      !!---------------------------------------------------------------------- 
    246  
    247       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn2d_orlanski') 
    248236      ! 
    249237      igrd = 2      ! Orlanski bc on u-velocity;  
     
    258246      CALL lbc_bdy_lnk( pva2d, 'V', -1., ib_bdy )   ! 
    259247      ! 
    260       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn2d_orlanski') 
    261       ! 
    262248   END SUBROUTINE bdy_dyn2d_orlanski 
     249 
    263250 
    264251   SUBROUTINE bdy_ssh( zssh ) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90

    r9090 r9124  
    8080      !!---------------------------------------------------------------------- 
    8181      ! 
    82       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_spe') 
    83       ! 
    8482      igrd = 2                      ! Relaxation of zonal velocity 
    8583      DO jb = 1, idx%nblenrim(igrd) 
     
    104102      IF( kt == nit000 )   CLOSE( unit = 102 ) 
    105103      ! 
    106       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_spe') 
    107       ! 
    108104   END SUBROUTINE bdy_dyn3d_spe 
     105 
    109106 
    110107   SUBROUTINE bdy_dyn3d_zgrad( idx, dta, kt , ib_bdy ) 
     
    126123      !!---------------------------------------------------------------------- 
    127124      ! 
    128       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_zgrad') 
    129       ! 
    130125      igrd = 2                      ! Copying tangential velocity into bdy points 
    131126      DO jb = 1, idx%nblenrim(igrd) 
     
    152147      CALL lbc_bdy_lnk( va, 'V', -1., ib_bdy )    
    153148      ! 
    154       IF( kt .eq. nit000 ) CLOSE( unit = 102 ) 
    155  
    156       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_zgrad') 
    157  
     149      IF( kt == nit000 )   CLOSE( unit = 102 ) 
     150      ! 
    158151   END SUBROUTINE bdy_dyn3d_zgrad 
     152 
    159153 
    160154   SUBROUTINE bdy_dyn3d_zro( idx, dta, kt, ib_bdy ) 
     
    174168      REAL(wp) ::   zwgt           ! boundary weight 
    175169      !!---------------------------------------------------------------------- 
    176       ! 
    177       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_zro') 
    178170      ! 
    179171      igrd = 2                       ! Everything is at T-points here 
     
    199191      IF( kt == nit000 )   CLOSE( unit = 102 ) 
    200192      ! 
    201       IF( nn_timing == 1 )   CALL timing_stop('bdy_dyn3d_zro') 
    202       ! 
    203193   END SUBROUTINE bdy_dyn3d_zro 
    204194 
     
    225215      !!---------------------------------------------------------------------- 
    226216      ! 
    227       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_frs') 
    228       ! 
    229217      igrd = 2                      ! Relaxation of zonal velocity 
    230218      DO jb = 1, idx%nblen(igrd) 
     
    250238      ! 
    251239      IF( kt == nit000 )   CLOSE( unit = 102 ) 
    252       ! 
    253       IF( nn_timing == 1 )   CALL timing_stop('bdy_dyn3d_frs') 
    254240      ! 
    255241   END SUBROUTINE bdy_dyn3d_frs 
     
    273259      INTEGER  ::   jb, igrd                               ! dummy loop indices 
    274260      !!---------------------------------------------------------------------- 
    275  
    276       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_orlanski') 
    277261      ! 
    278262      !! Note that at this stage the ub and ua arrays contain the baroclinic velocities.  
     
    289273      CALL lbc_bdy_lnk( va, 'V', -1., ib_bdy )    
    290274      ! 
    291       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_orlanski') 
    292       ! 
    293275   END SUBROUTINE bdy_dyn3d_orlanski 
    294276 
     
    309291      !!---------------------------------------------------------------------- 
    310292      ! 
    311       IF( nn_timing == 1 )   CALL timing_start('bdy_dyn3d_dmp') 
     293      IF( ln_timing )   CALL timing_start('bdy_dyn3d_dmp') 
    312294      ! 
    313295      DO ib_bdy=1, nb_bdy 
     
    339321      CALL lbc_lnk_multi( ua, 'U', -1.,  va, 'V', -1. )   ! Boundary points should be updated 
    340322      ! 
    341       IF( nn_timing == 1 )   CALL timing_stop('bdy_dyn3d_dmp') 
     323      IF( ln_timing )   CALL timing_stop('bdy_dyn3d_dmp') 
    342324      ! 
    343325   END SUBROUTINE bdy_dyn3d_dmp 
     326 
    344327 
    345328   SUBROUTINE bdy_dyn3d_nmn( idx, ib_bdy ) 
     
    357340      INTEGER  ::   jb, igrd                               ! dummy loop indices 
    358341      !!---------------------------------------------------------------------- 
    359  
    360       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_nmn') 
    361342      ! 
    362343      !! Note that at this stage the ub and ua arrays contain the baroclinic velocities.  
     
    373354      CALL lbc_bdy_lnk( va, 'V', -1., ib_bdy ) 
    374355      ! 
    375       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_nmn') 
    376       ! 
    377356   END SUBROUTINE bdy_dyn3d_nmn 
    378357 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice.F90

    r9019 r9124  
    5858      !!---------------------------------------------------------------------- 
    5959      ! 
     60      IF( ln_timing )   CALL timing_start('bdy_ice') 
     61      ! 
    6062      CALL ice_var_glo2eqv 
    6163      ! 
     
    6365         ! 
    6466         SELECT CASE( cn_ice_lim(ib_bdy) ) 
    65          CASE('none') 
    66             CYCLE 
    67          CASE('frs') 
    68             CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy ) 
     67         CASE('none')   ;   CYCLE 
     68         CASE('frs' )   ;   CALL bdy_ice_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy ) 
    6969         CASE DEFAULT 
    7070            CALL ctl_stop( 'bdy_ice : unrecognised option for open boundaries for ice fields' ) 
     
    7373      END DO 
    7474      ! 
    75                         CALL ice_var_zapsmall 
    76                         CALL ice_var_agg(1) 
     75      CALL ice_var_zapsmall 
     76      CALL ice_var_agg(1) 
     77      ! 
    7778      IF( ln_icectl )   CALL ice_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 
     79      IF( ln_timing )   CALL timing_stop('bdy_ice') 
    7880      ! 
    7981   END SUBROUTINE bdy_ice 
     
    102104      REAL(wp) ::   ztmelts, zdh 
    103105      !!------------------------------------------------------------------------------ 
    104       ! 
    105       IF( ln_timing )   CALL timing_start('bdy_ice_frs') 
    106106      ! 
    107107      jgrd = 1      ! Everything is at T-points here 
     
    255255      IF( jpl > 1 )   CALL ice_itd_reb( kt ) 
    256256      !       
    257       IF( ln_timing )   CALL timing_stop('bdy_ice_frs') 
    258       ! 
    259257   END SUBROUTINE bdy_ice_frs 
    260258 
     
    277275      REAL(wp) ::   zmsk1, zmsk2, zflag 
    278276      !!------------------------------------------------------------------------------ 
    279       ! 
    280       IF( ln_timing )   CALL timing_start('bdy_ice_dyn') 
    281277      ! 
    282278      DO ib_bdy=1, nb_bdy 
     
    355351      END DO 
    356352      ! 
    357       IF( ln_timing )   CALL timing_stop('bdy_ice_dyn') 
    358       ! 
    359353    END SUBROUTINE bdy_ice_dyn 
    360354 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r9105 r9124  
    2929   USE lib_mpp        ! for mpp_sum   
    3030   USE iom            ! I/O 
    31    USE timing         ! Timing 
    3231 
    3332   IMPLICIT NONE 
     
    7473      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    7574      !!---------------------------------------------------------------------- 
    76       ! 
    77       IF( nn_timing == 1 )   CALL timing_start('bdy_init') 
    7875 
    7976      ! ------------------------ 
     
    112109         ! 
    113110      ENDIF 
    114       ! 
    115       IF( nn_timing == 1 )   CALL timing_stop('bdy_init') 
    116111      ! 
    117112   END SUBROUTINE bdy_init 
     
    156151      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    157152      !!---------------------------------------------------------------------- 
    158       ! 
    159       IF( nn_timing == 1 )   CALL timing_start('bdy_segs') 
    160153      ! 
    161154      cgrid = (/'t','u','v'/) 
     
    13141307      IF( nb_bdy>0 )   DEALLOCATE( nbidta, nbjdta, nbrdta ) 
    13151308      ! 
    1316       IF( nn_timing == 1 )   CALL timing_stop('bdy_segs') 
    1317       ! 
    13181309   END SUBROUTINE bdy_segs 
    13191310 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdylib.F90

    r7646 r9124  
    1818   USE in_out_manager ! 
    1919   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    20    USE timing         ! Timing 
    2120 
    2221   IMPLICIT NONE 
     
    5150      !!---------------------------------------------------------------------- 
    5251      ! 
    53       IF( nn_timing == 1 ) CALL timing_start('bdy_frs') 
    54       !  
    5552      igrd = 1                       ! Everything is at T-points here 
    5653      DO ib = 1, idx%nblen(igrd) 
     
    6360      END DO 
    6461      ! 
    65       IF( nn_timing == 1 ) CALL timing_stop('bdy_frs') 
    66       ! 
    6762   END SUBROUTINE bdy_frs 
     63 
    6864 
    6965   SUBROUTINE bdy_spe( idx, pta, dta ) 
     
    8278      INTEGER  ::   ii, ij         ! 2D addresses 
    8379      !!---------------------------------------------------------------------- 
    84       ! 
    85       IF( nn_timing == 1 ) CALL timing_start('bdy_spe') 
    8680      ! 
    8781      igrd = 1                       ! Everything is at T-points here 
     
    9488      END DO 
    9589      ! 
    96       IF( nn_timing == 1 ) CALL timing_stop('bdy_spe') 
    97       ! 
    9890   END SUBROUTINE bdy_spe 
     91 
    9992 
    10093   SUBROUTINE bdy_orl( idx, ptb, pta, dta, ll_npo ) 
     
    115108      !!---------------------------------------------------------------------- 
    116109      ! 
    117       IF( nn_timing == 1 ) CALL timing_start('bdy_orl') 
    118       ! 
    119110      igrd = 1                       ! Everything is at T-points here 
    120111      ! 
    121112      CALL bdy_orlanski_3d( idx, igrd, ptb(:,:,:), pta(:,:,:), dta, ll_npo ) 
    122113      ! 
    123       IF( nn_timing == 1 ) CALL timing_stop('bdy_orl') 
    124       ! 
    125114   END SUBROUTINE bdy_orl 
     115 
    126116 
    127117   SUBROUTINE bdy_orlanski_2d( idx, igrd, phib, phia, phi_ext, ll_npo ) 
     
    161151      REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    162152      !!---------------------------------------------------------------------- 
    163       ! 
    164       IF( nn_timing == 1 )   CALL timing_start('bdy_orlanski_2d') 
    165153      ! 
    166154      ! ----------------------------------! 
     
    279267      END DO 
    280268      ! 
    281       IF( nn_timing == 1 )   CALL timing_stop('bdy_orlanski_2d') 
    282       ! 
    283269   END SUBROUTINE bdy_orlanski_2d 
    284270 
     
    320306      REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    321307      !!---------------------------------------------------------------------- 
    322       ! 
    323       IF( nn_timing == 1 )   CALL timing_start('bdy_orlanski_3d') 
    324308      ! 
    325309      ! ----------------------------------! 
     
    441425      END DO 
    442426      ! 
    443       IF( nn_timing == 1 )   CALL timing_stop('bdy_orlanski_3d') 
    444       ! 
    445427   END SUBROUTINE bdy_orlanski_3d 
    446428 
     
    462444      INTEGER  ::   ii, ij, ip, jp   ! 2D addresses 
    463445      !!---------------------------------------------------------------------- 
    464       !! 
    465       IF( nn_timing == 1 ) CALL timing_start('bdy_nmn') 
    466446      ! 
    467447      SELECT CASE(igrd) 
     
    514494      END DO 
    515495      ! 
    516       IF( nn_timing == 1 ) CALL timing_stop('bdy_nmn') 
    517       ! 
    518496   END SUBROUTINE bdy_nmn 
    519497 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90

    r7646 r9124  
    2626   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2727   USE wrk_nemo       ! Memory allocation 
    28    USE timing         ! timing 
    2928 
    3029   IMPLICIT NONE 
     
    8382      NAMELIST/nambdy_tide/filtide, ln_bdytide_2ddta, ln_bdytide_conj 
    8483      !!---------------------------------------------------------------------- 
    85       ! 
    86       IF( nn_timing == 1 )   CALL timing_start('bdytide_init') 
    8784      ! 
    8885      IF (nb_bdy>0) THEN 
     
    270267      END DO ! loop on ib_bdy 
    271268      ! 
    272       IF( nn_timing == 1 )   CALL timing_stop('bdytide_init') 
    273       ! 
    274269   END SUBROUTINE bdytide_init 
    275270 
     
    300295      REAL(wp), DIMENSION(jpmax_harmo) :: z_sist, z_cost 
    301296      !!---------------------------------------------------------------------- 
    302       ! 
    303       IF( nn_timing == 1 )   CALL timing_start('bdytide_update') 
    304297      ! 
    305298      ilen0(1) =  SIZE(td%ssh(:,1,1)) 
     
    363356      END DO 
    364357      ! 
    365       IF( nn_timing == 1 )   CALL timing_stop('bdytide_update') 
    366       ! 
    367358   END SUBROUTINE bdytide_update 
    368359 
     
    391382      REAL(wp) ::   z_arg, z_sarg, zramp, zoff, z_cost, z_sist       
    392383      !!---------------------------------------------------------------------- 
    393       ! 
    394       IF( nn_timing == 1 )   CALL timing_start('bdy_dta_tides') 
    395384      ! 
    396385      lk_first_btstp=.TRUE. 
     
    485474         END IF 
    486475      END DO 
    487       ! 
    488       IF( nn_timing == 1 ) CALL timing_stop('bdy_dta_tides') 
    489476      ! 
    490477   END SUBROUTINE bdy_dta_tides 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90

    r7646 r9124  
    7878   END SUBROUTINE bdy_tra 
    7979 
     80 
    8081   SUBROUTINE bdy_rnf( idx, pta, jpa ) 
    8182      !!---------------------------------------------------------------------- 
     
    9697      !!---------------------------------------------------------------------- 
    9798      ! 
    98       IF( nn_timing == 1 )   CALL timing_start('bdy_rnf') 
    99       ! 
    10099      igrd = 1                       ! Everything is at T-points here 
    101100      DO ib = 1, idx%nblenrim(igrd) 
     
    110109      END DO 
    111110      ! 
    112       IF( nn_timing == 1 )   CALL timing_stop('bdy_rnf') 
    113       ! 
    114111   END SUBROUTINE bdy_rnf 
     112 
    115113 
    116114   SUBROUTINE bdy_tra_dmp( kt ) 
     
    130128      !!---------------------------------------------------------------------- 
    131129      ! 
    132       IF( nn_timing == 1 )   CALL timing_start('bdy_tra_dmp') 
     130      IF( ln_timing )   CALL timing_start('bdy_tra_dmp') 
    133131      ! 
    134132      DO ib_bdy = 1, nb_bdy 
     
    149147      END DO 
    150148      ! 
    151       IF( nn_timing == 1 )   CALL timing_stop('bdy_tra_dmp') 
     149      IF( ln_timing )   CALL timing_stop('bdy_tra_dmp') 
    152150      ! 
    153151   END SUBROUTINE bdy_tra_dmp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90

    r7646 r9124  
    1919   USE in_out_manager ! I/O manager 
    2020   USE lib_mpp        ! for mppsum 
    21    USE timing         ! Timing 
    2221   USE lib_fortran    ! Fortran routines library 
    2322 
     
    7372      TYPE(OBC_INDEX), POINTER :: idx 
    7473      !!----------------------------------------------------------------------------- 
    75       ! 
    76       IF( nn_timing == 1 )   CALL timing_start('bdy_vol') 
    7774      ! 
    7875      IF( ln_vol ) THEN 
     
    165162      END IF  
    166163      ! 
    167       IF( nn_timing == 1 )   CALL timing_stop('bdy_vol') 
    168       ! 
    169164      END IF ! ln_vol 
    170165      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90

    r7646 r9124  
    1818   USE in_out_manager ! I/O manager (ctmp1) 
    1919   USE wrk_nemo                      ! Memory allocation 
    20    USE timing                        ! Timing 
    2120 
    2221   IMPLICIT NONE 
     
    6867      !!---------------------------------------------------------------------- 
    6968 
    70       IF( nn_timing == 1 )   CALL timing_start('dom_c1d') 
    71  
    7269      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    7370      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 901 ) 
     
    198195      ENDIF 
    199196      ! 
    200       IF( nn_timing == 1 )   CALL timing_stop('dom_c1d') 
    201       ! 
    202197   END SUBROUTINE dom_c1d 
    203198 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90

    r6140 r9124  
    5858      NAMELIST/namc1d_uvd/ ln_uvd_init, ln_uvd_dyndmp, cn_dir, sn_ucur, sn_vcur 
    5959      !!---------------------------------------------------------------------- 
    60       ! 
    61       IF( nn_timing == 1 )   CALL timing_start('dta_uvd_init') 
    6260      ! 
    6361      ierr0 = 0   ;   ierr1 = 0   ;   ierr2 = 0  ;   ierr3 = 0 
     
    117115      ENDIF 
    118116      ! 
    119       IF( nn_timing == 1 )  CALL timing_stop('dta_uvd_init') 
    120       ! 
    121117   END SUBROUTINE dta_uvd_init 
    122118 
     
    146142      !!---------------------------------------------------------------------- 
    147143      ! 
    148       IF( nn_timing == 1 )   CALL timing_start('dta_uvd') 
     144      IF( ln_timing )   CALL timing_start('dta_uvd') 
    149145      ! 
    150146      CALL fld_read( kt, 1, sf_uvd )      !==   read U & V current data at time step kt   ==! 
     
    223219      ENDIF 
    224220      ! 
    225       IF( nn_timing == 1 )  CALL timing_stop('dta_uvd') 
     221      IF( ln_timing )   CALL timing_stop('dta_uvd') 
    226222      ! 
    227223   END SUBROUTINE dta_uvd 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90

    r6140 r9124  
    157157      !!---------------------------------------------------------------------- 
    158158      ! 
    159       IF( nn_timing == 1 )  CALL timing_start( 'dyn_dmp' ) 
     159      IF( ln_timing )   CALL timing_start( 'dyn_dmp' ) 
    160160      ! 
    161161      CALL wrk_alloc( jpi,jpj,jpk,2,   zuv_dta ) 
     
    227227      CALL wrk_dealloc( jpi,jpj,jpk,2,   zuv_dta ) 
    228228      ! 
    229       IF( nn_timing == 1 )  CALL timing_stop( 'dyn_dmp') 
     229      IF( ln_timing )   CALL timing_stop( 'dyn_dmp') 
    230230      ! 
    231231   END SUBROUTINE dyn_dmp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90

    r9019 r9124  
    33   !! Coarse Ocean initialization : write the coarse ocean domain mesh and mask files 
    44   !!====================================================================== 
    5    !! History :  OPA  ! 1997-02  (G. Madec)  Original code 
    6    !!            8.1  ! 1999-11  (M. Imbard)  NetCDF FORMAT with IOIPSL 
    7    !!   NEMO     1.0  ! 2002-08  (G. Madec)  F90 and several file 
    8    !!            3.0  ! 2008-01  (S. Masson) add dom_uniq_crs 
    9    !!            4.0  ! 2011-01  (A. R. Porter, STFC Daresbury) dynamical allocation 
    10    !!                 ! 2012-06  (J. Simeon, C. Calone, C Ethe )  Reduced and modified for coarse grid 
     5   !! History :  3.6   ! 2012-06  (J. Simeon, C. Calone, C Ethe )  from domwri, reduced and modified for coarse grid 
    116   !!---------------------------------------------------------------------- 
    127 
     
    2520   USE crslbclnk       ! crs mediator to lbclnk 
    2621   USE wrk_nemo        ! Working array 
    27  
    28  
    2922 
    3023   IMPLICIT NONE 
     
    7467      REAL(wp), POINTER, DIMENSION(:,:  ) :: ze3tp, ze3wp 
    7568      !!---------------------------------------------------------------------- 
    76       ! 
    77       IF( nn_timing == 1 )  CALL timing_start('crs_dom_wri') 
    7869      ! 
    7970      CALL wrk_alloc( jpi_crs, jpj_crs,      zprt , zprw  ) 
     
    302293      CALL wrk_dealloc( jpi_crs, jpj_crs, jpk, zdepu, zdepv ) 
    303294      ! 
    304       IF( nn_timing == 1 )  CALL timing_stop('crs_dom_wri') 
    305       ! 
    306        
    307295   END SUBROUTINE crs_dom_wri 
    308296 
     
    327315      !!---------------------------------------------------------------------- 
    328316      ! 
    329       IF( nn_timing == 1 )  CALL timing_start('crs_dom_uniq_crs') 
    330       ! 
    331317      CALL wrk_alloc( jpi_crs, jpj_crs, ztstref ) 
    332318      ! 
     
    347333      CALL wrk_dealloc( jpi_crs, jpj_crs, ztstref ) 
    348334      ! 
    349       IF( nn_timing == 1 )  CALL timing_stop('crs_dom_uniq_crs') 
    350       ! 
    351        
    352335   END SUBROUTINE dom_uniq_crs 
    353336 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90

    r9019 r9124  
    6464      !!---------------------------------------------------------------------- 
    6565      !  
    66       IF( nn_timing == 1 )   CALL timing_start('crs_fld') 
     66      IF( ln_timing )   CALL timing_start('crs_fld') 
    6767 
    6868      ! Depth work arrrays 
     
    243243      CALL iom_swap( "nemo" )     ! return back on high-resolution grid 
    244244      ! 
    245       IF( nn_timing == 1 )   CALL timing_stop('crs_fld') 
     245      IF( ln_timing )   CALL timing_stop('crs_fld') 
    246246      ! 
    247247   END SUBROUTINE crs_fld 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90

    r9019 r9124  
    2323   USE lib_mpp 
    2424   USE wrk_nemo  
    25    USE timing                   ! Timing 
    2625 
    2726   IMPLICIT NONE 
     
    7877      !!---------------------------------------------------------------------- 
    7978      ! 
    80       IF( nn_timing == 1 )  CALL timing_start('crs_init') 
    81       ! 
    8279      IF(lwp) THEN 
    8380         WRITE(numout,*) 
     
    250247      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t, ze3u, ze3v, ze3w ) 
    251248      ! 
    252       IF( nn_timing == 1 )  CALL timing_stop('crs_init') 
    253       ! 
    254249   END SUBROUTINE crs_init 
    255250     
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90

    r9019 r9124  
    1313   USE dom_oce        ! ocean space and time domain 
    1414   USE eosbn2         ! equation of state                (eos_bn2 routine) 
    15    USE lib_mpp        ! distribued memory computing library 
    16    USE iom            ! I/O manager library 
    17    USE timing         ! preformance summary 
    18    USE wrk_nemo       ! working arrays 
    19    USE fldread        ! type FLD_N 
    2015   USE phycst         ! physical constant 
    2116   USE in_out_manager  ! I/O manager 
    2217   USE zdfddm 
    2318   USE zdf_oce 
     19   ! 
     20   USE lib_mpp        ! distribued memory computing library 
     21   USE iom            ! I/O manager library 
     22   USE fldread        ! type FLD_N 
     23   USE timing         ! preformance summary 
     24   USE wrk_nemo       ! working arrays 
    2425 
    2526   IMPLICIT NONE 
     
    8081      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace 
    8182      !!-------------------------------------------------------------------- 
    82       IF( nn_timing == 1 )   CALL timing_start('dia_ar5') 
     83      IF( ln_timing )   CALL timing_start('dia_ar5') 
    8384  
    8485      IF( kt == nit000 )     CALL dia_ar5_init 
     
    255256      ENDIF 
    256257      ! 
    257       IF( nn_timing == 1 )   CALL timing_stop('dia_ar5') 
     258      IF( ln_timing )   CALL timing_stop('dia_ar5') 
    258259      ! 
    259260   END SUBROUTINE dia_ar5 
     261 
    260262 
    261263   SUBROUTINE dia_ar5_hst( ktra, cptr, pua, pva )  
     
    332334      !!---------------------------------------------------------------------- 
    333335      ! 
    334       IF( nn_timing == 1 )   CALL timing_start('dia_ar5_init') 
    335       ! 
    336336      l_ar5 = .FALSE. 
    337337      IF(   iom_use( 'voltot'  ) .OR. iom_use( 'sshtot'    )  .OR. iom_use( 'sshdyn' )  .OR.  &  
     
    380380      ENDIF 
    381381      ! 
    382       IF( nn_timing == 1 )   CALL timing_stop('dia_ar5_init') 
    383       ! 
    384382   END SUBROUTINE dia_ar5_init 
    385383 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90

    r9019 r9124  
    6060      !!---------------------------------------------------------------------- 
    6161      ! 
    62       IF( nn_timing == 1 )   CALL timing_start('dia_cfl') 
     62      IF( ln_timing )   CALL timing_start('dia_cfl') 
    6363      ! 
    6464      !                       ! setup timestep multiplier to account for initial Eulerian timestep 
     
    138138      ENDIF 
    139139      ! 
    140       IF( nn_timing == 1 )   CALL timing_stop('dia_cfl') 
     140      IF( ln_timing )   CALL timing_stop('dia_cfl') 
    141141      ! 
    142142   END SUBROUTINE dia_cfl 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90

    r9019 r9124  
    3737   USE domvvl 
    3838   USE timing          ! preformance summary 
    39    USE wrk_nemo        ! working arrays 
    4039 
    4140   IMPLICIT NONE 
     
    121120 
    122121 
    123   SUBROUTINE dia_dct_init 
    124      !!--------------------------------------------------------------------- 
    125      !!               ***  ROUTINE diadct  ***   
    126      !! 
    127      !!  ** Purpose: Read the namelist parameters 
    128      !!              Open output files 
    129      !! 
    130      !!--------------------------------------------------------------------- 
    131      NAMELIST/namdct/nn_dct,nn_dctwri,nn_secdebug 
    132      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    133  
    134      IF( nn_timing == 1 )   CALL timing_start('dia_dct_init') 
     122   SUBROUTINE dia_dct_init 
     123      !!--------------------------------------------------------------------- 
     124      !!               ***  ROUTINE diadct  ***   
     125      !! 
     126      !!  ** Purpose: Read the namelist parameters 
     127      !!              Open output files 
     128      !! 
     129      !!--------------------------------------------------------------------- 
     130      INTEGER  ::   ios                 ! Local integer output status for namelist read 
     131      !! 
     132      NAMELIST/namdct/nn_dct,nn_dctwri,nn_secdebug 
     133      !!--------------------------------------------------------------------- 
    135134 
    136135     REWIND( numnam_ref )              ! Namelist namdct in reference namelist : Diagnostic: transport through sections 
     
    140139     REWIND( numnam_cfg )              ! Namelist namdct in configuration namelist : Diagnostic: transport through sections 
    141140     READ  ( numnam_cfg, namdct, IOSTAT = ios, ERR = 902 ) 
    142 902  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist', lwp ) 
     141902  IF( ios > 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist', lwp ) 
    143142     IF(lwm) WRITE ( numond, namdct ) 
    144143 
     
    175174     transports_3d(:,:,:,:)=0.0  
    176175     transports_2d(:,:,:)  =0.0  
    177  
    178      IF( nn_timing == 1 )   CALL timing_stop('dia_dct_init') 
    179176     ! 
    180177  END SUBROUTINE dia_dct_init 
    181178  
    182179  
    183   SUBROUTINE dia_dct(kt) 
     180  SUBROUTINE dia_dct( kt ) 
    184181     !!--------------------------------------------------------------------- 
    185182     !!               ***  ROUTINE diadct  ***   
     
    198195     !!               Reinitialise all relevant arrays to zero  
    199196     !!--------------------------------------------------------------------- 
    200      INTEGER,INTENT(in)        ::kt 
     197     INTEGER, INTENT(in) ::   kt 
    201198     ! 
    202      INTEGER             :: jsec,            &! loop on sections 
    203                             itotal            ! nb_sec_max*nb_type_class*nb_class_max 
    204      LOGICAL             :: lldebug =.FALSE.  ! debug a section   
    205       
    206      INTEGER , DIMENSION(1)             :: ish   ! tmp array for mpp_sum 
    207      INTEGER , DIMENSION(3)             :: ish2  !   " 
    208      REAL(wp), POINTER, DIMENSION(:)    :: zwork !   "   
    209      REAL(wp), POINTER, DIMENSION(:,:,:):: zsum  !   " 
     199     INTEGER ::   jsec              ! loop on sections 
     200     INTEGER ::   itotal            ! nb_sec_max*nb_type_class*nb_class_max 
     201     LOGICAL ::   lldebug =.FALSE.  ! debug a section   
     202     INTEGER              , DIMENSION(1)    ::   ish     ! work array for mpp_sum 
     203     INTEGER              , DIMENSION(3)    ::   ish2    !   " 
     204     REAL(wp), ALLOCATABLE, DIMENSION(:)    ::   zwork   !   "   
     205     REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)::   zsum    !   " 
    210206     !!---------------------------------------------------------------------     
    211207     ! 
    212      IF( nn_timing == 1 )   CALL timing_start('dia_dct') 
     208     IF( ln_timing )   CALL timing_start('dia_dct') 
    213209 
    214210     IF( lk_mpp )THEN 
    215211        itotal = nb_sec_max*nb_type_class*nb_class_max 
    216         CALL wrk_alloc( itotal                                , zwork )  
    217         CALL wrk_alloc( nb_sec_max,nb_type_class,nb_class_max , zsum  ) 
     212        ALLOCATE( zwork(itotal) , zsum(nb_sec_max,nb_type_class,nb_class_max) ) 
    218213     ENDIF     
    219214  
     
    286281     IF( lk_mpp )THEN 
    287282        itotal = nb_sec_max*nb_type_class*nb_class_max 
    288         CALL wrk_dealloc( itotal                                , zwork )  
    289         CALL wrk_dealloc( nb_sec_max,nb_type_class,nb_class_max , zsum  ) 
     283        DEALLOCATE( zwork , zsum  ) 
    290284     ENDIF     
    291285 
    292      IF( nn_timing == 1 )   CALL timing_stop('dia_dct') 
     286     IF( ln_timing )   CALL timing_stop('dia_dct') 
    293287     ! 
    294288  END SUBROUTINE dia_dct 
     289 
    295290 
    296291  SUBROUTINE readsec  
     
    304299     !! 
    305300     !!--------------------------------------------------------------------- 
    306      !! * Local variables 
    307301     INTEGER :: iptglo , iptloc                               ! Global and local number of points for a section 
    308302     INTEGER :: isec, iiglo, ijglo, iiloc, ijloc,iost,i1 ,i2  ! temporary  integer 
    309303     INTEGER :: jsec, jpt                                     ! dummy loop indices 
    310  
    311304     INTEGER, DIMENSION(2) :: icoord  
    312      CHARACTER(len=160)    :: clname                          !filename 
     305     LOGICAL               :: llbon, lldebug   ! local logical 
     306     CHARACTER(len=160)    :: clname           ! filename 
    313307     CHARACTER(len=200)    :: cltmp 
    314      CHARACTER(len=200)    :: clformat                        !automatic format 
    315      TYPE(POINT_SECTION),DIMENSION(nb_point_max)  ::coordtemp !contains listpoints coordinates  
    316                                                               !read in the file 
    317      INTEGER, POINTER, DIMENSION(:) :: directemp              !contains listpoints directions 
    318                                                               !read in the files 
    319      LOGICAL :: llbon                                       ,&!local logical 
    320                 lldebug                                       !debug the section 
     308     CHARACTER(len=200)    :: clformat                          !automatic format 
     309     TYPE(POINT_SECTION),DIMENSION(nb_point_max)  ::coordtemp   !contains listpoints coordinates read in the file 
     310     INTEGER, DIMENSION(nb_point_max) :: directemp              !contains listpoints directions read in the files 
    321311     !!------------------------------------------------------------------------------------- 
    322      CALL wrk_alloc( nb_point_max, directemp ) 
    323312 
    324313     !open input file 
     
    491480  
    492481     nb_sec = jsec-1   !number of section read in the file 
    493  
    494      CALL wrk_dealloc( nb_point_max, directemp ) 
    495482     ! 
    496483  END SUBROUTINE readsec 
     484 
    497485 
    498486  SUBROUTINE removepoints(sec,cdind,cdextr,ld_debug) 
     
    518506                istart,iend      !first and last points selected in listpoint 
    519507     INTEGER :: jpoint           !loop on list points 
    520      INTEGER, POINTER, DIMENSION(:)   :: idirec !contains temporary sec%direction 
    521      INTEGER, POINTER, DIMENSION(:,:) :: icoord !contains temporary sec%listpoint 
     508     INTEGER, POINTER, DIMENSION(nb_point_max)   :: idirec !contains temporary sec%direction 
     509     INTEGER, POINTER, DIMENSION(2,nb_point_max) :: icoord !contains temporary sec%listpoint 
    522510     !---------------------------------------------------------------------------- 
    523      CALL wrk_alloc(    nb_point_max, idirec ) 
    524      CALL wrk_alloc( 2, nb_point_max, icoord ) 
    525  
     511      ! 
    526512     IF( ld_debug )WRITE(numout,*)'      -------------------------' 
    527513     IF( ld_debug )WRITE(numout,*)'      removepoints in listpoint' 
     
    571557        WRITE(numout,*)'      sec%direction after removepoints :',sec%direction(1:sec%nb_point) 
    572558     ENDIF 
    573  
    574      CALL wrk_dealloc(    nb_point_max, idirec ) 
    575      CALL wrk_dealloc( 2, nb_point_max, icoord ) 
    576   END SUBROUTINE removepoints 
    577  
    578   SUBROUTINE transport(sec,ld_debug,jsec) 
     559      ! 
     560   END SUBROUTINE removepoints 
     561 
     562   SUBROUTINE transport(sec,ld_debug,jsec) 
    579563     !!------------------------------------------------------------------------------------------- 
    580564     !!                     ***  ROUTINE transport  *** 
     
    596580     !! 
    597581     !!------------------------------------------------------------------------------------------- 
    598      !! * Arguments 
    599582     TYPE(SECTION),INTENT(INOUT) :: sec 
    600583     LOGICAL      ,INTENT(IN)    :: ld_debug 
    601584     INTEGER      ,INTENT(IN)    :: jsec        ! numeric identifier of section 
    602      
    603      !! * Local variables 
    604      INTEGER             :: jk, jseg, jclass,jl,                 &!loop on level/segment/classes/ice categories 
    605                             isgnu, isgnv                          !  
    606      REAL(wp)            :: zumid, zvmid,                        &!U/V velocity on a cell segment  
    607                             zumid_ice, zvmid_ice,                &!U/V ice velocity  
    608                             zTnorm                                !transport of velocity through one cell's sides  
    609      REAL(wp)            :: ztn, zsn, zrhoi, zrhop, zsshn, zdep !temperature/salinity/potential density/ssh/depth at u/v point 
    610  
    611      TYPE(POINT_SECTION) :: k 
     585     ! 
     586     INTEGER ::   jk, jseg, jclass,jl, isgnu, isgnv    ! loop on level/segment/classes/ice categories 
     587     REAL(wp)::   zumid, zvmid, zumid_ice, zvmid_ice   ! U/V ocean & ice velocity on a cell segment  
     588     REAL(wp)::   zTnorm                               ! transport of velocity through one cell's sides  
     589     REAL(wp)::   ztn, zsn, zrhoi, zrhop, zsshn, zdep  ! temperature/salinity/potential density/ssh/depth at u/v point 
     590     TYPE(POINT_SECTION) ::   k 
    612591      !!-------------------------------------------------------- 
    613592      ! 
     
    1008987     REAL(wp)              :: zslope             ! section's slope coeff 
    1009988     ! 
    1010      REAL(wp), POINTER, DIMENSION(:):: zsumclasses ! 1D workspace  
     989     REAL(wp), DIMENSION(nb_type_class)::   zsumclasses  ! 1D workspace  
    1011990     !!-------------------------------------------------------------  
    1012      CALL wrk_alloc(nb_type_class , zsumclasses )   
    1013991 
    1014992     zsumclasses(:)=0._wp 
     
    11211099118   FORMAT(I8,1X,I8,1X,I4,1X,A30,1X,f9.2,1X,I4,3X,A8,1X,2F12.4,5X,3F12.4) 
    11221100119   FORMAT(I8,1X,I8,1X,I4,1X,A30,1X,f9.2,1X,I4,3X,A8,1X,2F12.4,5X,3E15.6) 
    1123  
    1124       CALL wrk_dealloc(nb_type_class , zsumclasses )   
    11251101      ! 
    11261102   END SUBROUTINE dia_dct_wri 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90

    r7646 r9124  
    2222   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2323   USE timing          ! preformance summary 
    24    USE wrk_nemo        ! working arrays 
    2524 
    2625   IMPLICIT NONE 
     
    177176      REAL(wp) :: ztime, ztemp 
    178177      !!-------------------------------------------------------------------- 
    179       IF( nn_timing == 1 )   CALL timing_start('dia_harm') 
    180  
    181       IF( kt == nit000 ) CALL dia_harm_init 
    182  
     178      IF( ln_timing )   CALL timing_start('dia_harm') 
     179      ! 
     180      IF( kt == nit000 )   CALL dia_harm_init 
     181      ! 
    183182      IF( kt >= nit000_han .AND. kt <= nitend_han .AND. MOD(kt,nstep_han) == 0 ) THEN 
    184  
     183         ! 
    185184         ztime = (kt-nit000+1) * rdt  
    186         
     185         ! 
    187186         nhc = 0 
    188187         DO jh = 1, nb_ana 
     
    191190               ztemp =(     MOD(jc,2) * ft(jh) *COS(ana_freq(jh)*ztime + vt(jh) + ut(jh))  & 
    192191                  &    +(1.-MOD(jc,2))* ft(jh) *SIN(ana_freq(jh)*ztime + vt(jh) + ut(jh))) 
    193  
     192                  ! 
    194193               DO jj = 1,jpj 
    195194                  DO ji = 1,jpi 
     
    205204         !        
    206205      END IF 
    207  
    208       IF ( kt == nitend_han )   CALL dia_harm_end 
    209  
    210       IF( nn_timing == 1 )   CALL timing_stop('dia_harm') 
    211   
     206      ! 
     207      IF( kt == nitend_han )   CALL dia_harm_end 
     208      ! 
     209      IF( ln_timing )   CALL timing_stop('dia_harm') 
     210      ! 
    212211   END SUBROUTINE dia_harm 
    213212 
     
    225224      INTEGER :: ksp, kun, keq 
    226225      REAL(wp) :: ztime, ztime_ini, ztime_end 
    227       REAL(wp) :: X1,X2 
    228       REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ana_amp 
    229       !!-------------------------------------------------------------------- 
    230       CALL wrk_alloc( jpi , jpj , jpmax_harmo , 2 , ana_amp ) 
    231  
     226      REAL(wp) :: X1, X2 
     227      REAL(wp), DIMENSION(jpi,jpj,jpmax_harmo,2) ::   ana_amp   ! workspace 
     228      !!-------------------------------------------------------------------- 
     229      ! 
    232230      IF(lwp) WRITE(numout,*) 
    233231      IF(lwp) WRITE(numout,*) 'anharmo_end: kt=nitend_han: Perform harmonic analysis' 
     
    364362         END DO 
    365363      END DO 
    366  
     364      ! 
    367365      CALL dia_wri_harm ! Write results in files 
    368       CALL wrk_dealloc( jpi , jpj , jpmax_harmo , 2 , ana_amp ) 
    369366      ! 
    370367   END SUBROUTINE dia_harm_end 
     
    427424      INTEGER                         :: ji_sd, jj_sd, ji1_sd, ji2_sd, jk1_sd, jk2_sd 
    428425      REAL(wp)                        :: zval1, zval2, zx1 
    429       REAL(wp), POINTER, DIMENSION(:) :: ztmpx, zcol1, zcol2 
    430       INTEGER , POINTER, DIMENSION(:) :: ipos2, ipivot 
     426      REAL(wp), DIMENSION(jpincomax) :: ztmpx, zcol1, zcol2 
     427      INTEGER , DIMENSION(jpincomax) :: ipos2, ipivot 
    431428      !--------------------------------------------------------------------------------- 
    432       CALL wrk_alloc( jpincomax , ztmpx , zcol1 , zcol2 ) 
    433       CALL wrk_alloc( jpincomax , ipos2 , ipivot        ) 
    434              
     429      !             
    435430      IF( init == 1 ) THEN 
    436431         IF( nsparse > jpdimsparse )   CALL ctl_stop( 'STOP', 'SUR_DETERMINE : nsparse .GT. jpdimsparse') 
     
    517512         ztmp7(ipos1(jj_sd))=ztmpx(jj_sd) 
    518513      END DO 
    519  
    520       CALL wrk_dealloc( jpincomax , ztmpx , zcol1 , zcol2 ) 
    521       CALL wrk_dealloc( jpincomax , ipos2 , ipivot        ) 
    522514      ! 
    523515   END SUBROUTINE SUR_DETERMINE 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90

    r7753 r9124  
    3131   USE lib_mpp         ! distributed memory computing library 
    3232   USE timing          ! preformance summary 
    33    USE wrk_nemo        ! work arrays 
    3433 
    3534   IMPLICIT NONE 
     
    8281      REAL(wp)   ::   z_wn_trd_t , z_wn_trd_s     !    -     - 
    8382      REAL(wp)   ::   z_ssh_hc , z_ssh_sc         !    -     - 
    84       REAL(wp), DIMENSION(:,:), POINTER ::   z2d0, z2d1 
    85       !!--------------------------------------------------------------------------- 
    86       IF( nn_timing == 1 )   CALL timing_start('dia_hsb')       
    87       ! 
    88       CALL wrk_alloc( jpi,jpj,   z2d0, z2d1 ) 
     83      REAL(wp), DIMENSION(jpi,jpj) ::   z2d0, z2d1   ! 2D workspace 
     84      !!--------------------------------------------------------------------------- 
     85      IF( ln_timing )   CALL timing_start('dia_hsb')       
    8986      ! 
    9087      tsn(:,:,:,1) = tsn(:,:,:,1) * tmask(:,:,:) ; tsb(:,:,:,1) = tsb(:,:,:,1) * tmask(:,:,:) ; 
     
    228225      IF( lrst_oce )   CALL dia_hsb_rst( kt, 'WRITE' ) 
    229226      ! 
    230       CALL wrk_dealloc( jpi,jpj,   z2d0, z2d1 ) 
    231       ! 
    232       IF( nn_timing == 1 )   CALL timing_stop('dia_hsb') 
     227      IF( ln_timing )   CALL timing_stop('dia_hsb') 
    233228      ! 
    234229   END SUBROUTINE dia_hsb 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90

    r9019 r9124  
    104104      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zdelr      ! delta rho equivalent to deltaT = 0.2 
    105105      !!---------------------------------------------------------------------- 
    106       IF( nn_timing == 1 )   CALL timing_start('dia_hth') 
     106      IF( ln_timing )   CALL timing_start('dia_hth') 
    107107 
    108108      IF( kt == nit000 ) THEN 
     
    332332      CALL iom_put( "hc300", htc3 )      ! first 300m heat content 
    333333      ! 
    334       IF( nn_timing == 1 )   CALL timing_stop('dia_hth') 
     334      IF( ln_timing )   CALL timing_stop('dia_hth') 
    335335      ! 
    336336   END SUBROUTINE dia_hth 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90

    r9019 r9124  
    3737   PUBLIC   ptr_sj         ! call by tra_ldf & tra_adv routines 
    3838   PUBLIC   ptr_sjk        !  
    39    PUBLIC   dia_ptr_init   ! call in step module 
     39   PUBLIC   dia_ptr_init   ! call in memogcm 
    4040   PUBLIC   dia_ptr        ! call in step module 
    4141   PUBLIC   dia_ptr_hst    ! called from tra_ldf/tra_adv routines 
     
    9696      !!---------------------------------------------------------------------- 
    9797      ! 
    98       IF( nn_timing == 1 )   CALL timing_start('dia_ptr') 
     98      IF( ln_timing )   CALL timing_start('dia_ptr') 
    9999 
    100100      ! 
     
    373373      ENDIF 
    374374      ! 
    375       IF( nn_timing == 1 )   CALL timing_stop('dia_ptr') 
     375      IF( ln_timing )   CALL timing_stop('dia_ptr') 
    376376      ! 
    377377   END SUBROUTINE dia_ptr 
     
    457457      !  
    458458   END SUBROUTINE dia_ptr_init 
     459 
    459460 
    460461   SUBROUTINE dia_ptr_hst( ktra, cptr, pva )  
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90

    r7646 r9124  
    1212   USE in_out_manager  ! I/O units 
    1313   USE iom             ! I/0 library 
    14    USE wrk_nemo        ! working arrays 
    15  
    1614 
    1715   IMPLICIT NONE 
     
    4240      !!---------------------------------------------------------------------- 
    4341      ! 
    44       REWIND ( numnam_ref )              ! Read Namelist nam_diatmb in reference namelist : TMB diagnostics 
    45       READ   ( numnam_ref, nam_diatmb, IOSTAT=ios, ERR= 901 ) 
     42      REWIND( numnam_ref )              ! Read Namelist nam_diatmb in reference namelist : TMB diagnostics 
     43      READ  ( numnam_ref, nam_diatmb, IOSTAT=ios, ERR= 901 ) 
    4644901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist', lwp ) 
    4745  
    4846      REWIND( numnam_cfg )              ! Namelist nam_diatmb in configuration namelist  TMB diagnostics 
    4947      READ  ( numnam_cfg, nam_diatmb, IOSTAT = ios, ERR = 902 ) 
    50 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist', lwp ) 
     48902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist', lwp ) 
    5149      IF(lwm) WRITE ( numond, nam_diatmb ) 
    5250 
     
    7270      !! 
    7371      !!---------------------------------------------------------------------- 
    74       REAL(wp), DIMENSION(jpi, jpj, jpk), INTENT(in   ) :: pfield   ! Input 3d field and mask 
    75       REAL(wp), DIMENSION(jpi, jpj,  3 ), INTENT(  out) :: ptmb     ! top, middle, bottom extracted from pfield 
     72      REAL(wp), DIMENSION(jpi, jpj, jpk), INTENT(in   ) ::   pfield   ! Input 3D field and mask 
     73      REAL(wp), DIMENSION(jpi, jpj,  3 ), INTENT(  out) ::   ptmb     ! top, middle, bottom extracted from pfield 
    7674      ! 
    77       INTEGER  ::   ji, jj  ! Dummy loop indices 
    78       INTEGER  ::   itop, imid, ibot  ! local integers 
    79       REAL(wp) ::   zmdi = 1.e+20_wp  ! land value 
     75      INTEGER ::   ji, jj   ! Dummy loop indices 
     76      INTEGER ::   itop, imid, ibot   ! local integers 
     77      REAL(wp)::   zmdi = 1.e+20_wp   ! land value 
    8078      !!--------------------------------------------------------------------- 
    8179      ! 
     
    8684            imid =  itop + ( ibot - itop + 1 ) / 2    ! middle ocean           
    8785            !                     
    88             ptmb(ji,jj,1) = pfield(ji,jj,itop)*tmask(ji,jj,itop)  + zmdi*( 1._wp-tmask(ji,jj,itop) ) 
    89             ptmb(ji,jj,2) = pfield(ji,jj,imid)*tmask(ji,jj,imid)  + zmdi*( 1._wp-tmask(ji,jj,imid) ) 
    90             ptmb(ji,jj,3) = pfield(ji,jj,ibot)*tmask(ji,jj,ibot)  + zmdi*( 1._wp-tmask(ji,jj,ibot) ) 
     86            ptmb(ji,jj,1) = pfield(ji,jj,itop)*tmask(ji,jj,itop) + zmdi*( 1._wp-tmask(ji,jj,itop) ) 
     87            ptmb(ji,jj,2) = pfield(ji,jj,imid)*tmask(ji,jj,imid) + zmdi*( 1._wp-tmask(ji,jj,imid) ) 
     88            ptmb(ji,jj,3) = pfield(ji,jj,ibot)*tmask(ji,jj,ibot) + zmdi*( 1._wp-tmask(ji,jj,ibot) ) 
    9189         END DO 
    9290      END DO 
     
    105103      !!-------------------------------------------------------------------- 
    106104      REAL(wp) ::   zmdi =1.e+20     ! land value 
    107       REAL(wp), POINTER, DIMENSION(:,:,:) :: zwtmb    ! workspace  
     105      REAL(wp), DIMENSION(jpi,jpj,3) ::   zwtmb   ! workspace  
    108106      !!-------------------------------------------------------------------- 
    109107      ! 
    110       IF (ln_diatmb) THEN 
    111          CALL wrk_alloc( jpi,jpj,3   , zwtmb ) 
    112          CALL dia_calctmb(  tsn(:,:,:,jp_tem),zwtmb ) 
    113          !ssh already output but here we output it masked 
    114          CALL iom_put( "sshnmasked" , sshn(:,:)*tmask(:,:,1) + zmdi*(1.0 - tmask(:,:,1)) ) 
    115          CALL iom_put( "top_temp" , zwtmb(:,:,1) )    ! tmb Temperature 
    116          CALL iom_put( "mid_temp" , zwtmb(:,:,2) )    ! tmb Temperature 
    117          CALL iom_put( "bot_temp" , zwtmb(:,:,3) )    ! tmb Temperature 
    118 !         CALL iom_put( "sotrefml" , hmld_tref(:,:) )    ! "T criterion Mixed Layer Depth 
    119  
    120          CALL dia_calctmb(  tsn(:,:,:,jp_sal),zwtmb ) 
    121          CALL iom_put( "top_sal" , zwtmb(:,:,1) )    ! tmb Salinity  
    122          CALL iom_put( "mid_sal" , zwtmb(:,:,2) )    ! tmb Salinity 
    123          CALL iom_put( "bot_sal" , zwtmb(:,:,3) )    ! tmb Salinity 
    124  
    125          CALL dia_calctmb(  un(:,:,:),zwtmb ) 
    126          CALL iom_put( "top_u" , zwtmb(:,:,1) )    ! tmb  U Velocity 
    127          CALL iom_put( "mid_u" , zwtmb(:,:,2) )    ! tmb  U Velocity 
    128          CALL iom_put( "bot_u" , zwtmb(:,:,3) )    ! tmb  U Velocity 
    129 !Called in  dynspg_ts.F90        CALL iom_put( "baro_u" , un_b )    ! Barotropic  U Velocity 
    130  
    131          CALL dia_calctmb(  vn(:,:,:),zwtmb ) 
    132          CALL iom_put( "top_v" , zwtmb(:,:,1) )    ! tmb  V Velocity 
    133          CALL iom_put( "mid_v" , zwtmb(:,:,2) )    ! tmb  V Velocity 
    134          CALL iom_put( "bot_v" , zwtmb(:,:,3) )    ! tmb  V Velocity 
    135 !Called in  dynspg_ts.F90       CALL iom_put( "baro_v" , vn_b )    ! Barotropic  V Velocity 
    136          CALL wrk_dealloc( jpi,jpj,3   , zwtmb ) 
    137       ELSE 
    138          CALL ctl_warn('dia_tmb: tmb diagnostic is set to false you should not have seen this') 
    139       ENDIF 
     108      CALL dia_calctmb( tsn(:,:,:,jp_tem), zwtmb ) 
     109      !ssh already output but here we output it masked 
     110      CALL iom_put( "sshnmasked", sshn(:,:)*tmask(:,:,1) + zmdi*(1.0 - tmask(:,:,1)) ) 
     111      CALL iom_put( "top_temp"  , zwtmb(:,:,1) )    ! tmb Temperature 
     112      CALL iom_put( "mid_temp"  , zwtmb(:,:,2) )    ! tmb Temperature 
     113      CALL iom_put( "bot_temp"  , zwtmb(:,:,3) )    ! tmb Temperature 
     114      ! 
     115      CALL dia_calctmb( tsn(:,:,:,jp_sal), zwtmb ) 
     116      CALL iom_put( "top_sal"   , zwtmb(:,:,1) )    ! tmb Salinity  
     117      CALL iom_put( "mid_sal"   , zwtmb(:,:,2) )    ! tmb Salinity 
     118      CALL iom_put( "bot_sal"   , zwtmb(:,:,3) )    ! tmb Salinity 
     119      ! 
     120      CALL dia_calctmb( un(:,:,:), zwtmb ) 
     121      CALL iom_put( "top_u"     , zwtmb(:,:,1) )    ! tmb  U Velocity 
     122      CALL iom_put( "mid_u"     , zwtmb(:,:,2) )    ! tmb  U Velocity 
     123      CALL iom_put( "bot_u"     , zwtmb(:,:,3) )    ! tmb  U Velocity 
     124      ! 
     125      CALL dia_calctmb( vn(:,:,:), zwtmb ) 
     126      CALL iom_put( "top_v"     , zwtmb(:,:,1) )    ! tmb  V Velocity 
     127      CALL iom_put( "mid_v"     , zwtmb(:,:,2) )    ! tmb  V Velocity 
     128      CALL iom_put( "bot_v"     , zwtmb(:,:,3) )    ! tmb  V Velocity 
    140129      ! 
    141130   END SUBROUTINE dia_tmb 
     131 
    142132   !!====================================================================== 
    143133END MODULE diatmb 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r9023 r9124  
    126126      !!---------------------------------------------------------------------- 
    127127      !  
    128       IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
     128      IF( ln_timing )   CALL timing_start('dia_wri') 
    129129      !  
    130130      ! Output the initial state and forcings 
     
    402402      IF (ln_dia25h)   CALL dia_25h( kt )             ! 25h averaging 
    403403 
    404       IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
     404      IF( ln_timing )   CALL timing_stop('dia_wri') 
    405405      ! 
    406406   END SUBROUTINE dia_wri 
     
    438438      !!---------------------------------------------------------------------- 
    439439      !  
    440       IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
     440      IF( ln_timing )   CALL timing_start('dia_wri') 
    441441      ! 
    442442      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==! 
     
    859859      ENDIF 
    860860      ! 
    861       IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
     861      IF( ln_timing )   CALL timing_stop('dia_wri') 
    862862      ! 
    863863   END SUBROUTINE dia_wri 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIU/step_diu.F90

    r7646 r9124  
    7777      &    qsr, qns, taum, rhop(:,:,1), rdt)  
    7878 
    79       IF(ln_diurnal_only) THEN 
     79      IF( ln_diurnal_only ) THEN 
    8080         IF( ln_diaobs )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    8181      
     
    8686         IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file 
    8787      
    88          IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset  
     88         IF( ln_timing .AND.  kstp == nit000  )   CALL timing_reset  
    8989      ENDIF 
    9090        
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r9019 r9124  
    284284   SUBROUTINE day_rst( kt, cdrw ) 
    285285      !!--------------------------------------------------------------------- 
    286       !!                   ***  ROUTINE ts_rst  *** 
     286      !!                   ***  ROUTINE day_rst  *** 
    287287      !! 
    288288      !!  ** Purpose : Read or write calendar in restart file: 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r9023 r9124  
    4444   USE lbclnk         ! ocean lateral boundary condition (or mpp link) 
    4545   USE lib_mpp        ! distributed memory computing library 
    46    USE timing         ! Timing 
    4746 
    4847   IMPLICIT NONE 
     
    8079      REAL(wp), DIMENSION(jpi,jpj) ::   z1_hu_0, z1_hv_0 
    8180      !!---------------------------------------------------------------------- 
    82       ! 
    83       IF( ln_timing )   CALL timing_start('dom_init') 
    8481      ! 
    8582      IF(lwp) THEN         ! Ocean domain Parameters (control print) 
     
    191188      ! 
    192189      IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
    193       ! 
    194       IF( ln_timing )   CALL timing_stop('dom_init') 
    195190      ! 
    196191   END SUBROUTINE dom_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r9090 r9124  
    2626   USE dom_oce        ! ocean space and time domain 
    2727   USE usrdef_fmask   ! user defined fmask 
    28    USE bdy_oce       
     28   USE bdy_oce        ! open boundary 
     29   ! 
    2930   USE in_out_manager ! I/O manager 
    3031   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3132   USE lib_mpp        ! Massively Parallel Processing library 
    32    USE timing         ! Timing 
    3333 
    3434   IMPLICIT NONE 
     
    102102         &             ln_vol, nn_volctl, nn_rimwidth, nb_jpk_bdy 
    103103      !!--------------------------------------------------------------------- 
    104       ! 
    105       IF( ln_timing )   CALL timing_start('dom_msk') 
    106104      ! 
    107105      REWIND( numnam_ref )              ! Namelist namlbc in reference namelist : Lateral momentum boundary condition 
     
    295293      CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 
    296294      ! 
    297       ! 
    298       IF( ln_timing )   CALL timing_stop('dom_msk') 
    299       ! 
    300295   END SUBROUTINE dom_msk 
    301296    
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domngb.F90

    r9019 r9124  
    1414   USE in_out_manager ! I/O manager 
    1515   USE lib_mpp        ! for mppsum 
    16    USE timing         ! Timing 
    1716 
    1817   IMPLICIT NONE 
     
    4847      !!-------------------------------------------------------------------- 
    4948      ! 
    50       IF( ln_timing )   CALL timing_start('dom_ngb') 
    51       ! 
    5249      zmask(:,:) = 0._wp 
    5350      ik = 1 
     
    7774      ENDIF 
    7875      ! 
    79       IF( ln_timing )   CALL timing_stop('dom_ngb') 
    80       ! 
    8176   END SUBROUTINE dom_ngb 
    8277 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r9090 r9124  
    119119      REAL(wp)::   zcoef 
    120120      !!---------------------------------------------------------------------- 
    121       ! 
    122       IF( ln_timing )   CALL timing_start('dom_vvl_init') 
    123121      ! 
    124122      IF(lwp) WRITE(numout,*) 
     
    239237         ENDIF 
    240238      ENDIF 
    241       ! 
    242       IF( ln_timing )   CALL timing_stop('dom_vvl_init') 
    243239      ! 
    244240   END SUBROUTINE dom_vvl_init 
     
    674670      !!---------------------------------------------------------------------- 
    675671      ! 
    676       IF( ln_timing )   CALL timing_start('dom_vvl_interpol') 
    677       ! 
    678672      IF(ln_wd_il) THEN 
    679673        zlnwd = 1.0_wp 
     
    761755      END SELECT 
    762756      ! 
    763       IF( ln_timing )   CALL timing_stop('dom_vvl_interpol') 
    764       ! 
    765757   END SUBROUTINE dom_vvl_interpol 
    766758 
     
    784776      INTEGER ::   id1, id2, id3, id4, id5     ! local integers 
    785777      !!---------------------------------------------------------------------- 
    786       ! 
    787       IF( ln_timing )   CALL timing_start('dom_vvl_rst') 
    788778      ! 
    789779      IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise  
     
    957947      ENDIF 
    958948      ! 
    959       IF( ln_timing )   CALL timing_stop('dom_vvl_rst') 
    960       ! 
    961949   END SUBROUTINE dom_vvl_rst 
    962950 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90

    r9023 r9124  
    2424   USE lbclnk          ! lateral boundary conditions - mpp exchanges 
    2525   USE lib_mpp         ! MPP library 
    26    USE timing          ! Timing 
    2726 
    2827   IMPLICIT NONE 
     
    7776      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdepu, zdepv   ! 3D workspace 
    7877      !!---------------------------------------------------------------------- 
    79       ! 
    80       IF( ln_timing )   CALL timing_start('dom_wri') 
    8178      ! 
    8279      IF(lwp) WRITE(numout,*) 
     
    200197      !                                     ! ============================ 
    201198      ! 
    202       IF( ln_timing )   CALL timing_stop('dom_wri') 
    203       ! 
    204199   END SUBROUTINE dom_wri 
    205200 
     
    222217      REAL(wp), DIMENSION(jpi,jpj) ::   ztstref 
    223218      !!---------------------------------------------------------------------- 
    224       ! 
    225       IF( ln_timing )   CALL timing_start('dom_uniq') 
    226219      ! 
    227220      ! build an array with different values for each element  
     
    238231      ! fill only the inner part of the cpu with llbl converted into real  
    239232      puniq(nldi:nlei,nldj:nlej) = REAL( COUNT( lldbl(nldi:nlei,nldj:nlej,:), dim = 3 ) , wp ) 
    240       ! 
    241       IF( ln_timing )   CALL timing_stop('dom_uniq') 
    242233      ! 
    243234   END SUBROUTINE dom_uniq 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r9023 r9124  
    3636   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3737   USE lib_mpp        ! distributed memory computing library 
    38    USE timing         ! Timing 
    3938 
    4039   IMPLICIT NONE 
     
    7574      REAL(wp) ::   zrefdep             ! depth of the reference level (~10m) 
    7675      !!---------------------------------------------------------------------- 
    77       ! 
    78       IF( ln_timing )   CALL timing_start('dom_zgr') 
    7976      ! 
    8077      IF(lwp) THEN                     ! Control print 
     
    162159            &                          ' w ', MAXVAL(   e3w_0(:,:,:) ) 
    163160      ENDIF 
    164       ! 
    165       IF( ln_timing )   CALL timing_stop('dom_zgr') 
    166161      ! 
    167162   END SUBROUTINE dom_zgr 
     
    285280      REAL(wp), DIMENSION(jpi,jpj) ::   zk   ! workspace 
    286281      !!---------------------------------------------------------------------- 
    287       ! 
    288       IF( ln_timing )   CALL timing_start('zgr_top_bot') 
    289282      ! 
    290283      IF(lwp) WRITE(numout,*) 
     
    316309      zk(:,:) = REAL( mbkv(:,:), wp )   ;   CALL lbc_lnk( zk, 'V', 1. )   ;   mbkv(:,:) = MAX( INT( zk(:,:) ), 1 ) 
    317310      ! 
    318       IF( ln_timing )   CALL timing_stop('zgr_top_bot') 
    319       ! 
    320311   END SUBROUTINE zgr_top_bot 
    321312 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90

    r9019 r9124  
    2222   USE in_out_manager  ! I/O manager 
    2323   USE lib_mpp         ! MPP library 
    24    USE timing          ! Timing 
    2524 
    2625   IMPLICIT NONE 
     
    6160      NAMELIST/namtsd/   ln_tsd_init, ln_tsd_tradmp, cn_dir, sn_tem, sn_sal 
    6261      !!---------------------------------------------------------------------- 
    63       ! 
    64       IF( ln_timing )   CALL timing_start('dta_tsd_init') 
    6562      ! 
    6663      !  Initialisation 
     
    120117      ENDIF 
    121118      ! 
    122       IF( ln_timing )   CALL timing_stop('dta_tsd_init') 
    123       ! 
    124119   END SUBROUTINE dta_tsd_init 
    125120 
     
    148143      REAL(wp), DIMENSION(jpk) ::  ztp, zsp   ! 1D workspace 
    149144      !!---------------------------------------------------------------------- 
    150       ! 
    151       IF( ln_timing )   CALL timing_start('dta_tsd') 
    152145      ! 
    153146      CALL fld_read( kt, 1, sf_tsd )      !==   read T & S data at kt time step   ==! 
     
    256249      ENDIF 
    257250      ! 
    258       IF( ln_timing )   CALL timing_stop('dta_tsd') 
    259       ! 
    260251   END SUBROUTINE dta_tsd 
    261252 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r9019 r9124  
    3636   USE lib_mpp         ! MPP library 
    3737   USE restart         ! restart 
    38    USE timing          ! Timing 
    3938 
    4039   IMPLICIT NONE 
     
    6362!!gm end 
    6463      !!---------------------------------------------------------------------- 
    65       ! 
    66       IF( ln_timing )   CALL timing_start('istate_init') 
    6764      ! 
    6865      IF(lwp) WRITE(numout,*) 
     
    165162      vb_b(:,:) = vb_b(:,:) * r1_hv_b(:,:) 
    166163      ! 
    167       IF( ln_timing )   CALL timing_stop('istate_init') 
    168       ! 
    169164   END SUBROUTINE istate_init 
    170165 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90

    r9111 r9124  
    2020   USE lib_mpp        ! MPP library 
    2121   USE prtctl         ! Print control 
    22    USE timing         ! Timing 
    2322 
    2423   IMPLICIT NONE 
     
    5352      REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zfv_t, zfv_f, zfv_vw, zfv, zfw 
    5453      !!---------------------------------------------------------------------- 
    55       ! 
    56       IF( ln_timing )   CALL timing_start('dyn_adv_cen2') 
    5754      ! 
    5855      IF( kt == nit000 .AND. lwp ) THEN 
     
    145142         &                       tab3d_2=va, clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    146143      ! 
    147       IF( ln_timing )   CALL timing_stop('dyn_adv_cen2') 
    148       ! 
    149144   END SUBROUTINE dyn_adv_cen2 
    150145 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90

    r9090 r9124  
    2323   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2424   USE lib_mpp        ! MPP library 
    25    USE timing         ! Timing 
    2625 
    2726   IMPLICIT NONE 
     
    7978      !!---------------------------------------------------------------------- 
    8079      ! 
    81       IF( ln_timing )   CALL timing_start('dyn_adv_ubs') 
    82       ! 
    8380      IF( kt == nit000 ) THEN 
    8481         IF(lwp) WRITE(numout,*) 
     
    238235         &                       tab3d_2=va, clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    239236      ! 
    240       IF( ln_timing )   CALL timing_stop('dyn_adv_ubs') 
    241       ! 
    242237   END SUBROUTINE dyn_adv_ubs 
    243238 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90

    r9019 r9124  
    2121   USE in_out_manager ! I/O manager 
    2222   USE prtctl         ! Print control 
    23    USE timing         ! Timing 
    2423 
    2524   IMPLICIT NONE 
     
    5655      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdu, ztrdv 
    5756      !!--------------------------------------------------------------------- 
    58       ! 
    59       IF( ln_timing )   CALL timing_start('dyn_bfr') 
    6057      ! 
    6158!!gm bug : time step is only rdt (not 2 rdt if euler start !) 
     
    109106         &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    110107      ! 
    111       IF( ln_timing )   CALL timing_stop('dyn_bfr') 
    112       ! 
    113108   END SUBROUTINE dyn_bfr 
    114109 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90

    r9090 r9124  
    2828   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2929   USE prtctl          ! Print control 
    30    USE timing          ! Timing 
    3130 
    3231   IMPLICIT NONE 
     
    114113      !!---------------------------------------------------------------------- 
    115114      ! 
    116       IF( ln_timing )   CALL timing_start('dyn_ldf_iso') 
    117       ! 
    118115      IF( kt == nit000 ) THEN 
    119116         IF(lwp) WRITE(numout,*) 
     
    399396      END DO                                           !   End of slab 
    400397      !                                                ! =============== 
    401       ! 
    402       IF( ln_timing )   CALL timing_stop('dyn_ldf_iso') 
    403       ! 
    404398   END SUBROUTINE dyn_ldf_iso 
    405399 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90

    r9090 r9124  
    1919   USE in_out_manager ! I/O manager 
    2020   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    21    USE timing         ! Timing 
    2221 
    2322   IMPLICIT NONE 
     
    6564      ENDIF 
    6665      ! 
    67       IF( ln_timing )   CALL timing_start('dyn_ldf_lap') 
    68       ! 
    6966      IF( kpass == 1 ) THEN   ;   zsign =  1._wp      ! bilaplacian operator require a minus sign 
    7067      ELSE                    ;   zsign = -1._wp      !  (eddy viscosity coef. >0) 
     
    105102      !                                                ! =============== 
    106103      ! 
    107       IF( ln_timing )   CALL timing_stop('dyn_ldf_lap') 
    108       ! 
    109104   END SUBROUTINE dyn_ldf_lap 
    110105 
     
    130125      !!---------------------------------------------------------------------- 
    131126      ! 
    132       IF( ln_timing )   CALL timing_start('dyn_ldf_blp') 
    133       ! 
    134127      IF( kt == nit000 )  THEN 
    135128         IF(lwp) WRITE(numout,*) 
     
    147140      CALL dyn_ldf_lap( kt, zulap, zvlap, pua, pva, 2 )   ! rotated laplacian applied to zlap (output in pta) 
    148141      ! 
    149       IF( ln_timing )   CALL timing_stop('dyn_ldf_blp') 
    150       ! 
    151142   END SUBROUTINE dyn_ldf_blp 
    152143 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r9023 r9124  
    194194      !!---------------------------------------------------------------------- 
    195195      ! 
    196       IF( ln_timing )   CALL timing_start('dyn_spg_init') 
    197       ! 
    198196      REWIND( numnam_ref )              ! Namelist namdyn_spg in reference namelist : Free surface 
    199197      READ  ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901) 
     
    231229      IF( nspg == np_TS ) THEN   ! split-explicit scheme initialisation 
    232230         CALL dyn_spg_ts_init          ! do it first: set nn_baro used to allocate some arrays later on 
    233          IF( dyn_spg_ts_alloc() /= 0  )   CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_ts  arrays' ) 
    234          IF( neuler/=0 .AND. ln_bt_fw )   CALL ts_rst( nit000, 'READ' ) 
    235       ENDIF 
    236       ! 
    237       IF( ln_timing )   CALL timing_stop('dyn_spg_init') 
     231      ENDIF 
    238232      ! 
    239233   END SUBROUTINE dyn_spg_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90

    r9019 r9124  
    2323   USE prtctl          ! Print control 
    2424   USE iom             ! I/O library 
    25    USE timing          ! Timing 
    2625 
    2726   IMPLICIT NONE 
    2827   PRIVATE 
    2928 
    30    PUBLIC   dyn_spg_exp   ! routine called by dynspg.F90  
     29   PUBLIC   dyn_spg_exp   ! called in dynspg.F90  
    3130 
    3231   !! * Substitutions 
     
    6160      !!---------------------------------------------------------------------- 
    6261      ! 
    63       IF( ln_timing )   CALL timing_start('dyn_spg_exp') 
    64       ! 
    6562      IF( kt == nit000 ) THEN 
    6663         IF(lwp) WRITE(numout,*) 
     
    9390      ENDIF 
    9491      ! 
    95       IF( ln_timing )   CALL timing_stop('dyn_spg_exp') 
    96       ! 
    9792   END SUBROUTINE dyn_spg_exp 
    9893 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r9116 r9124  
    4848#if defined key_agrif 
    4949   USE agrif_opa_interp ! agrif 
     50   USE agrif_oce 
    5051#endif 
    5152#if defined key_asminc    
     
    5960   USE iom             ! IOM library 
    6061   USE restart         ! only for lrst_oce 
    61    USE timing          ! Timing     
    6262   USE diatmb          ! Top,middle,bottom output 
    63 #if defined key_agrif 
    64    USE agrif_opa_interp ! agrif 
    65    USE agrif_oce 
    66 #endif 
    67 #if defined key_asminc    
    68    USE asminc          ! Assimilation increment 
    69 #endif 
    7063 
    7164   IMPLICIT NONE 
    7265   PRIVATE 
    7366 
    74    PUBLIC dyn_spg_ts        ! routine called in dynspg.F90  
    75    PUBLIC dyn_spg_ts_alloc  !    "      "     "    " 
    76    PUBLIC dyn_spg_ts_init   !    "      "     "    " 
    77    PUBLIC ts_rst            !    "      "     "    " 
     67   PUBLIC dyn_spg_ts        ! called by dyn_spg  
     68   PUBLIC dyn_spg_ts_init   !    -    - dyn_spg_init 
    7869 
    7970   !! Time filtered arrays at baroclinic time step: 
    8071   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   un_adv , vn_adv   !: Advection vel. at "now" barocl. step 
     72   ! 
    8173   INTEGER, SAVE :: icycle      ! Number of barotropic sub-steps for each internal step nn_baro <= 2.5 nn_baro 
    8274   REAL(wp),SAVE :: rdtbt       ! Barotropic time step 
    8375   ! 
    8476   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:)   ::   wgtbtp1, wgtbtp2   ! 1st & 2nd weights used in time filtering of barotropic fields 
    85    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  zwz                 ! ff_f/h at F points 
    86    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ftnw, ftne          ! triad of coriolis parameter 
    87    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ftsw, ftse          ! (only used with een vorticity scheme) 
     77   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zwz                ! ff_f/h at F points 
     78   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ftnw, ftne         ! triad of coriolis parameter 
     79   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ftsw, ftse         ! (only used with een vorticity scheme) 
    8880 
    8981   REAL(wp) ::   r1_12 = 1._wp / 12._wp   ! local ratios 
     
    179171      !!---------------------------------------------------------------------- 
    180172      ! 
    181       IF( ln_timing )   CALL timing_start('dyn_spg_ts') 
    182       ! 
    183173      IF( ln_wd_il ) ALLOCATE( zcpx(jpi,jpj), zcpy(jpi,jpj) ) 
    184174      !                                         !* Allocate temporary arrays 
     
    284274            zhf(:,:) = 0._wp 
    285275             
    286 !!gm  assume 0 in both cases (xhich is almost surely WRONG ! ) as hvatf has been removed  
     276!!gm  assume 0 in both cases (which is almost surely WRONG ! ) as hvatf has been removed  
    287277!!gm    A priori a better value should be something like : 
    288278!!gm          zhf(i,j) = masked sum of  ht(i,j) , ht(i+1,j) , ht(i,j+1) , (i+1,j+1)  
     
    12631253         CALL iom_put( "baro_v" , vn_b*vmask(:,:,1)+zmdi*(1-vmask(:,:,1 ) ) )  ! Barotropic  V Velocity 
    12641254      ENDIF 
    1265       IF( ln_timing )   CALL timing_stop('dyn_spg_ts') 
    12661255      ! 
    12671256   END SUBROUTINE dyn_spg_ts 
     
    14871476      ENDIF 
    14881477      ! 
     1478      !                             ! Allocate time-splitting arrays 
     1479      IF( dyn_spg_ts_alloc() /= 0    )   CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_ts  arrays' ) 
     1480      ! 
     1481      !                             ! read restart when needed 
     1482      IF( neuler /= 0 .AND. ln_bt_fw )   CALL ts_rst( nit000, 'READ' ) 
     1483      ! 
    14891484   END SUBROUTINE dyn_spg_ts_init 
    14901485 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90

    r9019 r9124  
    193193      REAL(wp), DIMENSION(jpi,jpj) ::   zwx, zwy, zwz   ! 2D workspace 
    194194      !!---------------------------------------------------------------------- 
    195       ! 
    196       IF( ln_timing )  CALL timing_start('vor_ene') 
    197195      ! 
    198196      IF( kt == nit000 ) THEN 
     
    275273      END DO                                           !   End of slab 
    276274      !                                                ! =============== 
    277       ! 
    278       IF( ln_timing )  CALL timing_stop('vor_ene') 
    279       ! 
    280275   END SUBROUTINE vor_ene 
    281276 
     
    310305      REAL(wp), DIMENSION(jpi,jpj) ::   zwx, zwy, zwz, zww   ! 2D workspace 
    311306      !!---------------------------------------------------------------------- 
    312       ! 
    313       IF( ln_timing )   CALL timing_start('vor_ens') 
    314307      ! 
    315308      IF( kt == nit000 ) THEN 
     
    391384      END DO                                           !   End of slab 
    392385      !                                                ! =============== 
    393       ! 
    394       IF( ln_timing )   CALL timing_stop('vor_ens') 
    395       ! 
    396386   END SUBROUTINE vor_ens 
    397387 
     
    426416      REAL(wp), DIMENSION(jpi,jpj)   :: ztnw, ztne, ztsw, ztse 
    427417      !!---------------------------------------------------------------------- 
    428       ! 
    429       IF( ln_timing )   CALL timing_start('vor_een') 
    430418      ! 
    431419      IF( kt == nit000 ) THEN 
     
    552540      END DO                                           !   End of slab 
    553541      !                                                ! =============== 
    554       ! 
    555       IF( ln_timing )   CALL timing_stop('vor_een') 
    556       ! 
    557542   END SUBROUTINE vor_een 
    558543 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r9023 r9124  
    207207#endif  
    208208      ! 
    209       IF( nn_timing == 1 )  CALL timing_stop('wzv') 
     209      IF( ln_timing )   CALL timing_stop('wzv') 
    210210      ! 
    211211   END SUBROUTINE wzv 
     
    236236      !!---------------------------------------------------------------------- 
    237237      ! 
    238       IF( ln_timing )  CALL timing_start('ssh_swp') 
     238      IF( ln_timing )   CALL timing_start('ssh_swp') 
    239239      ! 
    240240      IF( kt == nit000 ) THEN 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DYN/wet_dry.F90

    r9092 r9124  
    2626   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2727   USE lib_mpp        ! MPP library 
    28    USE timing         ! Timing 
     28   USE timing         ! timing of the main modules 
    2929 
    3030   IMPLICIT NONE 
     
    7171      !! ** input   : - namwad namelist 
    7272      !!---------------------------------------------------------------------- 
    73       !! 
    74       NAMELIST/namwad/ ln_wd_il, ln_wd_dl, rn_wdmin0, rn_wdmin1, rn_wdmin2, rn_wdld, & 
    75                      & nn_wdit, ln_wd_dl_bc, ln_wd_dl_rmp 
    76       INTEGER  ::   ios                 ! Local integer output status for namelist read 
    77       INTEGER  ::   ierr                ! Local integer status array allocation  
     73      INTEGER  ::   ios, ierr   ! Local integer 
     74      !! 
     75      NAMELIST/namwad/ ln_wd_il, ln_wd_dl   , rn_wdmin0, rn_wdmin1, rn_wdmin2, rn_wdld,   & 
     76         &             nn_wdit , ln_wd_dl_bc, ln_wd_dl_rmp 
    7877      !!---------------------------------------------------------------------- 
    7978      ! 
     
    10099         WRITE(numout,*) '      T => baroclinic u,v=0 at dry pts: ln_wd_dl_bc = ', ln_wd_dl_bc      
    101100         WRITE(numout,*) '      use a ramp for rwd limiter:  ln_wd_dl_rwd_rmp = ', ln_wd_dl_rmp 
    102   
    103101      ENDIF 
    104102      IF( .NOT. ln_read_cfg ) THEN 
    105103         IF(lwp) WRITE(numout,*) '      No configuration file so seting ssh_ref to zero  ' 
    106          ssh_ref=0.0 
     104         ssh_ref=0._wp 
    107105      ENDIF 
    108106 
    109       r_rn_wdmin1=1/rn_wdmin1 
     107      r_rn_wdmin1 = 1 / rn_wdmin1 
    110108      ll_wd = .FALSE. 
    111       IF(ln_wd_il .OR. ln_wd_dl) THEN 
     109      IF( ln_wd_il .OR. ln_wd_dl ) THEN 
    112110         ll_wd = .TRUE. 
    113111         ALLOCATE( wdmask(jpi,jpj),   STAT=ierr ) 
     
    144142      REAL(wp),  DIMENSION(jpi,jpj) ::   zflxu1 , zflxv1    ! local 2D workspace 
    145143      !!---------------------------------------------------------------------- 
    146       ! 
    147       IF( nn_timing == 1 )  CALL timing_start('wad_lmt') 
    148       ! 
    149         
     144      IF( ln_timing )   CALL timing_start('wad_lmt')      ! 
     145      ! 
    150146      DO jk = 1, jpkm1 
    151147         un(:,:,jk) = un(:,:,jk) * zwdlmtu(:,:)  
     
    153149      END DO 
    154150      jflag  = 0 
    155       zdepwd = 50._wp   !maximum depth on which that W/D could possibly happen 
    156  
     151      zdepwd = 50._wp      ! maximum depth on which that W/D could possibly happen 
     152      ! 
    157153      zflxp(:,:)   = 0._wp 
    158154      zflxn(:,:)   = 0._wp 
    159155      zflxu(:,:)   = 0._wp 
    160156      zflxv(:,:)   = 0._wp 
    161  
    162       zwdlmtu(:,:)  = 1._wp 
    163       zwdlmtv(:,:)  = 1._wp 
    164         
    165       ! Horizontal Flux in u and v direction 
    166       DO jk = 1, jpkm1   
    167          DO jj = 1, jpj 
    168             DO ji = 1, jpi 
    169                zflxu(ji,jj) = zflxu(ji,jj) + e3u_n(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk) 
    170                zflxv(ji,jj) = zflxv(ji,jj) + e3v_n(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk) 
    171             END DO   
    172          END DO   
    173       END DO 
    174         
     157      ! 
     158      zwdlmtu(:,:) = 1._wp 
     159      zwdlmtv(:,:) = 1._wp 
     160      ! 
     161      DO jk = 1, jpkm1     ! Horizontal Flux in u and v direction 
     162         zflxu(:,:) = zflxu(:,:) + e3u_n(:,:,jk) * un(:,:,jk) * umask(:,:,jk) 
     163         zflxv(:,:) = zflxv(:,:) + e3v_n(:,:,jk) * vn(:,:,jk) * vmask(:,:,jk) 
     164      END DO 
    175165      zflxu(:,:) = zflxu(:,:) * e2u(:,:) 
    176166      zflxv(:,:) = zflxv(:,:) * e1v(:,:) 
    177         
    178       wdmask(:,:) = 1 
     167      ! 
     168      wdmask(:,:) = 1._wp 
    179169      DO jj = 2, jpj 
    180170         DO ji = 2, jpi  
    181  
    182             IF( tmask(ji, jj, 1) < 0.5_wp ) CYCLE              ! we don't care about land cells 
    183             IF( ht_0(ji,jj) - ssh_ref > zdepwd ) CYCLE   ! and cells which are unlikely to dry 
    184  
    185             zflxp(ji,jj) = max(zflxu(ji,jj), 0._wp) - min(zflxu(ji-1,jj),   0._wp) + & 
    186                          & max(zflxv(ji,jj), 0._wp) - min(zflxv(ji,  jj-1), 0._wp)  
    187             zflxn(ji,jj) = min(zflxu(ji,jj), 0._wp) - max(zflxu(ji-1,jj),   0._wp) + & 
    188                          & min(zflxv(ji,jj), 0._wp) - max(zflxv(ji,  jj-1), 0._wp)  
    189  
     171            ! 
     172            IF( tmask(ji,jj,1)        < 0.5_wp )   CYCLE    ! we don't care about land cells 
     173            IF( ht_0(ji,jj) - ssh_ref > zdepwd )   CYCLE    ! and cells which are unlikely to dry 
     174            ! 
     175            zflxp(ji,jj) = MAX( zflxu(ji,jj) , 0._wp ) - MIN( zflxu(ji-1,jj  ) , 0._wp )  & 
     176               &         + MAX( zflxv(ji,jj) , 0._wp ) - MIN( zflxv(ji,  jj-1) , 0._wp )  
     177            zflxn(ji,jj) = MIN( zflxu(ji,jj) , 0._wp ) - MAX( zflxu(ji-1,jj  ) , 0._wp )  & 
     178               &         + MIN( zflxv(ji,jj) , 0._wp ) - MAX( zflxv(ji,  jj-1) , 0._wp )  
     179            ! 
    190180            zdep2 = ht_0(ji,jj) + sshb1(ji,jj) - rn_wdmin1 
    191             IF(zdep2 .le. 0._wp) THEN  !add more safty, but not necessary 
     181            IF( zdep2 <= 0._wp ) THEN     ! add more safty, but not necessary 
    192182               sshb1(ji,jj) = rn_wdmin1 - ht_0(ji,jj) 
    193183               IF(zflxu(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = 0._wp 
     
    197187               wdmask(ji,jj) = 0._wp 
    198188            END IF 
    199          ENDDO 
    200       END DO 
    201  
    202  
    203 ! HPG limiter from jholt 
     189         END DO 
     190      END DO 
     191      ! 
     192      !           ! HPG limiter from jholt 
    204193      wdramp(:,:) = min((ht_0(:,:) + sshb1(:,:) - rn_wdmin1)/(rn_wdmin0 - rn_wdmin1),1.0_wp) 
    205 !jth assume don't need a lbc_lnk here 
     194      !jth assume don't need a lbc_lnk here 
    206195      DO jj = 1, jpjm1 
    207196         DO ji = 1, jpim1 
    208             wdrampu(ji,jj) = min(wdramp(ji,jj),wdramp(ji+1,jj)) 
    209             wdrampv(ji,jj) = min(wdramp(ji,jj),wdramp(ji,jj+1)) 
     197            wdrampu(ji,jj) = MIN( wdramp(ji,jj) , wdramp(ji+1,jj) ) 
     198            wdrampv(ji,jj) = MIN( wdramp(ji,jj) , wdramp(ji,jj+1) ) 
    210199         END DO 
    211200      END DO 
    212 ! end HPG limiter 
    213  
    214  
    215        
    216         !! start limiter iterations  
    217       DO jk1 = 1, nn_wdit + 1 
    218         
    219            
     201      !           ! end HPG limiter 
     202      ! 
     203      ! 
     204      DO jk1 = 1, nn_wdit + 1      !==  start limiter iterations  ==! 
     205         ! 
    220206         zflxu1(:,:) = zflxu(:,:) * zwdlmtu(:,:) 
    221207         zflxv1(:,:) = zflxv(:,:) * zwdlmtv(:,:) 
    222208         jflag = 0     ! flag indicating if any further iterations are needed 
    223            
     209         ! 
    224210         DO jj = 2, jpj 
    225211            DO ji = 2, jpi  
    226          
    227                IF( tmask(ji, jj, 1) < 0.5_wp ) CYCLE  
    228                IF( ht_0(ji,jj) > zdepwd )      CYCLE 
    229          
     212               IF( tmask(ji, jj, 1) < 0.5_wp )   CYCLE  
     213               IF( ht_0(ji,jj)      > zdepwd )   CYCLE 
     214               ! 
    230215               ztmp = e1e2t(ji,jj) 
    231  
    232                zzflxp = max(zflxu1(ji,jj), 0._wp) - min(zflxu1(ji-1,jj),   0._wp) + & 
    233                       & max(zflxv1(ji,jj), 0._wp) - min(zflxv1(ji,  jj-1), 0._wp)  
    234                zzflxn = min(zflxu1(ji,jj), 0._wp) - max(zflxu1(ji-1,jj),   0._wp) + & 
    235                       & min(zflxv1(ji,jj), 0._wp) - max(zflxv1(ji,  jj-1), 0._wp)  
    236            
     216               ! 
     217               zzflxp = MAX( zflxu1(ji,jj) , 0._wp ) - MIN( zflxu1(ji-1,jj  ) , 0._wp)  & 
     218                  &   + MAX( zflxv1(ji,jj) , 0._wp ) - MIN( zflxv1(ji,  jj-1) , 0._wp)  
     219               zzflxn = MIN( zflxu1(ji,jj) , 0._wp ) - MAX( zflxu1(ji-1,jj  ) , 0._wp)  & 
     220                  &   + MIN( zflxv1(ji,jj) , 0._wp ) - MAX( zflxv1(ji,  jj-1) , 0._wp)  
     221               ! 
    237222               zdep1 = (zzflxp + zzflxn) * z2dt / ztmp 
    238223               zdep2 = ht_0(ji,jj) + sshb1(ji,jj) - rn_wdmin1 - z2dt * sshemp(ji,jj) 
    239            
     224               ! 
    240225               IF( zdep1 > zdep2 ) THEN 
    241                   wdmask(ji, jj) = 0 
     226                  wdmask(ji, jj) = 0._wp 
    242227                  zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zflxp(ji,jj) * z2dt ) 
    243228                  !zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zzflxp * z2dt ) 
     
    245230                  ! changes have zeroed the coefficient since further iterations will 
    246231                  ! not change anything 
    247                   IF( zcoef > 0._wp ) THEN 
    248                      jflag = 1  
    249                   ELSE 
    250                      zcoef = 0._wp 
     232                  IF( zcoef > 0._wp ) THEN   ;   jflag = 1  
     233                  ELSE                       ;   zcoef = 0._wp 
    251234                  ENDIF 
    252                   IF(jk1 > nn_wdit) zcoef = 0._wp 
    253                   IF(zflxu1(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = zcoef 
    254                   IF(zflxu1(ji-1,jj) < 0._wp) zwdlmtu(ji-1,jj) = zcoef 
    255                   IF(zflxv1(ji,  jj) > 0._wp) zwdlmtv(ji  ,jj) = zcoef 
    256                   IF(zflxv1(ji,jj-1) < 0._wp) zwdlmtv(ji,jj-1) = zcoef 
    257                END IF 
    258             END DO ! ji loop 
    259          END DO  ! jj loop 
    260  
     235                  IF( jk1 > nn_wdit )   zcoef = 0._wp 
     236                  IF( zflxu1(ji  ,jj  ) > 0._wp )   zwdlmtu(ji  ,jj  ) = zcoef 
     237                  IF( zflxu1(ji-1,jj  ) < 0._wp )   zwdlmtu(ji-1,jj  ) = zcoef 
     238                  IF( zflxv1(ji  ,jj  ) > 0._wp )   zwdlmtv(ji  ,jj  ) = zcoef 
     239                  IF( zflxv1(ji  ,jj-1) < 0._wp )   zwdlmtv(ji  ,jj-1) = zcoef 
     240               ENDIF 
     241            END DO 
     242         END DO 
    261243         CALL lbc_lnk_multi( zwdlmtu, 'U', 1., zwdlmtv, 'V', 1. ) 
    262  
    263          IF(lk_mpp) CALL mpp_max(jflag)   !max over the global domain 
    264  
    265          IF(jflag == 0) EXIT 
    266            
     244         ! 
     245         IF( lk_mpp )  CALL mpp_max(jflag)   !max over the global domain 
     246         ! 
     247         IF( jflag == 0 )  EXIT 
     248         ! 
    267249      END DO  ! jk1 loop 
    268         
     250      ! 
    269251      DO jk = 1, jpkm1 
    270          un(:,:,jk) = un(:,:,jk) * zwdlmtu(:, :)  
    271          vn(:,:,jk) = vn(:,:,jk) * zwdlmtv(:, :)  
    272       END DO 
    273  
    274       CALL lbc_lnk_multi( un, 'U', -1., vn, 'V', -1. ) 
    275         ! 
     252         un(:,:,jk) = un(:,:,jk) * zwdlmtu(:,:)  
     253         vn(:,:,jk) = vn(:,:,jk) * zwdlmtv(:,:)  
     254      END DO 
    276255      un_b(:,:) = un_b(:,:) * zwdlmtu(:, :) 
    277256      vn_b(:,:) = vn_b(:,:) * zwdlmtv(:, :) 
     257      ! 
     258!!gm TO BE SUPPRESSED ?  these lbc_lnk are useless since zwdlmtu and zwdlmtv are defined everywhere ! 
     259      CALL lbc_lnk_multi( un  , 'U', -1., vn  , 'V', -1. ) 
    278260      CALL lbc_lnk_multi( un_b, 'U', -1., vn_b, 'V', -1. ) 
    279         
    280       IF(jflag == 1 .AND. lwp) WRITE(numout,*) 'Need more iterations in wad_lmt!!!' 
    281         
     261!!gm 
     262      ! 
     263      IF(jflag == 1 .AND. lwp)   WRITE(numout,*) 'Need more iterations in wad_lmt!!!' 
     264      ! 
    282265      !IF( ln_rnf      )   CALL sbc_rnf_div( hdivn )          ! runoffs (update hdivn field) 
    283       !IF( nn_cla == 1 )   CALL cla_div    ( kt )             ! Cross Land Advection (update hdivn field) 
    284       ! 
    285       ! 
    286       ! 
    287       ! 
    288       IF( nn_timing == 1 )  CALL timing_stop('wad_lmt') 
    289       ! 
    290       IF( ln_timing )   CALL timing_stop('wad_lmt') 
     266      ! 
     267      IF( ln_timing )   CALL timing_stop('wad_lmt')      ! 
    291268      ! 
    292269   END SUBROUTINE wad_lmt 
     
    303280      !! ** Action  : - calculate flux limiter and W/D flag 
    304281      !!---------------------------------------------------------------------- 
    305       REAL(wp), INTENT(in)    ::   rdtbt    ! ocean time-step index 
     282      REAL(wp)                , INTENT(in   ) ::   rdtbt    ! ocean time-step index 
    306283      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   zflxu,  zflxv, sshn_e, zssh_frc   
    307284      ! 
    308285      INTEGER  ::   ji, jj, jk, jk1     ! dummy loop indices 
    309       INTEGER  ::   jflag               ! local scalar 
     286      INTEGER  ::   jflag               ! local integer 
    310287      REAL(wp) ::   z2dt 
    311288      REAL(wp) ::   zcoef, zdep1, zdep2 ! local scalars 
     
    317294      REAL(wp), DIMENSION(jpi,jpj) ::   zflxu1, zflxv1           ! local 2D workspace 
    318295      !!---------------------------------------------------------------------- 
    319       ! 
    320       IF( nn_timing == 1 )  CALL timing_start('wad_lmt_bt') 
     296      IF( ln_timing )   CALL timing_start('wad_lmt_bt')      ! 
    321297      ! 
    322298      jflag  = 0 
    323       zdepwd = 50._wp   !maximum depth that ocean cells can have W/D processes 
    324  
     299      zdepwd = 50._wp   ! maximum depth that ocean cells can have W/D processes 
     300      ! 
    325301      z2dt = rdtbt    
    326         
     302      ! 
    327303      zflxp(:,:)   = 0._wp 
    328304      zflxn(:,:)   = 0._wp 
    329  
    330305      zwdlmtu(:,:) = 1._wp 
    331306      zwdlmtv(:,:) = 1._wp 
    332         
    333       ! Horizontal Flux in u and v direction 
    334         
    335       DO jj = 2, jpj 
     307      ! 
     308      DO jj = 2, jpj      ! Horizontal Flux in u and v direction 
    336309         DO ji = 2, jpi  
    337  
    338            IF( tmask(ji, jj, 1 ) < 0.5_wp) CYCLE   ! we don't care about land cells 
    339            IF( ht_0(ji,jj) > zdepwd )      CYCLE   ! and cells which are unlikely to dry 
    340  
    341             zflxp(ji,jj) = max(zflxu(ji,jj), 0._wp) - min(zflxu(ji-1,jj),   0._wp) + & 
    342                          & max(zflxv(ji,jj), 0._wp) - min(zflxv(ji,  jj-1), 0._wp)  
    343             zflxn(ji,jj) = min(zflxu(ji,jj), 0._wp) - max(zflxu(ji-1,jj),   0._wp) + & 
    344                          & min(zflxv(ji,jj), 0._wp) - max(zflxv(ji,  jj-1), 0._wp)  
    345  
     310            ! 
     311            IF( tmask(ji, jj, 1 ) < 0.5_wp) CYCLE   ! we don't care about land cells 
     312            IF( ht_0(ji,jj) > zdepwd )      CYCLE   ! and cells which are unlikely to dry 
     313            ! 
     314            zflxp(ji,jj) = MAX( zflxu(ji,jj) , 0._wp ) - MIN( zflxu(ji-1,jj  ) , 0._wp )  & 
     315               &         + MAX( zflxv(ji,jj) , 0._wp ) - MIN( zflxv(ji,  jj-1) , 0._wp )  
     316            zflxn(ji,jj) = MIN( zflxu(ji,jj) , 0._wp ) - MAX( zflxu(ji-1,jj  ) , 0._wp )  & 
     317               &         + MIN( zflxv(ji,jj) , 0._wp ) - MAX( zflxv(ji,  jj-1) , 0._wp )  
     318            ! 
    346319            zdep2 = ht_0(ji,jj) + sshn_e(ji,jj) - rn_wdmin1 
    347             IF(zdep2 .le. 0._wp) THEN  !add more safety, but not necessary 
     320            IF( zdep2 <= 0._wp ) THEN  !add more safety, but not necessary 
    348321              sshn_e(ji,jj) = rn_wdmin1 - ht_0(ji,jj) 
    349               IF(zflxu(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = 0._wp 
    350               IF(zflxu(ji-1,jj) < 0._wp) zwdlmtu(ji-1,jj) = 0._wp 
    351               IF(zflxv(ji,  jj) > 0._wp) zwdlmtv(ji  ,jj) = 0._wp 
    352               IF(zflxv(ji,jj-1) < 0._wp) zwdlmtv(ji,jj-1) = 0._wp  
    353             END IF 
    354          ENDDO 
    355       END DO 
    356  
    357        
    358       !! start limiter iterations  
    359       DO jk1 = 1, nn_wdit + 1 
    360         
    361            
     322              IF( zflxu(ji  ,jj  ) > 0._wp)   zwdlmtu(ji  ,jj  ) = 0._wp 
     323              IF( zflxu(ji-1,jj  ) < 0._wp)   zwdlmtu(ji-1,jj  ) = 0._wp 
     324              IF( zflxv(ji  ,jj  ) > 0._wp)   zwdlmtv(ji  ,jj  ) = 0._wp 
     325              IF( zflxv(ji  ,jj-1) < 0._wp)   zwdlmtv(ji  ,jj-1) = 0._wp  
     326            ENDIF 
     327         END DO 
     328      END DO 
     329      ! 
     330      DO jk1 = 1, nn_wdit + 1      !! start limiter iterations  
     331         ! 
    362332         zflxu1(:,:) = zflxu(:,:) * zwdlmtu(:,:) 
    363333         zflxv1(:,:) = zflxv(:,:) * zwdlmtv(:,:) 
    364334         jflag = 0     ! flag indicating if any further iterations are needed 
    365            
     335         ! 
    366336         DO jj = 2, jpj 
    367337            DO ji = 2, jpi  
    368          
    369                IF( tmask(ji, jj, 1 ) < 0.5_wp) CYCLE  
    370                IF( ht_0(ji,jj) > zdepwd )      CYCLE 
    371          
     338               ! 
     339               IF( tmask(ji, jj, 1 ) < 0.5_wp )  CYCLE  
     340               IF( ht_0(ji,jj)       > zdepwd )   CYCLE 
     341               ! 
    372342               ztmp = e1e2t(ji,jj) 
    373  
    374                zzflxp = max(zflxu1(ji,jj), 0._wp) - min(zflxu1(ji-1,jj),   0._wp) + & 
    375                       & max(zflxv1(ji,jj), 0._wp) - min(zflxv1(ji,  jj-1), 0._wp)  
    376                zzflxn = min(zflxu1(ji,jj), 0._wp) - max(zflxu1(ji-1,jj),   0._wp) + & 
    377                       & min(zflxv1(ji,jj), 0._wp) - max(zflxv1(ji,  jj-1), 0._wp)  
     343               ! 
     344               zzflxp = max(zflxu1(ji,jj), 0._wp) - min(zflxu1(ji-1,jj),   0._wp)   & 
     345                  &   + max(zflxv1(ji,jj), 0._wp) - min(zflxv1(ji,  jj-1), 0._wp)  
     346               zzflxn = min(zflxu1(ji,jj), 0._wp) - max(zflxu1(ji-1,jj),   0._wp)   & 
     347                  &   + min(zflxv1(ji,jj), 0._wp) - max(zflxv1(ji,  jj-1), 0._wp)  
    378348           
    379349               zdep1 = (zzflxp + zzflxn) * z2dt / ztmp 
     
    399369            END DO ! ji loop 
    400370         END DO  ! jj loop 
    401  
     371         ! 
    402372         CALL lbc_lnk_multi( zwdlmtu, 'U', 1., zwdlmtv, 'V', 1. ) 
    403  
     373         ! 
    404374         IF(lk_mpp) CALL mpp_max(jflag)   !max over the global domain 
    405  
    406          IF(jflag == 0) EXIT 
    407            
     375         ! 
     376         IF(jflag == 0)   EXIT 
     377         ! 
    408378      END DO  ! jk1 loop 
    409         
     379      ! 
    410380      zflxu(:,:) = zflxu(:,:) * zwdlmtu(:, :)  
    411381      zflxv(:,:) = zflxv(:,:) * zwdlmtv(:, :)  
    412  
     382      ! 
     383!!gm THIS lbc_lnk is useless since it is already done at the end of the jk1-loop 
    413384      CALL lbc_lnk_multi( zflxu, 'U', -1., zflxv, 'V', -1. ) 
    414         
    415       IF(jflag == 1 .AND. lwp) WRITE(numout,*) 'Need more iterations in wad_lmt_bt!!!' 
    416         
     385!!gm end 
     386      ! 
     387      IF( jflag == 1 .AND. lwp )   WRITE(numout,*) 'Need more iterations in wad_lmt_bt!!!' 
     388      ! 
    417389      !IF( ln_rnf      )   CALL sbc_rnf_div( hdivn )          ! runoffs (update hdivn field) 
    418       !IF( nn_cla == 1 )   CALL cla_div    ( kt )             ! Cross Land Advection (update hdivn field) 
    419       ! 
    420       ! 
    421       IF( nn_timing == 1 )  CALL timing_stop('wad_lmt') 
     390      ! 
     391      IF( ln_timing )   CALL timing_stop('wad_lmt_bt')      ! 
     392      ! 
    422393   END SUBROUTINE wad_lmt_bt 
    423394 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flo_oce.F90

    r5836 r9124  
    77   !!   NEMO      1.0  ! 2002-11  (G. Madec, A. Bozec)  F90: Free form and module 
    88   !!---------------------------------------------------------------------- 
    9 #if   defined key_floats 
     9#if   defined   key_floats 
    1010   !!---------------------------------------------------------------------- 
    1111   !!   'key_floats'                                        drifting floats 
     
    6161      !!---------------------------------------------------------------------- 
    6262      ALLOCATE( wb(jpi,jpj,jpk) , nfloat(jpnfl) , nisobfl(jpnfl) , ngrpfl(jpnfl) , & 
    63                 flxx(jpnfl)     , flyy(jpnfl)   , flzz(jpnfl)    ,                 &  
    64                 tpifl(jpnfl)    , tpjfl(jpnfl)  , tpkfl(jpnfl)   , STAT=flo_oce_alloc ) 
     63         &      flxx(jpnfl)     , flyy(jpnfl)   , flzz(jpnfl)    ,                 &  
     64         &      tpifl(jpnfl)    , tpjfl(jpnfl)  , tpkfl(jpnfl)   , STAT=flo_oce_alloc ) 
    6565      ! 
    6666      IF( lk_mpp             )   CALL mpp_sum ( flo_oce_alloc ) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90

    r5836 r9124  
    77   !!   NEMO     1.0  ! 2002-06  (A. Bozec)  F90, Free form and module 
    88   !!---------------------------------------------------------------------- 
    9 #if   defined key_floats 
     9#if   defined   key_floats 
    1010   !!---------------------------------------------------------------------- 
    1111   !!   'key_floats'                                     float trajectories 
     
    2222   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine) 
    2323   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine) 
     24   ! 
    2425   USE in_out_manager  ! I/O manager 
    2526   USE timing          ! preformance summary 
     
    5253      !!---------------------------------------------------------------------- 
    5354      ! 
    54       IF( nn_timing == 1 )   CALL timing_start('flo_stp') 
     55      IF( ln_timing )   CALL timing_start('flo_stp') 
    5556      ! 
    5657      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme 
     
    6667      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field 
    6768      ! 
    68       IF( nn_timing == 1 )   CALL timing_stop('flo_stp') 
     69      IF( ln_timing )   CALL timing_stop('flo_stp') 
    6970      ! 
    7071   END SUBROUTINE flo_stp 
     
    7778      !! ** Purpose :   Read the namelist of floats 
    7879      !!---------------------------------------------------------------------- 
    79       INTEGER :: jfl 
    80       INTEGER :: ios                 ! Local integer output status for namelist read 
     80      INTEGER ::   jfl 
     81      INTEGER ::   ios                 ! Local integer output status for namelist read 
    8182      ! 
    8283      NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 
    8384      !!--------------------------------------------------------------------- 
    84       ! 
    85       IF( nn_timing == 1 )   CALL timing_start('flo_init') 
    8685      ! 
    8786      IF(lwp) WRITE(numout,*) 
     
    125124      IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 
    126125      ! 
    127       !memory allocation  
    128       jpnrstflo = jpnfl-jpnnewflo 
    129  
    130       !vertical axe for netcdf IOM ouput 
    131       DO jfl=1,jpnfl ; nfloat(jfl)=jfl ; ENDDO 
    132  
     126      jpnrstflo = jpnfl-jpnnewflo   ! memory allocation  
     127      ! 
     128      DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput 
     129         nfloat(jfl) = jfl  
     130      END DO 
    133131      ! 
    134132      CALL flo_dom                  ! compute/read initial position of floats 
    135  
     133      ! 
    136134      wb(:,:,:) = wn(:,:,:)         ! set wb for computation of floats trajectories at the first time step 
    137       ! 
    138       IF( nn_timing == 1 )   CALL timing_stop('flo_init') 
    139135      ! 
    140136   END SUBROUTINE flo_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbstp.F90

    r5215 r9124  
    11MODULE icbstp 
    2  
    32   !!====================================================================== 
    43   !!                       ***  MODULE  icbstp  *** 
     
    1312   !!            -    !                            into icb copies with haloes 
    1413   !!---------------------------------------------------------------------- 
     14 
    1515   !!---------------------------------------------------------------------- 
    1616   !!   icb_stp       : start iceberg tracking 
     
    2020   USE dom_oce        ! ocean domain 
    2121   USE sbc_oce        ! ocean surface forcing 
    22    USE phycst 
     22   USE phycst         ! physical constants 
     23   ! 
     24   USE icb_oce        ! iceberg: define arrays 
     25   USE icbini         ! iceberg: initialisation routines 
     26   USE icbutl         ! iceberg: utility routines 
     27   USE icbrst         ! iceberg: restart routines 
     28   USE icbdyn         ! iceberg: dynamics (ie advection) routines 
     29   USE icbclv         ! iceberg: calving routines 
     30   USE icbthm         ! iceberg: thermodynamics routines 
     31   USE icblbc         ! iceberg: lateral boundary routines (including mpp) 
     32   USE icbtrj         ! iceberg: trajectory I/O routines 
     33   USE icbdia         ! iceberg: budget 
     34   ! 
    2335   USE in_out_manager ! nemo IO 
    24    USE lib_mpp 
    25    USE iom 
    26    USE fldread 
     36   USE lib_mpp        ! massively parallel library  
     37   USE iom            ! I/O manager 
     38   USE fldread        ! field read 
    2739   USE timing         ! timing 
    28  
    29    USE icb_oce        ! define iceberg arrays 
    30    USE icbini         ! iceberg initialisation routines 
    31    USE icbutl         ! iceberg utility routines 
    32    USE icbrst         ! iceberg restart routines 
    33    USE icbdyn         ! iceberg dynamics (ie advection) routines 
    34    USE icbclv         ! iceberg calving routines 
    35    USE icbthm         ! iceberg thermodynamics routines 
    36    USE icblbc         ! iceberg lateral boundary routines (including mpp) 
    37    USE icbtrj         ! iceberg trajectory I/O routines 
    38    USE icbdia         ! iceberg budget 
    3940 
    4041   IMPLICIT NONE 
     
    6465      !!---------------------------------------------------------------------- 
    6566      ! 
    66       IF( nn_timing == 1 ) CALL timing_start('icb_stp') 
     67      IF( ln_timing )  CALL timing_start('icb_stp') 
    6768 
    68       !! start of timestep housekeeping 
    69  
     69      !                       !==  start of timestep housekeeping  ==! 
     70      ! 
    7071      nktberg = kt 
    71  
    72       IF( nn_test_icebergs < 0 ) THEN      ! read calving data 
     72      ! 
     73      IF( nn_test_icebergs < 0 ) THEN     !* read calving data 
    7374         ! 
    7475         CALL fld_read ( kt, 1, sf_icb ) 
    75          src_calving(:,:)      = sf_icb(1)%fnow(:,:,1)    ! calving in km^3/year (water equivalent) 
     76         src_calving     (:,:) = sf_icb(1)%fnow(:,:,1)    ! calving in km^3/year (water equivalent) 
    7677         src_calving_hflx(:,:) = 0._wp                    ! NO heat flux for now 
    7778         ! 
    7879      ENDIF 
    79  
     80      ! 
    8081      berg_grid%floating_melt(:,:) = 0._wp 
    81  
    82       ! anything that needs to be reset to zero each timestep for budgets is dealt with here 
    83       CALL icb_dia_step() 
    84  
     82      ! 
     83      !                                   !* anything that needs to be reset to zero each timestep  
     84      CALL icb_dia_step()                 !  for budgets is dealt with here 
     85      ! 
     86      !                                   !* write out time 
    8587      ll_verbose = .FALSE. 
    86       IF( nn_verbose_write > 0 .AND. & 
    87           MOD(kt-1,nn_verbose_write ) == 0 )   ll_verbose = nn_verbose_level >= 0 
    88  
    89       ! write out time 
    90       IF( ll_verbose ) WRITE(numicb,9100) nktberg, ndastp, nsec_day 
     88      IF( nn_verbose_write > 0 .AND. MOD( kt-1 , nn_verbose_write ) == 0 )   ll_verbose = ( nn_verbose_level >= 0 ) 
     89      ! 
     90      IF( ll_verbose )   WRITE(numicb,9100) nktberg, ndastp, nsec_day 
    9191 9100 FORMAT('kt= ',i8, ' day= ',i8,' secs=',i8) 
    92  
    93       ! copy nemo forcing arrays into iceberg versions with extra halo 
    94       ! only necessary for variables not on T points 
    95       CALL icb_utl_copy() 
    96  
    97       !!---------------------------------------------------------------------- 
    98       !! process icebergs 
    99  
     92      ! 
     93      !                                   !* copy nemo forcing arrays into iceberg versions with extra halo 
     94      CALL icb_utl_copy()                 ! only necessary for variables not on T points 
     95      ! 
     96      ! 
     97      !                       !==  process icebergs  ==! 
     98      !                              ! 
    10099                                     CALL icb_clv_flx( kt )   ! Accumulate ice from calving 
    101  
     100      !                              ! 
    102101                                     CALL icb_clv()           ! Calve excess stored ice into icebergs 
    103  
    104  
    105 !                               !==  For each berg, evolve  ==! 
     102      !                              ! 
     103      ! 
     104      !                       !==  For each berg, evolve  ==! 
    106105      ! 
    107106      IF( ASSOCIATED(first_berg) )   CALL icb_dyn( kt )       ! ice berg dynamics 
    108107 
    109       IF( lk_mpp ) THEN          ;   CALL icb_lbc_mpp()       ! Send bergs to other PEs 
    110       ELSE                       ;   CALL icb_lbc()           ! Deal with any cyclic boundaries in non-mpp case 
     108      IF( lk_mpp ) THEN   ;          CALL icb_lbc_mpp()       ! Send bergs to other PEs 
     109      ELSE                ;          CALL icb_lbc()           ! Deal with any cyclic boundaries in non-mpp case 
    111110      ENDIF 
    112111 
    113112      IF( ASSOCIATED(first_berg) )   CALL icb_thm( kt )       ! Ice berg thermodynamics (melting) + rolling 
    114  
    115       !!---------------------------------------------------------------------- 
    116       !! end of timestep housekeeping 
    117  
     113      ! 
     114      ! 
     115      !                       !==  diagnostics and output  ==! 
     116      ! 
     117      !                                   !* For each berg, record trajectory (when needed) 
    118118      ll_sample_traj = .FALSE. 
    119119      IF( nn_sample_rate > 0 .AND. MOD(kt-1,nn_sample_rate) == 0 )   ll_sample_traj = .TRUE. 
    120       IF( ll_sample_traj .AND.   & 
    121           ASSOCIATED(first_berg) )   CALL icb_trj_write( kt )  ! For each berg, record trajectory 
     120      IF( ll_sample_traj .AND. ASSOCIATED(first_berg) )   CALL icb_trj_write( kt ) 
    122121 
    123       ! Gridded diagnostics 
    124       ! To get these iom_put's and those preceding to actually do something 
    125       ! use key_iomput in cpp file and create content for XML file 
    126  
     122      !                                   !* Gridded diagnostics 
     123      !                                   !  To get these iom_put's and those preceding to actually do something 
     124      !                                   !  use key_iomput in cpp file and create content for XML file 
     125      ! 
    127126      CALL iom_put( "calving"           , berg_grid%calving      (:,:)   )  ! 'calving mass input' 
    128127      CALL iom_put( "berg_floating_melt", berg_grid%floating_melt(:,:)   )  ! 'Melt rate of icebergs + bits' , 'kg/m2/s' 
    129128      CALL iom_put( "berg_stored_ice"   , berg_grid%stored_ice   (:,:,:) )  ! 'Accumulated ice mass by class', 'kg' 
    130  
    131       ! store mean budgets 
    132       CALL icb_dia_put() 
    133  
    134       ! Dump icebergs to screen 
    135       if ( nn_verbose_level >= 2 )   CALL icb_utl_print( 'icb_stp, status', kt ) 
    136  
    137       ! Diagnose budgets 
     129      ! 
     130      CALL icb_dia_put()                  !* store mean budgets 
     131      ! 
     132      !                                   !*  Dump icebergs to screen 
     133      IF( nn_verbose_level >= 2 )   CALL icb_utl_print( 'icb_stp, status', kt ) 
     134      ! 
     135      !                                   !* Diagnose budgets 
    138136      ll_budget = .FALSE. 
    139137      IF( nn_verbose_write > 0 .AND. MOD(kt-1,nn_verbose_write) == 0 )   ll_budget = ln_bergdia 
    140138      CALL icb_dia( ll_budget ) 
    141  
    142       IF( MOD(kt,nn_stock) == 0 ) THEN 
     139      ! 
     140      IF( MOD(kt,nn_stock) == 0 ) THEN    !* restart 
    143141         CALL icb_rst_write( kt ) 
    144142         IF( nn_sample_rate > 0 )   CALL icb_trj_sync() 
    145143      ENDIF 
    146  
    147       IF( nn_timing == 1 ) CALL timing_stop('icb_stp') 
     144      ! 
     145      IF( ln_timing )  CALL timing_stop('icb_stp') 
    148146      ! 
    149147   END SUBROUTINE icb_stp 
     
    157155      !! 
    158156      !!---------------------------------------------------------------------- 
    159       INTEGER, INTENT( in )  :: kt 
     157      INTEGER, INTENT( in )  ::   kt   ! model time-step index 
    160158      !!---------------------------------------------------------------------- 
    161  
     159      ! 
    162160      ! only write a restart if not done in icb_stp 
    163       IF( MOD(kt,nn_stock) .NE. 0 ) CALL icb_rst_write( kt ) 
     161      IF( MOD(kt,nn_stock) /= 0 )  CALL icb_rst_write( kt ) 
    164162 
    165163      ! finish with trajectories if they were written 
    166       IF( nn_sample_rate .GT. 0 ) CALL icb_trj_end() 
     164      IF( nn_sample_rate > 0 )  CALL icb_trj_end() 
    167165 
    168       IF(lwp)   WRITE(numout,'(a,i6)') 'icebergs: icb_end complete', narea 
     166      IF(lwp) WRITE(numout,'(a,i6)') 'icebergs: icb_end complete', narea 
     167      ! 
    169168      CALL flush( numicb ) 
    170169      CLOSE( numicb ) 
     
    173172 
    174173   !!------------------------------------------------------------------------- 
    175  
    176174END MODULE icbstp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90

    r9019 r9124  
    100100   LOGICAL ::   ln_ctl           !: run control for debugging 
    101101   LOGICAL ::   ln_timing        !: run control for timing 
    102 !!gm to be removed at the end of the 2017 merge party 
    103    INTEGER ::   nn_timing        !: run control for timing 
    104 !!gm end 
    105102   LOGICAL ::   ln_diacfl        !: flag whether to create CFL diagnostics 
    106103   INTEGER ::   nn_print         !: level of print (0 no print) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90

    r9094 r9124  
    408408      IF( ln_timing )   CALL timing_start('ldf_slp_triad') 
    409409      ! 
    410       ! 
    411410      !--------------------------------! 
    412411      !  Some preliminary calculation  ! 
     
    644643      REAL(wp) ::   zck, zfk,      zbw             !   -      - 
    645644      !!---------------------------------------------------------------------- 
    646       ! 
    647       IF( ln_timing )   CALL timing_start('ldf_slp_mxl') 
    648645      ! 
    649646      zeps   =  1.e-20_wp        !==   Local constant initialization   ==! 
     
    727724      CALL lbc_lnk_multi( uslpml , 'U', -1. , vslpml , 'V', -1. , wslpiml, 'W', -1. , wslpjml, 'W', -1. )  
    728725      ! 
    729       IF( ln_timing )   CALL timing_stop('ldf_slp_mxl') 
    730       ! 
    731726   END SUBROUTINE ldf_slp_mxl 
    732727 
     
    743738      INTEGER ::   ierr         ! local integer 
    744739      !!---------------------------------------------------------------------- 
    745       ! 
    746       IF( ln_timing )   CALL timing_start('ldf_slp_init') 
    747740      ! 
    748741      IF(lwp) THEN 
     
    801794      ENDIF 
    802795      ! 
    803       IF( ln_timing )   CALL timing_stop('ldf_slp_init') 
    804       ! 
    805796   END SUBROUTINE ldf_slp_init 
    806797 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90

    r9094 r9124  
    3030   USE lib_mpp         ! distribued memory computing library 
    3131   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    32    USE timing          ! timing 
    3332 
    3433   IMPLICIT NONE 
     
    492491      !!---------------------------------------------------------------------- 
    493492      ! 
    494       IF( ln_timing )   CALL timing_start('ldf_eiv') 
    495       ! 
    496493      zn   (:,:) = 0._wp      ! Local initialization 
    497494      zhw  (:,:) = 5._wp 
     
    571568      END DO 
    572569      !   
    573       IF( ln_timing )   CALL timing_stop('ldf_eiv') 
    574       ! 
    575570   END SUBROUTINE ldf_eiv 
    576571 
     
    607602      !!---------------------------------------------------------------------- 
    608603      ! 
    609       IF( ln_timing )   CALL timing_start( 'ldf_eiv_trp') 
    610       ! 
    611604      IF( kt == kit000 )  THEN 
    612605         IF(lwp) WRITE(numout,*) 
     
    650643      IF( ln_ldfeiv_dia .AND. cdtype == 'TRA' )   CALL ldf_eiv_dia( zpsi_uw, zpsi_vw ) 
    651644      ! 
    652       IF( ln_timing )   CALL timing_stop( 'ldf_eiv_trp') 
    653       ! 
    654645    END SUBROUTINE ldf_eiv_trp 
    655646 
     
    675666!!gm I don't like this routine....   Crazy  way of doing things, not optimal at all... 
    676667!!gm     to be redesigned....    
    677       IF( ln_timing )   CALL timing_start( 'ldf_eiv_dia') 
    678       ! 
    679668      !                                                  !==  eiv stream function: output  ==! 
    680669      CALL lbc_lnk_multi( psi_uw, 'U', -1. , psi_vw, 'V', -1. ) 
     
    780769      ! 
    781770      ! 
    782       IF( ln_timing )   CALL timing_stop( 'ldf_eiv_dia')       
    783       ! 
    784771   END SUBROUTINE ldf_eiv_dia 
    785772 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk.F90

    r9098 r9124  
    5757   USE in_out_manager ! I/O manager 
    5858   USE lib_mpp        ! distribued memory computing library 
    59    USE timing         ! Timing 
    6059   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    6160   USE prtctl         ! Print control 
     
    383382      !!--------------------------------------------------------------------- 
    384383      ! 
    385       IF( ln_timing )   CALL timing_start('blk_oce') 
    386       ! 
    387384      ! local scalars ( place there for vector optimisation purposes) 
    388385      zst(:,:) = pst(:,:) + rt0      ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 
     
    564561      ENDIF 
    565562      ! 
    566       IF( ln_timing )   CALL timing_stop('blk_oce') 
    567       ! 
    568563   END SUBROUTINE blk_oce 
    569564 
     
    713708      REAL(wp), DIMENSION(jpi,jpj) ::   zrhoa     ! transfer coefficient for momentum      (tau) 
    714709      !!--------------------------------------------------------------------- 
    715       ! 
    716       IF( ln_timing )   CALL timing_start('blk_ice_tau') 
    717710      ! 
    718711      ! set transfer coefficients to default sea-ice values 
     
    811804      ENDIF 
    812805      ! 
    813       IF( ln_timing )   CALL timing_stop('blk_ice_tau') 
    814       ! 
    815806   END SUBROUTINE blk_ice_tau 
    816807 
     
    845836      REAL(wp), DIMENSION(jpi,jpj)     ::   zrhoa 
    846837      !!--------------------------------------------------------------------- 
    847       ! 
    848       IF( ln_timing )   CALL timing_start('blk_ice_flx') 
    849838      ! 
    850839      zcoef_dqlw = 4.0 * 0.95 * Stef             ! local scalars 
     
    965954      ENDIF 
    966955      ! 
    967       IF( ln_timing )   CALL timing_stop('blk_ice_flx') 
    968       ! 
    969956   END SUBROUTINE blk_ice_flx 
    970957    
     
    1002989      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zgfac   ! enhanced conduction factor 
    1003990      !!--------------------------------------------------------------------- 
    1004  
    1005       IF( ln_timing )  CALL timing_start('blk_ice_qcn') 
    1006991       
    1007992      ! -------------------------------------! 
     
    10651050      END DO  
    10661051      !       
    1067       IF( ln_timing )  CALL timing_stop('blk_ice_qcn') 
    1068       ! 
    10691052   END SUBROUTINE blk_ice_qcn 
    10701053    
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare.F90

    r9019 r9124  
    4040   USE lib_mpp        ! distribued memory computing library 
    4141   USE wrk_nemo       ! work arrays 
    42    USE timing         ! Timing 
    4342   USE prtctl         ! Print control 
    4443   USE lib_fortran    ! to use key_nosignedzero 
     
    121120      !!---------------------------------------------------------------------- 
    122121      ! 
    123       IF( nn_timing == 1 )  CALL timing_start('turb_coare') 
    124  
    125122      CALL wrk_alloc( jpi,jpj,   u_star, t_star, q_star, zeta_u, dt_zu, dq_zu) 
    126123      CALL wrk_alloc( jpi,jpj,   znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 ) 
     
    254251      CALL wrk_dealloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 ) 
    255252      IF( .NOT. l_zt_equal_zu ) CALL wrk_dealloc( jpi,jpj, zeta_t ) 
    256  
    257       IF( nn_timing == 1 )  CALL timing_stop('turb_coare') 
    258  
     253      ! 
    259254   END SUBROUTINE turb_coare 
    260255 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare3p5.F90

    r9019 r9124  
    3939   USE lib_mpp         ! distribued memory computing library 
    4040   USE wrk_nemo        ! work arrays 
    41    USE timing          ! Timing 
    4241   USE in_out_manager  ! I/O manager 
    4342   USE prtctl          ! Print control 
     
    122121      !!---------------------------------------------------------------------------------- 
    123122      ! 
    124       IF( nn_timing == 1 )  CALL timing_start('turb_coare3p5') 
    125  
    126123      CALL wrk_alloc( jpi,jpj, u_star, t_star, q_star, zeta_u, dt_zu, dq_zu) 
    127124      CALL wrk_alloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 ) 
     
    262259      CALL wrk_dealloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 ) 
    263260      IF( .NOT. l_zt_equal_zu ) CALL wrk_dealloc( jpi,jpj, zeta_t ) 
    264  
    265       IF( nn_timing == 1 )  CALL timing_stop('turb_coare3p5') 
    266  
     261      ! 
    267262   END SUBROUTINE turb_coare3p5 
    268263 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ecmwf.F90

    r9019 r9124  
    3333   USE lib_mpp         ! distribued memory computing library 
    3434   USE wrk_nemo        ! work arrays 
    35    USE timing          ! Timing 
    3635   USE in_out_manager  ! I/O manager 
    3736   USE prtctl          ! Print control 
     
    128127      !!---------------------------------------------------------------------------------- 
    129128      ! 
    130       IF( nn_timing == 1 )   CALL timing_start('turb_ecmwf') 
    131       ! 
    132129      CALL wrk_alloc( jpi,jpj,   u_star, t_star, q_star, func_m, func_h, dt_zu, dq_zu, Linv ) 
    133130      CALL wrk_alloc( jpi,jpj,   znu_a, z0, z0t, z0q, ztmp0, ztmp1, ztmp2 ) 
     
    292289      CALL wrk_dealloc( jpi,jpj,   znu_a, z0, z0t, z0q, ztmp0, ztmp1, ztmp2 ) 
    293290      ! 
    294       IF( nn_timing == 1 )   CALL timing_stop('turb_ecmwf') 
    295       ! 
    296291   END SUBROUTINE TURB_ECMWF 
    297292 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ncar.F90

    r9019 r9124  
    3535   USE lib_mpp         ! distribued memory computing library 
    3636   USE wrk_nemo        ! work arrays 
    37    USE timing          ! Timing 
    3837   USE in_out_manager  ! I/O manager 
    3938   USE prtctl          ! Print control 
     
    127126      !!---------------------------------------------------------------------------------- 
    128127      ! 
    129       IF( nn_timing == 1 )   CALL timing_start('turb_ncar') 
    130       ! 
    131128      CALL wrk_alloc( jpi,jpj,   Cx_n10, sqrt_Cd_n10, zeta_u, stab ) 
    132129      CALL wrk_alloc( jpi,jpj,   zpsi_h_u, ztmp0, ztmp1, ztmp2 ) 
     
    229226      CALL wrk_dealloc( jpi,jpj,   zpsi_h_u, ztmp0, ztmp1, ztmp2 ) 
    230227      ! 
    231       IF( nn_timing == 1 )   CALL timing_stop('turb_ncar') 
    232       ! 
    233228   END SUBROUTINE turb_ncar 
    234229 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r9119 r9124  
    4747   USE iom            ! NetCDF library 
    4848   USE lib_mpp        ! distribued memory computing library 
    49    USE timing         ! Timing 
    5049   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    5150 
     
    258257 
    259258      !!--------------------------------------------------------------------- 
    260       ! 
    261       IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_init') 
    262259      ! 
    263260      ! ================================ ! 
     
    10461043         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
    10471044      IF( ln_dm2dc .AND. ln_cpl ) ncpl_qsr_freq = 86400 / ncpl_qsr_freq 
    1048  
    1049       ! 
    1050       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_init') 
    10511045      ! 
    10521046   END SUBROUTINE sbc_cpl_init 
     
    11141108      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty, zmsk, zemp, zqns, zqsr 
    11151109      !!---------------------------------------------------------------------- 
    1116       ! 
    1117       IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_rcv') 
    11181110      ! 
    11191111      IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0) 
     
    14531445      ENDIF 
    14541446      ! 
    1455       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_rcv') 
    1456       ! 
    14571447   END SUBROUTINE sbc_cpl_rcv 
    14581448    
     
    14981488      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty  
    14991489      !!---------------------------------------------------------------------- 
    1500       ! 
    1501       IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_ice_tau') 
    15021490      ! 
    15031491      IF( srcv(jpr_itx1)%laction ) THEN   ;   itx =  jpr_itx1    
     
    16581646 
    16591647      ENDIF 
    1660       !    
    1661       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_ice_tau') 
    16621648      ! 
    16631649   END SUBROUTINE sbc_cpl_ice_tau 
     
    17301716      !!---------------------------------------------------------------------- 
    17311717      ! 
    1732       IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_ice_flx') 
    1733       ! 
    17341718      IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0) 
    17351719      ziceld(:,:) = 1._wp - picefr(:,:) 
     
    21132097      ! 
    21142098#endif 
    2115       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_ice_flx') 
    21162099      ! 
    21172100   END SUBROUTINE sbc_cpl_ice_flx 
     
    21352118      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   ztmp3, ztmp4    
    21362119      !!---------------------------------------------------------------------- 
    2137       ! 
    2138       IF( nn_timing == 1 )   CALL timing_start('sbc_cpl_snd') 
    21392120      ! 
    21402121      isec = ( kt - nit000 ) * NINT( rdt )        ! date of exchanges 
     
    27132694#endif 
    27142695      ! 
    2715       IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_snd') 
    2716       ! 
    27172696   END SUBROUTINE sbc_cpl_snd 
    27182697    
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90

    r6140 r9124  
    1616   USE dom_oce          ! ocean space and time domain 
    1717   USE sbc_oce          ! Surface boundary condition: ocean fields 
     18   ! 
    1819   USE in_out_manager   ! I/O manager 
    1920   USE lib_mpp          ! MPP library 
    20    USE timing           ! Timing 
    2121 
    2222   IMPLICIT NONE 
     
    6363      !!              Part 1: a diurnally forced OGCM. Climate Dynamics 29:6, 575-590. 
    6464      !!---------------------------------------------------------------------- 
    65       LOGICAL, OPTIONAL, INTENT(in) :: l_mask ! use the routine for night mask computation 
     65      LOGICAL , OPTIONAL          , INTENT(in) ::   l_mask    ! use the routine for night mask computation 
    6666      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pqsrin    ! input daily QSR flux  
     67      REAL(wp), DIMENSION(jpi,jpj)             ::   zqsrout   ! output QSR flux with diurnal cycle 
    6768      !! 
    6869      INTEGER  ::   ji, jj                                       ! dummy loop indices 
     
    7374      REAL(wp) ::   ztmp, ztmp1, ztmp2, ztest 
    7475      REAL(wp) ::   ztmpm, ztmpm1, ztmpm2 
    75       REAL(wp), DIMENSION(jpi,jpj) ::   zqsrout                  ! output QSR flux with diurnal cycle 
    7676      !---------------------------statement functions------------------------ 
    7777      REAL(wp) ::   fintegral, pt1, pt2, paaa, pbbb, pccc        ! dummy statement function arguments 
     
    8080         & - paaa * pt1 - zinvtwopi * pbbb * SIN(pccc + ztwopi * pt1) 
    8181      !!--------------------------------------------------------------------- 
    82       ! 
    83       IF( nn_timing == 1 )  CALL timing_start('sbc_dcy') 
    8482      ! 
    8583      ! Initialization 
     
    199197      DO jj = 1, jpj 
    200198         DO ji = 1, jpi 
    201             ztmpm = 0.0 
     199            ztmpm = 0._wp 
    202200            IF( ABS(rab(ji,jj)) < 1. ) THEN         ! day duration is less than 24h 
    203201               ! 
     
    241239      END DO   
    242240      ! 
    243       IF ( PRESENT(l_mask) .AND. l_mask ) THEN 
     241      IF( PRESENT(l_mask) .AND. l_mask ) THEN 
    244242         zqsrout(:,:) = float(imask_night(:,:)) 
    245243      ENDIF 
    246244      ! 
    247       IF( nn_timing == 1 )  CALL timing_stop('sbc_dcy') 
    248       ! 
    249245   END FUNCTION sbc_dcy 
    250246 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r9019 r9124  
    2525   USE in_out_manager ! I/O manager 
    2626   USE lib_mpp        ! distribued memory computing library 
    27    USE wrk_nemo       ! work arrays 
    28    USE timing         ! Timing 
    2927   USE lbclnk         ! ocean lateral boundary conditions 
    3028   USE lib_fortran    !  
     
    7068      REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp                ! local scalars 
    7169      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread, zcoef          !   -      - 
    72       REAL(wp), POINTER, DIMENSION(:,:) ::   ztmsk_neg, ztmsk_pos, z_wgt ! 2D workspaces 
    73       REAL(wp), POINTER, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      - 
     70      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_neg, ztmsk_pos, z_wgt ! 2D workspaces 
     71      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      - 
    7472      !!---------------------------------------------------------------------- 
    75       ! 
    76       IF( nn_timing == 1 )  CALL timing_start('sbc_fwb') 
    77       ! 
    78       CALL wrk_alloc( jpi,jpj, ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor ) 
    7973      ! 
    8074      IF( kt == nit000 ) THEN 
     
    154148      CASE ( 3 )                             !==  global fwf set to zero and spread out over erp area  ==! 
    155149         ! 
     150         ALLOCATE( ztmsk_neg(jpi,jpj) , ztmsk_pos(jpi,jpj) , ztmsk_tospread(jpi,jpj) , z_wgt(jpi,jpj) , zerp_cor(jpi,jpj) ) 
     151         ! 
    156152         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    157153            ztmsk_pos(:,:) = tmask_i(:,:)                      ! Select <0 and >0 area of erp 
     
    203199            ENDIF 
    204200         ENDIF 
     201         DEALLOCATE( ztmsk_neg , ztmsk_pos , ztmsk_tospread , z_wgt , zerp_cor ) 
    205202         ! 
    206203      CASE DEFAULT                           !==  you should never be there  ==! 
     
    209206      END SELECT 
    210207      ! 
    211       CALL wrk_dealloc( jpi,jpj, ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor ) 
    212       ! 
    213       IF( nn_timing == 1 )  CALL timing_stop('sbc_fwb') 
    214       ! 
    215208   END SUBROUTINE sbc_fwb 
    216209 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r9098 r9124  
    1919   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2020   USE wrk_nemo        ! work arrays 
    21    USE timing          ! Timing 
    2221   USE daymod          ! calendar 
    2322   USE fldread         ! read input fields 
     
    127126      !!---------------------------------------------------------------------- 
    128127      ! 
    129       IF( nn_timing == 1 )  CALL timing_start('sbc_ice_cice') 
    130       ! 
    131128      !                                        !----------------------! 
    132129      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !  Ice time-step only  ! 
     
    148145      ENDIF                                          ! End sea-ice time step only 
    149146      ! 
    150       IF( nn_timing == 1 )  CALL timing_stop('sbc_ice_cice') 
    151  
    152147   END SUBROUTINE sbc_ice_cice 
    153148 
     
    164159      INTEGER  ::   ji, jj, jl, jk                    ! dummy loop indices 
    165160      !!--------------------------------------------------------------------- 
    166  
    167       IF( nn_timing == 1 )  CALL timing_start('cice_sbc_init') 
    168161      ! 
    169162      CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 
     
    281274      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 
    282275      ! 
    283       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_init') 
    284       ! 
    285276   END SUBROUTINE cice_sbc_init 
    286277 
     
    299290      REAL(wp) ::   zintb, zintn  ! dummy argument 
    300291      !!--------------------------------------------------------------------- 
    301  
    302       IF( nn_timing == 1 )  CALL timing_start('cice_sbc_in') 
    303292      ! 
    304293      CALL wrk_alloc( jpi,jpj, ztmp, zpice ) 
     
    507496      CALL wrk_dealloc( jpi,jpj,ncat, ztmpn ) 
    508497      ! 
    509       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_in') 
    510       ! 
    511498   END SUBROUTINE cice_sbc_in 
    512499 
     
    523510      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 
    524511      !!--------------------------------------------------------------------- 
    525  
    526       IF( nn_timing == 1 )  CALL timing_start('cice_sbc_out') 
    527512      ! 
    528513      CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 
     
    680665      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 
    681666      ! 
    682       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_out') 
    683       ! 
    684667   END SUBROUTINE cice_sbc_out 
    685668 
     
    691674      !!  
    692675      !! 
     676      !!--------------------------------------------------------------------- 
    693677      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
    694       !!--------------------------------------------------------------------- 
    695  
     678      !! 
    696679      INTEGER  ::   jl                        ! dummy loop index 
    697680      INTEGER  ::   ierror 
    698  
    699       IF( nn_timing == 1 )  CALL timing_start('cice_sbc_hadgam') 
     681      !!--------------------------------------------------------------------- 
    700682      ! 
    701683      IF( kt == nit000 )  THEN 
     
    722704      END DO 
    723705      ! 
    724       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_hadgam') 
    725       ! 
    726706   END SUBROUTINE cice_sbc_hadgam 
    727707 
     
    732712      !! ** Purpose: Finalize CICE 
    733713      !!--------------------------------------------------------------------- 
    734  
     714      ! 
    735715      IF(lwp) WRITE(numout,*)'cice_sbc_final' 
    736  
     716      ! 
    737717      CALL CICE_Finalize 
    738  
     718      ! 
    739719   END SUBROUTINE cice_sbc_final 
     720 
    740721 
    741722   SUBROUTINE cice_sbc_force (kt) 
     
    755736      !! History : 
    756737      !!---------------------------------------------------------------------- 
    757       !! * Modules used 
    758738      USE iom 
    759  
    760       !! * arguments 
    761       INTEGER, INTENT( in  ) ::   kt ! ocean time step 
    762  
     739      !! 
     740      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
     741      !! 
    763742      INTEGER  ::   ierror             ! return error code 
    764743      INTEGER  ::   ifpr               ! dummy loop index 
     
    769748      TYPE(FLD_N) ::   sn_top1, sn_top2, sn_top3, sn_top4, sn_top5 
    770749      TYPE(FLD_N) ::   sn_bot1, sn_bot2, sn_bot3, sn_bot4, sn_bot5  
    771  
    772750      !! 
    773751      NAMELIST/namsbc_cice/ cn_dir, sn_snow, sn_rain, sn_sblm,   & 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r9098 r9124  
    2424   USE fldread        ! read input field at current time step 
    2525   USE lbclnk         ! 
    26    USE timing         ! Timing 
    2726   USE lib_fortran    ! glob_sum 
    2827 
     
    409408      REAL(wp) :: zpress     ! pressure to compute the freezing point in depth 
    410409      !!---------------------------------------------------------------------- 
    411  
    412       IF( nn_timing == 1 )   CALL timing_start('sbc_isf_bg03') 
    413410      ! 
    414411      DO ji = 1, jpi 
     
    441438      END DO 
    442439      ! 
    443       IF( nn_timing == 1 )   CALL timing_stop('sbc_isf_bg03') 
    444       ! 
    445440  END SUBROUTINE sbc_isf_bg03 
    446441 
     
    473468      REAL(wp), DIMENSION(jpi,jpj) ::   zfwflx, zhtflx, zhtflx_b 
    474469      !!--------------------------------------------------------------------- 
     470      ! 
    475471      ! coeficient for linearisation of potential tfreez 
    476472      ! Crude approximation for pressure (but commonly used) 
     
    478474      zlamb2 = 0.0832_wp 
    479475      zlamb3 =-7.53e-08_wp * grav * rau0 
    480       IF( nn_timing == 1 )  CALL timing_start('sbc_isf_cav') 
    481476      ! 
    482477      ! initialisation 
     
    571566      CALL iom_put('isfgammas', zgammas) 
    572567      !  
    573       IF( nn_timing == 1 )  CALL timing_stop('sbc_isf_cav') 
    574       ! 
    575568   END SUBROUTINE sbc_isf_cav 
    576569 
     
    585578      !!                Jenkins et al., 2010, JPO, p2298-2312 
    586579      !!--------------------------------------------------------------------- 
    587       REAL(wp), DIMENSION(:,:), INTENT(out) :: pgt, pgs 
    588       REAL(wp), DIMENSION(:,:), INTENT(in ) :: pqhisf, pqwisf 
    589       ! 
    590       INTEGER  :: ikt                         
     580      REAL(wp), DIMENSION(:,:), INTENT(  out) ::   pgt   , pgs      !  
     581      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::   pqhisf, pqwisf   !  
     582      ! 
    591583      INTEGER  :: ji, jj                     ! loop index 
     584      INTEGER  :: ikt                        ! local integer 
    592585      REAL(wp) :: zdku, zdkv                 ! U, V shear  
    593586      REAL(wp) :: zPr, zSc, zRc              ! Prandtl, Scmidth and Richardson number  
     
    615608         !! Jenkins et al., 2010, JPO, p2298-2312 
    616609         !! Adopted by Asay-Davis et al. (2015) 
    617 !!gm  I don't understand the u* expression in those papers... (see for example zdfglf module) 
    618 !!    for me ustar= Cd0 * |U|  not  (Cd0)^1/2 * |U| ....  which is what you can find in Jenkins et al. 
    619  
    620          !! compute ustar (eq. 24)           !! NB: here r_Cdmin_top = rn_Cd0 read in namdrg_top namelist) 
     610         !! compute ustar (eq. 24) 
     611!!gm  NB  use pCdU here so that it will incorporate local boost of Cd0 and log layer case : 
     612!!         zustar(:,:) = SQRT( rCdU_top(:,:) * SQRT(utbl(:,:) * utbl(:,:) + vtbl(:,:) * vtbl(:,:) + r_ke0_top) ) 
     613!! or better :  compute ustar in zdfdrg  and use it here as well as in TKE, GLS and Co 
     614!! 
     615!!     ===>>>>    GM  to be done this chrismas 
     616!!          
     617!!gm end 
    621618         zustar(:,:) = SQRT( r_Cdmin_top * (utbl(:,:) * utbl(:,:) + vtbl(:,:) * vtbl(:,:) + r_ke0_top) ) 
    622619 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r9115 r9124  
    365365      !!--------------------------------------------------------------------- 
    366366      ! 
    367       IF( nn_timing == 1 )  CALL timing_start('sbc') 
     367      IF( ln_timing )   CALL timing_start('sbc') 
    368368      ! 
    369369      !                                            ! ---------------------------------------- ! 
     
    518518      IF( kt == nitend )   CALL sbc_final         ! Close down surface module if necessary 
    519519      ! 
    520       IF( nn_timing == 1 )  CALL timing_stop('sbc') 
     520      IF( ln_timing )   CALL timing_stop('sbc') 
    521521      ! 
    522522   END SUBROUTINE sbc 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90

    r7753 r9124  
    2323   USE lib_mpp        ! distribued memory computing library 
    2424   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    25    USE timing         ! Timing 
    2625   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    2726 
     
    8079      TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read 
    8180      !!---------------------------------------------------------------------- 
    82       ! 
    83       IF( nn_timing == 1 )  CALL timing_start('sbc_ssr') 
    8481      ! 
    8582      IF( nn_sstr + nn_sssr /= 0 ) THEN 
     
    136133      ENDIF 
    137134      ! 
    138       IF( nn_timing == 1 )  CALL timing_stop('sbc_ssr') 
    139       ! 
    140135   END SUBROUTINE sbc_ssr 
    141136 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen.F90

    r9094 r9124  
    2323   USE trc_oce        ! share passive tracers/Ocean variables 
    2424   USE lib_mpp        ! MPP library 
    25    USE timing         ! Timing 
    2625 
    2726   IMPLICIT NONE 
     
    8180      !!---------------------------------------------------------------------- 
    8281      ! 
    83       IF( ln_timing )   CALL timing_start('tra_adv_cen') 
    84       ! 
    8582      IF( kt == kit000 )  THEN 
    8683         IF(lwp) WRITE(numout,*) 
     
    205202      END DO 
    206203      ! 
    207       IF( ln_timing )   CALL timing_stop('tra_adv_cen') 
    208       ! 
    209204   END SUBROUTINE tra_adv_cen 
    210205    
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90

    r9094 r9124  
    2727   USE lbclnk         ! ocean lateral boundary condition (or mpp link)  
    2828   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    29    USE timing         ! Timing 
    3029 
    3130   IMPLICIT NONE 
     
    8887      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdx, ztrdy, ztrdz, zptry 
    8988      !!---------------------------------------------------------------------- 
    90       ! 
    91       IF( ln_timing )   CALL timing_start('tra_adv_fct') 
    9289      ! 
    9390      IF( kt == kit000 )  THEN 
     
    324321      END DO                     ! end of tracer loop 
    325322      ! 
    326       IF( ln_timing )   CALL timing_stop('tra_adv_fct') 
    327       ! 
    328323   END SUBROUTINE tra_adv_fct 
    329324 
     
    353348      !!---------------------------------------------------------------------- 
    354349      ! 
    355       IF( ln_timing )   CALL timing_start('nonosc') 
    356       ! 
    357350      zbig  = 1.e+40_wp 
    358351      zrtrn = 1.e-15_wp 
     
    428421      END DO 
    429422      CALL lbc_lnk_multi( paa, 'U', -1. , pbb, 'V', -1. )   ! lateral boundary condition (changed sign) 
    430       ! 
    431       IF( ln_timing )   CALL timing_stop('nonosc') 
    432423      ! 
    433424   END SUBROUTINE nonosc 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90

    r9094 r9124  
    1616   USE zdfmxl         ! mixed layer depth 
    1717   ! 
    18    USE lbclnk         ! lateral boundary condition / mpp link 
    1918   USE in_out_manager ! I/O manager 
    2019   USE iom            ! IOM library 
    2120   USE lib_mpp        ! MPP library 
    22    USE timing         ! Timing 
     21   USE lbclnk         ! lateral boundary condition / mpp link 
    2322 
    2423   IMPLICIT NONE 
     
    9594      !!---------------------------------------------------------------------- 
    9695      ! 
    97       IF( ln_timing )   CALL timing_start('tra_adv_mle') 
    98       ! 
    9996      !                                      !==  MLD used for MLE  ==! 
    10097      !                                                ! compute from the 10m density to deal with the diurnal cycle 
     
    248245         CALL iom_put( "psiv_mle", zpsi_vw )    ! j-mle streamfunction 
    249246      ENDIF 
    250       ! 
    251       IF( ln_timing )   CALL timing_stop('tra_adv_mle') 
    252247      ! 
    253248   END SUBROUTINE tra_adv_mle 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90

    r9094 r9124  
    2727   ! 
    2828   USE iom            ! XIOS library 
    29    USE timing         ! Timing 
    30    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    3129   USE in_out_manager ! I/O manager 
    3230   USE lib_mpp        ! distribued memory computing 
    3331   USE lbclnk         ! ocean lateral boundary condition (or mpp link)  
     32   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    3433 
    3534   IMPLICIT NONE 
     
    9190      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zwy, zslpy   ! -      -  
    9291      !!---------------------------------------------------------------------- 
    93       ! 
    94       IF( ln_timing )   CALL timing_start('tra_adv_mus') 
    9592      ! 
    9693      IF( kt == kit000 )  THEN 
     
    275272      END DO                     ! end of tracer loop 
    276273      ! 
    277       IF( ln_timing )   CALL timing_stop('tra_adv_mus') 
    278       ! 
    279274   END SUBROUTINE tra_adv_mus 
    280275 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90

    r9094 r9124  
    2222   USE diaptr          ! poleward transport diagnostics 
    2323   ! 
     24   USE in_out_manager  ! I/O manager 
    2425   USE lib_mpp         ! distribued memory computing 
    2526   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
    26    USE in_out_manager  ! I/O manager 
    27    USE timing          ! Timing 
    2827   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    2928 
     
    9594      !!---------------------------------------------------------------------- 
    9695      ! 
    97       IF( ln_timing )   CALL timing_start('tra_adv_qck') 
    98       ! 
    9996      IF( kt == kit000 )  THEN 
    10097         IF(lwp) WRITE(numout,*) 
     
    116113      !        ! vertical fluxes are computed with the 2nd order centered scheme 
    117114      CALL tra_adv_cen2_k( kt, cdtype, pwn,         ptn, pta, kjpt ) 
    118       ! 
    119       IF( ln_timing )   CALL timing_stop('tra_adv_qck') 
    120115      ! 
    121116   END SUBROUTINE tra_adv_qck 
     
    427422      REAL(wp) ::  zc, zcurv, zfho          !   -      - 
    428423      !---------------------------------------------------------------------- 
    429       ! 
    430       IF( ln_timing )   CALL timing_start('quickest') 
    431424      ! 
    432425      DO jk = 1, jpkm1 
     
    460453      END DO 
    461454      ! 
    462       IF( ln_timing )   CALL timing_stop('quickest') 
    463       ! 
    464455   END SUBROUTINE quickest 
    465456 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90

    r9019 r9124  
    2222   ! 
    2323   USE iom            ! I/O library 
     24   USE in_out_manager ! I/O manager 
    2425   USE lib_mpp        ! massively parallel library 
    2526   USE lbclnk         ! ocean lateral boundary condition (or mpp link) 
    26    USE in_out_manager ! I/O manager 
    27    USE timing         ! Timing 
    2827   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    2928 
     
    102101      !!---------------------------------------------------------------------- 
    103102      ! 
    104       IF( ln_timing )   CALL timing_start('tra_adv_ubs') 
    105       ! 
    106103      IF( kt == kit000 )  THEN 
    107104         IF(lwp) WRITE(numout,*) 
     
    281278      END DO 
    282279      ! 
    283       IF( ln_timing )   CALL timing_stop('tra_adv_ubs') 
    284       ! 
    285280   END SUBROUTINE tra_adv_ubs 
    286281 
     
    310305      !!---------------------------------------------------------------------- 
    311306      ! 
    312       IF( ln_timing )   CALL timing_start('nonosc_z') 
    313       ! 
    314307      zbig  = 1.e+40_wp 
    315308      zrtrn = 1.e-15_wp 
     
    379372      END DO 
    380373      ! 
    381       IF( ln_timing )   CALL timing_stop('nonosc_z') 
    382       ! 
    383374   END SUBROUTINE nonosc_z 
    384375 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90

    r9099 r9124  
    4242 
    4343   PUBLIC   tra_bbl       !  routine called by step.F90 
    44    PUBLIC   tra_bbl_init  !  routine called by opa.F90 
     44   PUBLIC   tra_bbl_init  !  routine called by nemogcm.F90 
    4545   PUBLIC   tra_bbl_dif   !  routine called by trcbbl.F90 
    46    PUBLIC   tra_bbl_adv   !  -          -          -              - 
     46   PUBLIC   tra_bbl_adv   !     -      -          - 
    4747   PUBLIC   bbl           !  routine called by trcbbl.F90 and dtadyn.F90 
    4848 
     
    185185      REAL(wp), DIMENSION(jpi,jpj) ::   zptb   ! workspace 
    186186      !!---------------------------------------------------------------------- 
    187       ! 
    188       IF( ln_timing )   CALL timing_start('tra_bbl_dif') 
    189187      ! 
    190188      DO jn = 1, kjpt                                     ! tracer loop 
     
    211209      END DO                                                ! end tracer 
    212210      !                                                     ! =========== 
    213       ! 
    214       IF( ln_timing )   CALL timing_stop('tra_bbl_dif') 
    215       ! 
    216211   END SUBROUTINE tra_bbl_dif 
    217212 
     
    243238      !!---------------------------------------------------------------------- 
    244239      ! 
    245       IF( ln_timing )   CALL timing_start( 'tra_bbl_adv') 
    246240      !                                                          ! =========== 
    247241      DO jn = 1, kjpt                                            ! tracer loop 
     
    298292      END DO                                                ! end tracer 
    299293      !                                                     ! =========== 
    300       ! 
    301       IF( ln_timing )   CALL timing_stop( 'tra_bbl_adv') 
    302       ! 
    303294   END SUBROUTINE tra_bbl_adv 
    304295 
     
    343334      REAL(wp), DIMENSION(jpi,jpj)        :: zub, zvb, zdep   ! 2D workspace 
    344335      !!---------------------------------------------------------------------- 
    345       ! 
    346       IF( ln_timing )   CALL timing_start( 'bbl') 
    347336      ! 
    348337      IF( kt == kit000 )  THEN 
     
    475464      ENDIF 
    476465      ! 
    477       IF( ln_timing )   CALL timing_stop( 'bbl') 
    478       ! 
    479466   END SUBROUTINE bbl 
    480467 
     
    495482      NAMELIST/nambbl/ ln_trabbl, nn_bbl_ldf, nn_bbl_adv, rn_ahtbbl, rn_gambbl 
    496483      !!---------------------------------------------------------------------- 
    497       ! 
    498       IF( ln_timing )   CALL timing_start( 'tra_bbl_init') 
    499484      ! 
    500485      REWIND( numnam_ref )              ! Namelist nambbl in reference namelist : Bottom boundary layer scheme 
     
    569554      ahv_bbl_0(:,:) = rn_ahtbbl * e1_e2v(:,:) * e3v_bbl_0(:,:) * vmask(:,:,1) 
    570555      ! 
    571       IF( ln_timing )   CALL timing_stop( 'tra_bbl_init') 
    572       ! 
    573556   END SUBROUTINE tra_bbl_init 
    574557 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90

    r9019 r9124  
    3030   USE phycst         ! physical constants 
    3131   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    32    USE timing         ! Timing 
    3332 
    3433   IMPLICIT NONE 
     
    113112      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdit, zdjt, zftu, zftv, ztfw  
    114113      !!---------------------------------------------------------------------- 
    115       ! 
    116       IF( ln_timing )   CALL timing_start('tra_ldf_iso') 
    117114      ! 
    118115      IF( kt == kit000 )  THEN 
     
    383380      END DO                                                      ! end tracer loop 
    384381      ! 
    385       IF( ln_timing )   CALL timing_stop('tra_ldf_iso') 
    386       ! 
    387382   END SUBROUTINE tra_ldf_iso 
    388383 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap_blp.F90

    r9094 r9124  
    8989      !!---------------------------------------------------------------------- 
    9090      ! 
    91       IF( ln_timing )   CALL timing_start('tra_ldf_lap') 
    92       ! 
    9391      IF( kt == nit000 .AND. lwp )  THEN 
    9492         WRITE(numout,*) 
     
    165163      END DO                        ! end of tracer loop 
    166164      !                             ! ================== 
    167       ! 
    168       IF( ln_timing )   CALL timing_stop('tra_ldf_lap') 
    169165      ! 
    170166   END SUBROUTINE tra_ldf_lap 
     
    203199      !!--------------------------------------------------------------------- 
    204200      ! 
    205       IF( ln_timing )   CALL timing_start('tra_ldf_blp') 
    206       ! 
    207201      IF( kt == kit000 .AND. lwp )  THEN 
    208202         WRITE(numout,*) 
     
    243237      END SELECT 
    244238      ! 
    245       IF( ln_timing )   CALL timing_stop('tra_ldf_blp') 
    246       ! 
    247239   END SUBROUTINE tra_ldf_blp 
    248240 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90

    r9019 r9124  
    2727   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2828   USE lib_mpp        ! MPP library 
    29    USE timing         ! Timing 
    3029 
    3130   IMPLICIT NONE 
     
    9796      !!---------------------------------------------------------------------- 
    9897      ! 
    99       IF( ln_timing )   CALL timing_start('tra_ldf_triad') 
    100       ! 
    10198      IF( .NOT.ALLOCATED(zdkt3d) )  THEN 
    10299         ALLOCATE( zdkt3d(jpi,jpj,0:1) , STAT=ierr ) 
     
    430427      END DO                                                      ! end tracer loop 
    431428      !                                                           ! =============== 
    432       IF( ln_timing )   CALL timing_stop('tra_ldf_triad') 
    433       ! 
    434429   END SUBROUTINE tra_ldf_triad 
    435430 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r9019 r9124  
    334334      !!---------------------------------------------------------------------- 
    335335      ! 
    336       IF( ln_timing )   CALL timing_start('tra_qsr_init') 
    337       ! 
    338336      REWIND( numnam_ref )              ! Namelist namtra_qsr in reference     namelist 
    339337      READ  ( numnam_ref, namtra_qsr, IOSTAT = ios, ERR = 901) 
     
    428426      ENDIF 
    429427      ! 
    430       IF( ln_timing )   CALL timing_stop('tra_qsr_init') 
    431       ! 
    432428   END SUBROUTINE tra_qsr_init 
    433429 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r9119 r9124  
    2727   USE trd_oce        ! trends: ocean variables 
    2828   USE trdtra         ! trends manager: tracers  
     29   USE wet_dry,  ONLY : ll_wd, rn_wdmin1, r_rn_wdmin1   ! Wetting and drying 
    2930#if defined key_asminc    
    3031   USE asminc         ! Assimilation increment 
     
    3637   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    3738   USE timing         ! Timing 
    38    USE wet_dry,  ONLY : ll_wd, rn_wdmin1, r_rn_wdmin1 ! Wetting and drying 
    3939 
    4040   IMPLICIT NONE 
     
    252252      ! 
    253253#endif 
    254  
    255254      ! 
    256255      !---------------------------------------- 
     
    263262               DO ji = fs_2, fs_jpim1 
    264263                  zdep = 1._wp / e3t_n(ji,jj,jk)  
    265                   tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - htsc_iscpl(ji,jj,jk,jp_tem)                       & 
    266                       &                                         * zdep 
    267                   tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - htsc_iscpl(ji,jj,jk,jp_sal)                       & 
    268                       &                                         * zdep   
     264                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - htsc_iscpl(ji,jj,jk,jp_tem) * zdep 
     265                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - htsc_iscpl(ji,jj,jk,jp_sal) * zdep   
    269266               END DO   
    270267            END DO   
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r9094 r9124  
    5858      IF( ln_timing )   CALL timing_start('tra_zdf') 
    5959      ! 
     60      IF( kt == nit000 )  THEN 
     61         IF(lwp)WRITE(numout,*) 
     62         IF(lwp)WRITE(numout,*) 'tra_zdf : implicit vertical mixing on T & S' 
     63         IF(lwp)WRITE(numout,*) '~~~~~~~ ' 
     64      ENDIF 
     65      ! 
    6066      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =      rdt   ! at nit000, =   rdt (restarting with Euler time stepping) 
    6167      ELSEIF( kt <= nit000 + 1           ) THEN   ;   r2dt = 2. * rdt   ! otherwise, = 2 rdt (leapfrog) 
     
    134140      !!--------------------------------------------------------------------- 
    135141      ! 
    136       IF( ln_timing )   CALL timing_start('tra_zdf_imp') 
    137       ! 
    138       IF( kt == kit000 )  THEN 
    139          IF(lwp)WRITE(numout,*) 
    140          IF(lwp)WRITE(numout,*) 'tra_zdf_imp : implicit vertical mixing on ', cdtype 
    141          IF(lwp)WRITE(numout,*) '~~~~~~~~~~~ ' 
    142       ENDIF 
    143142      !                                               ! ============= ! 
    144143      DO jn = 1, kjpt                                 !  tracer loop  ! 
     
    253252      END DO                                          !  end tracer loop  ! 
    254253      !                                               ! ================= ! 
    255       ! 
    256       IF( ln_timing )   CALL timing_stop('tra_zdf_imp') 
    257       ! 
    258254   END SUBROUTINE tra_zdf_imp 
    259255 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_closea.F90

    r7754 r9124  
    3030   USE lbclnk          ! lateral boundary condition - MPP exchanges 
    3131   USE lib_mpp         ! MPP library 
    32    USE timing 
    3332 
    3433   IMPLICIT NONE 
     
    201200      !!---------------------------------------------------------------------- 
    202201      ! 
    203       IF( nn_timing == 1 )  CALL timing_start('sbc_clo') 
    204202      !                                                   !------------------! 
    205203      IF( kt == nit000 ) THEN                             !  Initialisation  ! 
     
    335333      CALL lbc_lnk( emp , 'T', 1._wp ) 
    336334      ! 
    337       IF( nn_timing == 1 )  CALL timing_stop('sbc_clo') 
    338       ! 
    339335   END SUBROUTINE sbc_clo 
    340336 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_fmask.F90

    r6979 r9124  
    3030   !!---------------------------------------------------------------------- 
    3131   !! NEMO/OPA 4.0 , NEMO Consortium  (2016) 
    32    !! $Id$  
     32   !! $Id:$  
    3333   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3434   !!---------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_hgr.F90

    r9023 r9124  
    2020   USE in_out_manager ! I/O manager 
    2121   USE lib_mpp        ! MPP library 
    22    USE timing         ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    2928   !!---------------------------------------------------------------------- 
    3029   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    31    !! $Id$  
     30   !! $Id:$  
    3231   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3332   !!---------------------------------------------------------------------- 
     
    7170      REAL(wp) ::   zphi1, zphi0, zsin_alpha, zim05, zjm05, zbeta, znorme      !   -      - 
    7271      !!------------------------------------------------------------------------------- 
    73       ! 
    74       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    7572      ! 
    7673      !     !==  beta-plane with regular grid-spacing and rotated domain ==!  (GYRE configuration) 
     
    170167      IF(lwp) WRITE(numout,*) '                           beta-plane used. beta = ', zbeta, ' 1/(s.m)' 
    171168      ! 
    172       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    173       ! 
    174169   END SUBROUTINE usr_def_hgr 
    175170 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_istate.F90

    r7753 r9124  
    2626   !!---------------------------------------------------------------------- 
    2727   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    28    !! $Id$  
     28   !! $Id:$  
    2929   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3030   !!---------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_nam.F90

    r9023 r9124  
    2020   USE in_out_manager ! I/O manager 
    2121   USE lib_mpp        ! MPP library 
    22    USE timing         ! Timing 
    2322    
    2423   IMPLICIT NONE 
     
    3332   !!---------------------------------------------------------------------- 
    3433   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    35    !! $Id$  
     34   !! $Id:$  
    3635   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3736   !!---------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_sbc.F90

    r9097 r9124  
    1313   !!   usrdef_sbc    : user defined surface bounday conditions in GYRE case 
    1414   !!---------------------------------------------------------------------- 
    15    USE oce             ! ocean dynamics and tracers 
    16    USE dom_oce         ! ocean space and time domain 
    17    USE sbc_oce         ! Surface boundary condition: ocean fields 
    18    USE phycst          ! physical constants 
     15   USE oce            ! ocean dynamics and tracers 
     16   USE dom_oce        ! ocean space and time domain 
     17   USE sbc_oce        ! Surface boundary condition: ocean fields 
     18   USE phycst         ! physical constants 
    1919   ! 
    20    USE in_out_manager  ! I/O manager 
    21    USE lib_mpp         ! distribued memory computing library 
    22    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    23    USE lib_fortran     ! 
     20   USE in_out_manager ! I/O manager 
     21   USE lib_mpp        ! distribued memory computing library 
     22   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     23   USE lib_fortran    ! 
    2424 
    2525   IMPLICIT NONE 
    2626   PRIVATE 
    2727 
    28    PUBLIC   usrdef_sbc_oce    ! routine called in sbcmod module 
    29    PUBLIC   usrdef_sbc_ice_tau  ! routine called by icestp.F90 for ice dynamics 
    30    PUBLIC   usrdef_sbc_ice_flx  ! routine called by icestp.F90 for ice thermo 
     28   PUBLIC   usrdef_sbc_oce       ! routine called in sbcmod module 
     29   PUBLIC   usrdef_sbc_ice_tau   ! routine called by icestp.F90 for ice dynamics 
     30   PUBLIC   usrdef_sbc_ice_flx   ! routine called by icestp.F90 for ice thermo 
    3131 
    3232   !! * Substitutions 
     
    3434   !!---------------------------------------------------------------------- 
    3535   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    36    !! $Id$ 
     36   !! $Id:$ 
    3737   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3838   !!---------------------------------------------------------------------- 
     
    225225   END SUBROUTINE usrdef_sbc_oce 
    226226 
     227 
    227228   SUBROUTINE usrdef_sbc_ice_tau( kt ) 
    228229      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    229230   END SUBROUTINE usrdef_sbc_ice_tau 
     231 
    230232 
    231233   SUBROUTINE usrdef_sbc_ice_flx( kt, phs, phi ) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90

    r7753 r9124  
    2424   USE lib_mpp        ! distributed memory computing library 
    2525   USE wrk_nemo       ! Memory allocation 
    26    USE timing         ! Timing 
    2726 
    2827   IMPLICIT NONE 
     
    3130   PUBLIC   usr_def_zgr        ! called by domzgr.F90 
    3231 
    33   !! * Substitutions 
     32   !! * Substitutions 
    3433#  include "vectopt_loop_substitute.h90" 
    3534   !!---------------------------------------------------------------------- 
    3635   !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
    37    !! $Id$ 
     36   !! $Id:$ 
    3837   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3938   !!---------------------------------------------------------------------- 
     
    132131      !!---------------------------------------------------------------------- 
    133132      ! 
    134       IF( nn_timing == 1 )  CALL timing_start('zgr_z') 
    135       ! 
    136133      ! Set parameters of z(k) function 
    137134      ! ------------------------------- 
     
    178175      ENDIF 
    179176      ! 
    180       IF( nn_timing == 1 )  CALL timing_stop('zgr_z') 
    181       ! 
    182177   END SUBROUTINE zgr_z 
    183178 
     
    236231      INTEGER  ::   jk 
    237232      !!---------------------------------------------------------------------- 
    238       ! 
    239       IF( nn_timing == 1 )  CALL timing_start('zgr_zco') 
    240233      ! 
    241234      DO jk = 1, jpk 
     
    251244      END DO 
    252245      ! 
    253       IF( nn_timing == 1 )  CALL timing_stop('zgr_zco') 
    254       ! 
    255246   END SUBROUTINE zgr_zco 
    256247 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90

    r9104 r9124  
    11281128   SUBROUTINE gls_rst( kt, cdrw ) 
    11291129      !!--------------------------------------------------------------------- 
    1130       !!                   ***  ROUTINE ts_rst  *** 
     1130      !!                   ***  ROUTINE gls_rst  *** 
    11311131      !!                      
    11321132      !! ** Purpose :   Read or write TKE file (en) in restart file 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r9023 r9124  
    205205         CALL Agrif_ParentGrid_To_ChildGrid() 
    206206         IF( ln_diaobs )        CALL dia_obs_wri 
    207          IF( nn_timing == 1 )   CALL timing_finalize 
     207         IF( ln_timing )   CALL timing_finalize 
    208208         CALL Agrif_ChildGrid_To_ParentGrid() 
    209209      ENDIF 
    210210#endif 
    211       IF( ln_timing    )   CALL timing_finalize 
     211      IF( ln_timing )   CALL timing_finalize 
    212212      ! 
    213213      CALL nemo_closefile 
     
    550550      njctle    = nn_jctle 
    551551      isplt     = nn_isplt 
    552       jsplt     = nn_jsplt 
    553 !!gm to be remove at the end of the 2017 merge party 
    554       if( ln_timing ) then  ;  nn_timing = 1 
    555       else                  ;  nn_timing = 0 
    556       endif 
    557 !!gm end 
    558        
     552      jsplt     = nn_jsplt       
    559553 
    560554      IF(lwp) THEN                  ! control print 
     
    613607      ! 
    614608#if defined key_agrif 
    615       IF( nn_timing == 1 ) CALL ctl_stop( 'AGRIF not implemented with nn_timing = 1') 
     609      IF( ln_timing )   CALL ctl_stop( 'AGRIF not implemented with ln_timing = true') 
    616610#endif 
    617611      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/step.F90

    r9023 r9124  
    9191# endif 
    9292#endif 
     93      ! 
     94      IF( ln_timing )   CALL timing_start('stp') 
     95      ! 
    9396      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9497      ! update I/O and calendar  
     
    334337#endif 
    335338      ! 
    336       IF( ln_timing .AND.  kstp == nit000  )   CALL timing_reset 
     339      IF( ln_timing ) THEN 
     340         IF( ln_timing      )   CALL timing_start('stp') 
     341!!gm avoid the init phase during 1st time step ???  useless now no? 
     342         IF( kstp == nit000 )   CALL timing_reset            
     343      ENDIF 
    337344      ! 
    338345   END SUBROUTINE stp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/daymod.F90

    r8583 r9124  
    223223      !!---------------------------------------------------------------------- 
    224224      ! 
    225       IF( nn_timing == 1 )  CALL timing_start('day') 
     225      IF( ln_timing )   CALL timing_start('day') 
    226226      ! 
    227227      zprec = 0.1 / rday 
     
    277277      IF( lrst_oce         ) CALL day_rst( kt, 'WRITE' )      ! write day restart information 
    278278      ! 
    279       IF( nn_timing == 1 )  CALL timing_stop('day') 
     279      IF( ln_timing )   CALL timing_stop('day') 
    280280      ! 
    281281   END SUBROUTINE day 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/diawri.F90

    r9019 r9124  
    136136      !!---------------------------------------------------------------------- 
    137137      !  
    138       IF( nn_timing == 1 )   CALL timing_start('dia_wri') 
     138      IF( ln_timing )   CALL timing_start('dia_wri') 
    139139      ! 
    140140      ! Output the initial state and forcings 
     
    322322      ENDIF 
    323323      ! 
    324       IF( nn_timing == 1 )   CALL timing_stop('dia_wri') 
     324      IF( ln_timing )   CALL timing_stop('dia_wri') 
    325325      ! 
    326326   END SUBROUTINE dia_wri 
     
    350350      !!---------------------------------------------------------------------- 
    351351      !  
    352       IF( nn_timing == 1 )   CALL timing_start('dia_wri_state') 
     352      IF( ln_timing )   CALL timing_start('dia_wri_state') 
    353353 
    354354      ! 0. Initialisation 
     
    428428      ENDIF 
    429429#endif 
    430         
    431       IF( nn_timing == 1 )   CALL timing_stop('dia_wri_state') 
    432       !  
    433  
     430      ! 
     431      IF( ln_timing )   CALL timing_stop('dia_wri_state') 
     432      ! 
    434433   END SUBROUTINE dia_wri_state 
     434 
    435435   !!====================================================================== 
    436436END MODULE diawri 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r9019 r9124  
    424424      isplt     = nn_isplt 
    425425      jsplt     = nn_jsplt 
    426 !!gm to be remove at the end of the 2017 merge party 
    427       if( ln_timing ) then  ;  nn_timing = 1 
    428       else                  ;  nn_timing = 0 
    429       endif 
    430 !!gm end 
    431426 
    432427      IF(lwp) THEN                  ! control print 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r9019 r9124  
    2323   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2424   USE zpshde          ! z-coord. with partial steps: horizontal derivatives 
     25   ! 
    2526   USE in_out_manager  ! I/O manager 
    2627   USE iom             ! I/O library 
     
    7273      !!             - interpolates data if needed 
    7374      !!---------------------------------------------------------------------- 
    74       ! 
    7575      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7676      ! 
     
    7979      REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation 
    8080      !!---------------------------------------------------------------------- 
    81        
    82       ! 
    83       IF( nn_timing == 1 )  CALL timing_start( 'sbc_ssm') 
     81      ! 
     82      IF( ln_timing )   CALL timing_start( 'sbc_ssm') 
    8483      
    8584      IF ( l_sasread ) THEN 
     
    153152      ENDIF 
    154153      ! 
    155       IF( nn_timing == 1 )  CALL timing_stop( 'sbc_ssm') 
     154      IF( ln_timing )   CALL timing_stop( 'sbc_ssm') 
    156155      ! 
    157156   END SUBROUTINE sbc_ssm 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90

    r7068 r9124  
    4545      !! ** Method  : - 
    4646      !!---------------------------------------------------------------------- 
    47       ! 
    4847      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    4948      INTEGER ::   jn, jk   ! dummy loop index 
    5049      !!---------------------------------------------------------------------- 
    5150      ! 
    52       IF( nn_timing == 1 )  CALL timing_start('trc_sms_age') 
     51      IF( ln_timing )   CALL timing_start('trc_sms_age') 
    5352      ! 
    5453      IF(lwp) WRITE(numout,*) 
     
    5958      DO jk = 1, nla_age 
    6059         tra(:,:,jk,jp_age) = rn_age_kill_rate * trb(:,:,jk,jp_age) 
    61       ENDDO 
     60      END DO 
    6261      ! 
    6362      tra(:,:,nl_age,jp_age) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jp_age)  & 
     
    6665      DO jk = nlb_age, jpk 
    6766         tra(:,:,jk,jp_age) = tmask(:,:,jk) * rryear 
    68       ENDDO 
     67      END DO 
    6968      ! 
    7069      IF( l_trdtrc ) CALL trd_trc( tra(:,:,:,jp_age), jn, jptra_sms, kt )   ! save trends 
    7170      ! 
    72       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_age') 
     71      IF( ln_timing )   CALL timing_stop('trc_sms_age') 
    7372      ! 
    7473   END SUBROUTINE trc_sms_age 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90

    r7192 r9124  
    4949      !!---------------------------------------------------------------------- 
    5050      ! 
    51       IF( nn_timing == 1 )  CALL timing_start('trc_atm_c14_ini') 
     51      IF( ln_timing )   CALL timing_start('trc_atm_c14_ini') 
    5252      ! 
    5353       
     
    192192      ENDIF 
    193193      ! 
    194       IF( nn_timing == 1 )  CALL timing_stop('trc_atm_c14_ini') 
     194      IF( ln_timing )   CALL timing_stop('trc_atm_c14_ini') 
    195195      ! 
    196196   END SUBROUTINE trc_atm_c14_ini 
     
    216216      !!---------------------------------------------------------------------- 
    217217      ! 
    218       IF( nn_timing == 1 )  CALL timing_start('trc_atm_c14') 
     218      IF( ln_timing )   CALL timing_start('trc_atm_c14') 
    219219      ! 
    220220      IF( kc14typ == 0) THEN 
     
    297297      ENDIF 
    298298      ! 
    299       IF( nn_timing == 1 )  CALL timing_stop('trc_atm_c14') 
     299      IF( ln_timing )   CALL timing_stop('trc_atm_c14') 
    300300      ! 
    301301   END SUBROUTINE trc_atm_c14 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90

    r7068 r9124  
    2828   !!---------------------------------------------------------------------- 
    2929   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    30    !! $                                                                    $  
     30   !! $Id:$  
    3131   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3232   !!---------------------------------------------------------------------- 
     
    6060      !!---------------------------------------------------------------------- 
    6161      ! 
    62       IF( nn_timing == 1 )  CALL timing_start('trc_sms_c14') 
     62      IF( ln_timing )   CALL timing_start('trc_sms_c14') 
    6363      ! 
    6464      IF( kt ==  nittrc000 ) THEN 
     
    6868      ENDIF 
    6969      ! 
    70   
    7170      ! Get co2sbc & c14sbc(ji,jj): at 1st iter for all, at each time step for transient 
    7271      IF( kc14typ >= 1 .OR.  kt ==  nittrc000 )   CALL trc_atm_c14( kt, co2sbc, c14sbc )  
     
    8079      DO jj = 1, jpj 
    8180         DO ji = 1, jpi   
    82             IF( tmask(ji,jj,1) >  0.) THEN 
    83  
    84                zt   = MIN( 40., tsn(ji,jj,1,jp_tem)) 
    85  
     81            IF( tmask(ji,jj,1) >  0. ) THEN 
     82               ! 
     83               zt   = MIN( 40. , tsn(ji,jj,1,jp_tem) ) 
     84               ! 
    8685               !  Computation of solubility zsol in [mol/(L * atm)] 
    8786               !   after Wanninkhof (2014) referencing Weiss (1974) 
     
    143142         END DO 
    144143      END DO 
    145  
    146144      ! 
    147145      IF( lrst_trc ) THEN 
     
    149147         IF(lwp) WRITE(numout,*) ' trc_rst_wri_c14 : Write specific variables from c14 model ' 
    150148         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    151       ! 
     149         ! 
    152150         CALL iom_rstput( kt, nitrst, numrtw, 'co2sbc', co2sbc )       ! These five need      & 
    153151         CALL iom_rstput( kt, nitrst, numrtw, 'c14sbc', c14sbc )     ! &    to be written   & 
     
    156154         CALL iom_rstput( kt, nitrst, numrtw, 'qtr_c14', qtr_c14 )   ! &    to be coherent. 
    157155         CALL iom_rstput( kt, nitrst, numrtw, 'qint_c14', qint_c14 ) ! Cumulative 
    158       ! 
     156         ! 
    159157      ENDIF 
    160158 
    161159      IF( l_trdtrc )  CALL trd_trc( tra(:,:,:,jp_c14), 1, jptra_sms, kt )   ! save trends 
    162160      ! 
    163       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_c14') 
     161      IF( ln_timing )   CALL timing_stop('trc_sms_c14') 
    164162      ! 
    165163   END SUBROUTINE trc_sms_c14 
    166164 
    167  
    168165  !!====================================================================== 
    169166END MODULE trcsms_c14 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90

    r8397 r9124  
    8585      !!---------------------------------------------------------------------- 
    8686      ! 
    87       ! 
    88       IF( nn_timing == 1 )  CALL timing_start('trc_sms_cfc') 
     87      IF( ln_timing )   CALL timing_start('trc_sms_cfc') 
    8988      ! 
    9089      ALLOCATE( zpatm(jphem,jp_cfc), STAT=ierr ) 
     
    194193      END IF 
    195194      ! 
    196       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_cfc') 
     195      IF( ln_timing )   CALL timing_stop('trc_sms_cfc') 
    197196      ! 
    198197   END SUBROUTINE trc_sms_cfc 
     
    205204      !! ** Purpose : sets constants for CFC model 
    206205      !!--------------------------------------------------------------------- 
    207       INTEGER :: jn 
     206      INTEGER ::   jn   ! 
    208207      !!---------------------------------------------------------------------- 
    209208      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90

    r7646 r9124  
    4646      !!---------------------------------------------------------------------- 
    4747      ! 
    48       IF( nn_timing == 1 )  CALL timing_start('trc_sms_my_trc') 
     48      IF( ln_timing )   CALL timing_start('trc_sms_my_trc') 
    4949      ! 
    5050      IF(lwp) WRITE(numout,*) 
     
    6767      END IF 
    6868      ! 
    69       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_my_trc') 
     69      IF( ln_timing )   CALL timing_stop('trc_sms_my_trc') 
    7070      ! 
    7171   END SUBROUTINE trc_sms_my_trc 
     72 
    7273 
    7374   INTEGER FUNCTION trc_sms_my_trc_alloc() 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90

    r9085 r9124  
    101101      !!--------------------------------------------------------------------- 
    102102      ! 
    103       IF( nn_timing == 1 )  CALL timing_start('p2z_bio') 
     103      IF( ln_timing )   CALL timing_start('p2z_bio') 
    104104      ! 
    105105      IF( lk_iomput ) THEN 
     
    382382      ENDIF 
    383383      ! 
    384       IF( nn_timing == 1 )  CALL timing_stop('p2z_bio') 
     384      IF( ln_timing )  CALL timing_stop('p2z_bio') 
    385385      ! 
    386386   END SUBROUTINE p2z_bio 
     387 
    387388 
    388389   SUBROUTINE p2z_bio_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90

    r7646 r9124  
    6868      !!--------------------------------------------------------------------- 
    6969      ! 
    70       IF( nn_timing == 1 )  CALL timing_start('p2z_exp') 
     70      IF( ln_timing )   CALL timing_start('p2z_exp') 
    7171      ! 
    7272      IF( kt == nittrc000 )   CALL p2z_exp_init 
     
    155155      ENDIF 
    156156      ! 
    157       IF( nn_timing == 1 )  CALL timing_stop('p2z_exp') 
     157      IF( ln_timing )  CALL timing_stop('p2z_exp') 
    158158      ! 
    159159   END SUBROUTINE p2z_exp 
     160 
    160161 
    161162   SUBROUTINE p2z_exp_init 
     
    166167      INTEGER  ::   ji, jj, jk 
    167168      REAL(wp) ::   zmaskt, zfluo, zfluu 
    168       REAL(wp), POINTER, DIMENSION(:,:  ) :: zrro 
    169       REAL(wp), POINTER, DIMENSION(:,:,:) :: zdm0 
    170       !!--------------------------------------------------------------------- 
    171  
     169      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zrro 
     170      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdm0 
     171      !!--------------------------------------------------------------------- 
     172      ! 
    172173      IF(lwp) THEN 
    173174         WRITE(numout,*) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90

    r9019 r9124  
    1111   !!             3.2  !  2009-04  (C. Ethe, G. Madec)  minor optimisation + style 
    1212   !!---------------------------------------------------------------------- 
     13 
     14   !!---------------------------------------------------------------------- 
    1315   !!   p2z_opt        :   Compute the light availability in the water column 
    1416   !!---------------------------------------------------------------------- 
     
    6971      !!--------------------------------------------------------------------- 
    7072      ! 
    71       IF( nn_timing == 1 )  CALL timing_start('p2z_opt') 
     73      IF( ln_timing )   CALL timing_start('p2z_opt') 
    7274      ! 
    7375      ! Allocate temporary workspace 
     
    143145      CALL wrk_dealloc( jpi, jpj, jpk, zparr, zparg    ) 
    144146      ! 
    145       IF( nn_timing == 1 )  CALL timing_stop('p2z_opt') 
     147      IF( ln_timing )   CALL timing_stop('p2z_opt') 
    146148      ! 
    147149   END SUBROUTINE p2z_opt 
     
    157159      !! 
    158160      !!---------------------------------------------------------------------- 
     161      INTEGER ::   ios   ! Local integer 
     162      !! 
    159163      NAMELIST/namlobopt/ xkg0, xkr0, xkgp, xkrp, xlg, xlr, rpig 
    160164      NAMELIST/namlobrat/ rcchl, redf, reddom 
    161       INTEGER :: ios                 ! Local integer output status for namelist read 
    162165      !!---------------------------------------------------------------------- 
    163166 
     
    168171      REWIND( numnatp_cfg )              ! Namelist namlobopt in configuration namelist : Lobster options 
    169172      READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 ) 
    170 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp ) 
     173902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp ) 
    171174      IF(lwm) WRITE ( numonp, namlobopt ) 
    172175 
     
    190193      REWIND( numnatp_cfg )              ! Namelist namlobrat in configuration namelist : Lobster ratios 
    191194      READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 ) 
    192 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp ) 
     195904   IF( ios > 0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp ) 
    193196      IF(lwm) WRITE ( numonp, namlobrat ) 
    194197 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90

    r7646 r9124  
    3535   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3636   !!---------------------------------------------------------------------- 
    37  
    3837CONTAINS 
    3938 
     
    5655      !!              trend of passive tracers is saved for futher diagnostics. 
    5756      !!--------------------------------------------------------------------- 
    58       !! 
    5957      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    60       !! 
     58      ! 
    6159      INTEGER  ::   ji, jj, jk, jl, ierr 
    6260      CHARACTER (len=25) :: charout 
     
    6563      !!--------------------------------------------------------------------- 
    6664      ! 
    67       IF( nn_timing == 1 )  CALL timing_start('p2z_sed') 
     65      IF( ln_timing )   CALL timing_start('p2z_sed') 
    6866      ! 
    6967      IF( kt == nittrc000 ) THEN 
     
    119117      ENDIF 
    120118      ! 
    121       IF( nn_timing == 1 )  CALL timing_stop('p2z_sed') 
     119      IF( ln_timing )   CALL timing_stop('p2z_sed') 
    122120      ! 
    123121   END SUBROUTINE p2z_sed 
     122 
    124123 
    125124   SUBROUTINE p2z_sed_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90

    r7681 r9124  
    66   !! History :   1.0  !            M. Levy 
    77   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture 
     8   !!---------------------------------------------------------------------- 
     9 
    810   !!---------------------------------------------------------------------- 
    911   !!   p2zsms        :  Time loop of passive tracers sms 
     
    4244      !! ** Method  : - ??? 
    4345      !! -------------------------------------------------------------------- 
    44       !! 
    4546      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    4647      ! 
    47       INTEGER :: jn 
     48      INTEGER ::   jn   ! dummy loop index 
    4849      !! -------------------------------------------------------------------- 
    4950      ! 
    50       IF( nn_timing == 1 )  CALL timing_start('p2z_sms') 
     51      IF( ln_timing )   CALL timing_start('p2z_sms') 
    5152      ! 
    5253      CALL p2z_opt( kt )      ! optical model 
     
    5455      CALL p2z_sed( kt )      ! sedimentation model 
    5556      CALL p2z_exp( kt )      ! export 
    56  
     57      ! 
    5758      IF( l_trdtrc ) THEN 
    5859         DO jn = jp_pcs0, jp_pcs1 
     
    6061         END DO 
    6162      END IF 
    62  
    6363      ! 
    6464      IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES 
    65       IF( nn_timing == 1 )  CALL timing_stop('p2z_sms') 
     65      IF( ln_timing )   CALL timing_stop('p2z_sms') 
    6666      ! 
    6767   END SUBROUTINE p2z_sms 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zagg.F90

    r7753 r9124  
    1010   !!             3.6  !  2015-05  (O. Aumont) PISCES quota 
    1111   !!---------------------------------------------------------------------- 
     12 
    1213   !!---------------------------------------------------------------------- 
    1314   !!   p4z_agg       :  Compute aggregation of particles 
     
    3839      !! ** Method  : - ??? 
    3940      !!--------------------------------------------------------------------- 
    40       INTEGER, INTENT(in) :: kt, knt 
     41      INTEGER, INTENT(in) ::   kt, knt   ! 
     42      ! 
    4143      INTEGER  ::   ji, jj, jk 
    4244      REAL(wp) ::   zagg, zagg1, zagg2, zagg3, zagg4 
     
    4951      !!--------------------------------------------------------------------- 
    5052      ! 
    51       IF( nn_timing == 1 )  CALL timing_start('p4z_agg') 
    52  
     53      IF( ln_timing )   CALL timing_start('p4z_agg') 
    5354      ! 
    5455      !  Exchange between organic matter compartments due to coagulation/disaggregation 
     
    178179      ENDIF 
    179180      ! 
    180       IF( nn_timing == 1 )  CALL timing_stop('p4z_agg') 
     181      IF( ln_timing )   CALL timing_stop('p4z_agg') 
    181182      ! 
    182183   END SUBROUTINE p4z_agg 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90

    r7753 r9124  
    5656      !!--------------------------------------------------------------------- 
    5757      INTEGER, INTENT(in) :: kt, knt 
     58      ! 
    5859      INTEGER             :: ji, jj, jk, jn 
    5960      CHARACTER (len=25) :: charout 
    60  
    6161      !!--------------------------------------------------------------------- 
    6262      ! 
    63       IF( nn_timing == 1 )  CALL timing_start('p4z_bio') 
     63      IF( ln_timing )   CALL timing_start('p4z_bio') 
    6464      ! 
    6565      !     ASSIGN THE SHEAR RATE THAT IS USED FOR AGGREGATION 
     
    112112      ENDIF 
    113113      ! 
    114       IF( nn_timing == 1 )  CALL timing_stop('p4z_bio') 
     114      IF( ln_timing )   CALL timing_stop('p4z_bio') 
    115115      ! 
    116116   END SUBROUTINE p4z_bio 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90

    r7753 r9124  
    155155      REAL(wp) ::   zst  , zft  , zcks  , zckf  , zaksp1 
    156156      REAL(wp) ::   total2free, free2SWS, total2SWS, SWS2total 
    157  
    158157      !!--------------------------------------------------------------------- 
    159158      ! 
    160       IF( nn_timing == 1 )  CALL timing_start('p4z_che') 
     159      IF( ln_timing )   CALL timing_start('p4z_che') 
    161160      ! 
    162161      ! Computation of chemical constants require practical salinity 
     
    447446      END DO 
    448447      ! 
    449       IF( nn_timing == 1 )  CALL timing_stop('p4z_che') 
     448      IF( ln_timing )  CALL timing_stop('p4z_che') 
    450449      ! 
    451450   END SUBROUTINE p4z_che 
     451 
    452452 
    453453   SUBROUTINE ahini_for_at(p_hini) 
     
    470470      REAL(wp)  ::  za2, za1, za0 
    471471      REAL(wp)  ::  p_dictot, p_bortot, p_alkcb  
    472  
    473       IF( nn_timing == 1 )  CALL timing_start('ahini_for_at') 
     472      !!--------------------------------------------------------------------- 
     473 
     474      IF( ln_timing )  CALL timing_start('ahini_for_at') 
    474475      ! 
    475476      DO jk = 1, jpk 
     
    512513      END DO 
    513514      ! 
    514       IF( nn_timing == 1 )  CALL timing_stop('ahini_for_at') 
     515      IF( ln_timing )  CALL timing_stop('ahini_for_at') 
    515516      ! 
    516517   END SUBROUTINE ahini_for_at 
    517518 
    518519   !=============================================================================== 
     520 
    519521   SUBROUTINE anw_infsup( p_alknw_inf, p_alknw_sup ) 
    520522 
     
    564566   REAL(wp), POINTER, DIMENSION(:,:,:) :: zalknw_inf, zalknw_sup, rmask, zh_min, zh_max, zeqn_absmin 
    565567 
    566    IF( nn_timing == 1 )  CALL timing_start('solve_at_general') 
     568   IF( ln_timing )  CALL timing_start('solve_at_general') 
    567569      !  Allocate temporary workspace 
    568570   CALL wrk_alloc( jpi, jpj, jpk, zalknw_inf, zalknw_sup, rmask ) 
     
    801803 
    802804 
    803    IF( nn_timing == 1 )  CALL timing_stop('solve_at_general') 
    804  
    805  
     805      IF( ln_timing )   CALL timing_stop('solve_at_general') 
     806      ! 
    806807   END SUBROUTINE solve_at_general 
     808 
    807809 
    808810   INTEGER FUNCTION p4z_che_alloc() 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90

    r7753 r9124  
    7979      !!--------------------------------------------------------------------- 
    8080      ! 
    81       IF( nn_timing == 1 )  CALL timing_start('p4z_fechem') 
     81      IF( ln_timing )   CALL timing_start('p4z_fechem') 
    8282      ! 
    8383      ! Allocate temporary workspace 
     
    366366      ENDIF 
    367367      ! 
    368       IF( nn_timing == 1 )  CALL timing_stop('p4z_fechem') 
     368      IF( ln_timing )   CALL timing_stop('p4z_fechem') 
    369369      ! 
    370370   END SUBROUTINE p4z_fechem 
     
    383383      !! 
    384384      !!---------------------------------------------------------------------- 
     385      INTEGER ::   ios   ! Local integer  
     386      !! 
    385387      NAMELIST/nampisfer/ ln_fechem, ln_ligvar, ln_fecolloid, xlam1, xlamdust, ligand, kfep  
    386       INTEGER :: ios                 ! Local integer output status for namelist read 
     388      !!---------------------------------------------------------------------- 
    387389 
    388390      REWIND( numnatp_ref )              ! Namelist nampisfer in reference namelist : Pisces iron chemistry 
     
    392394      REWIND( numnatp_cfg )              ! Namelist nampisfer in configuration namelist : Pisces iron chemistry 
    393395      READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 ) 
    394 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp ) 
     396902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp ) 
    395397      IF(lwm) WRITE ( numonp, nampisfer ) 
    396398 
     
    434436      ! 
    435437   END SUBROUTINE p4z_fechem_init 
     438    
    436439   !!====================================================================== 
    437440END MODULE p4zfechem 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90

    r7753 r9124  
    8383      !!--------------------------------------------------------------------- 
    8484      ! 
    85       IF( nn_timing == 1 )  CALL timing_start('p4z_flx') 
     85      IF( ln_timing )   CALL timing_start('p4z_flx') 
    8686      ! 
    8787      CALL wrk_alloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm ) 
     
    216216      CALL wrk_dealloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm ) 
    217217      ! 
    218       IF( nn_timing == 1 )  CALL timing_stop('p4z_flx') 
     218      IF( ln_timing )   CALL timing_stop('p4z_flx') 
    219219      ! 
    220220   END SUBROUTINE p4z_flx 
     
    231231      !! ** input   :   Namelist nampisext 
    232232      !!---------------------------------------------------------------------- 
     233      INTEGER ::   jm 
     234      INTEGER ::   ios   ! Local integer  
     235      ! 
    233236      NAMELIST/nampisext/ln_co2int, atcco2, clname, nn_offset 
    234       INTEGER :: jm 
    235       INTEGER :: ios                 ! Local integer output status for namelist read 
    236237      !!---------------------------------------------------------------------- 
    237238      ! 
     
    243244      REWIND( numnatp_cfg )              ! Namelist nampisext in configuration namelist : Pisces atm. conditions 
    244245      READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 ) 
    245 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp ) 
     246902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp ) 
    246247      IF(lwm) WRITE ( numonp, nampisext ) 
    247248      ! 
     
    292293         ENDIF 
    293294      ENDIF 
    294  
    295295      ! 
    296296      oce_co2(:,:)  = 0._wp                ! Initialization of Flux of Carbon 
     
    302302   END SUBROUTINE p4z_flx_init 
    303303 
     304 
    304305   SUBROUTINE p4z_patm( kt ) 
    305  
    306306      !!---------------------------------------------------------------------- 
    307307      !!                  ***  ROUTINE p4z_atm  *** 
     
    311311      !! 
    312312      !!---------------------------------------------------------------------- 
    313       !! * arguments 
    314313      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
    315314      ! 
     
    321320      !! 
    322321      NAMELIST/nampisatm/ ln_presatm, ln_presatmco2, sn_patm, sn_atmco2, cn_dir 
     322      !!---------------------------------------------------------------------- 
    323323 
    324324      !                                         ! ----------------------- ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90

    r7753 r9124  
    3333      !! 
    3434      !!--------------------------------------------------------------------- 
    35       ! 
    3635      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    3736      ! 
     
    4039      !!--------------------------------------------------------------------- 
    4140      ! 
    42       IF( nn_timing == 1 )  CALL timing_start('p4z_int') 
     41      IF( ln_timing )   CALL timing_start('p4z_int') 
    4342      ! 
    4443      ! Computation of phyto and zoo metabolic rate 
     
    6160      ENDIF 
    6261      ! 
    63       IF( nn_timing == 1 )  CALL timing_stop('p4z_int') 
     62      IF( ln_timing )   CALL timing_stop('p4z_int') 
    6463      ! 
    6564   END SUBROUTINE p4z_int 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zligand.F90

    r7646 r9124  
    5050      !!--------------------------------------------------------------------- 
    5151      ! 
    52       IF( nn_timing == 1 )  CALL timing_start('p4z_ligand') 
     52      IF( ln_timing )   CALL timing_start('p4z_ligand') 
    5353      ! 
    5454      ! ------------------------------------------------------------------ 
     
    7575      ! Dissolution of nanoparticle Fe 
    7676      ! ---------------------------------------------------------- 
    77  
    7877      DO jk = 1, jpkm1 
    7978         DO jj = 1, jpj 
     
    9796       ENDIF 
    9897      ! 
    99       IF( nn_timing == 1 )  CALL timing_stop('p4z_ligand') 
     98      IF( ln_timing )   CALL timing_stop('p4z_ligand') 
    10099      ! 
    101100   END SUBROUTINE p4z_ligand 
     
    114113      !! 
    115114      !!---------------------------------------------------------------------- 
     115      INTEGER ::   ios   ! Local integer  
     116      ! 
    116117      NAMELIST/nampislig/ rlgw, prlgw, rlgs, rfep, rlig 
    117       INTEGER :: ios                 ! Local integer output status for namelist read 
     118      !!---------------------------------------------------------------------- 
    118119 
    119120      REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90

    r8533 r9124  
    7272   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    7373   !!---------------------------------------------------------------------- 
    74  
    7574CONTAINS 
    7675 
     
    8483      !! ** Method  : - ??? 
    8584      !!--------------------------------------------------------------------- 
    86       ! 
    8785      INTEGER, INTENT(in)  :: kt, knt 
    8886      ! 
     
    9593      !!--------------------------------------------------------------------- 
    9694      ! 
    97       IF( nn_timing == 1 )  CALL timing_start('p4z_lim') 
     95      IF( ln_timing )   CALL timing_start('p4z_lim') 
    9896      ! 
    9997      DO jk = 1, jpkm1 
     
    224222      ENDIF 
    225223      ! 
    226       IF( nn_timing == 1 )  CALL timing_stop('p4z_lim') 
     224      IF( ln_timing )   CALL timing_stop('p4z_lim') 
    227225      ! 
    228226   END SUBROUTINE p4z_lim 
    229227 
     228 
    230229   SUBROUTINE p4z_lim_init 
    231  
    232230      !!---------------------------------------------------------------------- 
    233231      !!                  ***  ROUTINE p4z_lim_init  *** 
     
    241239      !! 
    242240      !!---------------------------------------------------------------------- 
    243  
     241      INTEGER ::   ios   ! Local integer 
     242      ! 
    244243      NAMELIST/namp4zlim/ concnno3, concdno3, concnnh4, concdnh4, concnfer, concdfer, concbfe,   & 
    245244         &                concbno3, concbnh4, xsizedia, xsizephy, xsizern, xsizerd,          &  
    246245         &                xksi1, xksi2, xkdoc, qnfelim, qdfelim, caco3r, oxymin 
    247       INTEGER :: ios                 ! Local integer output status for namelist read 
    248  
     246      !!---------------------------------------------------------------------- 
     247      ! 
    249248      REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    250249      READ  ( numnatp_ref, namp4zlim, IOSTAT = ios, ERR = 901) 
    251250901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zlim in reference namelist', lwp ) 
    252  
     251      ! 
    253252      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    254253      READ  ( numnatp_cfg, namp4zlim, IOSTAT = ios, ERR = 902 ) 
    255 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zlim in configuration namelist', lwp ) 
     254902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp4zlim in configuration namelist', lwp ) 
    256255      IF(lwm) WRITE ( numonp, namp4zlim ) 
    257  
     256      ! 
    258257      IF(lwp) THEN                         ! control print 
    259258         WRITE(numout,*) ' ' 
     
    286285   END SUBROUTINE p4z_lim_init 
    287286 
     287 
    288288   INTEGER FUNCTION p4z_lim_alloc() 
    289289      !!---------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90

    r7753 r9124  
    6565      !!--------------------------------------------------------------------- 
    6666      ! 
    67       IF( nn_timing == 1 )  CALL timing_start('p4z_lys') 
     67      IF( ln_timing )  CALL timing_start('p4z_lys') 
    6868      ! 
    6969      CALL wrk_alloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat ) 
     
    141141      CALL wrk_dealloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat ) 
    142142      ! 
    143       IF( nn_timing == 1 )  CALL timing_stop('p4z_lys') 
     143      IF( ln_timing )   CALL timing_stop('p4z_lys') 
    144144      ! 
    145145   END SUBROUTINE p4z_lys 
    146146 
     147 
    147148   SUBROUTINE p4z_lys_init 
    148  
    149149      !!---------------------------------------------------------------------- 
    150150      !!                  ***  ROUTINE p4z_lys_init  *** 
     
    158158      !! 
    159159      !!---------------------------------------------------------------------- 
    160       INTEGER  ::  ios                 ! Local integer output status for namelist read 
    161  
     160      INTEGER ::   ios   ! Local integer 
     161      ! 
    162162      NAMELIST/nampiscal/ kdca, nca 
    163163      !!---------------------------------------------------------------------- 
    164  
     164      ! 
    165165      REWIND( numnatp_ref )              ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution 
    166166      READ  ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901) 
    167167901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in reference namelist', lwp ) 
    168  
     168      ! 
    169169      REWIND( numnatp_cfg )              ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution 
    170170      READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 ) 
    171 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp ) 
     171902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp ) 
    172172      IF(lwm) WRITE ( numonp, nampiscal ) 
    173  
     173      ! 
    174174      IF(lwp) THEN                         ! control print 
    175175         WRITE(numout,*) ' ' 
     
    179179         WRITE(numout,*) '    order of reaction for calcite dissolution nca       =', nca 
    180180      ENDIF 
    181  
     181      ! 
    182182      ! Number of seconds per month  
    183183      rmtss =  nyear_len(1) * rday / raamo 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90

    r8533 r9124  
    7676      !!--------------------------------------------------------------------- 
    7777      ! 
    78       IF( nn_timing == 1 )  CALL timing_start('p4z_meso') 
     78      IF( ln_timing )   CALL timing_start('p4z_meso') 
    7979      ! 
    8080      CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 
     
    240240      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing ) 
    241241      ! 
    242       IF( nn_timing == 1 )  CALL timing_stop('p4z_meso') 
     242      IF( ln_timing )   CALL timing_stop('p4z_meso') 
    243243      ! 
    244244   END SUBROUTINE p4z_meso 
    245245 
     246 
    246247   SUBROUTINE p4z_meso_init 
    247  
    248248      !!---------------------------------------------------------------------- 
    249249      !!                  ***  ROUTINE p4z_meso_init  *** 
     
    257257      !! 
    258258      !!---------------------------------------------------------------------- 
    259  
     259      INTEGER ::   ios   ! Local integer 
     260      ! 
    260261      NAMELIST/namp4zmes/ part2, grazrat2, resrat2, mzrat2, xprefc, xprefp, xprefz,   & 
    261262         &                xprefpoc, xthresh2dia, xthresh2phy, xthresh2zoo, xthresh2poc, & 
    262263         &                xthresh2, xkgraz2, epsher2, sigma2, unass2, grazflux 
    263       INTEGER :: ios                 ! Local integer output status for namelist read 
    264  
     264      !!---------------------------------------------------------------------- 
     265      ! 
    265266      REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    266267      READ  ( numnatp_ref, namp4zmes, IOSTAT = ios, ERR = 901) 
    267268901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmes in reference namelist', lwp ) 
    268  
     269      ! 
    269270      REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    270271      READ  ( numnatp_cfg, namp4zmes, IOSTAT = ios, ERR = 902 ) 
    271 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmes in configuration namelist', lwp ) 
     272902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp4zmes in configuration namelist', lwp ) 
    272273      IF(lwm) WRITE ( numonp, namp4zmes ) 
    273  
    274  
     274      ! 
    275275      IF(lwp) THEN                         ! control print 
    276276         WRITE(numout,*) ' '  
     
    296296         WRITE(numout,*) '    half sturation constant for grazing 2          xkgraz2      =', xkgraz2 
    297297      ENDIF 
    298  
    299  
     298      ! 
    300299   END SUBROUTINE p4z_meso_init 
    301300 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90

    r8533 r9124  
    4242   REAL(wp), PUBLIC ::  epsher      !: half sturation constant for grazing 1  
    4343 
    44  
    4544   !!---------------------------------------------------------------------- 
    4645   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    4847   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4948   !!---------------------------------------------------------------------- 
    50  
    5149CONTAINS 
    5250 
     
    7573      !!--------------------------------------------------------------------- 
    7674      ! 
    77       IF( nn_timing == 1 )  CALL timing_start('p4z_micro') 
     75      IF( ln_timing )   CALL timing_start('p4z_micro') 
    7876      ! 
    7977      CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 
     
    196194      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing ) 
    197195      ! 
    198       IF( nn_timing == 1 )  CALL timing_stop('p4z_micro') 
     196      IF( ln_timing )   CALL timing_stop('p4z_micro') 
    199197      ! 
    200198   END SUBROUTINE p4z_micro 
     
    202200 
    203201   SUBROUTINE p4z_micro_init 
    204  
    205202      !!---------------------------------------------------------------------- 
    206203      !!                  ***  ROUTINE p4z_micro_init  *** 
     
    214211      !! 
    215212      !!---------------------------------------------------------------------- 
    216  
     213      INTEGER ::   ios   ! Local integer 
     214      ! 
    217215      NAMELIST/namp4zzoo/ part, grazrat, resrat, mzrat, xpref2c, xpref2p, & 
    218216         &                xpref2d,  xthreshdia,  xthreshphy,  xthreshpoc, & 
    219217         &                xthresh, xkgraz, epsher, sigma1, unass 
    220       INTEGER :: ios                 ! Local integer output status for namelist read 
    221  
     218      !!---------------------------------------------------------------------- 
     219      ! 
    222220      REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    223221      READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901) 
    224222901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in reference namelist', lwp ) 
    225  
     223      ! 
    226224      REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    227225      READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 ) 
    228 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp ) 
     226902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp ) 
    229227      IF(lwm) WRITE ( numonp, namp4zzoo ) 
    230  
     228      ! 
    231229      IF(lwp) THEN                         ! control print 
    232230         WRITE(numout,*) ' ' 
     
    249247         WRITE(numout,*) '    half sturation constant for grazing 1           xkgraz      =', xkgraz 
    250248      ENDIF 
    251  
     249      ! 
    252250   END SUBROUTINE p4z_micro_init 
    253251 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90

    r7753 r9124  
    7272      !!--------------------------------------------------------------------- 
    7373      ! 
    74       IF( nn_timing == 1 )  CALL timing_start('p4z_nano') 
     74      IF( ln_timing )   CALL timing_start('p4z_nano') 
    7575      ! 
    7676      prodcal(:,:,:) = 0.  !: calcite production variable set to zero 
     
    126126       ENDIF 
    127127      ! 
    128       IF( nn_timing == 1 )  CALL timing_stop('p4z_nano') 
     128      IF( ln_timing )   CALL timing_stop('p4z_nano') 
    129129      ! 
    130130   END SUBROUTINE p4z_nano 
     131 
    131132 
    132133   SUBROUTINE p4z_diat 
     
    145146      !!--------------------------------------------------------------------- 
    146147      ! 
    147       IF( nn_timing == 1 )  CALL timing_start('p4z_diat') 
     148      IF( ln_timing )   CALL timing_start('p4z_diat') 
    148149      ! 
    149150 
     
    201202      ENDIF 
    202203      ! 
    203       IF( nn_timing == 1 )  CALL timing_stop('p4z_diat') 
     204      IF( ln_timing )   CALL timing_stop('p4z_diat') 
    204205      ! 
    205206   END SUBROUTINE p4z_diat 
    206207 
     208 
    207209   SUBROUTINE p4z_mort_init 
    208  
    209210      !!---------------------------------------------------------------------- 
    210211      !!                  ***  ROUTINE p4z_mort_init  *** 
     
    218219      !! 
    219220      !!---------------------------------------------------------------------- 
    220  
     221      INTEGER ::   ios   ! Local integer 
     222      ! 
    221223      NAMELIST/namp4zmort/ wchl, wchld, wchldm, mprat, mprat2 
    222       INTEGER :: ios                 ! Local integer output status for namelist read 
    223  
     224      !!---------------------------------------------------------------------- 
     225      ! 
    224226      REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
    225227      READ  ( numnatp_ref, namp4zmort, IOSTAT = ios, ERR = 901) 
    226228901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmort in reference namelist', lwp ) 
    227  
     229      ! 
    228230      REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    229231      READ  ( numnatp_cfg, namp4zmort, IOSTAT = ios, ERR = 902 ) 
    230 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmort in configuration namelist', lwp ) 
     232902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp4zmort in configuration namelist', lwp ) 
    231233      IF(lwm) WRITE ( numonp, namp4zmort ) 
    232  
     234      ! 
    233235      IF(lwp) THEN                         ! control print 
    234236         WRITE(numout,*) ' ' 
     
    241243         WRITE(numout,*) '    Diatoms mortality rate                    mprat2    =', mprat2 
    242244      ENDIF 
    243  
     245      ! 
    244246   END SUBROUTINE p4z_mort_init 
    245247 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90

    r7970 r9124  
    1818   USE prtctl_trc      !  print control for debugging 
    1919 
    20  
    2120   IMPLICIT NONE 
    2221   PRIVATE 
     
    5958      !! ** Method  : - ??? 
    6059      !!--------------------------------------------------------------------- 
    61       ! 
    6260      INTEGER, INTENT(in) ::   kt, knt   ! ocean time step 
    6361      ! 
     
    7270      !!--------------------------------------------------------------------- 
    7371      ! 
    74       IF( nn_timing == 1 )  CALL timing_start('p4z_opt') 
     72      IF( ln_timing )  CALL timing_start('p4z_opt') 
    7573      ! 
    7674      ! Allocate temporary workspace 
     
    250248                   CALL wrk_dealloc( jpi, jpj, jpk, zpar   ,  ze0, ze1, ze2, ze3, zchl3d ) 
    251249      ! 
    252       IF( nn_timing == 1 )  CALL timing_stop('p4z_opt') 
     250      IF( ln_timing )  CALL timing_stop('p4z_opt') 
    253251      ! 
    254252   END SUBROUTINE p4z_opt 
     253 
    255254 
    256255   SUBROUTINE p4z_opt_par( kt, pqsr, pe1, pe2, pe3, pe0, pqsr100 )  
     
    334333      !! 
    335334      !!---------------------------------------------------------------------- 
    336       !! * arguments 
    337335      INTEGER ,                INTENT(in) ::   kt     ! ocean time step 
    338  
    339       !! * local declarations 
     336      ! 
    340337      INTEGER  :: ji,jj 
    341338      REAL(wp) :: zcoef 
    342339      !!--------------------------------------------------------------------- 
    343340      ! 
    344       IF( nn_timing == 1 )  CALL timing_start('p4z_optsbc') 
     341      IF( ln_timing )  CALL timing_start('p4z_optsbc') 
    345342      ! 
    346343      ! Compute par_varsw at nit000 or only if there is more than 1 time record in par coefficient file 
     
    352349      ENDIF 
    353350      ! 
    354       IF( nn_timing == 1 )  CALL timing_stop('p4z_optsbc') 
     351      IF( ln_timing )  CALL timing_stop('p4z_optsbc') 
    355352      ! 
    356353   END SUBROUTINE p4z_opt_sbc 
     354 
    357355 
    358356   SUBROUTINE p4z_opt_init 
     
    365363      !! ** Input   :   external ascii and netcdf files 
    366364      !!---------------------------------------------------------------------- 
    367       ! 
    368365      INTEGER :: numpar 
    369366      INTEGER :: ierr 
     
    375372      ! 
    376373      NAMELIST/nampisopt/cn_dir, sn_par, ln_varpar, parlux 
    377  
    378       !!---------------------------------------------------------------------- 
    379  
    380       IF( nn_timing == 1 )  CALL timing_start('p4z_opt_init') 
     374      !!---------------------------------------------------------------------- 
    381375 
    382376      REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR 
     
    434428      IF( ln_qsr_bio )   etot3    (:,:,:) = 0._wp 
    435429      !  
    436       IF( nn_timing == 1 )  CALL timing_stop('p4z_opt_init') 
    437       ! 
    438430   END SUBROUTINE p4z_opt_init 
    439431 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90

    r7753 r9124  
    1717   USE prtctl_trc      !  print control for debugging 
    1818   USE iom             !  I/O manager 
    19  
    2019 
    2120   IMPLICIT NONE 
     
    6968      !!--------------------------------------------------------------------- 
    7069      ! 
    71       IF( nn_timing == 1 )  CALL timing_start('p4z_poc') 
     70      IF( ln_timing )  CALL timing_start('p4z_poc') 
    7271      ! 
    7372      ! Allocate temporary workspace 
     
    470469      DEALLOCATE( alphag ) 
    471470      ! 
    472       IF( nn_timing == 1 )  CALL timing_stop('p4z_poc') 
     471      IF( ln_timing )   CALL timing_stop('p4z_poc') 
    473472      ! 
    474473   END SUBROUTINE p4z_poc 
     
    487486      !! 
    488487      !!---------------------------------------------------------------------- 
    489       INTEGER :: jn 
     488      INTEGER ::   ios, ifault   ! Local integer 
     489      INTEGER ::   jn 
    490490      REAL(wp) :: remindelta, reminup, remindown 
    491       INTEGER  :: ifault 
    492  
    493       NAMELIST/nampispoc/ xremip, jcpoc, rshape,  & 
    494          &     xremipc, xremipn, xremipp 
    495  
    496  
    497       INTEGER :: ios                 ! Local integer output status for namelist read 
     491      !! 
     492      NAMELIST/nampispoc/ xremip , jcpoc  , rshape,  & 
     493         &                xremipc, xremipn, xremipp 
     494      !!---------------------------------------------------------------------- 
    498495 
    499496      REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
     
    503500      REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    504501      READ  ( numnatp_cfg, nampispoc, IOSTAT = ios, ERR = 902 ) 
    505 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampispoc in configuration namelist', lwp ) 
     502902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampispoc in configuration namelist', lwp ) 
    506503      IF(lwm) WRITE ( numonp, nampispoc ) 
    507504 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90

    r7753 r9124  
    6565      !! ** Method  : - ??? 
    6666      !!--------------------------------------------------------------------- 
    67       ! 
    6867      INTEGER, INTENT(in) :: kt, knt 
    6968      ! 
     
    8584      !!--------------------------------------------------------------------- 
    8685      ! 
    87       IF( nn_timing == 1 )  CALL timing_start('p4z_prod') 
     86      IF( ln_timing )   CALL timing_start('p4z_prod') 
    8887      ! 
    8988      !  Allocate temporary workspace 
     
    486485     CALL wrk_dealloc( jpi, jpj, jpk, zprorcan, zprorcad, zprofed, zprofen, zpronewn, zpronewd ) 
    487486     ! 
    488      IF( nn_timing == 1 )  CALL timing_stop('p4z_prod') 
     487     IF( ln_timing )  CALL timing_stop('p4z_prod') 
    489488     ! 
    490489   END SUBROUTINE p4z_prod 
     
    502501      !! ** input   :   Namelist nampisprod 
    503502      !!---------------------------------------------------------------------- 
     503      INTEGER :: ios                 ! Local integer output status for namelist read 
    504504      ! 
    505505      NAMELIST/namp4zprod/ pislopen, pisloped, xadap, ln_newprod, bresp, excretn, excretd,  & 
    506506         &                 chlcnm, chlcdm, chlcmin, fecnm, fecdm, grosip 
    507       INTEGER :: ios                 ! Local integer output status for namelist read 
    508507      !!---------------------------------------------------------------------- 
    509508 
     
    514513      REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    515514      READ  ( numnatp_cfg, namp4zprod, IOSTAT = ios, ERR = 902 ) 
    516 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zprod in configuration namelist', lwp ) 
     515902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp4zprod in configuration namelist', lwp ) 
    517516      IF(lwm) WRITE ( numonp, namp4zprod ) 
    518517 
     
    555554      ! 
    556555   END FUNCTION p4z_prod_alloc 
     556 
    557557   !!====================================================================== 
    558558END MODULE p4zprod 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90

    r8533 r9124  
    5858      !! ** Method  : - ??? 
    5959      !!--------------------------------------------------------------------- 
    60       ! 
    6160      INTEGER, INTENT(in) ::   kt, knt ! ocean time step 
    6261      ! 
     
    7271      !!--------------------------------------------------------------------- 
    7372      ! 
    74       IF( nn_timing == 1 )  CALL timing_start('p4z_rem') 
     73      IF( ln_timing )   CALL timing_start('p4z_rem') 
    7574      ! 
    7675      ! Allocate temporary workspace 
     
    289288      CALL wrk_dealloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zfacsi, zfacsib ) 
    290289      ! 
    291       IF( nn_timing == 1 )  CALL timing_stop('p4z_rem') 
     290      IF( ln_timing )   CALL timing_stop('p4z_rem') 
    292291      ! 
    293292   END SUBROUTINE p4z_rem 
     
    309308         &                xremikc, xremikn, xremikp 
    310309      INTEGER :: ios                 ! Local integer output status for namelist read 
     310      !!---------------------------------------------------------------------- 
    311311 
    312312      REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization 
     
    316316      REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization 
    317317      READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 ) 
    318 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp ) 
     318902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp ) 
    319319      IF(lwm) WRITE ( numonp, nampisrem ) 
    320320 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90

    r7753 r9124  
    108108      !!--------------------------------------------------------------------- 
    109109      ! 
    110       IF( nn_timing == 1 )  CALL timing_start('p4z_sbc') 
    111  
     110      IF( ln_timing )  CALL timing_start('p4z_sbc') 
    112111      ! 
    113112      ! Compute dust at nit000 or only if there is more than 1 time record in dust file 
     
    189188      ENDIF 
    190189      ! 
    191       IF( nn_timing == 1 )  CALL timing_stop('p4z_sbc') 
     190      IF( ln_timing )  CALL timing_stop('p4z_sbc') 
    192191      ! 
    193192   END SUBROUTINE p4z_sbc 
    194193 
     194 
    195195   SUBROUTINE p4z_sbc_init 
    196  
    197196      !!---------------------------------------------------------------------- 
    198197      !!                  ***  routine p4z_sbc_init  *** 
     
    232231        &                hratio, fep_rats, fep_rath, lgw_rath 
    233232      !!---------------------------------------------------------------------- 
    234       ! 
    235       IF( nn_timing == 1 )  CALL timing_start('p4z_sbc_init') 
    236233      ! 
    237234      !                            !* set file information 
     
    535532      ENDIF 
    536533      ! 
    537       IF( nn_timing == 1 )  CALL timing_stop('p4z_sbc_init') 
    538       ! 
    539534   END SUBROUTINE p4z_sbc_init 
    540535 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r8541 r9124  
    6868      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zsoufer, zpdep, zlight 
    6969      REAL(wp), POINTER, DIMENSION(:,:  ) :: zwsfep 
    70  
    7170      !!--------------------------------------------------------------------- 
    7271      ! 
    73       IF( nn_timing == 1 )  CALL timing_start('p4z_sed') 
     72      IF( ln_timing )  CALL timing_start('p4z_sed') 
    7473      ! 
    7574      IF( kt == nittrc000 .AND. knt == 1 )   r1_rday  = 1. / rday 
     
    522521      IF( ln_ligand ) CALL wrk_dealloc( jpi, jpj, zwsfep ) 
    523522      ! 
    524       IF( nn_timing == 1 )  CALL timing_stop('p4z_sed') 
     523      IF( ln_timing )  CALL timing_stop('p4z_sed') 
    525524      ! 
    526525   END SUBROUTINE p4z_sed 
     
    537536   END FUNCTION p4z_sed_alloc 
    538537 
    539  
    540538   !!====================================================================== 
    541539END MODULE p4zsed 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90

    r7753 r9124  
    6969      !!--------------------------------------------------------------------- 
    7070      ! 
    71       IF( nn_timing == 1 )  CALL timing_start('p4z_sink') 
     71      IF( ln_timing )   CALL timing_start('p4z_sink') 
    7272 
    7373 
     
    261261      ENDIF 
    262262      ! 
    263       IF( nn_timing == 1 )  CALL timing_stop('p4z_sink') 
     263      IF( ln_timing )   CALL timing_stop('p4z_sink') 
    264264      ! 
    265265   END SUBROUTINE p4z_sink 
    266266 
     267 
    267268   SUBROUTINE p4z_sink_init 
    268269      !!---------------------------------------------------------------------- 
     
    270271      !!---------------------------------------------------------------------- 
    271272      INTEGER :: jk 
    272  
     273      !!---------------------------------------------------------------------- 
     274      ! 
    273275      ik100 = 10        !  last level where depth less than 100 m 
    274276      DO jk = jpkm1, 1, -1 
     
    282284      ! 
    283285   END SUBROUTINE p4z_sink_init 
     286 
    284287 
    285288   SUBROUTINE p4z_sink2( pwsink, psinkflx, jp_tra, kiter ) 
     
    294297      !!      transport term, i.e.  div(u*tra). 
    295298      !!--------------------------------------------------------------------- 
    296       ! 
    297299      INTEGER , INTENT(in   )                         ::   jp_tra    ! tracer index index       
    298300      INTEGER , INTENT(in   )                         ::   kiter     ! number of iterations for time-splitting  
    299301      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj,jpk) ::   pwsink    ! sinking speed 
    300302      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   psinkflx  ! sinking fluxe 
    301       !! 
     303      ! 
    302304      INTEGER  ::   ji, jj, jk, jn 
    303305      REAL(wp) ::   zigma,zew,zign, zflx, zstep 
     
    305307      !!--------------------------------------------------------------------- 
    306308      ! 
    307       IF( nn_timing == 1 )  CALL timing_start('p4z_sink2') 
     309      IF( ln_timing )   CALL timing_start('p4z_sink2') 
    308310      ! 
    309311      ! Allocate temporary workspace 
     
    391393      CALL wrk_dealloc( jpi, jpj, jpk, ztraz, zakz, zwsink2, ztrb ) 
    392394      ! 
    393       IF( nn_timing == 1 )  CALL timing_stop('p4z_sink2') 
     395      IF( ln_timing )  CALL timing_stop('p4z_sink2') 
    394396      ! 
    395397   END SUBROUTINE p4z_sink2 
     
    401403      !!---------------------------------------------------------------------- 
    402404      INTEGER :: ierr(3) 
    403  
     405      !!---------------------------------------------------------------------- 
     406      ! 
    404407      ierr(:) = 0 
    405408      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90

    r9081 r9124  
    4040   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xnegtr     !: ??? 
    4141 
    42  
    4342   !!---------------------------------------------------------------------- 
    4443   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    6867      !!--------------------------------------------------------------------- 
    6968      ! 
    70       IF( nn_timing == 1 )  CALL timing_start('p4z_sms') 
     69      IF( ln_timing )   CALL timing_start('p4z_sms') 
    7170      ! 
    7271      IF( kt == nittrc000 ) THEN 
     
    171170      ! 
    172171 
    173       IF( lk_iomput .OR. ln_check_mass )  CALL p4z_chk_mass( kt ) ! Mass conservation checking 
    174  
    175       IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES 
    176       IF( nn_timing == 1 )  CALL timing_stop('p4z_sms') 
    177       ! 
     172      IF( lk_iomput .OR. ln_check_mass )  CALL p4z_chk_mass( kt )    ! Mass conservation checking 
     173 
     174      IF( lwm .AND. kt == nittrc000    )  CALL FLUSH( numonp )       ! flush output namelist PISCES 
     175      ! 
     176      IF( ln_timing )  CALL timing_stop('p4z_sms') 
    178177      ! 
    179178   END SUBROUTINE p4z_sms 
     179 
    180180 
    181181   SUBROUTINE p4z_sms_init 
     
    188188      !!             namelist: natext, natbio, natsms 
    189189      !!---------------------------------------------------------------------- 
     190      INTEGER :: ios                 ! Local integer output status for namelist read 
     191      !! 
    190192      NAMELIST/nampisbio/ nrdttrc, wsbio, xkmort, ferat3, wsbio2, wsbio2max, wsbio2scale,    & 
    191193         &                   niter1max, niter2max, wfep, ldocp, ldocz, lthet,  & 
    192194         &                   no3rat3, po4rat3 
    193  
     195         ! 
    194196      NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp 
    195197      NAMELIST/nampismass/ ln_check_mass 
    196       INTEGER :: ios                 ! Local integer output status for namelist read 
    197198      !!---------------------------------------------------------------------- 
    198199 
     
    203204      REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables 
    204205      READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 ) 
    205 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp ) 
     206902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp ) 
    206207      IF(lwm) WRITE ( numonp, nampisbio ) 
    207208 
     
    238239      REWIND( numnatp_cfg )              ! Namelist nampisdmp in configuration namelist : Pisces damping 
    239240      READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 ) 
    240 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp ) 
     241906   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp ) 
    241242      IF(lwm) WRITE ( numonp, nampisdmp ) 
    242243 
     
    255256      REWIND( numnatp_cfg )              ! Namelist nampismass in configuration namelist : Pisces mass conservation check  
    256257      READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 ) 
    257 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp ) 
     258908   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp ) 
    258259      IF(lwm) WRITE ( numonp, nampismass ) 
    259260 
     
    264265         WRITE(numout,*) '    Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass 
    265266      ENDIF 
    266  
     267      ! 
    267268   END SUBROUTINE p4z_sms_init 
     269 
    268270 
    269271   SUBROUTINE p4z_rst( kt, cdrw ) 
     
    279281      INTEGER         , INTENT(in) ::   kt         ! ocean time-step 
    280282      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag 
    281       ! 
    282       !!--------------------------------------------------------------------- 
    283  
     283      !!--------------------------------------------------------------------- 
     284      ! 
    284285      IF( TRIM(cdrw) == 'READ' ) THEN 
    285286         ! 
     
    337338   END SUBROUTINE p4z_rst 
    338339 
     340 
    339341   SUBROUTINE p4z_dmp( kt ) 
    340342      !!---------------------------------------------------------------------- 
     
    354356      REAL(wp) :: zalksumb, zpo4sumb, zno3sumb, zsilsumb 
    355357      !!--------------------------------------------------------------------- 
    356  
    357358 
    358359      IF(lwp)  WRITE(numout,*) 
     
    415416      !! 
    416417      !!--------------------------------------------------------------------- 
    417       ! 
    418418      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index       
    419419      REAL(wp)             ::  zrdenittot, zsdenittot, znitrpottot 
     
    422422      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwork 
    423423      !!---------------------------------------------------------------------- 
    424  
    425       ! 
    426       !!--------------------------------------------------------------------- 
    427  
     424      ! 
    428425      IF( kt == nittrc000 ) THEN  
    429426         xfact1 = rfact2r * 12. / 1.e15 * ryyss    ! conversion molC/kt --> PgC/yr 
     
    535532         ! 
    536533         IF( lwp ) WRITE(numnit,9200) ndastp, znitrpottot * xfact2  , & 
    537          &                             zrdenittot  * xfact2  , & 
    538          &                             zsdenittot  * xfact2 
    539  
     534            &                             zrdenittot  * xfact2  , & 
     535            &                             zsdenittot  * xfact2 
    540536      ENDIF 
    541537      ! 
     
    543539 9100  FORMAT(i8,5e18.10) 
    544540 9200  FORMAT(i8,3f10.5) 
    545  
    546541       ! 
    547542   END SUBROUTINE p4z_chk_mass 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zlim.F90

    r7646 r9124  
    154154      !!--------------------------------------------------------------------- 
    155155      ! 
    156       IF( nn_timing == 1 )  CALL timing_start('p5z_lim') 
     156      IF( ln_timing )   CALL timing_start('p5z_lim') 
    157157      ! 
    158158      zratchl = 6.0 
     
    448448      ENDIF 
    449449      ! 
    450       IF( nn_timing == 1 )  CALL timing_stop('p5z_lim') 
     450      IF( ln_timing )  CALL timing_stop('p5z_lim') 
    451451      ! 
    452452   END SUBROUTINE p5z_lim 
    453453 
     454 
    454455   SUBROUTINE p5z_lim_init 
    455  
    456456      !!---------------------------------------------------------------------- 
    457457      !!                  ***  ROUTINE p5z_lim_init  *** 
     
    465465      !! 
    466466      !!---------------------------------------------------------------------- 
    467  
     467      INTEGER :: ios                 ! Local integer output status for namelist read 
     468      !! 
    468469      NAMELIST/namp5zlim/ concnno3, concpno3, concdno3, concnnh4, concpnh4, concdnh4,  & 
    469470         &                concnfer, concpfer, concdfer, concbfe, concnpo4, concppo4,   & 
     
    471472         &                xsizephy, xsizern, xsizerp, xsizerd, xksi1, xksi2, xkdoc,    & 
    472473         &                caco3r, oxymin 
    473  
     474         ! 
    474475      NAMELIST/namp5zquota/ qnnmin, qnnmax, qpnmin, qpnmax, qnpmin, qnpmax, qppmin,      & 
    475476         &                  qppmax, qndmin, qndmax, qpdmin, qpdmax, qfnmax, qfpmax, qfdmax,  & 
    476477         &                  qfnopt, qfpopt, qfdopt 
    477   
    478  
    479       INTEGER :: ios                 ! Local integer output status for namelist read 
    480  
     478      !!---------------------------------------------------------------------- 
     479      ! 
    481480      REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters 
    482481      READ  ( numnatp_ref, namp5zlim, IOSTAT = ios, ERR = 901) 
    483482901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist', lwp ) 
    484  
     483      ! 
    485484      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    486485      READ  ( numnatp_cfg, namp5zlim, IOSTAT = ios, ERR = 902 ) 
    487 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp ) 
     486902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp ) 
    488487      IF(lwm) WRITE ( numonp, namp5zlim ) 
    489  
     488      ! 
    490489      IF(lwp) THEN                         ! control print 
    491490         WRITE(numout,*) ' ' 
     
    523522      READ  ( numnatp_ref, namp5zquota, IOSTAT = ios, ERR = 903) 
    524523903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist', lwp ) 
    525  
     524      ! 
    526525      REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters  
    527526      READ  ( numnatp_cfg, namp5zquota, IOSTAT = ios, ERR = 904 ) 
    528 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist', lwp ) 
     527904   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist', lwp ) 
    529528      IF(lwm) WRITE ( numonp, namp5zquota ) 
    530  
     529      ! 
    531530      IF(lwp) THEN                         ! control print 
    532531         WRITE(numout,*) ' ' 
     
    552551         WRITE(numout,*) '    Maximal Fe quota for diatoms             qfdmax    = ', qfdmax 
    553552      ENDIF 
    554  
     553      ! 
    555554      zpsino3 = 2.3 * rno3 
    556555      zpsinh4 = 1.8 * rno3 
     
    560559      ! 
    561560   END SUBROUTINE p5z_lim_init 
     561 
    562562 
    563563   INTEGER FUNCTION p5z_lim_alloc() 
     
    569569      !!---------------------------------------------------------------------- 
    570570      ierr(:) = 0 
    571  
     571      ! 
    572572      !*  Biological arrays for phytoplankton growth 
    573573      ALLOCATE( xpicono3(jpi,jpj,jpk), xpiconh4(jpi,jpj,jpk),       & 
     
    585585         &      fvpuptk (jpi,jpj,jpk), xlimpic (jpi,jpj,jpk),       & 
    586586         &      xlimsi  (jpi,jpj,jpk), STAT=ierr(1) ) 
    587  
     587         ! 
    588588      !*  Minimum/maximum quotas of phytoplankton 
    589589      ALLOCATE( xqnnmin (jpi,jpj,jpk), xqnnmax(jpi,jpj,jpk),       & 
     
    593593         &      xqndmin (jpi,jpj,jpk), xqndmax(jpi,jpj,jpk),       & 
    594594         &      xqpdmin (jpi,jpj,jpk), xqpdmax(jpi,jpj,jpk),     STAT=ierr(2) ) 
    595       ! 
     595         ! 
    596596      p5z_lim_alloc = MAXVAL( ierr ) 
    597597      ! 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90

    r7646 r9124  
    8989      !!--------------------------------------------------------------------- 
    9090      ! 
    91       IF( nn_timing == 1 )  CALL timing_start('p5z_meso') 
     91      IF( ln_timing )   CALL timing_start('p5z_meso') 
    9292      ! 
    9393      CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 
     
    362362      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing ) 
    363363      ! 
    364       IF( nn_timing == 1 )  CALL timing_stop('p5z_meso') 
     364      IF( ln_timing )   CALL timing_stop('p5z_meso') 
    365365      ! 
    366366   END SUBROUTINE p5z_meso 
    367367 
     368 
    368369   SUBROUTINE p5z_meso_init 
    369  
    370370      !!---------------------------------------------------------------------- 
    371371      !!                  ***  ROUTINE p5z_meso_init  *** 
     
    379379      !! 
    380380      !!---------------------------------------------------------------------- 
    381  
     381      INTEGER :: ios                 ! Local integer output status for namelist read 
     382      !! 
    382383      NAMELIST/namp5zmes/part2, bmetexc2, grazrat2, resrat2, mzrat2, xpref2c, xpref2p, xpref2z, & 
    383384         &                xpref2m, xpref2d, xthresh2dia, xthresh2phy, xthresh2zoo, xthresh2poc, & 
    384385         &                xthresh2mes, xthresh2, xkgraz2, epsher2, ssigma2, unass2c, & 
    385       &                   unass2n, unass2p, srespir2, grazflux 
    386  
    387       INTEGER :: ios                 ! Local integer output status for namelist read 
    388  
     386         &                unass2n, unass2p, srespir2, grazflux 
     387      !!---------------------------------------------------------------------- 
     388      ! 
    389389      REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton 
    390390      READ  ( numnatp_ref, namp5zmes, IOSTAT = ios, ERR = 901) 
    391391901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist', lwp ) 
    392  
     392      ! 
    393393      REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton 
    394394      READ  ( numnatp_cfg, namp5zmes, IOSTAT = ios, ERR = 902 ) 
    395 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp ) 
     395902   IF( ios > 0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp ) 
    396396      IF(lwm) WRITE ( numonp, namp5zmes ) 
    397  
    398  
     397      ! 
    399398      IF(lwp) THEN                         ! control print 
    400399         WRITE(numout,*) ' '  
     
    426425         WRITE(numout,*) '    Use excess carbon for respiration              bmetexc2    = ', bmetexc2 
    427426      ENDIF 
    428  
    429  
     427      ! 
    430428   END SUBROUTINE p5z_meso_init 
    431429 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90

    r7646 r9124  
    8686      !!--------------------------------------------------------------------- 
    8787      ! 
    88       IF( nn_timing == 1 )  CALL timing_start('p5z_micro') 
     88      IF( ln_timing )   CALL timing_start('p5z_micro') 
    8989      ! 
    9090      CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 
     
    306306      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing ) 
    307307      ! 
    308       IF( nn_timing == 1 )  CALL timing_stop('p5z_micro') 
     308      IF( ln_timing )   CALL timing_stop('p5z_micro') 
    309309      ! 
    310310   END SUBROUTINE p5z_micro 
     
    312312 
    313313   SUBROUTINE p5z_micro_init 
    314  
    315314      !!---------------------------------------------------------------------- 
    316315      !!                  ***  ROUTINE p5z_micro_init  *** 
     
    324323      !! 
    325324      !!---------------------------------------------------------------------- 
    326  
     325      INTEGER ::   ios   ! Local integer 
     326      !! 
    327327      NAMELIST/namp5zzoo/ part, grazrat, bmetexc, resrat, mzrat, xprefc, xprefn, & 
    328328         &                xprefp, xprefd, xprefz, xthreshdia, xthreshphy, & 
    329329         &                xthreshpic, xthreshpoc, xthreshzoo, xthresh, xkgraz, & 
    330330         &                epsher, ssigma, srespir, unassc, unassn, unassp 
    331  
    332       INTEGER :: ios                 ! Local integer output status for namelist read 
    333  
     331      !!---------------------------------------------------------------------- 
     332      ! 
    334333      REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton 
    335334      READ  ( numnatp_ref, namp5zzoo, IOSTAT = ios, ERR = 901) 
    336335901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist', lwp ) 
    337  
     336      ! 
    338337      REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton 
    339338      READ  ( numnatp_cfg, namp5zzoo, IOSTAT = ios, ERR = 902 ) 
    340 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist', lwp ) 
     339902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist', lwp ) 
    341340      IF(lwm) WRITE ( numonp, namp5zzoo ) 
    342  
     341      ! 
    343342      IF(lwp) THEN                         ! control print 
    344343         WRITE(numout,*) ' ' 
     
    369368         WRITE(numout,*) '    Use of excess carbon for respiration            bmetexc     =', bmetexc 
    370369      ENDIF 
    371  
     370      ! 
    372371   END SUBROUTINE p5z_micro_init 
    373372 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmort.F90

    r7646 r9124  
    7474      !!--------------------------------------------------------------------- 
    7575      ! 
    76       IF( nn_timing == 1 )  CALL timing_start('p5z_nano') 
     76      IF( ln_timing )   CALL timing_start('p5z_nano') 
    7777      ! 
    7878      prodcal(:,:,:) = 0.  !: calcite production variable set to zero 
     
    124124       ENDIF 
    125125      ! 
    126       IF( nn_timing == 1 )  CALL timing_stop('p5z_nano') 
     126      IF( ln_timing )   CALL timing_stop('p5z_nano') 
    127127      ! 
    128128   END SUBROUTINE p5z_nano 
     129 
    129130 
    130131   SUBROUTINE p5z_pico 
     
    143144      !!--------------------------------------------------------------------- 
    144145      ! 
    145       IF( nn_timing == 1 )  CALL timing_start('p5z_pico') 
     146      IF( ln_timing )   CALL timing_start('p5z_pico') 
    146147      ! 
    147148      DO jk = 1, jpkm1 
     
    184185       ENDIF 
    185186      ! 
    186       IF( nn_timing == 1 )  CALL timing_stop('p5z_pico') 
     187      IF( ln_timing )   CALL timing_stop('p5z_pico') 
    187188      ! 
    188189   END SUBROUTINE p5z_pico 
     
    204205      !!--------------------------------------------------------------------- 
    205206      ! 
    206       IF( nn_timing == 1 )  CALL timing_start('p5z_diat') 
     207      IF( ln_timing )   CALL timing_start('p5z_diat') 
    207208      ! 
    208209 
     
    262263      ENDIF 
    263264      ! 
    264       IF( nn_timing == 1 )  CALL timing_stop('p5z_diat') 
     265      IF( ln_timing )   CALL timing_stop('p5z_diat') 
    265266      ! 
    266267   END SUBROUTINE p5z_diat 
    267268 
     269 
    268270   SUBROUTINE p5z_mort_init 
    269  
    270271      !!---------------------------------------------------------------------- 
    271272      !!                  ***  ROUTINE p5z_mort_init  *** 
     
    279280      !! 
    280281      !!---------------------------------------------------------------------- 
    281  
     282      INTEGER :: ios                 ! Local integer output status for namelist read 
     283      !! 
    282284      NAMELIST/namp5zmort/ wchln, wchlp, wchld, wchldm, mpratn, mpratp, mpratd 
    283       INTEGER :: ios                 ! Local integer output status for namelist read 
     285      !!---------------------------------------------------------------------- 
    284286 
    285287      REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton 
     
    289291      REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton 
    290292      READ  ( numnatp_cfg, namp5zmort, IOSTAT = ios, ERR = 902 ) 
    291 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist', lwp ) 
     293902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist', lwp ) 
    292294      IF(lwm) WRITE ( numonp, namp5zmort ) 
    293295 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90

    r7646 r9124  
    9898      !!--------------------------------------------------------------------- 
    9999      ! 
    100       IF( nn_timing == 1 )  CALL timing_start('p5z_prod') 
     100      IF( ln_timing )   CALL timing_start('p5z_prod') 
    101101      ! 
    102102      !  Allocate temporary workspace 
     
    571571      CALL wrk_dealloc( jpi, jpj, jpk, zcroissp, zcroissn, zcroissd ) 
    572572      ! 
    573       IF( nn_timing == 1 )  CALL timing_stop('p5z_prod') 
     573      IF( ln_timing )   CALL timing_stop('p5z_prod') 
    574574      ! 
    575575   END SUBROUTINE p5z_prod 
     
    587587      !! ** input   :   Namelist nampisprod 
    588588      !!---------------------------------------------------------------------- 
    589       ! 
     589      INTEGER :: ios                 ! Local integer output status for namelist read 
     590      !! 
    590591      NAMELIST/namp5zprod/ pislopen, pislopep, pisloped, excretn, excretp, excretd,     & 
    591592         &                 thetannm, thetanpm, thetandm, chlcmin, grosip, bresp, xadap 
    592  
    593       INTEGER :: ios                 ! Local integer output status for namelist read 
    594593      !!---------------------------------------------------------------------- 
    595594 
     
    600599      REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production 
    601600      READ  ( numnatp_cfg, namp5zprod, IOSTAT = ios, ERR = 902 ) 
    602 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist', lwp ) 
     601902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist', lwp ) 
    603602      IF(lwm) WRITE ( numonp, namp5zprod ) 
    604603 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/par_sed.F90

    r7646 r9124  
    77   !!        !  06-12  (C. Ethe)  Orignal 
    88   !!---------------------------------------------------------------------- 
    9    !! $Id$ 
    109#if defined key_sed 
     10   !!---------------------------------------------------------------------- 
     11   !!   'key_sed'                                                  Sediment  
     12   !!---------------------------------------------------------------------- 
     13 
    1114   !! Domain characteristics 
    1215   USE par_kind 
     
    3740      jpwat = 7,         &   !: number of pore water component 
    3841      jpwatp1 = jpwat + 1 
    39  
    4042    
    4143   ! pore water components        
     
    6163      jpdia2dsed = 7 
    6264#endif 
     65 
     66   !!---------------------------------------------------------------------- 
     67   !! NEMO/TOP 4.0 , NEMO Consortium (2017) 
     68   !! $Id$  
     69   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     70   !!====================================================================== 
    6371END MODULE par_sed 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sed.F90

    r7646 r9124  
    44   !! Sediment :   set sediment global variables 
    55   !!====================================================================== 
    6 #if defined key_sed 
    76   !! History : 
    87   !!        !  06-12  (C. Ethe)  Orignal 
     8   !!---------------------------------------------------------------------- 
     9#if defined key_sed 
     10   !!---------------------------------------------------------------------- 
     11   !!   'key_sed'                                                  Sediment  
    912   !!---------------------------------------------------------------------- 
    1013   USE par_sed 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedadv.F90

    r5215 r9124  
    11MODULE sedadv 
    2 #if defined key_sed 
    32   !!====================================================================== 
    43   !!              ***  MODULE  sedadv  *** 
    54   !!    Sediment : vertical advection and burial 
    65   !!===================================================================== 
    7    !! * Modules used 
     6#if defined key_sed 
     7   !!---------------------------------------------------------------------- 
     8   !!   'key_sed'                                                  Sediment  
    89   !!---------------------------------------------------------------------- 
    910   !!   sed_adv : 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90

    r7646 r9124  
    55   !!====================================================================== 
    66   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture 
    7    !!---------------------------------------------------------------------- 
    8    !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    9    !! $Id$  
    10    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    117   !!---------------------------------------------------------------------- 
    128 
     
    6864   INTEGER, PUBLIC  ::   jp_pcs1  !: Last  index of PISCES tracers 
    6965 
     66   !!---------------------------------------------------------------------- 
     67   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     68   !! $Id$  
     69   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    7070   !!====================================================================== 
    7171END MODULE par_pisces 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90

    r8533 r9124  
    137137CONTAINS 
    138138 
    139  
    140139   INTEGER FUNCTION sms_pisces_alloc() 
    141140      !!---------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90

    r7646 r9124  
    2020   PUBLIC   trc_ice_ini_pisces ! called by trcini.F90 module 
    2121 
     22   !!---------------------------------------------------------------------- 
     23   !! NEMO/TOP 4.0 , NEMO Consortium (2017) 
     24   !! $Id: trcsub.F90 9019 2017-12-13 14:58:53Z timgraham $  
     25   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     26   !!---------------------------------------------------------------------- 
    2227CONTAINS 
    2328 
    24  
    2529   SUBROUTINE trc_ice_ini_pisces 
    2630      !!---------------------------------------------------------------------- 
     
    2933      !! ** Purpose :   Initialisation of the PISCES biochemical model 
    3034      !!---------------------------------------------------------------------- 
    31  
     35      ! 
    3236      IF( ln_p4z .OR. ln_p5z ) THEN  ;   CALL p4z_ice_ini   !  PISCES 
    3337      ELSE                           ;   CALL p2z_ice_ini   !  LOBSTER 
    3438      ENDIF 
    35  
     39      ! 
    3640   END SUBROUTINE trc_ice_ini_pisces 
    3741 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90

    r7646 r9124  
    1818   USE iom             ! I/O manager 
    1919 
    20  
    2120   IMPLICIT NONE 
    2221   PRIVATE 
    2322 
    2423   PUBLIC   trc_nam_pisces   ! called by trcnam.F90 module 
    25  
    2624 
    2725   !!---------------------------------------------------------------------- 
     
    3028   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3129   !!---------------------------------------------------------------------- 
    32  
    3330CONTAINS 
    3431 
     
    4239      !!             namelist: natext, natbio, natsms 
    4340      !!---------------------------------------------------------------------- 
    44       !! 
    4541      INTEGER :: jl, jn 
    4642      INTEGER :: ios, ioptio                 ! Local integer output status for namelist read 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90

    r7646 r9124  
    2323   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    2424   !!---------------------------------------------------------------------- 
    25  
    2625CONTAINS 
    27  
    28       !!---------------------------------------------------------------------- 
    29       !!                   ***  ROUTINE trc_ini_pisces *** 
    30       !! 
    31       !! ** Purpose :   Initialisation of the PISCES biochemical model 
    32       !!---------------------------------------------------------------------- 
    33  
    3426 
    3527   SUBROUTINE trc_sms_pisces( kt ) 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90

    r9019 r9124  
    5050      !!---------------------------------------------------------------------- 
    5151      ! 
    52       IF( nn_timing == 1 )  CALL timing_start('trc_bbl') 
     52      IF( ln_timing )   CALL timing_start('trc_bbl') 
    5353      ! 
    5454      IF( .NOT. l_offline .AND. nn_dttrc == 1 ) THEN 
     
    9292      ENDIF 
    9393      ! 
    94       IF( nn_timing == 1 ) CALL timing_stop('trc_bbl') 
     94      IF( ln_timing )  CALL timing_stop('trc_bbl') 
    9595      ! 
    9696   END SUBROUTINE trc_bbl 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r9019 r9124  
    8989      !!---------------------------------------------------------------------- 
    9090      ! 
    91       IF( nn_timing == 1 )  CALL timing_start('trc_dmp') 
     91      IF( ln_timing )   CALL timing_start('trc_dmp') 
    9292      ! 
    9393      IF( l_trdtrc )   CALL wrk_alloc( jpi, jpj, jpk, ztrtrd )   ! temporary save of trends 
     
    161161      ENDIF 
    162162      ! 
    163       IF( nn_timing == 1 )  CALL timing_stop('trc_dmp') 
     163      IF( ln_timing )   CALL timing_stop('trc_dmp') 
    164164      ! 
    165165   END SUBROUTINE trc_dmp 
     
    179179      NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr 
    180180      !!---------------------------------------------------------------------- 
    181       ! 
    182       IF( nn_timing == 1 )  CALL timing_start('trc_dmp_ini') 
    183181      ! 
    184182      REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 
     
    222220         ! 
    223221      ENDIF 
    224       IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_ini') 
    225222      ! 
    226223   END SUBROUTINE trc_dmp_ini 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r9019 r9124  
    7474      !!---------------------------------------------------------------------- 
    7575      ! 
    76       IF( nn_timing == 1 )   CALL timing_start('trc_ldf') 
     76      IF( ln_timing )   CALL timing_start('trc_ldf') 
    7777      ! 
    7878      IF( l_trdtrc )  THEN 
     
    124124      CALL wrk_dealloc( jpi,jpj,jpk,   zahu, zahv ) 
    125125      ! 
    126       IF( nn_timing == 1 )   CALL timing_stop('trc_ldf') 
     126      IF( ln_timing )   CALL timing_stop('trc_ldf') 
    127127      ! 
    128128   END SUBROUTINE trc_ldf 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90

    r9081 r9124  
    8686      !!---------------------------------------------------------------------- 
    8787      ! 
    88       IF( nn_timing == 1 )  CALL timing_start('trc_nxt') 
     88      IF( ln_timing )   CALL timing_start('trc_nxt') 
    8989      ! 
    9090      IF( kt == nittrc000 .AND. lwp ) THEN 
     
    143143      ENDIF 
    144144      ! 
    145       IF( nn_timing == 1 )  CALL timing_stop('trc_nxt') 
     145      IF( ln_timing )   CALL timing_stop('trc_nxt') 
    146146      ! 
    147147   END SUBROUTINE trc_nxt 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90

    r7753 r9124  
    5454      !!---------------------------------------------------------------------- 
    5555      ! 
    56       IF( nn_timing == 1 )  CALL timing_start('trc_rad') 
     56      IF( ln_timing )   CALL timing_start('trc_rad') 
    5757      ! 
    5858      IF( kt == nittrc000 ) THEN 
     
    7575      ENDIF 
    7676      ! 
    77       IF( nn_timing == 1 )  CALL timing_stop('trc_rad') 
     77      IF( ln_timing )   CALL timing_stop('trc_rad') 
    7878      ! 
    7979   END SUBROUTINE trc_rad 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r9019 r9124  
    6868      !!--------------------------------------------------------------------- 
    6969      ! 
    70       IF( nn_timing == 1 )  CALL timing_start('trc_sbc') 
     70      IF( ln_timing )   CALL timing_start('trc_sbc') 
    7171      ! 
    7272      ! Allocate temporary workspace 
     
    182182      IF( l_trdtrc )  CALL wrk_dealloc( jpi,jpj,jpk,   ztrtrd ) 
    183183      ! 
    184       IF( nn_timing == 1 )  CALL timing_stop('trc_sbc') 
     184      IF( ln_timing )   CALL timing_stop('trc_sbc') 
    185185      ! 
    186186   END SUBROUTINE trc_sbc 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r9033 r9124  
    5656      !! --------------------------------------------------------------------- 
    5757      ! 
    58       IF( nn_timing == 1 )   CALL timing_start('trc_trp') 
     58      IF( ln_timing )   CALL timing_start('trc_trp') 
    5959      ! 
    6060      IF( .NOT. lk_c1d ) THEN 
     
    9191      END IF 
    9292      ! 
    93       IF( nn_timing == 1 )   CALL timing_stop('trc_trp') 
     93      IF( ln_timing )   CALL timing_stop('trc_trp') 
    9494      ! 
    9595   END SUBROUTINE trc_trp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r9019 r9124  
    5050      !!--------------------------------------------------------------------- 
    5151      ! 
    52       IF( nn_timing == 1 )  CALL timing_start('trc_zdf') 
     52      IF( ln_timing )   CALL timing_start('trc_zdf') 
    5353      ! 
    5454      IF( l_trdtrc )   ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
     
    7171      END IF 
    7272      ! 
    73       IF( nn_timing == 1 )  CALL timing_stop('trc_zdf') 
     73      IF( ln_timing )  CALL timing_stop('trc_zdf') 
    7474      ! 
    7575   END SUBROUTINE trc_zdf 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbc.F90

    r9119 r9124  
    6060      !!              - allocates passive tracer BC data structure  
    6161      !!---------------------------------------------------------------------- 
    62       ! 
    6362      INTEGER,INTENT(IN) :: ntrc                           ! number of tracers 
    6463      INTEGER            :: jl, jn , ib, ibd, ii, ij, ik   ! dummy loop indices 
     
    8180                        & cn_dir_cbc, sn_trccbc, rn_trcfac, ln_rnf_ctl, rn_bc_time 
    8281      NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy 
    83  
    8482      !!---------------------------------------------------------------------- 
    85       IF( nn_timing == 1 )  CALL timing_start('trc_bc_ini') 
    8683      ! 
    8784      IF( lwp ) THEN 
     
    332329      ! 
    333330      DEALLOCATE( slf_i )          ! deallocate local field structure 
    334       IF( nn_timing == 1 )  CALL timing_stop('trc_bc_ini') 
    335331      ! 
    336332   END SUBROUTINE trc_bc_ini 
     
    348344      !!---------------------------------------------------------------------- 
    349345      USE fldread 
    350        
    351       !! * Arguments 
     346      !!       
    352347      INTEGER, INTENT( in ) ::   kt              ! ocean time-step index 
    353348      INTEGER, INTENT( in ), OPTIONAL ::   jit   ! subcycle time-step index (for timesplitting option) 
     
    357352      !!--------------------------------------------------------------------- 
    358353      ! 
    359       IF( nn_timing == 1 )  CALL timing_start('trc_bc') 
     354      IF( ln_timing )   CALL timing_start('trc_bc') 
    360355 
    361356      IF( kt == nit000 .AND. lwp) THEN 
     
    452447      END DO                                                     ! tracer loop 
    453448      !                                                          ! =========== 
    454       ! 
    455       IF( nn_timing == 1 )  CALL timing_stop('trc_bc') 
     449      IF( ln_timing )   CALL timing_stop('trc_bc') 
    456450      ! 
    457451   END SUBROUTINE trc_bc 
     
    462456   !!---------------------------------------------------------------------- 
    463457CONTAINS 
    464  
    465458   SUBROUTINE trc_bc_ini( ntrc )        ! Empty routine 
    466459      INTEGER,INTENT(IN) :: ntrc                           ! number of tracers 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbdy.F90

    r7646 r9124  
    5151      !!---------------------------------------------------------------------- 
    5252      ! 
    53       IF( nn_timing == 1 ) CALL timing_start('trc_bdy') 
     53      IF( ln_timing )  CALL timing_start('trc_bdy') 
    5454      ! 
    5555      igrd = 1  
     
    7676      END DO 
    7777      ! 
    78       IF( nn_timing == 1 ) CALL timing_stop('trc_bdy') 
     78      IF( ln_timing )  CALL timing_stop('trc_bdy') 
    7979 
    8080   END SUBROUTINE trc_bdy 
     81 
    8182 
    8283   SUBROUTINE trc_bdy_dmp( kt ) 
     
    9899      !!---------------------------------------------------------------------- 
    99100      ! 
    100       IF( nn_timing == 1 ) CALL timing_start('trc_bdy_dmp') 
     101      IF( ln_timing )  CALL timing_start('trc_bdy_dmp') 
    101102      ! 
    102103      DO jn = 1, jptra 
    103104         DO ib_bdy=1, nb_bdy 
    104             IF ( trcdta_bdy(jn, ib_bdy)%dmp ) THEN 
     105            IF( trcdta_bdy(jn, ib_bdy)%dmp ) THEN 
    105106               igrd = 1                       ! Everything is at T-points here 
    106107               DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd) 
     
    114115               END DO 
    115116            ENDIF 
    116          ENDDO 
    117       ENDDO 
     117         END DO 
     118      END DO 
    118119      ! 
    119       IF( nn_timing == 1 ) CALL timing_stop('trc_bdy_dmp') 
     120      IF( ln_timing )  CALL timing_stop('trc_bdy_dmp') 
    120121      ! 
    121122   END SUBROUTINE trc_bdy_dmp 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcdta.F90

    r8542 r9124  
    2020   USE oce_trc       !  shared variables between ocean and passive tracers 
    2121   USE trc           !  passive tracers common variables 
     22   ! 
    2223   USE iom           !  I/O manager 
    2324   USE lib_mpp       !  MPP library 
     
    6970      NAMELIST/namtrc_dta/ sn_trcdta, cn_dir, rn_trfac  
    7071      !!---------------------------------------------------------------------- 
    71       ! 
    72       IF( nn_timing == 1 )  CALL timing_start('trc_dta_ini') 
    7372      ! 
    7473      IF( lwp ) THEN 
     
    154153      ! 
    155154      DEALLOCATE( slf_i )          ! deallocate local field structure 
    156       IF( nn_timing == 1 )  CALL timing_stop('trc_dta_ini') 
    157155      ! 
    158156   END SUBROUTINE trc_dta_ini 
     
    182180      !!---------------------------------------------------------------------- 
    183181      ! 
    184       IF( nn_timing == 1 )  CALL timing_start('trc_dta') 
     182      IF( ln_timing )   CALL timing_start('trc_dta') 
    185183      ! 
    186184      IF( nb_trcdta > 0 ) THEN 
     
    246244      ENDIF 
    247245      ! 
    248       IF( nn_timing == 1 )  CALL timing_stop('trc_dta') 
     246      IF( ln_timing )  CALL timing_stop('trc_dta') 
    249247      ! 
    250248   END SUBROUTINE trc_dta 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcice.F90

    r7753 r9124  
    1212   !!   trc_ice   :  Call the appropriate sea ice tracer subroutine 
    1313   !!---------------------------------------------------------------------- 
    14  
    1514   USE oce_trc         ! shared variables between ocean and passive tracers 
    1615   USE trc             ! passive tracers common variables 
     
    2423   PRIVATE 
    2524    
    26    PUBLIC   trc_ice_ini ! called by trc_nam 
     25   PUBLIC   trc_ice_ini   ! called by trc_nam 
    2726 
     27   !!---------------------------------------------------------------------- 
     28   !! NEMO/TOP 4.0 , NEMO Consortium (2011) 
     29   !! $Id: trcini.F90 9019 2017-12-13 14:58:53Z timgraham $  
     30   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     31   !!---------------------------------------------------------------------- 
    2832CONTAINS 
    2933    
     
    3741      !!             
    3842      !!--------------------------------------------------------------------- 
    39       ! --- Variable declarations --- ! 
    40  
     43      ! 
    4144      IF(lwp) THEN 
    4245         WRITE(numout,*) 
     
    4447         WRITE(numout,*) '~~~~~~~~~~~~~' 
    4548      ENDIF 
    46  
    47       IF( nn_timing == 1 )  CALL timing_start('trc_ice_ini') 
    4849      ! 
    4950      CALL trc_nam_ice 
    5051      ! 
    51       trc_i(:,:,:) = 0.0d0 ! by default 
    52       trc_o(:,:,:) = 0.0d0 ! by default 
    53  
     52      trc_i(:,:,:) = 0._wp  ! by default 
     53      trc_o(:,:,:) = 0._wp  ! by default 
     54      ! 
    5455      IF ( nn_ice_tr == 1 ) THEN 
    5556         IF( ln_pisces  )    CALL trc_ice_ini_pisces       ! PISCES  bio-model 
     
    5960         IF( ln_my_trc  )    CALL trc_ice_ini_my_trc       ! MY_TRC  tracers 
    6061      ENDIF 
    61  
    62       IF( nn_timing == 1 )   CALL timing_stop('trc_ice_ini') 
    6362      ! 
    6463   END SUBROUTINE trc_ice_ini 
     64 
    6565 
    6666   SUBROUTINE trc_nam_ice 
     
    8686         WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 
    8787      ENDIF 
    88  
    89       IF( nn_timing == 1 )  CALL timing_start('trc_nam_ice') 
    90  
    9188      ! 
    9289      REWIND( numnat_ref )              ! Namelist namtrc_ice in reference namelist : Passive tracer input data 
     
    110107         cn_trc_o      (jn) = sn_tri_tracer(jn)%ctrc_o 
    111108      END DO 
    112  
    113       IF( nn_timing == 1 )   CALL timing_stop('trc_nam_ice') 
    114109      ! 
    115110   END SUBROUTINE trc_nam_ice 
     
    122117   SUBROUTINE trc_ice_ini                   ! Dummy routine    
    123118   END SUBROUTINE trc_ice_ini 
    124  
    125119   SUBROUTINE trc_nam_ice 
    126120   END SUBROUTINE trc_nam_ice 
    127  
    128121#endif 
    129122 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r9019 r9124  
    5252      !!--------------------------------------------------------------------- 
    5353      ! 
    54       IF( nn_timing == 1 )   CALL timing_start('trc_init') 
     54      IF( ln_timing )   CALL timing_start('trc_init') 
    5555      ! 
    5656      IF(lwp) WRITE(numout,*) 
     
    8080      CALL trc_ini_inv   ! Inventories 
    8181      ! 
    82       IF( nn_timing == 1 )   CALL timing_stop('trc_init') 
     82      IF( ln_timing )   CALL timing_stop('trc_init') 
    8383      ! 
    8484   END SUBROUTINE trc_init 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsms.F90

    r7646 r9124  
    4747      !!--------------------------------------------------------------------- 
    4848      ! 
    49       IF( nn_timing == 1 )   CALL timing_start('trc_sms') 
     49      IF( ln_timing )   CALL timing_start('trc_sms') 
    5050      ! 
    5151      IF( ln_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES  
     
    6161      ENDIF 
    6262      ! 
    63       IF( nn_timing == 1 )   CALL timing_stop('trc_sms') 
     63      IF( ln_timing )   CALL timing_stop('trc_sms') 
    6464      ! 
    6565   END SUBROUTINE trc_sms 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r9019 r9124  
    5959      !!------------------------------------------------------------------- 
    6060      ! 
    61       IF( nn_timing == 1 )   CALL timing_start('trc_stp') 
     61      IF( ln_timing )   CALL timing_start('trc_stp') 
    6262      ! 
    6363      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
     
    1121129300  FORMAT(i10,D23.16) 
    113113      ! 
    114       IF( nn_timing == 1 )   CALL timing_stop('trc_stp') 
     114      IF( ln_timing )   CALL timing_stop('trc_stp') 
    115115      ! 
    116116   END SUBROUTINE trc_stp 
     
    136136      CHARACTER(len=2) ::   cl2   ! 2 characters 
    137137      !!---------------------------------------------------------------------- 
     138      ! 
     139      IF( ln_timing )   CALL timing_start('trc_mean_qsr') 
    138140      ! 
    139141      IF( kt == nittrc000 ) THEN 
     
    227229      ENDIF 
    228230      ! 
     231      IF( ln_timing )   CALL timing_stop('trc_mean_qsr') 
     232      ! 
    229233   END SUBROUTINE trc_mean_qsr 
    230234 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90

    r9019 r9124  
    9797      !!------------------------------------------------------------------- 
    9898      ! 
    99       IF( nn_timing == 1 )  CALL timing_start('trc_sub_stp') 
     99      IF( ln_timing )   CALL timing_start('trc_sub_stp') 
    100100      ! 
    101101      IF( kt == nit000 ) THEN 
     
    286286      ENDIF 
    287287      ! 
    288       IF( nn_timing == 1 )  CALL timing_stop('trc_sub_stp') 
     288      IF( ln_timing )   CALL timing_stop('trc_sub_stp') 
    289289      ! 
    290290   END SUBROUTINE trc_sub_stp 
     
    302302      INTEGER ::   ierr 
    303303      !!------------------------------------------------------------------- 
    304       ! 
    305       IF( nn_timing == 1 )  CALL timing_start('trc_sub_ini') 
    306304      ! 
    307305      IF(lwp) WRITE(numout,*) 
     
    348346      ENDIF 
    349347      ! 
    350       IF( nn_timing == 1 )  CALL timing_stop('trc_sub_ini') 
    351       ! 
    352348   END SUBROUTINE trc_sub_ini 
     349 
    353350 
    354351   SUBROUTINE trc_sub_reset( kt ) 
     
    365362      !!------------------------------------------------------------------- 
    366363      ! 
    367       IF( nn_timing == 1 )  CALL timing_start('trc_sub_reset') 
     364      IF( ln_timing )   CALL timing_start('trc_sub_reset') 
    368365      ! 
    369366      !   restore physics variables 
     
    443440      ! 
    444441      ! 
    445       IF( nn_timing == 1 )  CALL timing_stop('trc_sub_reset') 
     442      IF( ln_timing )   CALL timing_stop('trc_sub_reset') 
    446443      ! 
    447444   END SUBROUTINE trc_sub_reset 
     
    473470      !!--------------------------------------------------------------------- 
    474471      ! 
    475       IF( nn_timing == 1 )  CALL timing_start('trc_sub_ssh') 
     472      IF( ln_timing )   CALL timing_start('trc_sub_ssh') 
    476473      ! 
    477474      ! Allocate temporary workspace 
     
    533530      CALL wrk_dealloc( jpi,jpj,   zhdiv ) 
    534531      ! 
    535       IF( nn_timing == 1 )  CALL timing_stop('trc_sub_ssh') 
     532      IF( ln_timing )   CALL timing_stop('trc_sub_ssh') 
    536533      ! 
    537534   END SUBROUTINE trc_sub_ssh 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcwri.F90

    r7646 r9124  
    4444      !!--------------------------------------------------------------------- 
    4545      ! 
    46       IF( nn_timing == 1 )  CALL timing_start('trc_wri') 
     46      IF( ln_timing )   CALL timing_start('trc_wri') 
    4747      ! 
    4848      IF( l_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro 
     
    6060      IF( ln_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers 
    6161      ! 
    62       IF( nn_timing == 1 )  CALL timing_stop('trc_wri') 
     62      IF( ln_timing )   CALL timing_stop('trc_wri') 
    6363      ! 
    6464   END SUBROUTINE trc_wri 
Note: See TracChangeset for help on using the changeset viewer.