Changeset 15272
- Timestamp:
- 2021-09-20T12:32:09+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_strthr/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r15258 r15272 324 324 IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 325 325 ! Get Calendar informations 326 IF(nn_timing == 2) CALL timing_start('iom_rstget') 326 327 CALL iom_get( numror, 'kt', zkt ) ! last time-step of previous run 328 IF(nn_timing == 2) CALL timing_stop('iom_rstget') 327 329 IF(lwp) THEN 328 330 WRITE(numout,*) ' *** Info read in restart : ' … … 338 340 ! Control of date 339 341 IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 ) & 340 341 342 & CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart', & 343 & ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 342 344 ! define ndastp and adatrj 343 345 IF ( nrstdt == 2 ) THEN 346 IF(nn_timing == 2) CALL timing_start('iom_rstget') 344 347 ! read the parameters correspondting to nit000 - 1 (last time step of previous run) 345 348 CALL iom_get( numror, 'ndastp', zndastp ) 346 349 ndastp = NINT( zndastp ) 347 350 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) 350 354 ! calculate start time in hours and minutes 351 352 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 353 354 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 356 360 ! Add to nn_time0 357 361 nhour = nn_time0 / 100 358 362 nminute = ( nn_time0 - nhour * 100 ) 359 360 361 362 363 364 365 366 367 368 369 ENDIF 370 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 372 376 ELSE 373 377 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) … … 405 409 ENDIF 406 410 ! calendar control 411 IF(nn_timing == 2) CALL timing_start('iom_rstput') 407 412 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) ) ! time-step 408 413 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) ) ! date … … 410 415 ! ! the begining of the run [s] 411 416 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp) ) ! time 417 IF(nn_timing == 2) CALL timing_stop('iom_rstput') 412 418 ENDIF 413 419 !
Note: See TracChangeset
for help on using the changeset viewer.