0

I am very new to GIS.

I am trying to translate a single band of a NetCDF file to a GeoTIFF file, and then load it up into QGIS and have it overlap with a shapefile of the US. However, when I load up the shapefile and the GeoTIFF, I am not getting any overlap.

Here's a link to the two layers

The top left is the shapefile, the bottom right is my GeoTIFF.

Here's the command I'm using to do the translation: gdal_translate -a_srs EPSG:4326 NETCDF:evap.mon.mean.nc:evap -b 1 -of GTiff test2.geotiff

I have tried a wide variety of a_srs values but none seem to give the results I want.

Does anyone know what is going wrong here?

Result of gdal info:

Band 485 Block=349x1 Type=Float32, ColorInterp=Undefined

  NoData Value=9.96920996838686905e+36

  Unit Type: kg/m^2

  Metadata:

    actual_range={-0.53373265,2.7928879}
    coordinates=lat lon
    dataset=NARR Monthly Means
    GRIB_id=57
    GRIB_name=EVP
    grid_mapping=Lambert_Conformal
    level_desc=Surface
    long_name=Monthly accumulated total evaporation at Surface
    missing_value=-9.96921e+36
    NETCDF_DIM_time=1922592
    NETCDF_VARNAME=evap
    parent_stat=Mean
    standard_name=water_evaporation_amount
    statistic=Mean
    units=kg/m^2
    valid_range={-4,20}
    var_desc=Evaporation amount
    _FillValue=9.96921e+36

Also, when I open the GeoTIFF with RasterIO, it gives this warning:

NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)

Could that be the issue?

  • Does gdalinfo NETCDF:evap.mon.mean.nc:evap show the native SRS of your NetCDF data? What it is? – user30184 Jul 1 at 18:05
  • @user30184, I've modified the main post to include the gdal info – mataslauzadis Jul 1 at 18:21
1

When you use the -a_srs flag you are telling GDAL that you know that the projection of the raster is the following epsg code (in your case EPSG:4326) but that is not the projection of your raster (grid_mapping=Lambert_Conformal).

There isn't enough information encoded in the raster to tell us what the actual projection is but you should be able to find it in the metadata you got with the the data file.

  • I was able to find more specification about the dataset here. How can I use this information to fix the issue? I see there are grid corners, and a more detailed projection specification here. It is number 211 – mataslauzadis Jul 2 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.