NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
i4dy.f File Reference

Go to the source code of this file.

Functions/Subroutines

function i4dy (IDATE)
 THIS FUNCTION CONVERTS AN EIGHT DIGIT INTEGER DATE (YYMMDDHH) TO TEN DIGITS (YYYYMMDDHH) USING THE Y2K "WINDOWING" TECHNIQUE. More...
 

Detailed Description

Author
WOOLLEN
Date
1998-07-08

Definition in file i4dy.f.

Function/Subroutine Documentation

function i4dy (   IDATE)

THIS FUNCTION CONVERTS AN EIGHT DIGIT INTEGER DATE (YYMMDDHH) TO TEN DIGITS (YYYYMMDDHH) USING THE Y2K "WINDOWING" TECHNIQUE.

ALL TWO-DIGIT YEARS GREATER THAN "40" ARE ASSUMED TO HAVE A FOUR-DIGIT YEAR BEGINNING WITH "19" (1941-1999) AND ALL TWO- DIGIT YEARS LESS THAN OR EQUAL TO "40" ARE ASSUMED TO HAVE A FOUR- DIGIT YEAR BEGINNING WITH "20" (2000-2040). IF THE INPUT DATE IS ALREADY TEN DIGITS, THIS ROUTINE JUST RETURNS ITS VALUE.

PROGRAM HISTORY LOG: 1998-07-08 J. WOOLLEN – ORIGINAL AUTHOR 1998-11-24 J. WOOLLEN – MODIFIED TO CONFORM TO THE NCEP 2-DIGIT YEAR TIME WINDOW OF 1921-2020 (BUT INADVERTENTLY SET TO 1911-2010) 1998-12-14 J. WOOLLEN – MODIFIED TO USE 20 AS THE 2-DIGIT YEAR FOR WINDOWING TO A 4-DIGIT YEAR (00-20 ==> ADD 2000; 21-99 ==> ADD 1900), THIS WINDOWING TECHNIQUE WAS INADVERTENTLY CHANGED TO 10 IN THE PREVIOUS IMPLEMENTATION OF I4DY (1998-11-24) 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – MODIFIED DATE CALCULATIONS TO NO LONGER USE FLOATING POINT ARITHMETIC SINCE THIS CAN LEAD TO ROUND OFF ERROR AND AN IMPROPER RESULTING DATE ON SOME MACHINES (E.G., NCEP IBM FROST/SNOW), INCREASES PORTABILITY; UNIFIED/PORTABLE FOR WRF; ADDED DOCUMENTATION (INCLUDING HISTORY) 2018-06-29 J. ATOR – CHANGED 2-DIGIT->4-DIGIT YEAR WINDOW RANGE TO (00-40 ==> ADD 2000; 41-99 ==> ADD 1900)

USAGE: I4DY (IDATE) INPUT ARGUMENT LIST: IDATE - INTEGER: DATE (EITHER YYMMDDHH OR YYYYMMDDHH), DEPENDING ON DATELEN() VALUE

OUTPUT ARGUMENT LIST: I4DY - INTEGER: DATE (YYYYMMDDHH)

REMARKS: THIS ROUTINE CALLS: None THIS ROUTINE IS CALLED BY: CKTABA CMSGINI DATEBF DUMPBF IUPBS01 OPENMB OPENMG REWNBF Also called by application programs.

Definition at line 49 of file i4dy.f.

Referenced by cktaba(), cmsgini(), iupbs01(), openmb(), openmg(), and rewnbf().