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 14072 for NEMO/trunk/src/OCE/DOM/daymod.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DOM/daymod.F90

    r13970 r14072  
    1919   !!                    ----------- WARNING ----------- 
    2020   !!                    ------------------------------- 
    21    !!   sbcmod assume that the time step is dividing the number of second of  
    22    !!   in a day, i.e. ===> MOD( rday, rn_Dt ) == 0  
     21   !!   sbcmod assume that the time step is dividing the number of second of 
     22   !!   in a day, i.e. ===> MOD( rday, rn_Dt ) == 0 
    2323   !!   except when user defined forcing is used (see sbcmod.F90) 
    2424   !!---------------------------------------------------------------------- 
     
    8484      lrst_oce = .NOT. l_offline   ! force definition of offline 
    8585      IF( lrst_oce )   CALL day_rst( nit000, 'READ' ) 
    86        
     86 
    8787      ! set the calandar from ndastp (read in restart file and namelist) 
    8888      nyear   =   ndastp / 10000 
     
    9494      isecrst = ( nhour * NINT(rhhmm) + nminute ) * NINT(rmmss) 
    9595 
    96       CALL ymds2ju( nyear, nmonth, nday, REAL(isecrst,wp), fjulday )   
     96      CALL ymds2ju( nyear, nmonth, nday, REAL(isecrst,wp), fjulday ) 
    9797      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    9898      IF( nhour*NINT(rhhmm*rmmss) + nminute*NINT(rmmss) - ndt05 .LT. 0 ) fjulday = fjulday+1.       ! move back to the day at nit000 (and not at nit000 - 1) 
     
    124124      IF( isecrst - ndt05 .GT. 0 ) THEN 
    125125         ! 1 timestep before current middle of first time step is still the same day 
    126          nsec_year  = (nday_year-1) * nsecd + isecrst - ndt05  
    127          nsec_month = (nday-1)      * nsecd + isecrst - ndt05     
     126         nsec_year  = (nday_year-1) * nsecd + isecrst - ndt05 
     127         nsec_month = (nday-1)      * nsecd + isecrst - ndt05 
    128128      ELSE 
    129          ! 1 time step before the middle of the first time step is the previous day  
    130          nsec_year  = nday_year     * nsecd + isecrst - ndt05  
    131          nsec_month = nday          * nsecd + isecrst - ndt05    
     129         ! 1 time step before the middle of the first time step is the previous day 
     130         nsec_year  = nday_year     * nsecd + isecrst - ndt05 
     131         nsec_month = nday          * nsecd + isecrst - ndt05 
    132132      ENDIF 
    133133      nsec_monday   = imonday       * nsecd + isecrst - ndt05 
    134       nsec_day      =                         isecrst - ndt05  
     134      nsec_day      =                         isecrst - ndt05 
    135135      IF( nsec_day    .LT. 0 ) nsec_day    = nsec_day    + nsecd 
    136136      IF( nsec_monday .LT. 0 ) nsec_monday = nsec_monday + nsecd*7 
     
    144144      nsec000_1jan000 = nsec1jan000 + nsec_year + ndt05 
    145145      nsecend_1jan000 = nsec000_1jan000 + ndt * ( nitend - nit000 + 1 ) 
    146        
     146 
    147147      ! Up to now, calendar parameters are related to the end of previous run (nit000-1) 
    148148      ! call day to set the calendar parameters at the begining of the current simulaton. needed by iom_init 
     
    344344               ! calculate start time in hours and minutes 
    345345               zdayfrac = adatrj - REAL(INT(adatrj), wp) 
    346           ksecs = NINT(zdayfrac * rday)          ! Nearest second to catch rounding errors in adatrj          
     346          ksecs = NINT(zdayfrac * rday)          ! Nearest second to catch rounding errors in adatrj 
    347347               ihour = ksecs / NINT( rhhmm*rmmss ) 
    348348          iminute = ksecs / NINT(rmmss) - ihour*NINT(rhhmm) 
    349             
     349 
    350350               ! Add to nn_time0 
    351351               nhour   =   nn_time0 / 100 
    352352               nminute = ( nn_time0 - nhour * 100 ) 
    353353          nminute = nminute + iminute 
    354            
     354 
    355355               IF( nminute >= NINT(rhhmm) ) THEN 
    356356             nminute = nminute - NINT(rhhmm) 
     
    361361        nhour = nhour - NINT(rjjhh) 
    362362             adatrj = adatrj + 1. 
    363           ENDIF           
     363          ENDIF 
    364364          nn_time0 = nhour * 100 + nminute 
    365                adatrj = REAL(INT(adatrj), wp)                    ! adatrj set to integer as nn_time0 updated           
     365               adatrj = REAL(INT(adatrj), wp)                    ! adatrj set to integer as nn_time0 updated 
    366366            ELSE 
    367367               ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 
Note: See TracChangeset for help on using the changeset viewer.