|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
help reading GRIB1 datasetI have a few datasets in GRIB1 format that I would like to use in GMT.
grdimage is having some trouble. I've attached the GRIB file. It contains global soil texture data in 9 bins labeled 1-9 (plus zero for water tiles so make it ten bins). Is it a grib file and which version? degrib/bin/degrib global_soiltype.1x1.grb -I Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 MsgNum, Byte, GRIB-Version, elem, level, reference(UTC), valid(UTC), Proj(hr) 1.0, 0, 1, SNOEV="Snow sublimation heat flux [W/m^2]", 0-SFC, 01/01/2000 00:00, 01/01/2000 00:00, 0.00 ^ | Version 1 What does grdinfo think about this file? grdinfo global_soiltype.1x1.grb=gd Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 global_soiltype.1x1.grb: Title: Grid imported trhough GDAL global_soiltype.1x1.grb: Command: global_soiltype.1x1.grb: Remark: global_soiltype.1x1.grb: Gridline node registration used global_soiltype.1x1.grb: Unrecognized grid file format! Probably not a GMT grid global_soiltype.1x1.grb: x_min: -179 x_max: 180 x_inc: 1 name: x nx: 360 global_soiltype.1x1.grb: y_min: -90 y_max: 89 y_inc: 1 name: y ny: 180 global_soiltype.1x1.grb: z_min: 0 z_max: 9 name: z global_soiltype.1x1.grb: scale_factor: 1 add_offset: 0 Lets make a color table grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 Warning! : Can't figure out time unit of 4 # cpt file created by: grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd #COLOR_MODEL = RGB # 0 64 0 192 1.125 64 0 192 1.125 0 128 255 2.25 0 128 255 2.25 64 224 255 3.375 64 224 255 3.375 64 255 192 4.5 64 255 192 4.5 192 255 64 5.625 192 255 64 5.625 255 224 64 6.75 255 224 64 6.75 255 32 64 7.875 255 32 64 7.875 255 160 255 9 255 160 255 B 0 0 0 F 255 255 255 N 128 128 128 Looks good, lets make an image. grdimage global_soiltype.1x1.grb=gd -JM15c -R-179/180/-89/89 -Cglobal_vegfrac.0.144.decpercent.cpt -V > global_soiltype.1x1.ps grdimage: Allocates memory and read data file GMT_grd_is_global: yes, longitude cells span exactly 360 gdalread: Unsupported data type grdimage: project grid files grdimage: Given domain implies x_inc = 0.0164499 grdimage: Grid projection from size 360x180 to 360x180 GMT_grd_is_global: yes, longitude cells span exactly 360 GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 1, nxp = 360, nyp = 0 grdimage: Evaluate pixel colors grdimage: Creating PostScript image 24-bit [colorimage] pslib: Colormap of 14 colors created pslib: Image depth reduced to 4 bits pslib: LZW compressed 32400 to 369 bytes The trouble is that the postscript image is empty. I have confirmed with other programs that the file does contain the expected data. I am using GMT-4.5.1 with GDAL-1.6.2 on a 32-bit Linux box. GDAL was configured with internal support for GRIB format. The table of supported format located at http://www.gdal.org/formats_list.html indicates it supports both GRIB1 and GRIB2. Any ideas? -- Dan Kokron Global Modeling and Assimilation Office NASA Goddard Space Flight Center Greenbelt, MD 20771 Daniel.S.Kokron@... Phone: (301) 614-5192 Fax: (301) 614-5304 To unsubscribe, send the message "signoff gmt-help" to listserv@... |
|
|
Re: help reading GRIB1 datasetDan Kokron wrote:
> I have a few datasets in GRIB1 format that I would like to use in GMT. > grdimage is having some trouble. I've attached the GRIB file. It > contains global soil texture data in 9 bins labeled 1-9 (plus zero for > water tiles so make it ten bins). Dan, For one side there is a bad GDAL behavior. Using your commands, I got something in the PS file. And part of it were the "Warning! : Can't figure out time unit of 4" that are printed by GDAL. So it means that GDAL is issuing warnings into stdout instead of stderr. I can try fill another ticket in GDAL, but honestly, if it is to be left there ignored for another couple of years ... Now, aside from that (serious) trouble, you can make it work by converting the grib file into netCDF with grdreformat global_soiltype.1x1.grb=gd gribed.grd Than grdimage works ... under the condition that you change either the projection or the map limits. The following worked for me. ... -JM15c -R-179/180/-87/87 ... or ... -JX15cd -R-179/180/-89/89 ... I don't know why there is no image with lat > +/- 87 but you shouldn't use Mercator to plot at such high latitudes. Joaquim > > Is it a grib file and which version? > > degrib/bin/degrib global_soiltype.1x1.grb -I > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > MsgNum, Byte, GRIB-Version, elem, level, reference(UTC), valid(UTC), Proj(hr) > 1.0, 0, 1, SNOEV="Snow sublimation heat flux [W/m^2]", 0-SFC, 01/01/2000 00:00, 01/01/2000 00:00, 0.00 > ^ > | > Version 1 > > > What does grdinfo think about this file? > > grdinfo global_soiltype.1x1.grb=gd > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > global_soiltype.1x1.grb: Title: Grid imported trhough GDAL > global_soiltype.1x1.grb: Command: > global_soiltype.1x1.grb: Remark: > global_soiltype.1x1.grb: Gridline node registration used > global_soiltype.1x1.grb: Unrecognized grid file format! Probably not a GMT grid > global_soiltype.1x1.grb: x_min: -179 x_max: 180 x_inc: 1 name: x nx: 360 > global_soiltype.1x1.grb: y_min: -90 y_max: 89 y_inc: 1 name: y ny: 180 > global_soiltype.1x1.grb: z_min: 0 z_max: 9 name: z > global_soiltype.1x1.grb: scale_factor: 1 add_offset: 0 > > Lets make a color table > > grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > Warning! : Can't figure out time unit of 4 > # cpt file created by: grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd > #COLOR_MODEL = RGB > # > 0 64 0 192 1.125 64 0 192 > 1.125 0 128 255 2.25 0 128 255 > 2.25 64 224 255 3.375 64 224 255 > 3.375 64 255 192 4.5 64 255 192 > 4.5 192 255 64 5.625 192 255 64 > 5.625 255 224 64 6.75 255 224 64 > 6.75 255 32 64 7.875 255 32 64 > 7.875 255 160 255 9 255 160 255 > B 0 0 0 > F 255 255 255 > N 128 128 128 > > Looks good, lets make an image. > > grdimage global_soiltype.1x1.grb=gd -JM15c -R-179/180/-89/89 -Cglobal_vegfrac.0.144.decpercent.cpt -V > global_soiltype.1x1.ps > grdimage: Allocates memory and read data file > GMT_grd_is_global: yes, longitude cells span exactly 360 > gdalread: Unsupported data type > grdimage: project grid files > grdimage: Given domain implies x_inc = 0.0164499 > grdimage: Grid projection from size 360x180 to 360x180 > GMT_grd_is_global: yes, longitude cells span exactly 360 > GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 1, nxp = 360, nyp = 0 > grdimage: Evaluate pixel colors > grdimage: Creating PostScript image 24-bit [colorimage] > pslib: Colormap of 14 colors created > pslib: Image depth reduced to 4 bits > pslib: LZW compressed 32400 to 369 bytes > > The trouble is that the postscript image is empty. I have confirmed > with other programs that the file does contain the expected data. > > I am using GMT-4.5.1 with GDAL-1.6.2 on a 32-bit Linux box. GDAL was > configured with internal support for GRIB format. The table of > supported format located at http://www.gdal.org/formats_list.html > indicates it supports both GRIB1 and GRIB2. > > Any ideas? > To unsubscribe, send the message "signoff gmt-help" to listserv@... |
|
|
Re: help reading GRIB1 datasetThanks for the help. Unfortunately, we climate folks use Mercator for
almost everything. Dan On Mon, 2009-10-19 at 11:52 -0500, Joaquim Luis wrote: > Dan Kokron wrote: > > I have a few datasets in GRIB1 format that I would like to use in GMT. > > grdimage is having some trouble. I've attached the GRIB file. It > > contains global soil texture data in 9 bins labeled 1-9 (plus zero for > > water tiles so make it ten bins). > > Dan, > > For one side there is a bad GDAL behavior. Using your commands, I got something in > the PS file. And part of it were the "Warning! : Can't figure out time unit of 4" > that are printed by GDAL. So it means that GDAL is issuing warnings into stdout > instead of stderr. I can try fill another ticket in GDAL, but honestly, if it is > to be left there ignored for another couple of years ... > > Now, aside from that (serious) trouble, you can make it work by converting the > grib file into netCDF with > > grdreformat global_soiltype.1x1.grb=gd gribed.grd > > Than grdimage works ... under the condition that you change either the projection or > the map limits. The following worked for me. > ... -JM15c -R-179/180/-87/87 ... > or > ... -JX15cd -R-179/180/-89/89 ... > > I don't know why there is no image with lat > +/- 87 but you shouldn't use Mercator > to plot at such high latitudes. > > Joaquim > > > > > Is it a grib file and which version? > > > > degrib/bin/degrib global_soiltype.1x1.grb -I > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > MsgNum, Byte, GRIB-Version, elem, level, reference(UTC), valid(UTC), Proj(hr) > > 1.0, 0, 1, SNOEV="Snow sublimation heat flux [W/m^2]", 0-SFC, 01/01/2000 00:00, 01/01/2000 00:00, 0.00 > > ^ > > | > > Version 1 > > > > > > What does grdinfo think about this file? > > > > grdinfo global_soiltype.1x1.grb=gd > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > global_soiltype.1x1.grb: Title: Grid imported trhough GDAL > > global_soiltype.1x1.grb: Command: > > global_soiltype.1x1.grb: Remark: > > global_soiltype.1x1.grb: Gridline node registration used > > global_soiltype.1x1.grb: Unrecognized grid file format! Probably not a GMT grid > > global_soiltype.1x1.grb: x_min: -179 x_max: 180 x_inc: 1 name: x nx: 360 > > global_soiltype.1x1.grb: y_min: -90 y_max: 89 y_inc: 1 name: y ny: 180 > > global_soiltype.1x1.grb: z_min: 0 z_max: 9 name: z > > global_soiltype.1x1.grb: scale_factor: 1 add_offset: 0 > > > > Lets make a color table > > > > grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > Warning! : Can't figure out time unit of 4 > > # cpt file created by: grd2cpt -Cwysiwyg -E9 global_soiltype.1x1.grb=gd > > #COLOR_MODEL = RGB > > # > > 0 64 0 192 1.125 64 0 192 > > 1.125 0 128 255 2.25 0 128 255 > > 2.25 64 224 255 3.375 64 224 255 > > 3.375 64 255 192 4.5 64 255 192 > > 4.5 192 255 64 5.625 192 255 64 > > 5.625 255 224 64 6.75 255 224 64 > > 6.75 255 32 64 7.875 255 32 64 > > 7.875 255 160 255 9 255 160 255 > > B 0 0 0 > > F 255 255 255 > > N 128 128 128 > > > > Looks good, lets make an image. > > > > grdimage global_soiltype.1x1.grb=gd -JM15c -R-179/180/-89/89 -Cglobal_vegfrac.0.144.decpercent.cpt -V > global_soiltype.1x1.ps > > grdimage: Allocates memory and read data file > > GMT_grd_is_global: yes, longitude cells span exactly 360 > > gdalread: Unsupported data type > > grdimage: project grid files > > grdimage: Given domain implies x_inc = 0.0164499 > > grdimage: Grid projection from size 360x180 to 360x180 > > GMT_grd_is_global: yes, longitude cells span exactly 360 > > GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 1, nxp = 360, nyp = 0 > > grdimage: Evaluate pixel colors > > grdimage: Creating PostScript image 24-bit [colorimage] > > pslib: Colormap of 14 colors created > > pslib: Image depth reduced to 4 bits > > pslib: LZW compressed 32400 to 369 bytes > > > > The trouble is that the postscript image is empty. I have confirmed > > with other programs that the file does contain the expected data. > > > > I am using GMT-4.5.1 with GDAL-1.6.2 on a 32-bit Linux box. GDAL was > > configured with internal support for GRIB format. The table of > > supported format located at http://www.gdal.org/formats_list.html > > indicates it supports both GRIB1 and GRIB2. > > > > Any ideas? > > > > To unsubscribe, send the message "signoff gmt-help" to listserv@... Dan Kokron Global Modeling and Assimilation Office NASA Goddard Space Flight Center Greenbelt, MD 20771 Daniel.S.Kokron@... Phone: (301) 614-5192 Fax: (301) 614-5304 To unsubscribe, send the message "signoff gmt-help" to listserv@... |
| Free embeddable forum powered by Nabble | Forum Help |