-1) Where can I get the latest and greatest TKIO? ftp://web.pps.eosdis.nasa.gov/pub/PPStoolkit/CURRENT_RELEASE 0) Where can I get bug fixes for the latest and greatest TKIO? ftp://web.pps.eosdis.nasa.gov/pub/PPStoolkit/CURRENT_BUGFIXES 1) What languages and formats does TKIO currently handle? C: HDF4 and binary FORTRAN: HDF4 2) What algorithm data products can TKIO read and write? TSDIS version 6 data products and preliminary version 7 products. See $TKIO/configfiles for a list of all the currently incorporated algorithm config files. 3) What happens when you run the INSTALL scripts? INSTALL.pl compileJAVA: Compiles the JAVA classes, initializes TKIO. INSTALL.pl buildRW: Using JAVA classes builds algorithm code for configuration files in the $TKIO/configfiles directory. Initializes TKIO. INSTALL.pl compileRW: Compiles all the code built by the JAVA classes. Initializes TKIO. 4) What TKIO routines do algorithms use? The most frequently used: TKopen TKclose TKreadScan TKwriteScan TKreadGrid TKwriteGrid TKreadStruct TKwriteStruct TKgetMetaxxx TKsetMetaxxx The TKreadStruct and TKwriteStruct handle all data that is not a swath, a grid, or metadata. 5) Where can I find example code and makefiles? See $TKIO/ccode/test and $TKIO/fortcode/test for coding examples. ($TKIO is the directory where you installed TKIO). For example, to run $TKIO/ccode/test/test.c.2A25: a) Copy test.c.2A25 to test.c b) Make necessary changes to test.c--for example enter your filename. c) Type 'make FILE=test' to run the makefile which compiles the code. The makefile may need some adjustment depending on how HDF or other formats were installed. d) The executable $TKIO/ccode/test/test can now be run. It will make a copy of your input file data (but not metadata). 6) How do I find out structure declaration names for my algorithm? See the TK_.h files. (ex. TK_2A25.h) in the $TKIO/inc/ccode and $TKIO/inc/fortcode directories. The same header files are also in $TKIO/ccode/algstructs and $TKIO/fortcode/algstructs. 7) How do I find out the structure name that gets sent into TKreadStruct and TKwriteStruct? See the TK_.h files. (ex. TK_2A25.h) in the $TKIO/inc/ccode and $TKIO/inc/fortcode directories. The same header files are also in $TKIO/ccode/algstructs and $TKIO/fortcode/algstructs. This information can also be found in the File Specifications Document. 8) My FORTRAN compiler is having trouble compiling/linking with the call to get an environmental variable in TKopen.f. Why? Calls to get an environmental variable are compiler dependent. The TKIO installation assumes you are using the INTEL compiler. If you are not then you need to changed the subroutine $TKIO/fortcode/select/TKopen.f to reflect your compiler's call to get an environmental variable. 9) My FORTRAN compiler is having trouble compiling/linking with the call 'CALL date_and_time'. Why? 'date_and_time' is an INTEL routine. The TKIO installation assumes you are using the INTEL compiler. If you are not then you need to comment out the call in $TKIO/fortcode/tk/TKsetgendatetime.f and and add your own call if you want the product generation time to be correct. 10) How do I find out which metadata needs to be updated by the algorithm? See the File Specifications document. 11) How do I read and write intermediate metadata? See the TKIO User's Guide for a full explanation. In general: Call TKwriteMetaFile for every orbit that is processed including the last orbit. (TKwriteMetaFile should be called after the algorithm has made any desired metadata updates and before TKclose.) If your final product is called in a separate executable from the one that processed the last orbit then you will need to call TKreadMetaFile to get the metadata into memory before the final product write. Some details: TKwriteMetaFile does the following: 1) Calls TKreadMetaFile to read in any existing intermediate metafile. 2) Calls TKtransferMetaData. 3) Writes out the intermediate metafile. Note that neither TKtransferMetaData or TKreadMetaFile will overwrite any metadata updates that the algorithm may have made. So be careful with timing. The general rule is to call TKwriteMetaFile when the algorithm is completely finished updating metadata and to call TKreadMetaFile (if necessary) before any further algorithm updates. 12) How do I transfer metadata from one algorithm to another? Use TKtransferMetadata to transfer metadata. This is mostly used for Level 2 algorithms. It uses the instructions in the *.metadata.cfg files to determine what metadata should be transferred. 13) How do I seek to a specific scanline? Use TKseek. NOTE: After TKopen the file pointer is positioned at the beginning of the orbit. So if you wish to read overlap scans you must make a call to TKseek to go back to the beginning of the overlap scans. The call to TKseek computes your desired position. However the file pointer may not actually be set to that position until you make a call to TKread (this is the case in binary). 14) Can I build my own config files to describe my data and then reinstall TKIO to build the read/write code? No! This is not recommended at this time as there are no instructions on how to build configfiles. Incorrect files will lead to unpredictable results. 15) What is a default algorithm? 'Default' algorithm usually refers to the latest processing version of the algorithm as defined by BLUE. It is possible for the user to define which algorithm should be the default by modifying the $TKIO/configfiles/default.versions file and rebuilding and reinstalling TKIO. However this is not recommended at this time. 16) What are some of the 'versions' associated with an algorithm data product? AlgorithmID -- The algorithm id. AlgorithmVersion -- The version of the algorithm. It is up to the user to write this value to the metadata of the product file during the running of the algorithm. ProductVersion -- More of a processing version compared to Algorithm Version. This value is passed into the algorith and given to TKIO which updates the metadata of the product file with this value. DataFormatVersion -- The format version of the data, this would change if, for instance, parameters were added or deleted, or dimension sizes changed. Value is hard-coded in the algid.data.cfg file and TKIO updates the metadata of the product file with this value. BlueprintVersion -- The version of Blueprint used to generate the config files. Value is hard-coded in the algid.metadata.cfg file and TKIO updates the metadata of the product file with this value. TKIOVersion -- The version of TKIO used to generate the data product file. This is set in the code of TKIO by a programmer previous to a new release of TKIO and TKIO updates the metadata of the product file with this value. MetadataVersion -- Similar to DataFormatVersion but for metadata, this would change if metadata elements were added or deleted. This value is hard-coded in the algid.metadata.cfg file. TKCodeBuildVersion -- Basically identifies how the 'STRUCTS' were coded. Value is hard-coded in the algid.data.cfg file and TKIO updates the metadata of the product file with this value. 17) If I get a warning that my product was not built with the current default config file or algid how do I fix it? NOTE: TSDIS Version 6 products always give a warning similar to this: "TKWARN TKIO: Incorrect algid in TKopen! DEFAULT=3A12_a1, PRODUCT=3A12_ for file 3A12.010201.6.HDF. RESULTS UNKNOWN! See TKIO.FAQ." This is because Version 6 files do not have the relevant version info in their metadata. So if you get this warning for a version 6 file you can ignore it as long as the algids (3A12 in this example) match. If you are not dealing with a version 6 file then do the following: Go to the $TKIO/ccode/tools or $TKIO/fortcode/tools directory and use 'TKversionsBinary' or 'TKversionsHDF4' as appropriate. All of the versions listed above (#16) will be printed. At the end of the output you will see something like this (using 1B11 as an example): PRODUCT CONFIGURATION ID: 1B11_a1 DEFAULT CONFIGURATION ID: 1B11_b1 This example tells you that in your call to TKopen you must use '1B11_a1' rather than '1B11' since '1B11' indicates the default which in this case is '1B11_b1' and so does not match '1B11_a1'. In addition you must change all your structure names from the default version, ex. 'L1B11_SWATH' to 'L1B11_SWATH_a1'. Alternatively you could rebuild TKIO to use 1B11_a1 as your default. 18) Are binary files random access? For reading TKseek may be used to jump around the swath. TKIO writes out binary files ordered as described in the *.data.config file and expects data to be read in the same order. 19) What is 'jobname' in TKopen? 'jobname' is used in PPS data processing to trace errors and also to send metadata information to the algorithm. If the algorithm is running in PPS then 'jobname' will be passed to the algorithm as the first argument on the command line. The algorithm must then send 'jobname' to TKopen. In the PPS system the file 'jobname.TKIOmetafile' is used to update a couple of items in the metadata. If users want to make sure this feature is working correctly they may use the file in $TKIO/ccode/test/ (or $TKIO/fortcode/test/) called 'jobid.TKIOmetafile' for testing. Simply send in 'jobid' as your 'jobname' and make sure the file is available in the directory where the algorithm is to be run and TKIO will update the metadata appropriately. If the algorithm is not being run in PPS users may send in any string they want to TKopen. If the 'jobname'.TKIOmetafile is not found by TKIO a warning will be printed and the metadata will not be updated but the algorithm will continue to run. 20) How do I read TSDIS metadata? First make sure that you have called the TKinitTSDIS function. After that you can use TKgetTSDISmetafloat, etc. to get metadata values.