Format of a VM2 file and how to read it
A VM2 file contains a list of values in CSV format with the following columns:
- REFTIME: reference time (YYYYmmddHHMM or YYYYmmddHHMMSS) in UTC
- STATION ID: integer
- VARIABLE ID id: integer
- VALUE 1: double (empty if missing)
- VALUE 2: double (empty if missing)
- VALUE 3: string (without comma)
- FLAGS: string (without comma)
E.g.
201201010000,1,2,4.56,7.8,X,000000000
201201010030,1,2,12.0,9.4,X,000000000
20120101003045,1,2,12.0,9.4,X,000000000
Read VM2 values from stdin
while (parser.next(value)) {
}
Serialize a VM2 file
value.year = 2012;
value.month = 1;
value.station_id = 123;
static void serialize(std::ostream &out, const Value &value)
Serialize a value.