I'm trying to process the daily rainfall data provided by Jaxa

The documentation says that the format of the dat file (say: gsmap_nrt.20170514.0.25d.daily.00Z-23Z.dat) is: 4-byte float plain binary,little-endian

How can I read/process this data in QGIS or GDAL?

  • It looks like you could export the data to GoogleMaps (* .kmz). KMZ you can read with QGIS. – Mike May 27 '17 at 11:47
  • 1
    @Mike The kmz contains 200x300 png tiles similar to the web interface. I doubt it can be easily used inside QGIS. – AndreJ May 27 '17 at 18:23
  • Maybe related: researchgate.net/post/How_can_I_read_JAXA_GSMaP_data – AndreJ May 27 '17 at 18:40
  • @Kazuhito: Can you please post that as an answer, so that I can accept it? – Devdatta Tengshe May 28 '17 at 4:31
  • 1
    No problems. If someone else has a Linux solution, they can post it as an additional answer. – Devdatta Tengshe May 28 '17 at 4:36

JAXA provides a format converter which can convert HDF5/HDF4 and their binary products into either GeoTiff or KMZ. (NB: only for Windows OS).

Just in case the above direct link to the tool does not work, this is JAXA Toolkit website and the first one (highlighted) is the same link.

enter image description here

  • 1
    Unfortunately, the tool depends on the MS Visual C++ Redistributable for Visual Studio 2012 runtime DLL, which has been dropped from the Microsoft website. There are downloads available from other sites, but you may or may not trust them. I have taken them from wintotal.de/softwarearchiv/?id=6970 – AndreJ May 28 '17 at 5:40
  • And I have to admit that JAXA does not guarantee future support. – Kazuhito May 28 '17 at 8:32

You can use the GDAL vrt driver to read the source data with a file named test.vrt like this:

<VRTDataset rasterXSize="1440" rasterYSize="480">
  <VRTRasterBand dataType="CFloat32" band="1" subClass="VRTRawRasterBand">
    <SourceFilename relativetoVRT="1">test.dat</SourceFilename>

and these GDAL commands:

gdal_translate -ot Float32 -of GTiff -a_srs EPSG:4326 -a_ullr 0 60 360 -60 -a_nodata -999.90002441406 test.vrt vrt1.tif
gdalwarp -t_srs WGS84 vrt1.tif vrt2.tif -wo SOURCE_EXTRA=10000 --config CENTER_LONG 0

This works on every OS for 24h accumulation files of 0.25 deg cell size. You need to adapt the rasterXSize and rasterYSize for other files according to the documentation, as well as re-calculate the LineOffset to rasterXSize* 4

The result can be loaded into QGIS, and looks the same as the tif created by the JAXA Format Conversion Tool (tested with data from 2017-05-01):

enter image description here

  • wow, proper QGIS/GDAL solution! – Kazuhito May 28 '17 at 8:25
  • 1
    Feel free to wrap it into a QGIS plugin! – AndreJ May 28 '17 at 11:54

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.