24 #include <sys/types.h> 30 #define MTKd_NDATATYPE 13 31 #define MTKd_DataType { "void", "char8", "uchar8", "int8", "uint8", \ 32 "int16", "uint16", "int32", "uint32", \ 33 "int64", "uint64", "float", "double" } 34 #define MTKd_DataSize { 0, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 } 109 #define MTKT_DATABUFFER_INIT { 0, 0, 0, MTKe_void, MTK_FALSE, {0}, NULL, NULL } 140 #define MTKT_DATABUFFER3D_INIT { 0, 0, 0, 0, 0, {0}, NULL, NULL } 143 #define EPOCH_DAY 2448988.5 144 #define EPOCH_DAY_FRACTION 0.0003125 145 #define SECONDSperDAY 86400.0 146 #define SECONDSperHOUR 3600.0 147 #define SECONDSperMINUTE 60.0 149 #define MTKd_DATETIME_LEN 28 152 #define LEAP_SECONDS {{ 2441317.5, 10.0 }, \ 153 { 2441499.5, 11.0 }, \ 154 { 2441683.5, 12.0 }, \ 155 { 2442048.5, 13.0 }, \ 156 { 2442413.5, 14.0 }, \ 157 { 2442778.5, 15.0 }, \ 158 { 2443144.5, 16.0 }, \ 159 { 2443509.5, 17.0 }, \ 160 { 2443874.5, 18.0 }, \ 161 { 2444239.5, 19.0 }, \ 162 { 2444786.5, 20.0 }, \ 163 { 2445151.5, 21.0 }, \ 164 { 2445516.5, 22.0 }, \ 165 { 2446247.5, 23.0 }, \ 166 { 2447161.5, 24.0 }, \ 167 { 2447892.5, 25.0 }, \ 168 { 2448257.5, 26.0 }, \ 169 { 2448804.5, 27.0 }, \ 170 { 2449169.5, 28.0 }, \ 171 { 2449534.5, 29.0 }, \ 172 { 2450083.5, 30.0 }, \ 173 { 2450630.5, 31.0 }, \ 174 { 2451179.5, 32.0 }, \ 175 { 2453736.5, 33.0 }, \ 176 { 2454832.5, 34.0 }, \ 177 { 2456109.5, 35.0 }, \ 178 { 2457204.5, 36.0 }, \ 209 char **basefieldname,
275 #define strncasecmp _strnicmp 276 #define strdup _strdup 277 #define strlwr _strlwr 278 #define strcasestr win_strcasestr
MTKt_status MtkStringListFree(int strcnt, char **strlist[])
Free string list.
unsigned char MTKt_uchar8
MTKt_status MtkNcToMtkDataTypeConvert(nc_type nc_datatype, MTKt_DataType *datatype)
MTKt_status MtkDataBufferAllocate(int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
Allocate Data Buffer.
MTKt_status MtkDataBufferAllocate3D(int nblock, int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer3D *databuf)
Allocate 3-dimensional Data Buffer (a buffer stack)
HDFFCLIBAPI _fcd _fcd intf intf * datatype
MTKt_status MtkCalToJulian(int y, int m, int d, int h, int mn, int s, double *julian)
Convert calendar date to Julian date.
MTKt_status MtkTaiToUtc(double secTAI93, char utc_datetime[MTKd_DATETIME_LEN])
Convert TAI93 to UTC.
MTKt_status MtkParseFieldname(const char *fieldname, char **basefieldname, int *ndim, int **dimlist)
Parses extra dimensions from fieldnames.
MTKt_status MtkUtcToTai(char utc_datetime[MTKd_DATETIME_LEN], double *secTAI93)
Convert UTC to TAI93.
2-dimensional Data Buffer
char * MtkVersion(void)
MisrToolkit Version.
MTKt_status MtkHdfToMtkDataTypeConvert(int32 hdf_datatype, MTKt_DataType *datatype)
Convert HDF data type to MISR Toolkit data type.
3-dimensional Data Buffer
MTKt_status MtkDateTimeToJulian(const char *datetime, double *jd)
Convert date and time (ISO 8601) to Julian date.
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
MTKt_status MtkUtcJdToTaiJd(double jdUTC[2], double jdTAI[2])
Convert UTC Julian date to TAI Julian date.
MTKt_status MtkDataBufferImport(int nline, int nsample, MTKt_DataType datatype, void *dataptr, MTKt_DataBuffer *databuf)
Import Data Buffer.
MTKt_status MtkTaiJdToUtcJd(double jdTAI[2], double jdUTC[2])
Convert TAI Julian date to UTC Julian date.
MTKt_status MtkTaiToTaiJd(double secTAI93, double jdTAI[2])
Convert TAI93 to TAI Julian date.
MTKt_status MtkUtcToUtcJd(char utc_datetime[MTKd_DATETIME_LEN], double jdUTC[2])
Convert UTC date to UTC Julian date.
MTKt_status MtkTaiJdToTai(double jdTAI[2], double *secTAI93)
Convert TAI Julian date to TAI93 time.
MTKt_status MtkJulianToCal(double jd, int *year, int *month, int *day, int *hour, int *min, int *sec)
Convert Julian date to calendar date.
MTKt_DataBufferType3D data
char * win_strcasestr(const char *s, const char *find)
MTKt_status MtkDataBufferFree3D(MTKt_DataBuffer3D *databuf)
Free 3-dimensional data buffer (a buffer stack)
3-dimensional Data Buffer Type Union
MTKt_status MtkUtcJdToUtc(double jdUTCin[2], char utc_datetime[MTKd_DATETIME_LEN])
Convert calendar date to Julian date.
MTKt_status MtkNCVarId(int Ncid, const char *Name, MTKt_ncvarid *Var)
int const JOCTET * dataptr
#define MTKd_DATETIME_LEN
MTKt_status MtkJulianToDateTime(double jd, char datetime[MTKd_DATETIME_LEN])
Convert Julian date to date and time (ISO 8601)
2-dimensional Data Buffer Type Union