Public:MDF Format
From Mesonet Wiki
(Difference between revisions)
Revision as of 14:55, 2 December 2008 (edit) Nebain (Talk | contribs) (Precipitation is given in millimeters, not inches.) ← Previous diff |
Revision as of 14:53, 19 February 2009 (edit) Jpbostic (Talk | contribs) (remove the redundant references to "uncompressed" MDF - that's all we use now) Next diff → |
||
Line 8: | Line 8: | ||
=== 1. Introduction === | === 1. Introduction === | ||
- | Uncompressed Mesonet data files (MDF) and Mesonet time series (MTS) files were the first type of files generated for mass distribution to customers. Their tabular layout is excellent for both printing and importing into spreadsheets and/or word processing documents. The specification for this particular kind of MDF file has undergone considerable modification since it's inception, but generally holds true to it's original format. | + | Mesonet data files (MDF) and Mesonet time series (MTS) files were the first type of files generated for mass distribution to customers. Their tabular layout is excellent for both printing and importing into spreadsheets and/or word processing documents. The specification for this particular kind of MDF file has undergone considerable modification since it's inception, but generally holds true to it's original format. |
---- | ---- | ||
Line 14: | Line 14: | ||
=== 2. The Format === | === 2. The Format === | ||
- | Uncompressed MDF files should only contain standard, printable ASCII characters. Line breaks can be either DOS (carraige return and line feed characters), Mac (carraige return character only), or Unix (linefeed character only) format, but should be consistent. Uncompressed files should be transmittable in FTP or HTTP text mode without character conversions, aside from the line breaks. | + | MDF files should only contain standard, printable ASCII characters. Line breaks can be either DOS (carraige return and line feed characters), Mac (carraige return character only), or Unix (linefeed character only) format, but should be consistent. They should be transmittable in FTP or HTTP text mode without character conversions, aside from the line breaks. |
- | An uncompressed MDF file consists of four key elements: | + | An MDF file consists of four key elements: |
# A version number which identifies the general format as well as whether the file is compressed or uncompressed. | # A version number which identifies the general format as well as whether the file is compressed or uncompressed. | ||
Line 25: | Line 25: | ||
==== 2.1 The Version Number ==== | ==== 2.1 The Version Number ==== | ||
- | This is a version number line from an uncompressed MDF file downloaded from the Mesonet BBS: | + | This is a version number line from an MDF file: |
101 !Copyright (c) 1995 Oklahoma Climatological Survey. | 101 !Copyright (c) 1995 Oklahoma Climatological Survey. | ||
- | In an uncompressed MDF file, the version number is always 101 since there have been no modifications of the uncompressed MDF format since the use of version numbers began. MDF and MTS files are defined internally to have an initial version of 100. Another number is added to indicate what format the MDF or MTS file is created with, in this case the number is 1, which indicates that it is an uncompressed version of the file. Compressed MDF/MTS files are currently labeled with an even number (currently 102). If the file formats were ever modified, the version numbers on both files would be upgraded making sure that the uncompressed version was odd (e.g. 103, 105, 139, etc.) and the compressed version was even (e.g. 104, 106, 140, etc.). The key to remember is '''odd numbers indicate uncompressed files while even numbers indicate compression was used'''. | + | In an MDF file, the version number is always 101 since there have been no modifications of the MDF format since the use of version numbers began. MDF and MTS files are defined internally to have an initial version of 100. Another number is added to indicate what format the MDF or MTS file is created with, in this case the number is 1, which indicates that it is an uncompressed version of the file. Compressed MDF/MTS files are currently labeled with an even number (currently 102). If the file formats were ever modified, the version numbers on both files would be upgraded making sure that the uncompressed version was odd (e.g. 103, 105, 139, etc.) and the compressed version was even (e.g. 104, 106, 140, etc.). The key to remember is '''odd numbers indicate uncompressed files while even numbers indicate compression was used'''. |
The copyright statement is ignored by our current software since it is superfluous to data gathering. Currently there are no plans to parse or display any portion of the copyright statement. It is there solely to protect OCS and OU intellectual property. | The copyright statement is ignored by our current software since it is superfluous to data gathering. Currently there are no plans to parse or display any portion of the copyright statement. It is there solely to protect OCS and OU intellectual property. | ||
Line 47: | Line 47: | ||
==== 2.3 The parameter identifier line ==== | ==== 2.3 The parameter identifier line ==== | ||
- | The next line in an uncompressed MDF/MTS file contains a list of parameter identifiers delimited by spaces: | + | The next line in an MDF/MTS file contains a list of parameter identifiers delimited by spaces: |
STID STNM TIME RELH TAIR WSPD WVEC WDIR | STID STNM TIME RELH TAIR WSPD WVEC WDIR | ||
Line 188: | Line 188: | ||
=== 4. Conclusion === | === 4. Conclusion === | ||
- | The uncompressed MDF and MTS format is the one most used by those wishing to supply their own data for certain parameters as it lends itself to both use in software and for viewing in text editors and/or spreadsheets. The current revisions of the plugins (3.1 as of this writing) allow for user-defined parameter identifiers and values, however conversion and units are not supported for these user-defined identifiers. Therefore, if one wishes to plot some data using software developed within OCS, it is highly recommended to use the uncompressed MDF/MTS specification. | + | The MDF and MTS format is the one most used by those wishing to supply their own data for certain parameters as it lends itself to both use in software and for viewing in text editors and/or spreadsheets. The current revisions of the plugins (3.1 as of this writing) allow for user-defined parameter identifiers and values, however conversion and units are not supported for these user-defined identifiers. Therefore, if one wishes to plot some data using software developed within OCS, it is highly recommended to use the MDF/MTS specification. |
Revision as of 14:53, 19 February 2009
Contents |