public class CDFTT2000 extends java.lang.Object implements CDFConstants
AHUFF_COMPRESSION, ALPHAOSF1_DECODING, ALPHAOSF1_ENCODING, ALPHAVMSd_DECODING, ALPHAVMSd_ENCODING, ALPHAVMSg_DECODING, ALPHAVMSg_ENCODING, ALPHAVMSi_DECODING, ALPHAVMSi_ENCODING, ATTR_, ATTR_EXISTENCE_, ATTR_EXISTS, ATTR_MAXgENTRY_, ATTR_MAXrENTRY_, ATTR_MAXzENTRY_, ATTR_NAME_, ATTR_NAME_TRUNC, ATTR_NUMBER_, ATTR_NUMgENTRIES_, ATTR_NUMrENTRIES_, ATTR_NUMzENTRIES_, ATTR_SCOPE_, BACKWARD_, BACKWARDFILEoff, BACKWARDFILEon, BAD_ALLOCATE_RECS, BAD_ARGUMENT, BAD_ATTR_NAME, BAD_ATTR_NUM, BAD_BLOCKING_FACTOR, BAD_CACHE_SIZE, BAD_CDF_EXTENSION, BAD_CDF_ID, BAD_CDF_NAME, BAD_CDFSTATUS, BAD_CHECKSUM, BAD_COMPRESSION_PARM, BAD_DATA_TYPE, BAD_DECODING, BAD_DIM_COUNT, BAD_DIM_INDEX, BAD_DIM_INTERVAL, BAD_DIM_SIZE, BAD_ENCODING, BAD_ENTRY_NUM, BAD_FNC_OR_ITEM, BAD_FORMAT, BAD_INITIAL_RECS, BAD_MAJORITY, BAD_MALLOC, BAD_NEGtoPOSfp0_MODE, BAD_NUM_DIMS, BAD_NUM_ELEMS, BAD_NUM_VARS, BAD_READONLY_MODE, BAD_REC_COUNT, BAD_REC_INTERVAL, BAD_REC_NUM, BAD_SCOPE, BAD_SCRATCH_DIR, BAD_SPARSEARRAYS_PARM, BAD_VAR_NAME, BAD_VAR_NUM, BAD_zMODE, BADDATE_LEAPSECOND_UPDATED, BLOCKINGFACTOR_TOO_SMALL, BLOCKINGFACTOR_TOO_SMALL2, CANNOT_ALLOCATE_RECORDS, CANNOT_CHANGE, CANNOT_COMPRESS, CANNOT_COPY, CANNOT_INSERT_RECORDS, CANNOT_SPARSEARRAYS, CANNOT_SPARSERECORDS, CDF_, CDF_ACCESS_, CDF_ATTR_NAME_LEN, CDF_ATTR_NAME_LEN256, CDF_BYTE, CDF_CACHESIZE_, CDF_CHAR, CDF_CHECKSUM_, CDF_CLOSE_ERROR, CDF_COMPRESSION_, CDF_COPYRIGHT_, CDF_COPYRIGHT_LEN, CDF_CREATE_ERROR, CDF_DECODING_, CDF_DELETE_ERROR, CDF_DOUBLE, CDF_ENCODING_, CDF_EPOCH, CDF_EPOCH16, CDF_EXISTS, CDF_FLOAT, CDF_FORMAT_, CDF_INCREMENT_, CDF_INFO_, CDF_INT1, CDF_INT2, CDF_INT4, CDF_INT8, CDF_INTERNAL_ERROR, CDF_LEAPSECONDLASTUPDATED_, CDF_MAJORITY_, CDF_MAX_DIMS, CDF_MAX_PARMS, CDF_MIN_DIMS, CDF_NAME_, CDF_NAME_TRUNC, CDF_NEGtoPOSfp0_MODE_, CDF_NUMATTRS_, CDF_NUMgATTRS_, CDF_NUMrVARS_, CDF_NUMvATTRS_, CDF_NUMzVARS_, CDF_OK, CDF_OPEN_ERROR, CDF_PATHNAME_LEN, CDF_READ_ERROR, CDF_READONLY_MODE_, CDF_REAL4, CDF_REAL8, CDF_RELEASE_, CDF_SAVE_ERROR, CDF_SCRATCHDIR_, CDF_STATUS_, CDF_STATUSTEXT_LEN, CDF_TIME_TT2000, CDF_UCHAR, CDF_UINT1, CDF_UINT2, CDF_UINT4, CDF_VAR_NAME_LEN, CDF_VAR_NAME_LEN256, CDF_VERSION_, CDF_WARN, CDF_WRITE_ERROR, CDF_zMODE_, CDFwithSTATS_, CHECKSUM_, CHECKSUM_ERROR, CHECKSUM_NOT_ALLOWED, CLOSE_, COLUMN_MAJOR, COMPRESS_CACHESIZE_, COMPRESSION_ERROR, CONFIRM_, CORRUPTED_V2_CDF, CORRUPTED_V3_CDF, CREATE_, CURgENTRY_EXISTENCE_, CURrENTRY_EXISTENCE_, CURzENTRY_EXISTENCE_, DATATYPE_MISMATCH, DATATYPE_SIZE_, DECOMPRESSION_ERROR, DECSTATION_DECODING, DECSTATION_ENCODING, DEFAULT_BYTE_PADVALUE, DEFAULT_CHAR_PADVALUE, DEFAULT_DOUBLE_PADVALUE, DEFAULT_EPOCH_PADVALUE, DEFAULT_EPOCH16_PADVALUE, DEFAULT_FLOAT_PADVALUE, DEFAULT_INT1_PADVALUE, DEFAULT_INT2_PADVALUE, DEFAULT_INT4_PADVALUE, DEFAULT_INT8_PADVALUE, DEFAULT_REAL4_PADVALUE, DEFAULT_REAL8_PADVALUE, DEFAULT_TT2000_PADVALUE, DEFAULT_UCHAR_PADVALUE, DEFAULT_UINT1_PADVALUE, DEFAULT_UINT2_PADVALUE, DEFAULT_UINT4_PADVALUE, DELETE_, DID_NOT_COMPRESS, EMPTY_COMPRESSED_CDF, END_OF_VAR, EPOCH_STRING_LEN, EPOCH_STRING_LEN_EXTEND, EPOCH1_STRING_LEN, EPOCH1_STRING_LEN_EXTEND, EPOCH2_STRING_LEN, EPOCH2_STRING_LEN_EXTEND, EPOCH3_STRING_LEN, EPOCH3_STRING_LEN_EXTEND, EPOCH4_STRING_LEN, EPOCH4_STRING_LEN_EXTEND, EPOCHx_FORMAT_MAX, EPOCHx_STRING_MAX, FILLED_TT2000_VALUE, FORCED_PARAMETER, FUNCTION_NOT_SUPPORTED, gENTRY_, gENTRY_DATA_, gENTRY_DATASPEC_, gENTRY_DATATYPE_, gENTRY_EXISTENCE_, gENTRY_NUMELEMS_, GET_, GETCDFCHECKSUM_, GETCDFFILEBACKWARD_, GETCDFVALIDATE_, GETLEAPSECONDSENVVAR_, GLOBAL_SCOPE, GZIP_COMPRESSION, HOST_DECODING, HOST_ENCODING, HP_DECODING, HP_ENCODING, HUFF_COMPRESSION, IBM_PC_OVERFLOW, IBMPC_DECODING, IBMPC_ENCODING, IBMRS_DECODING, IBMRS_ENCODING, ILLEGAL_EPOCH_FIELD, ILLEGAL_EPOCH_VALUE, ILLEGAL_FOR_SCOPE, ILLEGAL_IN_zMODE, ILLEGAL_ON_V1_CDF, ILLEGAL_TT2000_VALUE, IS_A_NETCDF, LIB_COPYRIGHT_, LIB_INCREMENT_, LIB_RELEASE_, LIB_subINCREMENT_, LIB_VERSION_, MAC_DECODING, MAC_ENCODING, MD5_CHECKSUM, MULTI_FILE, MULTI_FILE_FORMAT, NA_FOR_VARIABLE, NEGATIVE_FP_ZERO, NEGtoPOSfp0off, NEGtoPOSfp0on, NETWORK_DECODING, NETWORK_ENCODING, NeXT_DECODING, NeXT_ENCODING, NO_ATTR_SELECTED, NO_CDF_SELECTED, NO_CHECKSUM, NO_COMPRESSION, NO_DELETE_ACCESS, NO_ENTRY_SELECTED, NO_MORE_ACCESS, NO_PADVALUE_SPECIFIED, NO_SPARSEARRAYS, NO_SPARSERECORDS, NO_STATUS_SELECTED, NO_SUCH_ATTR, NO_SUCH_CDF, NO_SUCH_ENTRY, NO_SUCH_RECORD, NO_SUCH_VAR, NO_VAR_SELECTED, NO_VARS_IN_CDF, NO_WRITE_ACCESS, NONE_CHECKSUM, NOT_A_CDF, NOT_A_CDF_OR_NOT_SUPPORTED, NOVARY, NULL_, OPEN_, OPTIMAL_ENCODING_TREES, OTHER_CHECKSUM, PAD_SPARSERECORDS, PPC_DECODING, PPC_ENCODING, PRECEEDING_RECORDS_ALLOCATED, PREV_SPARSERECORDS, PUT_, READ_ONLY_DISTRIBUTION, READ_ONLY_MODE, READONLYoff, READONLYon, rENTRY_, rENTRY_DATA_, rENTRY_DATASPEC_, rENTRY_DATATYPE_, rENTRY_EXISTENCE_, rENTRY_NAME_, rENTRY_NUMELEMS_, RLE_COMPRESSION, RLE_OF_ZEROs, ROW_MAJOR, rVAR_, rVAR_ALLOCATEBLOCK_, rVAR_ALLOCATEDFROM_, rVAR_ALLOCATEDTO_, rVAR_ALLOCATERECS_, rVAR_BLOCKINGFACTOR_, rVAR_CACHESIZE_, rVAR_COMPRESSION_, rVAR_DATA_, rVAR_DATASPEC_, rVAR_DATATYPE_, rVAR_DIMVARYS_, rVAR_EXISTENCE_, rVAR_HYPERDATA_, rVAR_INITIALRECS_, rVAR_MAXallocREC_, rVAR_MAXREC_, rVAR_NAME_, rVAR_nINDEXENTRIES_, rVAR_nINDEXLEVELS_, rVAR_nINDEXRECORDS_, rVAR_NUMallocRECS_, rVAR_NUMBER_, rVAR_NUMELEMS_, rVAR_NUMRECS_, rVAR_PADVALUE_, rVAR_RECORDS_, rVAR_RECORDS_RENUMBER_, rVAR_RECVARY_, rVAR_RESERVEPERCENT_, rVAR_SEQDATA_, rVAR_SEQPOS_, rVAR_SPARSEARRAYS_, rVAR_SPARSERECORDS_, rVARs_CACHESIZE_, rVARs_DIMCOUNTS_, rVARs_DIMINDICES_, rVARs_DIMINTERVALS_, rVARs_DIMSIZES_, rVARs_MAXREC_, rVARs_NUMDIMS_, rVARs_RECCOUNT_, rVARs_RECDATA_, rVARs_RECINTERVAL_, rVARs_RECNUMBER_, SAVE_, SCRATCH_CREATE_ERROR, SCRATCH_DELETE_ERROR, SCRATCH_READ_ERROR, SCRATCH_WRITE_ERROR, SELECT_, SGi_DECODING, SGi_ENCODING, SINGLE_FILE, SINGLE_FILE_FORMAT, SOME_ALREADY_ALLOCATED, STAGE_CACHESIZE_, STATUS_TEXT_, SUN_DECODING, SUN_ENCODING, TOO_MANY_PARMS, TOO_MANY_VARS, TT2000_0_STRING_LEN, TT2000_1_STRING_LEN, TT2000_2_STRING_LEN, TT2000_3_STRING_LEN, TT2000_CDF_MAYNEEDUPDATE, TT2000_TIME_ERROR, TT2000_USED_OUTDATED_TABLE, UNABLE_TO_PROCESS_CDF, UNKNOWN_COMPRESSION, UNKNOWN_SPARSENESS, UNSUPPORTED_OPERATION, VALIDATE_, VALIDATEFILEoff, VALIDATEFILEon, VAR_ALREADY_CLOSED, VAR_CLOSE_ERROR, VAR_CREATE_ERROR, VAR_DELETE_ERROR, VAR_EXISTS, VAR_NAME_TRUNC, VAR_OPEN_ERROR, VAR_READ_ERROR, VAR_SAVE_ERROR, VAR_WRITE_ERROR, VARIABLE_SCOPE, VARY, VAX_DECODING, VAX_ENCODING, VIRTUAL_RECORD_DATA, zENTRY_, zENTRY_DATA_, zENTRY_DATASPEC_, zENTRY_DATATYPE_, zENTRY_EXISTENCE_, zENTRY_NAME_, zENTRY_NUMELEMS_, ZLIB_COMPRESS_ERROR, ZLIB_UNCOMPRESS_ERROR, zMODEoff, zMODEon1, zMODEon2, zVAR_, zVAR_ALLOCATEBLOCK_, zVAR_ALLOCATEDFROM_, zVAR_ALLOCATEDTO_, zVAR_ALLOCATERECS_, zVAR_BLOCKINGFACTOR_, zVAR_CACHESIZE_, zVAR_COMPRESSION_, zVAR_DATA_, zVAR_DATASPEC_, zVAR_DATATYPE_, zVAR_DIMCOUNTS_, zVAR_DIMINDICES_, zVAR_DIMINTERVALS_, zVAR_DIMSIZES_, zVAR_DIMVARYS_, zVAR_EXISTENCE_, zVAR_HYPERDATA_, zVAR_INITIALRECS_, zVAR_MAXallocREC_, zVAR_MAXREC_, zVAR_NAME_, zVAR_nINDEXENTRIES_, zVAR_nINDEXLEVELS_, zVAR_nINDEXRECORDS_, zVAR_NUMallocRECS_, zVAR_NUMBER_, zVAR_NUMDIMS_, zVAR_NUMELEMS_, zVAR_NUMRECS_, zVAR_PADVALUE_, zVAR_RECCOUNT_, zVAR_RECINTERVAL_, zVAR_RECNUMBER_, zVAR_RECORDS_, zVAR_RECORDS_RENUMBER_, zVAR_RECVARY_, zVAR_RESERVEPERCENT_, zVAR_SEQDATA_, zVAR_SEQPOS_, zVAR_SPARSEARRAYS_, zVAR_SPARSERECORDS_, zVARs_CACHESIZE_, zVARs_MAXREC_, zVARs_RECDATA_, zVARs_RECNUMBER_
Constructor and Description |
---|
CDFTT2000() |
Modifier and Type | Method and Description |
---|---|
static long[] |
breakdown(long nanoSecSinceJ2000)
Breaks a TT2000 epoch value down into its full, UTC-based date/time
component parts.
|
static long[][] |
breakdown(long[] nanoSecSinceJ2000)
Breaks an array of TT2000 epoch values down into two dimensional array,
the first dimension being the count of the epoch values, and the second
dimension being their full, UTC-based date/time component parts for
each value.
|
static long[] |
breakdownTT2000(long nanoSecSinceJ2000)
Breaks a TT2000 epoch value down into its full, UTC-based date/time
component parts - new name as toUTCparts.
|
static long[] |
breakdownTT2000withBasedLeapDay(long tt2000,
int yymmdd)
breakdownTT2000withBasedLeapDay.
|
static long[] |
CDFgetLastDateinLeapSecondsTable()
/**
This method returns the last UTC date that a leap second was added in
the leap second table used in the class.
|
static double[][] |
CDFgetLeapSecondsTable()
This method returns the leap seconds table.
|
static int |
CDFgetLeapSecondsTableStatus()
This method returns the status code reflecting whether the leap
seconds are from a external file, defined by an environment variable,
or the leap seconds are based on the hard-coded table in the class.
|
static int |
CDFgetRowsinLeapSecondsTable()
This method returns the number of entries in the leap seconds table.
|
static long[] |
compute(long[] year,
long[] month,
long[] day)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour,
long[] minute)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its * UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour,
long[] minute,
long[] second)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its * UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour,
long[] minute,
long[] second,
long[] msec)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its * UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour,
long[] minute,
long[] second,
long[] msec,
long[] usec)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its * UTC-based date/time component parts.
|
static long[] |
compute(long[] year,
long[] month,
long[] day,
long[] hour,
long[] minute,
long[] second,
long[] msec,
long[] usec,
long[] nsec)
Computes an array of TT2000 epochs, nanoseconds since J2000, based on
its * UTC-based date/time component parts.
|
static long |
compute(long year,
long month,
long day,
long hour,
long minute,
long second,
long msec,
long usec,
long nsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour,
double minute)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour,
double minute,
double second)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec,
double micsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
computeTT2000(double year,
double month,
double day,
double hour,
double minute,
double second,
double msec,
double usec,
double nsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts - a new name from fromUTCparts.
|
static long |
computeTT2000withBasedLeapDay(double yy,
double mm,
double dd,
double hh,
double mn,
double ss,
double ms,
double us,
double ns,
int yymmdd)
This method returns the TT2000 time in nanoseconds based on the last
leap second day.
|
static long |
computeTT2000withBasedLeapDay(long yy,
long mm,
long dd,
long hh,
long mn,
long ss,
long ms,
long us,
long ns,
int yymmdd)
This method returns the TT2000 time in nanoseconds based on the last
leap second day.
|
static java.lang.String |
encode(long nanoSecSinceJ2000)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string in ISO 8601 format.
|
static java.lang.String[] |
encode(long[] nanoSecSinceJ2000)
Converts an array of epoch values in TT2000 type into an array of
readable, UTC-based date/time strings in ISO 8601 format.
|
static java.lang.String |
encode(long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string of chosen formats.
|
static java.lang.String |
encodeTT2000withBasedLeapDay(long tt2000,
int yymmdd)
encodeTT2000withBasedLeapDay.
|
static long |
fromGregorianTime(java.util.GregorianCalendar gc)
This method converts the UTC-based date/time in a GregorianCalendar
class object to TT2000 time.
|
static long |
fromUTCEPOCH(double epoch)
Convert an epoch value in CDF_EPOCH type to TT2000 type.
|
static long |
fromUTCEPOCH16(double[] epoch)
Convert an epoch data in CDF_EPOCH16 type to TT2000 type.
|
static long[] |
fromUTCISO8601string(java.lang.String string)
This method parses an input, UTC-based, date/time string in ISO 8601
and returns their date/time components.
|
static long |
fromUTCparts(double year,
double month,
double day)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec,
double micsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double msec,
double usec,
double nsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its
UTC-based date/time component parts.
|
static long |
fromUTCstring(java.lang.String string)
This method parses an input, UTC-based, date/time string and returns a
TT2000 epoch value, nanoseconds since J2000.
|
static java.lang.String |
getLeapSecondsTableEnvVar()
Find the environment variable "CDF_LEAPSECONDSTABLE" that is
defined for the leap seconds table for CDF.
|
static double |
LeapSecondsfromYMD(long year,
long month,
long day)
Find the leap seconds from a given, UTC-based year/month/day.
|
static long |
parse(java.lang.String string)
This method parses an input date/time string and returns a TT2000
epoch value, nanoseconds since J2000.
|
static long[] |
parse(java.lang.String[] strings)
This method parses an array of input date/time strings and returns an
array of TT2000 epoch values, nanoseconds since J2000.
|
static long |
parseTT2000(java.lang.String string)
This method parses an input, UTC-based, date/time string and returns a
TT2000 epoch value, nanoseconds since J2000.
|
static long |
parseTT2000withBasedLeapDay(java.lang.String tt2000,
int yymmdd)
parseTT2000withBasedLeapDay.
|
static java.util.GregorianCalendar |
toGregorianTime(long tt2000)
This method converts the UTC-based date/time in TT2000 type to a
GregorianCalendar class object in default, local time zone.
|
static java.util.GregorianCalendar |
toGregorianTime(long tt2000,
java.util.TimeZone tz)
This method converts the UTC-based date/time in TT2000 type to a
GregorianCalendar class object in specified time zone.
|
static double |
toUTCEPOCH(long nanoSecSinceJ2000)
Convert an epoch value in TT2000 type to CDF_EPOCH type.
|
static double |
toUTCEPOCH16(long nanoSecSinceJ2000,
double[] epoch)
Convert an epoch value in TT2000 type to CDF_EPOCH16 type.
|
static long[] |
toUTCparts(long nanoSecSinceJ2000)
Breaks a TT2000 epoch value down into its full, UTC-based date/time
component parts.
|
static java.lang.String |
toUTCstring(long nanoSecSinceJ2000)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string of ISO 8601 formats.
|
static java.lang.String |
toUTCstring(java.lang.Long nanoSecSinceJ2000)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string of ISO 8601 formats.
|
static java.lang.String |
toUTCstring(long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string of chosen formats.
|
static java.lang.String |
toUTCstring(java.lang.Long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 type into a readable, UTC-based
date/time string of chosen formats.
|
public static java.lang.String getLeapSecondsTableEnvVar()
public static double LeapSecondsfromYMD(long year, long month, long day)
year
- the yearmonth
- the monthday
- the daypublic static long[] breakdownTT2000(long nanoSecSinceJ2000)
nanoSecSinceJ2000
- the epoch value, in nanoseconds since J2000,
to break downIndex | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long[] toUTCparts(long nanoSecSinceJ2000)
nanoSecSinceJ2000
- the epoch value, in nanoseconds since J2000,
to break downIndex | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long[] breakdown(long nanoSecSinceJ2000)
nanoSecSinceJ2000
- the epoch value, in nanoseconds since J2000,
to break downIndex | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long[][] breakdown(long[] nanoSecSinceJ2000)
nanoSecSinceJ2000
- an array of epoch values, in nanoseconds since
J2000, to break downIndex | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long computeTT2000(double year, double month, double day) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. It is in doubleCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. It is in doubleCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour in double
Note: Avoid passing in the time component that extends into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour in double
Note: Avoid passing in the time component that extends into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour, double minute) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour, double minute, double second) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour, double minute, double second, double milsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemilsec
- the millisecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double milsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemilsec
- the millisecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour, double minute, double second, double milsec, double micsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemilsec
- the millisecond, a full millisecond in doublemicsec
- the microsecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double milsec, double micsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemilsec
- the millisecond, a full millisecond in doublemicsec
- the microsecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long computeTT2000(double year, double month, double day, double hour, double minute, double second, double msec, double usec, double nsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1), otherwise an
exception is thrown. A full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemsec
- the millisecond, a full millisecond in doubleusec
- the microsecond, a full microsecond in doublensec
- the nanosecond, a full nanosecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double msec, double usec, double nsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, either the day of the month or day of the year
(DOY). For DOY, month has to be one (1). A full day in
doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemsec
- the millisecond, a full millisecond in doubleusec
- the microsecond, a full microsecond in doublensec
- the nanosecond, a full nanosecond in double
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long compute(long year, long month, long day, long hour, long minute, long second, long msec, long usec, long nsec) throws CDFException
year
- the year, a full year in longmonth
- the month, a full month in longday
- the day, a full day in longhour
- the hour, a full hour in longminute
- the minute, a full minute in longsecond
- the second, a full second in longmsec
- the millisecond, a full millisecond in longusec
- the microsecond, a full microsecond in longnsec
- the nanosecond, a full nanosecond in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour, long[] minute) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in longminute
- an array of minutes, a full minute in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour, long[] minute, long[] second) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in longminute
- an array of minutes, a full minute in longsecond
- an array of seconds, a full second in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour, long[] minute, long[] second, long[] msec) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in longminute
- an array of minutes, a full minute in longsecond
- an array of seconds, a full second in longmsec
- an array of milliseconds, a full millisecond in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour, long[] minute, long[] second, long[] msec, long[] usec) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in longminute
- an array of minutes, a full minute in longsecond
- an array of seconds, a full second in longmsec
- an array of milliseconds, a full millisecond in longusec
- an array of microseconds, a full microsecond in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] compute(long[] year, long[] month, long[] day, long[] hour, long[] minute, long[] second, long[] msec, long[] usec, long[] nsec) throws CDFException
year
- an array of years, a full year in longmonth
- an array of months, a full month in longday
- an array of days, a full day in longhour
- an array of hours, a full hour in longminute
- an array of minutes, a full minute in longsecond
- an array of seconds, a full second in longmsec
- an array of milliseconds, a full millisecond in longusec
- an array of microseconds, a full microsecond in longnsec
- an array of nanoseconds, a full nanosecond in long
Note: Avoid passing in the time components that extend into the
next day as that could present a potential problem.CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static double toUTCEPOCH(long nanoSecSinceJ2000) throws CDFException
nanoSecSinceJ2000
- the nanoseconds since J2000CDFException
- an ILLEGAL_EPOCH_FIELD if an illegal
component value is detected.public static long fromUTCEPOCH(double epoch) throws CDFException
epoch
- the CDF_EPOCH valueCDFException
- an TT2000_TIME_ERROR if date is out of the
valid range for TT2000.public static double toUTCEPOCH16(long nanoSecSinceJ2000, double[] epoch) throws CDFException
nanoSecSinceJ2000
- the nanoseconds since J2000epoch
- the returned CDF_EPOCH16 value, a double[2] objectCDFException
- an ILLEGAL_EPOCH_FIELD if an illegal
component value is detected.public static long fromUTCEPOCH16(double[] epoch) throws CDFException
epoch
- the CDF_EPOCH16 value, a double[2] objectCDFException
- an TT2000_TIME_ERROR if date is out of the
valid range for TT2000.public static java.lang.String toUTCstring(java.lang.Long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in Long objectpublic static java.lang.String toUTCstring(long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longpublic static java.lang.String toUTCstring(java.lang.Long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in Long objectformat
- the format (from 0 to 3, as the default), an optionalpublic static java.lang.String toUTCstring(long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longformat
- the format (from 0 to 3, as the default), an optionalpublic static java.lang.String encode(long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longpublic static java.lang.String[] encode(long[] nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longpublic static java.lang.String encode(long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longformat
- the format (from 0 to 3, as the default), an optionalpublic static long parseTT2000(java.lang.String string) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
string
- the epoch in string representationCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCstring(java.lang.String string) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
string
- the epoch in string representationCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] fromUTCISO8601string(java.lang.String string) throws CDFException
string
- the epoch in string representationCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long parse(java.lang.String string) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
string
- the epoch in string representationCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] parse(java.lang.String[] strings) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
strings
- an array of epochs in string representationCDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] CDFgetLastDateinLeapSecondsTable()
public static long fromGregorianTime(java.util.GregorianCalendar gc)
gc
- the Gregorian calendar objectpublic static java.util.GregorianCalendar toGregorianTime(long tt2000)
tt2000
- the TT2000 data valuepublic static java.util.GregorianCalendar toGregorianTime(long tt2000, java.util.TimeZone tz)
tt2000
- the TT2000 data valuetz
- the time zonepublic static int CDFgetLeapSecondsTableStatus()
public static double[][] CDFgetLeapSecondsTable()
public static int CDFgetRowsinLeapSecondsTable()
public static long computeTT2000withBasedLeapDay(long yy, long mm, long dd, long hh, long mn, long ss, long ms, long us, long ns, int yymmdd)
yy
- the year, a full year in longmm
- the month, a full month in longdd
- the day, a full day in longhh
- the hour, a full hour in longmn
- the minute, a full minute in longss
- the second, a full second in longms
- the millisecond, a full millisecond in longus
- the microsecond, a full microsecond in longns
- the nanosecond, a full nanosecond in longyymmdd
- the last leap second day (in YYYYMMDD) the UTC date is
based upon, an int valuepublic static long computeTT2000withBasedLeapDay(double yy, double mm, double dd, double hh, double mn, double ss, double ms, double us, double ns, int yymmdd)
yy
- the year, a full year in doublemm
- the month, a full month in doubledd
- the day, a full day in doublehh
- the hour, a full hour in doublemn
- the minute, a full minute in doubless
- the second, a full second in doublems
- the millisecond, a full millisecond in doubleus
- the microsecond, a full microsecond in doublens
- the nanosecond, a full nanosecond in doubleyymmdd
- the last leap second day (in YYYYMMDD) the UTC date is
based upon, an int valuepublic static long[] breakdownTT2000withBasedLeapDay(long tt2000, int yymmdd)
tt2000
- the nanoseconds since J2000yymmdd
- the last leap second day (in YYYYMMDD) the UTC date is
based upon, an int valuepublic static java.lang.String encodeTT2000withBasedLeapDay(long tt2000, int yymmdd)
tt2000
- the nanoseconds since J2000 with leap seconds
second dayyymmdd
- the last leap second day (in YYYYMMDD) the UTC date is
based upon, an int valuepublic static long parseTT2000withBasedLeapDay(java.lang.String tt2000, int yymmdd)
tt2000
- the UTC string (in ISO 8601 form) based on the last leap
second dayyymmdd
- the last leap second day (in YYYYMMDD) the UTC date is
based upon, an int value