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?

EDIT 02/18/2021:

Found this question and I saw it was unanswered. If anyone else is facing this issue, I can help. I was using the gdal_translate command which DOES NOT perform geospatial reprojection. I solved this by instead reprojecting using the gdalwarp command, and then using gdal_translate to convert the NetCDF to a GeoTIFF.

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

1 Answer 1

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.

1
  • 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 Commented Jul 2, 2019 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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