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 15272 for branches/UKMO/dev_r5518_obs_oper_strthr – NEMO

Ignore:
Timestamp:
2021-09-20T12:32:09+02:00 (3 years ago)
Author:
jroberts
Message:

Sort out spacing in new code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_obs_oper_strthr/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r15258 r15272  
    324324         IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 
    325325            ! Get Calendar informations 
     326            IF(nn_timing == 2)  CALL timing_start('iom_rstget') 
    326327            CALL iom_get( numror, 'kt', zkt )   ! last time-step of previous run 
     328            IF(nn_timing == 2)  CALL timing_stop('iom_rstget') 
    327329            IF(lwp) THEN 
    328330               WRITE(numout,*) ' *** Info read in restart : ' 
     
    338340            ! Control of date 
    339341            IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 )                                         & 
    340                  &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 & 
    341                  &                  ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 
     342               &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 & 
     343               &                  ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 
    342344            ! define ndastp and adatrj 
    343345            IF ( nrstdt == 2 ) THEN 
     346               IF(nn_timing == 2)  CALL timing_start('iom_rstget') 
    344347               ! read the parameters correspondting to nit000 - 1 (last time step of previous run) 
    345348               CALL iom_get( numror, 'ndastp', zndastp ) 
    346349               ndastp = NINT( zndastp ) 
    347350               CALL iom_get( numror, 'adatrj', adatrj  ) 
    348           CALL iom_get( numror, 'ntime', ktime ) 
    349           nn_time0=INT(ktime) 
     351               CALL iom_get( numror, 'ntime', ktime ) 
     352               IF(nn_timing == 2)  CALL timing_stop('iom_rstget') 
     353               nn_time0=INT(ktime) 
    350354               ! calculate start time in hours and minutes 
    351           zdayfrac=adatrj-INT(adatrj) 
    352           ksecs = NINT(zdayfrac*86400)        ! Nearest second to catch rounding errors in adatrj          
    353           ihour = INT(ksecs/3600) 
    354           iminute = ksecs/60-ihour*60 
    355             
     355               zdayfrac=adatrj-INT(adatrj) 
     356               ksecs = NINT(zdayfrac*86400)        ! Nearest second to catch rounding errors in adatrj 
     357               ihour = INT(ksecs/3600) 
     358               iminute = ksecs/60-ihour*60 
     359 
    356360               ! Add to nn_time0 
    357361               nhour   =   nn_time0 / 100 
    358362               nminute = ( nn_time0 - nhour * 100 ) 
    359           nminute=nminute+iminute 
    360            
    361           IF( nminute >= 60 ) THEN 
    362              nminute=nminute-60 
    363         nhour=nhour+1 
    364           ENDIF 
    365           nhour=nhour+ihour 
    366           IF( nhour >= 24 ) THEN 
    367         nhour=nhour-24 
    368              adatrj=adatrj+1 
    369           ENDIF           
    370           nn_time0 = nhour * 100 + nminute 
    371           adatrj = INT(adatrj)                    ! adatrj set to integer as nn_time0 updated           
     363               nminute=nminute+iminute 
     364 
     365               IF( nminute >= 60 ) THEN 
     366                  nminute=nminute-60 
     367                  nhour=nhour+1 
     368               ENDIF 
     369               nhour=nhour+ihour 
     370               IF( nhour >= 24 ) THEN 
     371                  nhour=nhour-24 
     372                  adatrj=adatrj+1 
     373               ENDIF 
     374               nn_time0 = nhour * 100 + nminute 
     375               adatrj = INT(adatrj)                    ! adatrj set to integer as nn_time0 updated 
    372376            ELSE 
    373377               ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 
     
    405409         ENDIF 
    406410         ! calendar control 
     411         IF(nn_timing == 2)  CALL timing_start('iom_rstput') 
    407412         CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp) )   ! time-step 
    408413         CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) )   ! date 
     
    410415         !                                                                     ! the begining of the run [s] 
    411416         CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp) ) ! time 
     417         IF(nn_timing == 2)  CALL timing_stop('iom_rstput') 
    412418      ENDIF 
    413419      ! 
Note: See TracChangeset for help on using the changeset viewer.