<div dir="ltr"><br clear="all"><div>Hello list, <br><br></div><div>I'm trying to import the 3b42rt TRMM product by using r.in.bin.<br><br>I've used the follow lines,<br><br>r.inr.in.bin --o -f -h input=2001-1-1.bin output=2001-1-1 north=-16 south=-57 east=50 west=76 cols=104 rows=197 <br></div><div><br>but, always i got the follow error message:<br><br>ADVERTENCIA: File Size 519968 ... Total Bytes 81952<br><br></div><div>if i don't use the -h flag, then the error is:<br></div><div><pre>ERROR: Invalid north latitud.<br><br></pre><pre>Now i´ḿ guessing my python script to download a .bin file with a subset area is working bad, <br><br></pre><pre>this is the script, <br><br>from urllib2 import *<br>from urllib import urlopen<br>import os<br>import datetime<br><br>init=2001 #start year to download<br>final=2002 #end year<br>month_in=1 <br>month_end=5 <br>day_in=1<br>day_end=31<br><br>north="-16" #subset corners<br>south="-57"<br>east="-50"<br>west="-76"<br><br>ldirectory="/media/TOSHIBA/trmm_historica/" #destination folder <br><br>#Function to conect and download trmm data<br>def download(url, file_name):<br> try:<br> ur = urlopen(url)<br> contents = ur.readlines()<br> fo = open(file_name, "w")<br> print "conected..."<br> for line in contents: <br> <br> fo.write(line)<br> fo.close()<br> except Exception, e:<br> print "not possible to conect"<br> print str(e)<br> sys.exit(2)<br><br><br><br>for year in range(init,final):<br> for month in range(month_in,month_end):<br> for day in range(day_in,day_end):<br> url = "<a href="http://disc2.nascom.nasa.gov/daac-bin/Giovanni/tovas/Giovanni_cgi.pl?west=">http://disc2.nascom.nasa.gov/daac-bin/Giovanni/tovas/Giovanni_cgi.pl?west=</a>"+west+"&north="+north+"&east="+east+"&south="+south+"¶ms=0%7C3B42RT&plot_type=Area+Plot&byr="+str(year)+"&bmo="+str(month)+"&bdy="+str(day)+"&eyr="+str(year)+"&emo="+str(month)+"&edy="+str(day)+"&begin_date=2000%2F03%2F01&end_date="+str(year)+"%2F"+str(month)+"%2F"+str(day)+"&cbar=cdyn&cmin=&cmax=&yaxis=ydyn&ymin=&ymax=&yint=&ascres=0.25x0.25&global_cfg=<a href="http://tovas.global.cfg.pl">tovas.global.cfg.pl</a>&instance_id=realtime&prod_id=3B42RT_daily&action=ASCII+Output" <br> print str(year)+"-"+str(month)+"-"+str(day)<br> download(url, ldirectory+str(year)+"-"+str(month)+"-"+str(day)+".bin")<br><br><br><br><br></pre>thanks in advance if somebody can see something that i can´t do it and solve my problem.<br><br>if somebody could help me, i´ĺl really appreciate it<pre><br></pre><br></div><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr">Diana Marcela Brito Hoyos<div>Bióloga</div><div><br></div><div><font size="1">"</font><i style="font-size:12.8px"><font size="1">El bosque sería muy triste si solo cantaran los pájaros que mejor lo hacen"</font></i></div></div></div></div></div>
</div>