wgrib2: -csv (comma separated values)
Introduction
The -csv option writes the grid values to a specified
file as a comma separated values (text) which can be imported into a
spread sheet. This function is similar to -text
with a different output.
"time0","time1","field","level",longitude,latitude,grid-value
Time0 is the reference time, that is usually the analysis or
start of the forecast time. Time1 is the verification
time. For analyses, Time0 and Time1 will be the same.
The -csv option only works on the grids
for which wgrib2 can derive latitude and longitudes values.
Otherwise no output is generated. The undefined value is 9.999e20.
Use the -undefine option to limit
the output to certain regions.
Usage
-csv output_file_name
Example
$ wgrib2 fcst.grb2 -csv junk
1:0:d=2007032600:HGT:1000 mb:anl:
2:125535:d=2007032600:HGT:1000 mb:3 hour fcst:
$ cat junk
"2007-03-26 00:00:00","2007-03-26 00:00:00","HGT","1000 mb",0,-90,164.1
"2007-03-26 00:00:00","2007-03-26 00:00:00","HGT","1000 mb",0.5,-90,164.1
"2007-03-26 00:00:00","2007-03-26 00:00:00","HGT","1000 mb",1,-90,164.1
"2007-03-26 00:00:00","2007-03-26 00:00:00","HGT","1000 mb",1.5,-90,164.1
...
"2007-03-26 00:00:00","2007-03-26 03:00:00","HGT","1000 mb",-1.5,90,-91.7
"2007-03-26 00:00:00","2007-03-26 03:00:00","HGT","1000 mb",-1,90,-91.7
"2007-03-26 00:00:00","2007-03-26 03:00:00","HGT","1000 mb",-0.5,90,-91.7
See also:
-spread,
-text,
-bin,
-ieee,
-undefine
|