Creating CDFs from DE-1 SAI files. 3 December, 1993 This directory contains files relevant to creating a CDF from DE-1 Scanning Auroral Imager (SAI) Mission Analysis Files (MAF). Its contents are: ----------------------------------------------------------------- Directory ANON_DIR:[SPDS.DE_SAI] AAREADME.DOC;4 Overall view and NDADS instructions CDF.RELEASE;1 Describes how to get the CDF package CXIT.README;2 Describes the CXIT display package DE_SAI.README;6 This file MAFCRD.FOR;50 These 5 files are the source code for MAFCRD. MAFREC.TXT;1 | DELIB.FOR;4 | DEVIEW.FOR;139 | SETCRD.FOR;18 | MAFCRD_FL.COM;5 This makes the MAFCRD executable. SAI-FILE.DOC;1 This describes a MAF file SAI2CDF.FOR;2 This makes a CDF from the files in SAIYYDDD.FILES INGEST.COM;7 This makes the SAI2CDF executable SAIYYDDD.FILES;1 A sample list of MAFfiles to go into the CDF SAIYYDDD.SKT;2 A sample skeleton table SAI_CDF.COM;2 A command file to automate CDF creation ----------------------------------------------------------------- To make a CDF from DE-1 SAI files, do the following: (If problems develop, please contact D. Bilitza at NSSDCA::BILITZA or bilitza@nssdca.gsfc.nasa.gov.) (NOTE: You must have the CDF Package to create or access CDFs. See the CDF.RELEASE file for further information.) 1. Copy all the files from NSSDCA::ANON_DIR:[SPDS.DE_SAI] into your own directory. Run MAFCRD_FL.COM and INGEST.COM to create the MAFCRD and SAI2CDF executables. 2. Get the desired SAI files. For example, ask NDADS for them. It will probably be convenient to copy them into your directory. Alternatively, it will be convenient to define a short logical name for the directory in which they may be found. 3. Choose a name for your CDF, =< 20 characters. A suggested name has the form SAIyyddd, for a CDF that contains all the images from day yyddd. (One SAI file of raw data contains one image; the CDF contains many images, each as a separate record.) 4. Note: You may use the command file described below, SAI_CDF, to perform the remaining steps. Edit SAIyyddd.FILES to look like the *.FILES file you copied over (which you can then delete). Each successive line should have one file name in format CHARACTER*40. If they are not in your directory, add the directory name (or its logical name) to each filename. You can use the spaces beyond 40 for comments (enter spaces, not tabs, to get to 40th space). The easiest way to do this is to get a one-column directory listing to disk of the SAI files. For example, if the files came from NDADS, enter: $ DIR/COL=1,OUT=SAIyyddd.FILES *.SAI* where is the directory name (or logical name) if the files are not in your own directory. Rename and edit this listing. Do not have any other lines--no blanks, no comments; delete the lines from the directory listing that show the directory, etc. The files must be listed in chronological order. This file must be named with your CDFname followed by .FILES. 5. Edit the skeleton table, renaming it .SKT, as follows: The 4 lines that look like this, at the top, must be edited. Put your own CDF name in, and either accept the other three parameters (for use of the CDF on a VAX) or replace them by NETWORK, ROW, SINGLE for use on a Unix-based machine. (Use NETWORK, COLUMN, SINGLE for use with CXIT on the Macintosh.) (The CDFconvert program will allow you to change between these two forms.) CDF NAME: SAIyyddd DATA ENCODING: VAX MAJORITY: COLUMN FORMAT: MULTI Next, put in your desired title (up to 80 characters; this is used in NGS/CDAW graphics, and some other programs, for labeling purposes), and optionally, the time resolution (usually 6, 8, or 12 minutes) and time period (e.g., the date). Finally, for the variable EPOCH, adjust the SCALEMIN and SCALEMAX to reflect the actual time period covered by the images. This is not critical, but the program will use whatever values you have here to discard images outside that interval; the values are also useful for identifying the CDF. [At present, the variable names are hardcoded. Do not change them. They all begin with SAI, followed by KRAY (intensity in kRayleighs), MLT and MLAT for magnetic local time and latitude (both in degrees), and GOLT, GOLN for geographic latitude and longitude. (Other variables are used for indexing.)] In summary, you MUST put in your CDF name as shown above; all other changes are for convenience but not required. The skeleton should be named with your CDFname, followed by .SKT. Note: If you are still using an early version of the CDF package (=< v.2.2), delete the line #zVariables# at the end of the skeleton table. 6. You now have your file list and your skeleton table prepared and are ready to run. First, make the CDF skeleton by running: $ CDFSKELETON 87 Next, generate the coordinate files by running the MAFCRD program and responding to the prompt with the CDFname. E.g., $ RUN MAFCRD Enter CDF name (e.g. SAIYYDDD) SAI8302103 8. Finally, fill the CDF with the image data by running SAI2CDF and responding to the prompt with the CDFname. E.g., $ RUN SAI2CDF Enter CDF name (e.g. SAIYYDDD): SAI8302103 -------------------------- To automate this process, the SAI_CDF.COM command file may help. You must have the executables and the desired SAI files (steps 1-3, above) in the same directory as SAI_CDF.COM. The command file will create a CDF containing all the SAI files in the directory (fulfilling steps 4-8 above). If you want to automatically delete all the intermediate files that get created (such as the new skeleton and the coordinate files), edit the final lines of the command file, to allow the deletes (uncomment them). Usage: $ @SAI_CDF where is the name you wish your CDF to have, in =< 20 characters.