Ignore:
Timestamp:
Aug 6, 2019 9:11:47 AM (2 years ago)
Author:
raasch
Message:

relational operators .EQ., .NE., etc. replaced by ==, /=, etc.

File:
1 edited

Legend:

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

    r3839 r4144  
    2525! -----------------
    2626! $Id$
     27! relational operators .EQ., .NE., etc. replaced by ==, /=, etc.
     28!
     29! 3839 2019-03-28 21:12:25Z moh.hefny
    2730! further tabs removed, unused variables removed
    2831!
     
    191194
    192195          !> Condition for printing an error when date_init is not provided when day_of_year_init is not given in the namelist or when the format of the date is not the one required by PALM.
    193           IF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
     196          IF ( day_of_month > 0 .AND. day_of_month <= 31 .AND. month_of_year > 0 .AND. month_of_year <= 12) THEN
    194197       
    195198             IF ( month_of_year == 1 ) THEN  !!month of year is read in input
     
    226229
    227230         
    228           IF ( day_of_year .LE. 31 ) THEN
     231          IF ( day_of_year <= 31 ) THEN
    229232
    230233             month_of_year=1
     
    234237
    235238             DO i_mon=2,12   !january is considered in the first case
    236                 IF ( day_of_year .LE. SUM(days(1:i_mon)) .AND. day_of_year .GT. SUM(days(1:(i_mon-1))) ) THEN
     239                IF ( day_of_year <= SUM(days(1:i_mon)) .AND. day_of_year > SUM(days(1:(i_mon-1))) ) THEN
    237240           
    238241                   month_of_year=i_mon
     
    249252       !> in the second condition both day of month and month_of_year are either given in input (passed to date_init) or we are in some day successive to the initial one, so that day_of_month has already be computed in previous step
    250253       !>TBD: something to calculate the current year is missing
    251        ELSEIF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
     254       ELSEIF ( day_of_month > 0 .AND. day_of_month <= 31 .AND. month_of_year > 0 .AND. month_of_year <= 12) THEN
    252255 
    253256          !> calculate month_of_year. TBD: test the condition when day_of_year==31
     
    257260             month_of_year = 1
    258261       
    259           ELSE IF (day_of_year .GT. 1 .AND. day_of_year .GT. SUM(days(1:month_of_year))) THEN
     262          ELSE IF (day_of_year > 1 .AND. day_of_year > SUM(days(1:month_of_year))) THEN
    260263
    261264             month_of_year = month_of_year + 1
     
    319322
    320323          !> Condition for printing an error when date_init is not provided when day_of_year_init is not given in the namelist or when the format of the date is not the one required by PALM.
    321           IF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
     324          IF ( day_of_month > 0 .AND. day_of_month <= 31 .AND. month_of_year > 0 .AND. month_of_year <= 12) THEN
    322325       
    323326             IF ( month_of_year == 1 ) THEN  !!month of year is read in input
     
    346349
    347350!--    Calculate current day of the year !TBD: considetr leap years
    348        IF ( (day_of_year_init + days_since_reference_point)  .GT. 365 ) THEN
     351       IF ( (day_of_year_init + days_since_reference_point)  > 365 ) THEN
    349352
    350353          day_of_year=INT(MOD((day_of_year_init + days_since_reference_point), 365.0_wp))
     
    369372          !> The first case is when date_init is not provided: we only know day_of_year_init
    370373          !DO i_mon=1,12
    371              !IF (day_of_year .LE. SUM(days(1:i_mon))) THEN
    372           IF ( day_of_year .LE. 31 ) THEN
     374             !IF (day_of_year <= SUM(days(1:i_mon))) THEN
     375          IF ( day_of_year <= 31 ) THEN
    373376
    374377             month_of_year=1
     
    378381
    379382             DO i_mon=2,12   !january is considered in the first case
    380                 IF ( day_of_year .LE. SUM(days(1:i_mon)) .AND. day_of_year .GT. SUM(days(1:(i_mon-1))) ) THEN
     383                IF ( day_of_year <= SUM(days(1:i_mon)) .AND. day_of_year > SUM(days(1:(i_mon-1))) ) THEN
    381384           
    382385                   month_of_year=i_mon
     
    393396       !> in the second condition both day of month and month_of_year are either given in input (passed to date_init) or we are in some day successive to the initial one, so that day_of_month has already be computed in previous step
    394397       !>TBD: something to calculate the current year is missing
    395        ELSEIF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
     398       ELSEIF ( day_of_month > 0 .AND. day_of_month <= 31 .AND. month_of_year > 0 .AND. month_of_year <= 12) THEN
    396399 
    397400          !> calculate month_of_year. TBD: test the condition when day_of_year==31
     
    401404             month_of_year = 1
    402405       
    403           ELSE IF (day_of_year .GT. 1 .AND. day_of_year .GT. SUM(days(1:month_of_year))) THEN
     406          ELSE IF (day_of_year > 1 .AND. day_of_year > SUM(days(1:month_of_year))) THEN
    404407
    405408             month_of_year = month_of_year + 1
Note: See TracChangeset for help on using the changeset viewer.