- Timestamp:
- 2017-10-20T10:04:07+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r8630 r8644 144 144 CALL day( nit000 ) 145 145 ! 146 IF( lwxios ) THEN 147 ! define variables in restart file when writing with XIOS 148 CALL set_rstw_var_active('kt') 149 CALL set_rstw_var_active('ndastp') 150 CALL set_rstw_var_active('adatrj') 151 CALL set_rstw_var_active('ntime') 152 ENDIF 153 146 154 END SUBROUTINE day_init 147 155 … … 341 349 ndastp = NINT( zndastp ) 342 350 CALL iom_get( numror, 'adatrj', adatrj ) 343 344 351 CALL iom_get( numror, 'ntime', ktime ) 352 nn_time0=INT(ktime) 345 353 ! calculate start time in hours and minutes 346 347 ksecs = NINT(zdayfrac*86400)! Nearest second to catch rounding errors in adatrj348 349 350 354 zdayfrac=adatrj-INT(adatrj) 355 ksecs = NINT(zdayfrac*86400) ! Nearest second to catch rounding errors in adatrj 356 ihour = INT(ksecs/3600) 357 iminute = ksecs/60-ihour*60 358 351 359 ! Add to nn_time0 352 360 nhour = nn_time0 / 100 353 361 nminute = ( nn_time0 - nhour * 100 ) 354 355 356 357 358 359 360 361 362 363 364 ENDIF365 366 362 nminute=nminute+iminute 363 364 IF( nminute >= 60 ) THEN 365 nminute=nminute-60 366 nhour=nhour+1 367 ENDIF 368 nhour=nhour+ihour 369 IF( nhour >= 24 ) THEN 370 nhour=nhour-24 371 adatrj=adatrj+1 372 ENDIF 373 nn_time0 = nhour * 100 + nminute 374 adatrj = INT(adatrj) ! adatrj set to integer as nn_time0 updated 367 375 ELSE 368 376 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) … … 378 386 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 379 387 nhour = nn_time0 / 100 380 388 nminute = ( nn_time0 - nhour * 100 ) 381 389 IF( nhour*3600+nminute*60-ndt05 .lt. 0 ) ndastp=ndastp-1 ! Start hour is specified in the namelist (default 0) 382 390 adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday … … 388 396 WRITE(numout,*) ' date ndastp : ', ndastp 389 397 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 390 398 WRITE(numout,*) ' nn_time0 : ',nn_time0 391 399 WRITE(numout,*) 392 400 ENDIF … … 405 413 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj, lxios = lwxios ) ! number of elapsed days since 406 414 ! ! the begining of the run [s] 407 415 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), lxios = lwxios ) ! time 408 416 IF( lwxios ) CALL iom_swap( cxios_context ) 409 417 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.