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

Changeset 804


Ignore:
Timestamp:
2008-01-31T10:44:45+01:00 (16 years ago)
Author:
ctlod
Message:

allow good date when perfoming restarts, see ticket:#55

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_001_SBC/NEMO/OPA_SRC/daymod.F90

    r703 r804  
    123123 
    124124         ! number of seconds since... 
    125          rsec_year  = REAL( nday_year - 1 ) * rday - rdttra(1)      ! 00h 1st day of the current year 
    126          rsec_day   = REAL( nday      - 1 ) * rday - rdttra(1)      ! 00h 1st day of the current month 
    127          rsec_month =                              - rdttra(1)      ! 00h         of the current day 
     125         IF( ln_rstart )   THEN 
     126            rsec_year  = REAL( nday_year ) * rday     - rdttra(1)      ! 00h 1st day of the current year 
     127            rsec_month = REAL( nday      ) * rday     - rdttra(1)      ! 00h 1st day of the current month 
     128            rsec_day   = REAL( nday      ) * rday     - rdttra(1)      ! 00h         of the current day 
     129         ELSE 
     130            rsec_year  = REAL( nday_year - 1 ) * rday - rdttra(1)      ! 00h 1st day of the current year 
     131            rsec_month = REAL( nday      - 1 ) * rday - rdttra(1)      ! 00h 1st day of the current month 
     132            rsec_day   =                              - rdttra(1)      ! 00h         of the current day 
     133         ENDIF 
    128134 
    129135         ! control print 
    130          IF(lwp) WRITE(numout,*)' ==============>> time-step =', kt, ' Initial DATE= ',   & 
     136         IF(lwp) WRITE(numout,*)' ==============>> time-step =', kt, ' Initial DATE Y/M/D = ',   & 
    131137               &                   nyear, '/', nmonth, '/', nday, '  rsec_day:', rsec_day 
    132138 
    133          ! 
    134139         !                     ! -------------------------------- !  
    135140      ELSE                     !  Model calendar at time-step kt  ! 
     
    178183            ndastp = nyear * 10000 + nmonth * 100 + nday   ! NEW date 
    179184            ! 
    180 !           IF(lwp) WRITE(numout,'(a,i8,a,i4,a,i2,a,i2,a,i3)') '======>> time-step =', kt,   & 
    181 !              &   '      New day, DATE= ', nyear, '/', nmonth, '/', nday, '      nday_year = ', nday_year 
    182 !           IF(lwp) WRITE(numout,'(a,F9.0,a,F9.0,a,F9.0)') '         rsec_year = ', rsec_year,   & 
    183 !              &   '   rsec_month = ', rsec_month, '   rsec_day = ', rsec_day 
     185           IF(lwp) WRITE(numout,'(a,i8,a,i4,a,i2,a,i2,a,i3)') '======>> time-step =', kt,   & 
     186              &   '      New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, '      nday_year = ', nday_year 
     187           IF(lwp) WRITE(numout,'(a,F9.0,a,F9.0,a,F9.0)') '         rsec_year = ', rsec_year,   & 
     188              &   '   rsec_month = ', rsec_month, '   rsec_day = ', rsec_day 
    184189         ENDIF 
    185190 
Note: See TracChangeset for help on using the changeset viewer.