DATE_UTILITY.F90 Subprograms

Last modified: Fri Feb 11 14:23:42 2005.


List of Subprograms


Subprogram Descriptions

IS_LEAP_YEAR

[Next Subprogram] [List of Subprograms]
 NAME:
       Is_Leap_Year

 PURPOSE:
       Routine to determine if a specified year is a leap year.

 CATEGORY:
       Utility

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Result = Is_Leap_Year( Year )

 INPUT ARGUMENTS:
       Year:     Integer specifying the Year in the format YYYY.
                 Thus, 96 == 96 C.E. *NOT* 1996.
                 UNITS:      N/A
                 TYPE:       INTEGER
                 DIMENSION:  Scalar
                 ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       None.

 OUTPUT ARGUMENTS:
       None.

 OPTIONAL OUTPUT ARGUMENTS:
       None.

 FUNCTION RESULT:
       Result:    The return value is a logical value indicating whether
                  the specified year is a leap year.
                  .TRUE.  - it is a leap year.
                  .FALSE. - it is NOT a leap year.
                  UNITS:      N/A
                  TYPE:       LOGICAL
                  DIMENSION:  Scalar

 CALLS:
       None.

 CONTAINS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 03-Apr-2000
                       paul.vandelst@ssec.wisc.edu

(See Date_Utility.f90)


DATE_TO_DAY_OF_YEAR

[Previous Subprogram] [Next Subprogram] [List of Subprograms]
 NAME:
       Date_to_Day_of_Year

 PURPOSE:
       Routine to convert input numeric (e.g. DD,MM,YYYY) date information
       to a day of Year.

 CATEGORY:
       Utility

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Date_to_Day_of_Year ( Day_of_Month,             &  ! Input
                                            Month,                    &  ! Input           
                                            Year,                     &  ! Input           
                                            Day_of_Year,              &  ! Output          
                                            Message_Log = Message_Log )  ! Optional input  

 INPUT ARGUMENTS:
       Day_of_Month:  Integer defining the number of the day in the
                      specified Month.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN )

       Month:         Integer defining the Month from 1-12.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN )

       Year:          Integer specifying the Year in the format YYYY.
                      Thus, 96 == 96 C.E. *NOT* 1996.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       Message_Log:   Character string specifying a filename in which any
                      messages will be logged. If not specified, or if an
                      error occurs opening the log file, the default action
                      is to output message to the screen.
                      UNITS:      N/A
                      TYPE:       CHARACTER( * )
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       Day_of_Year:   Integer defining the day-of-Year.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( OUT )

 OPTIONAL OUTPUT ARGUMENTS:
       None.

 FUNCTION RESULT:
       Error_Status: The return value is an integer defining the error status.
                     The error codes are defined in the ERROR_HANDLER module.
                     If == SUCCESS the date conversion was successful.
                        == FAILURE input data was invalid.
                     UNITS:      N/A
                     TYPE:       INTEGER
                     DIMENSION:  Scalar

 CALLS:
       Display_Message:  Subroutine to output messages
                         SOURCE: Error_Handler module

 CONTAINS:
       None.

 EXTERNALS:
       None.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 03-Apr-2000
                       paul.vandelst@ssec.wisc.edu

(See Date_Utility.f90)


DAY_OF_YEAR_TO_DATE

[Previous Subprogram] [List of Subprograms]
 NAME:
       Day_of_Year_to_Date

 PURPOSE:
       Routine to convert the day of year into either a numeric or character
       string date. 

 CATEGORY:
       Utility

 LANGUAGE:
       Fortran-95

 CALLING SEQUENCE:
       Error_Status = Day_of_Year_to_Date( Day_of_Year,                 &  ! Input
                                           Year,                        &  ! Input
                                           Day_of_Month = Day_of_Month, &  ! Optional output
                                           Month        = Month,        &  ! Optional output
                                           Date_String  = Date_String,  &  ! Optional output
                                           Message_Log  = Message_Log   )  ! Error messaging

 INPUT ARGUMENTS:
       Day_of_Year:   Integer defining the day-of-year.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN )

       Year:          Integer specifying the year in the format YYYY.
                      Thus, 96 == 96 C.E. *NOT* 1996.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN )

 OPTIONAL INPUT ARGUMENTS:
       Message_Log:   Character string specifying a filename in which any
                      messages will be logged. If not specified, or if an
                      error occurs opening the log file, the default action
                      is to output message to the screen.
                      UNITS:      N/A
                      TYPE:       CHARACTER( * )
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( IN ), OPTIONAL

 OUTPUT ARGUMENTS:
       None.

 OPTIONAL OUTPUT ARGUMENTS:
       Day_of_Month:  Integer defining the number of the day in the
                      specified month.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( OUT ), OPTIONAL

       Month:         Integer defining the month from 1-12.
                      UNITS:      N/A
                      TYPE:       INTEGER
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( OUT ), OPTIONAL

       Date_String:   Character string containing the date in DD-MMM-YYYY
                      format, e.g. 18-Jul-2000. If string length is less
                      than 11 characters, the output is truncated.
                      UNITS:      N/A
                      TYPE:       CHARACTER( * )
                      DIMENSION:  Scalar
                      ATTRIBUTES: INTENT( OUT ), OPTIONAL

 FUNCTION RESULT:
       Error_Status: The return value is an integer defining the error status.
                     The error codes are defined in the ERROR_HANDLER module.
                     If == SUCCESS the date conversion was successful.
                        == FAILURE input data was invalid.
                     UNITS:      N/A
                     TYPE:       INTEGER
                     DIMENSION:  Scalar

 CALLS:
       Display_Message:  Subroutine to output messages
                         SOURCE: ERROR_HANDLER module

 CONTAINS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 CREATION HISTORY:
       Written by:     Paul van Delst, CIMSS/SSEC 03-Apr-2000
                       paul.vandelst@ssec.wisc.edu

(See Date_Utility.f90)