[GRASS-user] GRIB2 r.in.gdal problem

Lee Eddington lee.w.eddington at gmail.com
Tue Feb 11 21:21:12 PST 2014


I’m trying to import some GRIB2 data into GRASS (6.4.3 on a Mac) and am having a problem with the range of the latitude coordinates.  I’m working with the following file:

	http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2014021112/gfs.t12z.master.grbf72.10m.uv.grib2

I used gdal_translate to create a GeoTiff file, but when I try to import it into a lat/lon location I get the following:

GRASS 6.4.3 (GFS_from_grib):~ > r.in.gdal input=gfs.t12z.master.grbf72.10m.uv.tif output=gfs
WARNING: Datum <unknown> not recognised by GRASS and no parameters found
Projection of input dataset and current location appear to match
WARNING: G_set_window(): Illegal latitude for North

Here is the output from gdalinfo:

lees-mbp:GFS Lee$ gdalinfo gfs.t12z.master.grbf72.10m.uv.tif
Driver: GTiff/GeoTIFF
Files: gfs.t12z.master.grbf72.10m.uv.tif
       gfs.t12z.master.grbf72.10m.uv.tif.aux.xml
Size is 720, 361
Coordinate System is:
GEOGCS["Coordinate System imported from GRIB file",
    DATUM["unknown",
        SPHEROID["Sphere",6371229,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (-0.250000000000000,90.250000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  -0.2500000,  90.2500000) (  0d15' 0.00"W, 90d15' 0.00"N)
Lower Left  (  -0.2500000, -90.2500000) (  0d15' 0.00"W, 90d15' 0.00"S)
Upper Right (     359.750,      90.250) (359d45' 0.00"E, 90d15' 0.00"N)
Lower Right (     359.750,     -90.250) (359d45' 0.00"E, 90d15' 0.00"S)
Center      ( 179.7500000,   0.0000000) (179d45' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=720x1 Type=Float64, ColorInterp=Gray
  Description = 10[m] HTGL="Specified height level above ground"
  Metadata:
    GRIB_COMMENT=u-component of wind [m/s]
    GRIB_ELEMENT=UGRD
    GRIB_FORECAST_SECONDS=259200 sec
    GRIB_PDS_PDTN=0
    GRIB_PDS_TEMPLATE_NUMBERS=2 2 2 0 96 0 0 0 1 0 0 0 72 103 0 0 0 0 10 255 0 0 0 0 0
    GRIB_REF_TIME=1392120000 sec UTC
    GRIB_SHORT_NAME=10-HTGL
    GRIB_UNIT=[m/s]
    GRIB_VALID_TIME=1392379200 sec UTC
Band 2 Block=720x1 Type=Float64, ColorInterp=Undefined
  Description = 10[m] HTGL="Specified height level above ground"
  Metadata:
    GRIB_COMMENT=v-component of wind [m/s]
    GRIB_ELEMENT=VGRD
    GRIB_FORECAST_SECONDS=259200 sec
    GRIB_REF_TIME=1392120000 sec UTC
    GRIB_SHORT_NAME=10-HTGL
    GRIB_UNIT=[m/s]
    GRIB_VALID_TIME=1392379200 sec UTC

So it’s showing the north and south bounds of 90.25 N and -90.25 S.  I’m almost positive that this would be the values of the edges of the cells and that the cells are centered at 90 N and 90 S.

Is there a way to import this data?

Thanks,
Lee



More information about the grass-user mailing list