Changeset 3839 for palm/trunk


Ignore:
Timestamp:
Mar 28, 2019 9:12:25 PM (6 years ago)
Author:
moh.hefny
Message:

fixing negative day situation when 1st day of month is used with spinup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/date_and_time_mod.f90

    r3665 r3839  
    418418          ENDIF
    419419
    420 
    421 
     420          ! fix the date if the day is 1st and earlier day is needed due to spinup
     421          IF ( day_of_month < 1 ) THEN
     422 
     423             ! if the day is the first day in the year
     424             IF ( month_of_year  ==  1 ) THEN
     425                month_of_year = 12
     426                day_of_month = 31
     427 
     428             ! other cases
     429             ELSE
     430                month_of_year = month_of_year - 1
     431                day_of_month = days(month_of_year)
     432             ENDIF
     433 
     434          ENDIF
    422435
    423436      ELSE
Note: See TracChangeset for help on using the changeset viewer.