McIDAS User's Guide
Version 2018.2

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


TXT2MD

Creates an MD file from an ASCII text data file.


Format

TXT2MD sfile dfile schema [keywords]


Parameters

sfile

source ASCII text file name and extension

dfile

destination MD file number

schema

MD file schema name, for example: IRAB, ISFC


Keywords

CONTinue=

NO

stops filing data if a line of text that contains an invalid time format is encountered (default)

 

YES

continues filing data if a line of text that contains an invalid time format is encountered

MISS=

value representing the missing data in sfile

ROW=

row to write the data (default=first available row)


Remarks

Use command TXT2MD to convert files containing lists of data to MD files. Before using this command, be sure that the schema is registered on your workstation. See commands LSCHE and SCHE for more information. Also see Registering MD File Schemas.

The sfile must be an ASCII text file with an end-of-line indicator at the end of each line. The sfile format must be columnar. The first line contains the schema key names; subsequent lines contain the corresponding data values, as shown below. Extra spaces between the columns are ignored.

TIME  ID   LAT   LON    ZS  PSL  TD   T  DAY     TYPE NREC MOD ST CO
 12  MEI  32.33 88.75   94  1009 267 272 1993072  0    9    0  MS US
 12  NMM  32.55 88.56   97  1009 268 270 1993072  0    9    0  MS US
 12  JAN  32.31 90.08  101  1015 265 273 1993072  0    9    0  MS US
 12  MCB  31.18 90.46  126  1015 272 272 1993072  0    9    0  MS US
 12  GWO  33.50 90.08   47  1014 264 273 1993072  0    9    0  MS US
 12  CBM  33.65 88.45   67  1009 268 270 1993072  0    9    0  MS US
 12  TUP  34.26 88.76  110  1010 265 272 1993072  0    9    0  MS US
 12  GPT  30.40 89.06    9  1011 268 274 1993072  0    9    0  MS US
 12  BIX  30.41 88.91   10  1011 269 273 1993072  0    9    0  MS US

Each data line in sfile is placed into one record in dfile. If repeat groups are defined in the schema, each data line must also include the data to be stored in the record's repeat groups.

If dfile does not exist, it will be created. If it already exists, the data is appended to the first available row or the row specified with keyword ROW. If you use keyword ROW, any column in the dfile row matching a column header from sfile will be replaced. If the column headers in sfile do not match the column headers in dfile, the data is appended to new columns at the end of the row.

The values for the row header keys in dfile, such as DAY and TIME, are set to the values found in the first data line of sfile. Values of the row header keys in subsequent data lines in sfile are ignored.

If the dfile schema has a key that represents time, such as HMS and TIME in the ISFC schema, it must be specified using the HH, HH:MM, or HH:MM:SS formats in sfile. For example, 12:00:00 UTC must be in the format 12, 12:00, or 12:00:00.

The dfile cannot have more than six column header keys or 10,000 columns. Each record in dfile, including repeat groups in that record, cannot contain more than 64 keys.


Examples

TXT2MD UPPRDATA.TXT 15 IRAB

This entry reads the ASCII text file UPPRDATA.TXT and puts it into MD file 15 of schema IRAB.

TXT2MD SFCDATA.TXT 5 ISFC MISS=-999

This entry reads the ASCII text file SFCDATA.TXT and puts it into MD file 5 of schema ISFC. Any data value set to -999 in SFCDATA.TXT is treated as missing when it is read into the MD file.

TXT2MD TEMPDATA 100 TEMP ROW=5

This entry reads the ASCII text file TEMPDATA and puts it into row 5 of MD file 100. TEMP is an MD file schema created and registered by the user.

 


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]