Hello list,

I'm trying to import the 3b42rt TRMM product by using r.in.bin.

I've used the follow lines,

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

but, always i got the follow error message:

ADVERTENCIA: File Size 519968 ... Total Bytes 81952

if i don't use the -h flag, then the error is:

ERROR: Invalid north latitud.

Now i´ḿ guessing my python script to download a .bin file with a
subset area is working bad,

this is the script,

from urllib2 import *
from urllib import urlopen
import os
import datetime

init=2001 #start year to download
final=2002 #end year
month_in=1
month_end=5
day_in=1
day_end=31

north="-16" #subset corners
south="-57"
east="-50"
west="-76"

ldirectory="/media/TOSHIBA/trmm_historica/" #destination folder

#Function to conect and download trmm data
def download(url, file_name):
        try:
                ur = urlopen(url)
                contents = ur.readlines()
                fo = open(file_name, "w")
                print "conected..."
                for line in contents:
                        
                        fo.write(line)
                fo.close()
        except  Exception, e:
                print "not possible to conect"
                print str(e)
                sys.exit(2)



for year in range(init,final):
        for month in range(month_in,month_end):
                for day in range(day_in,day_end):
                        url = 
"http://disc2.nascom.nasa.gov/daac-bin/Giovanni/tovas/Giovanni_cgi.pl?west="+west+"&north="+north+"&east="+east+"&south="+south+"&params=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=tovas.global.cfg.pl&instance_id=realtime&prod_id=3B42RT_daily&action=ASCII+Output"
                        print str(year)+"-"+str(month)+"-"+str(day)
                        download(url, 
ldirectory+str(year)+"-"+str(month)+"-"+str(day)+".bin")




thanks in advance if somebody can see something that i can´t do it and
solve my problem.

if somebody could help me, i´ĺl really appreciate it




-- 
Diana Marcela Brito Hoyos
Bióloga

"*El bosque sería muy triste si solo cantaran los pájaros que mejor lo
hacen"*
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to