<div dir="ltr">Hello Laurent <div><br></div><div>w00t! This new add-on sounds very nice! I'd like to do some testing. However, I tried to install it via g.extension and I get the following:</div><div><br></div><div>g.extension extension=t.rast.in.gpm url=<a href="https://bitbucket.org/lrntct/t.rast.in.gpm">https://bitbucket.org/lrntct/t.rast.in.gpm</a></div><div>Fetching <t.rast.in.gpm> from</div><div><<a href="https://bitbucket.org/lrntct/t.rast.in.gpm/get/default.zip">https://bitbucket.org/lrntct/t.rast.in.gpm/get/default.zip</a>> (be</div><div>patient)...</div><div>ERROR: Extension <t.rast.in.gpm> not found</div><div><br></div><div>Is it intended to install with g.extension? </div><div><br></div><div>thanks much! </div><div>Vero</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-21 1:04 GMT+01:00 Laurent C. <span dir="ltr"><<a href="mailto:lrntct@gmail.com" target="_blank">lrntct@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
I wrote a module that automatically download, import and register GPM<br>
IMERG maps in GRASS.<br>
You will need a NASA Earthdata Login to download the data. The code<br>
can be found here:<br>
<a href="https://bitbucket.org/lrntct/t.rast.in.gpm" rel="noreferrer" target="_blank">https://bitbucket.org/lrntct/<wbr>t.rast.in.gpm</a><br>
<br>
For now, it is limited to IMERGHH data.<br>
Hope it could help people working with those data.<br>
<br>
Regards,<br>
Laurent<br>
<br>
<br>
2015-03-19 10:50 GMT-06:00 Laurent C. <<a href="mailto:lrntct@gmail.com">lrntct@gmail.com</a>>:<br>
> Hi all,<br>
><br>
> I'm coming back to that subject because the GPM datas are finally available<br>
> since December 2014. The original data are stored in HDF5, which is<br>
> supported by GDAL.<br>
> However, I had a problem with the geo-referencing of the data. It seems that<br>
> the lat/long coordinates are flipped.<br>
> The problem seems to come from GDAL, as the HDF5 driver still don't support<br>
> GPM data:<br>
> <a href="http://www.gdal.org/frmt_hdf5.html" rel="noreferrer" target="_blank">http://www.gdal.org/frmt_hdf5.<wbr>html</a><br>
><br>
> I've actually downloaded a regional extracts the data in NetCDF from a NASA<br>
> website, although I can't remember where exactly, as there are several<br>
> services. Those data suffer from the same problem of inverted coordinates.<br>
><br>
> So I used the ncpdq from NCO package to fix the NetCDF directly, and a tiny<br>
> Python script to batch process the files :<br>
><br>
> ###<br>
> #!/usr/bin/env python<br>
> from os import listdir<br>
> import subprocess<br>
> for input_file in listdir(main_path):<br>
>     output_file = input_file + '_fixed'<br>
>     subprocess.call(['ncpdq','-a', 'lat,lon', input_file, output_file])<br>
> ###<br>
><br>
> After batch import the data in GRASS, maintaining the original name<br>
> including timestep, which looks like this:<br>
> 3B-HHR.MS.MRG.3IMERG.20140619-<wbr>S000000-E002959.0000.V03D<br>
><br>
> A Python script to register the maps in temporal framework:<br>
><br>
> #####<br>
> #!/usr/bin/env python<br>
> import grass.script as grass<br>
><br>
> # retrieve the list of maps<br>
> maplist = grass.read_command('g.list', type = 'raster',<br>
>     pattern = '*IMERG*')<br>
><br>
> # turn result in a list<br>
> maplist = maplist.split()<br>
><br>
> file_name = 'gpm_timestamp.txt'<br>
><br>
> # creating the file containing the timepstamp<br>
> list_file = open(file_name,'w')<br>
><br>
> # iterate through the maps<br>
> for input_map in maplist:<br>
>     # split line to keep only the timestamp<br>
>     raw_ts = input_map.split('.')[4]<br>
>     # isolate the date<br>
>     raw_mapdate = raw_ts.split('-')[0]<br>
>     # put the date in form<br>
>     mapdate = raw_mapdate[:4] + '-' + raw_mapdate[4:6] + \<br>
>         '-' + raw_mapdate[6:]<br>
>     # isolate the start time<br>
>     raw_start_time = raw_ts.split('-')[1]<br>
>     # put the date in form<br>
>     start_time = raw_start_time[1:3] + ':' + \<br>
>         raw_start_time[3:5] + ':' + raw_start_time[5:]<br>
>     # isolate the end time<br>
>     raw_end_time = raw_ts.split('-')[2]<br>
>     # put the end time in form<br>
>     end_time = raw_end_time[1:3] + ':' + \<br>
>         raw_end_time[3:5] + ':' + raw_end_time[5:]<br>
>     # put timestamp in form<br>
>     timestamp = mapdate + ' ' + start_time + '|' + mapdate + \<br>
>         ' ' + end_time<br>
><br>
>     # format the whole line<br>
>     line = input_map + '|' + timestamp + '\n'<br>
><br>
>     # write line to the file<br>
>     list_file.write(line)<br>
><br>
> # close the file<br>
> list_file.close()<br>
><br>
> # register the maps in grass space_time dataset<br>
> grass.run_command('t.register'<wbr>, input = 'GPM_ZMCM', file = file_name)<br>
><br>
> #####<br>
><br>
><br>
> Hope it will help other peoples having trouble using those data.<br>
><br>
> Regards,<br>
> Laurent<br>
><br>
><br>
> 2014-11-06 5:15 GMT-06:00 maning sambale <<a href="mailto:emmanuel.sambale@gmail.com">emmanuel.sambale@gmail.com</a>>:<br>
>><br>
>> Thanks Markus.  Already registered and can access ftp.  Unfortunately,<br>
>> processed (L3) rainfall data will be released by Dec 2014.<br>
>> Will just wait then. :)<br>
>><br>
>> On Thu, Nov 6, 2014 at 4:27 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>
>> > On Mon, Nov 3, 2014 at 10:18 AM, maning sambale<br>
>> > <<a href="mailto:emmanuel.sambale@gmail.com">emmanuel.sambale@gmail.com</a>> wrote:<br>
>> >> Has anyone here able to archive and load GPM dataset into GRASS?  I<br>
>> >> was able to get TRMM netcdf in my area of interest before, but I can't<br>
>> >> find the tools to automate GPM downloads.<br>
>> >><br>
>> >> Thanks!<br>
>> >><br>
>> >> [0] <a href="http://www.nasa.gov/mission_pages/GPM/main/" rel="noreferrer" target="_blank">http://www.nasa.gov/mission_<wbr>pages/GPM/main/</a><br>
>> ><br>
>> > They state<br>
>> ><br>
>> > "All data are freely available through the NASA's Precipitation<br>
>> > Processing System at <a href="http://pps.gsfc.nasa.gov" rel="noreferrer" target="_blank">http://pps.gsfc.nasa.gov</a>"<br>
>> ><br>
>> > --> "Register and search for GPM and TRMM data, order custom subsets<br>
>> > and set up subscriptions using PPS Data Products Ordering Interface<br>
>> > (STORM)."<br>
>> ><br>
>> > At time the server seems to be down?<br>
>> ><br>
>> > Markus<br>
>><br>
>><br>
>><br>
>> --<br>
>> cheers,<br>
>> maning<br>
>> ------------------------------<wbr>------------------------<br>
>> "Freedom is still the most radical idea of all" -N.Branden<br>
>> wiki: <a href="http://esambale.wikispaces.com/" rel="noreferrer" target="_blank">http://esambale.wikispaces.<wbr>com/</a><br>
>> blog: <a href="http://epsg4253.wordpress.com/" rel="noreferrer" target="_blank">http://epsg4253.wordpress.com/</a><br>
>> ------------------------------<wbr>------------------------<br>
>> ______________________________<wbr>_________________<br>
>> grass-user mailing list<br>
>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
><br>
><br>
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></blockquote></div><br></div>