2

I am working with GPM(Global Precipitation Measurement) satellite data which are in .netcdf format. When I open the data in qgis it is in a different projection and I can not overlap the shape for the region I am trying to analyze. How can I solve this?

The link to download the data is: https://disc.gsfc.nasa.gov/datasets?keywords=GPM%20DPR&page=1 Product:'GPM DPR Precipitation Profile 1 Day 0.25 degree x 0.25 degree V05 (GPM_3DPRD.05)' In the metadata: lat.resolution = 0.25 lon.resolution = 0.25 NorthBoundingCoordinate = 67 SouthBoundingCoordinate =-67 EastBoundingCoordinate = 180 WestBoundingCoordinate=-180

The option that I selected was 'precipRateNearSurfaceMean'.

CRS-GPM_3DPRD.05 file: Undefined; CRS-Shapefile: SIRGAS 2000, EPSG:4674

6
  • It would help if you add a link to the data, the CRS of the data, the CRS that QGIS assignes to it, and the CRS of the shapefile. You might try to add an Openstreetmap basemap with the QMS plugin and see if that aligns.
    – AndreJ
    Oct 10 '18 at 15:14
  • Ok AndreJ. I put up with the question. Oct 10 '18 at 16:12
  • Unfortunately, I can't get it to display in QGIS. Maybe the netcdf structure is too complicated.
    – AndreJ
    Oct 11 '18 at 12:13
  • It is true! I found some similar issues here like this topic that was answered by you: (gis.stackexchange.com/questions/213083/…) , but I could not solve... Oct 11 '18 at 12:20
  • Selecting a single dataset on the website gives me a file that displays fine in Panoply, but flipped vertically in QGIS. I'm not sure how to handle that without programming.
    – AndreJ
    Oct 11 '18 at 16:14
2

There seems to be a bug in the data. Ncdump reads:

netcdf \3a-day {
dimensions:
    AD = 2 ;
    chn = 2 ;
    nlon = 1440 ;
    nlat = 536 ;

and Panolpy plots it correctly, while exporting to tif with GDAL returns a 536x1440 raster with coordinates flipped. So you can use this workaround:

gdal_translate -of VRT -gcp -67 180 180 -67 -gcp -67 -180 -180 -67 -gcp 67 180 180 67 -gcp 67 -180 -180 67  3a-day.nc tmp.vrt
gdalwarp -t_srs EPSG:4326 tmp.vrt warpout.tif
gdal_translate -a_ullr -180 67 180 -67 warpout.tif 3a-day.tif

Please check the result with a dataset that has an uneven placement of data around the world.

See also http://osgeo-org.1560.x6.nabble.com/gdal-dev-Netcdf-coordinates-swapped-td5381627.html for a reply from the GDAL dev's.

6
  • Thanks AndreJ...Do I have to use all these commands in the gdal together? I will do this, if not solve the problem I will try in other software because as you spoke the file .nc in qgis is very complex. Oct 15 '18 at 12:28
  • You can put all three commands in a batch file and run that.
    – AndreJ
    Oct 15 '18 at 14:04
  • I tried to do what you suggested but a message appears: FAILURE: Too many command options. Maybe it's some problem with my qgis software. Oct 19 '18 at 12:19
  • The GDAL command line apps have nothing to do with the QGIS software. Most probably you have a typo in your bat file.
    – AndreJ
    Oct 19 '18 at 19:00
  • Ok, Andre. I meant at the time of the installation of the gdal Oct 19 '18 at 20: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.