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 7158 for branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90 – NEMO

Ignore:
Timestamp:
2016-10-29T01:21:05+02:00 (7 years ago)
Author:
clem
Message:

debug branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r5564 r7158  
    2020   !! 
    2121   !!   we suppose that the time step is deviding the number of second of in a day 
    22    !!             ---> MOD( rday, rdttra(1) ) == 0 
     22   !!             ---> MOD( rday, rdt ) == 0 
    2323   !! 
    2424   !!           ----------- WARNING ----------- 
     
    7878            &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 
    7979      ENDIF 
    80       ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0 
    81       IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
    82       IF( MOD( rday     , 2.        ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
    83       IF( MOD( rdttra(1), 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
    84       nsecd   = NINT(rday           ) 
    85       nsecd05 = NINT(0.5 * rday     ) 
    86       ndt     = NINT(      rdttra(1)) 
    87       ndt05   = NINT(0.5 * rdttra(1)) 
     80      ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 
     81      IF( MOD( rday     , rdt ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
     82      IF( MOD( rday     , 2.  ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
     83      IF( MOD( rdt  , 2.      ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
     84      nsecd   = NINT(rday       ) 
     85      nsecd05 = NINT(0.5 * rday ) 
     86      ndt     = NINT(      rdt  ) 
     87      ndt05   = NINT(0.5 * rdt  ) 
    8888 
    8989      IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 
     
    223223      nsec_week  = nsec_week  + ndt 
    224224      nsec_day   = nsec_day   + ndt 
    225       adatrj  = adatrj  + rdttra(1) / rday 
    226       fjulday = fjulday + rdttra(1) / rday 
     225      adatrj  = adatrj  + rdt / rday 
     226      fjulday = fjulday + rdt / rday 
    227227      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    228228      IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error 
     
    334334               ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    335335               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    336                adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     336               adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    337337               ! note this is wrong if time step has changed during run 
    338338            ENDIF 
     
    340340            ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    341341            ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    342             adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     342            adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    343343         ENDIF 
    344344         IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error 
Note: See TracChangeset for help on using the changeset viewer.