AMES ACCESS ROUTINES I Location II Format Checker (dataex) A. Location B. File descriptions C. Running the code D. Input Parameters E. Output F. Sample_run AMES ACCESS ROUTINES The following set of programs and routines are intended to be used with data sets that are formatted as described in "Format Specification for Data Exchange" written by S. Gaines and S. Hipskind, Feb. 1992. This document is located at /oracle_db/ndsc/ames/gaines2.ps in PostScript form. Two types of access routines are available: a format checking program, dataex, and an IDL reading/plotting program, xchgread. I Location Copy the files from the following directories to your user area. Format checking routines (dataex): /oracle_db/ndsc/ames/format IDL reading routines (xchgread): /oracle_db/ndsc/ames/idl II Format Checker (dataex) Author: S.E.Gaines, NASA Ames Research Center, April 1991. The format checking program DATAEX reads an Ames formatted file and checks it for the proper implementation of the Ames format. A. Location The format checking routines are located in the directory: /oracle_db/ndsc/ames/format. Copy the files dataex.csh, dataex.f and dataex_clr.csh to your user area. B. File descriptions dataex_clr.csh C shell script to prompt user for input, compile dataex.f Fortran code and run dataex.csh C shell script to prompt user for input and run dataex code dataex.f Fortran format checking code C. Running the code If the fortran file has not yet been compiled run the code by typing: % dataex_clr.csh then answer the questions. If the code has already been compiled type % dataex.csh and answer the questions. In general you should give the name of the file you wish to check, and use default values for all other input parameters. To use default parameters, simply return. For a full description of input parameters see the next section. D. Input Parameters The shell scripts dataex.csh and dataex_clr.csh prompt the user for the following information and writes it to the file dataex.in Parameter Type Definition -------- ----------- ----------------------------------- pathname character filename of files to be checked, may use wildcards chcknp logical .true. to check for nonprintable characters parsit logical .true. to parse data records; allows detailed checking of data records ** retdat logical .true. to write 3d and 4d data to scratch file prntit logical .true. to print contents of data file to dataex.out dbhead logical .true. if data file contains a database header mname0 character expected mission name of data file in filspec ** When PARSIT = .false. data records are read with 'free format' read statements. When PARSIT = .true. data records are parsed. This allows for the elimination of several bugs inherent in the free format read (see BUGS), and allows the routine to flag the following conditions: Non-numeric characters in the data records; Excess number of values within a data record; Blank lines within the data records; Excessive padding of data records with spaces; Number of bounded variables NX(1) greater than the corresponding missing value indicator AMISS(1) for formats 2110, 2160, and 2310. E. Output Dataex creates two files. Dataex.in contains input parameters as obtained from dataex.csh script. Dataex.out contains format error diagnostics. There are three types of error diagnostics. The severity of the error is indicated by the number of asterisks preceding the diagnostic. (*) indicates a suggestion for improving the file format and the associated "error" will not cause this program to reject the file format. (**) indicate a violation of the format standards but the associated error is not fatal, so this program will continue after encountering an error of this type. (***) indicate a fatal error for this program and a violation of the format standards (subsequent error diagnostics may be meaningless). This type of error can indicate that parameter values defined in the PARAMETER statements must be redefined. F. Sample_run (In the following, the user responses are after the ":". A null response of a carriage return chooses the default values which are indicated inside of the parentheses. This session runs dataex and then types the output file dataex.out.) % dataex.csh Script to run program dataex.f It is assumed that program dataex.f is in the same directory as this script file. Enter pathname for files to be checked (*.*): dat/2110h.d Enter the value for checknp (TRUE): Enter the value for parsit (TRUE): Enter the value for retdata (FALSE): Enter the value for printit (FALSE): Enter the value for dbhead (TRUE):false Enter the standard mission name (NDSC): pathname of files to check = dat/2110h.d checknp = TRUE parsit = TRUE retdata = FALSE printit = FALSE dbhead = FALSE mname0 = NDSC Are these values ok (y)? %more dataex.out Program control variables: CHCKNP=T PARSIT=T PRNTIT=F RETDAT=F DBHEAD=F MNAME0: NDSC CRFMT=(A132) ASCII decimal values of nonprintable characters to be flagged and counted: 9 Reading file dat/2110h.d Number of lines read by CKNPC= 252 Number of lines in file header= 32 Number of successfully read independent variable marks and associated data= 1 Number of lines per independent variable mark= 220.0 $$$$$$ Looks good! Thanks for the file $$$$$$ Number of files read= 1