visad/src/main/java/ucar/nc2/iosp/gempak/GempakUtil.java
public static String[] TG_CFTM(int ifcast) {
        String ftype = "";
        String ftime = "";

        //Check for negative times.
        if (ifcast < 0) {
            return new String[] { ftype, ftime };
        }


        // Get the number representing forecast type and convert to a
        // character.

        int iftype = ifcast / 100000;
        if (iftype == 0) {
            ftype = "A";
        } else if (iftype == 1) {
            ftype = "F";
        } else if (iftype == 2) {
            ftype = "G";
        } else if (iftype == 3) {
            ftype = "I";
        }

        // Convert the time to a character.  Add 100000 so that leading
        // zeros will be encoded.

        int    iftime = ifcast - iftype * 100000;
        int    ietime = iftime + 100000;
        String fff    = ST_INCH(ietime);

        // If the forecast time has minutes, set the character output
        // to all five digits. Otherwise, use only the first three digits,
        // which represent hours.

        if (ietime % 100 == 0) {
            ftime = fff.substring(1, 4);
        } else {
            ftime = fff.substring(1);
        }

        return new String[] { ftype, ftime };
    }
public static String[] TG_CFTM(int ifcast) {
        String ftype = "";
        String ftime = "";

        //Check for negative times.
        if (ifcast < 0) {
            return new String[] { ftype, ftime };
        }


        // Get the number representing forecast type and convert to a
        // character.

        int iftype = ifcast / 100000;
        if (iftype == 0) {
            ftype = "A";
        } else if (iftype == 1) {
            ftype = "F";
        } else if (iftype == 2) {
            ftype = "G";
        } else if (iftype == 3) {
            ftype = "I";
        }

        // Convert the time to a character.  Add 100000 so that leading
        // zeros will be encoded.

        int    iftime = ifcast - iftype * 100000;
        int    ietime = iftime + 100000;
        String fff    = ST_INCH(ietime);

        // If the forecast time has minutes, set the character output
        // to all five digits. Otherwise, use only the first three digits,
        // which represent hours.

        if (ietime % 100 == 0) {
            ftime = fff.substring(1, 4);
        } else {
            ftime = fff.substring(1);
        }

        return new String[] { ftype, ftime };
    }
public static String [ ] TG_CFTM ( int ifcast ) { String ftype = "" ; String ftime = "" ; //Check for negative times.
 if ( ifcast < 0 ) { return new String [ ] { ftype , ftime } ; } // Get the number representing forecast type and convert to a
 // character.
 int iftype = ifcast / 100000 ; if ( iftype == 0 ) { ftype = "A" ; } else if ( iftype == 1 ) { ftype = "F" ; } else if ( iftype == 2 ) { ftype = "G" ; } else if ( iftype == 3 ) { ftype = "I" ; } // Convert the time to a character.  Add 100000 so that leading
 // zeros will be encoded.
 int iftime = ifcast - iftype * 100000 ; int ietime = iftime + 100000 ; String fff = ST_INCH ( ietime ) ; // If the forecast time has minutes, set the character output
 // to all five digits. Otherwise, use only the first three digits,
 // which represent hours.
 if ( ietime % 100 == 0 ) { ftime = fff . substring ( 1 , 4 ) ; } else { ftime = fff . substring ( 1 ) ; } return new String [ ] { ftype , ftime } ; }
This subroutine converts an integer grid forecast time into
the character forecast type and time.  The forecast type
is  A (analysis), F (forecast), G (guess) or I (initialize).
If the forecast time is less than 100 and the minutes are 00,
only hh is returned.
@param ifcast   integer forecast time
@return type and time.
This subroutine converts an integer grid forecast time into the character forecast type and time . The forecast type is A ( analysis ) F ( forecast ) G ( guess ) or I ( initialize ) . If the forecast time is less than 100 and the minutes are 00 only hh is returned .