Re: avhrr data extraction [message #80412 is a reply to message #80409] |
Mon, 04 June 2012 13:02   |
anil
Messages: 34 Registered: August 2009
|
Member |
|
|
On Jun 4, 5:33 pm, Matt <sav...@nsidc.org> wrote:
> Hi Anil,
>
> I think what you want is to just grab the SST data
> bsloni=loni[4715:5057]
> bslati=lati[1006:1142]
> bsst = sst[4715:5057, 1006:1142]
>
> That looks like Australia to me. That what you were expecting?
>
> Hope that helps.
>
> Matt
>
> On Jun 4, 6:46 am, anil <akpinar.a...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> Hi,
>> I have downloaded some daily ,04km, night time sea surface temperature
>> data from avhrr. an example:ftp://podaac-ftp.jpl.nasa.gov/allData/avhrr/L3/pathf inder_v5/daily/ni...
>
>> I want to read these data and extract the values for a region (defined
>> latitudes and longitudes). To read the data , I use:
>
>> file=hdf_sd_start('2002252.s04d1pfv50-sst.hdf')
>> indexa=hdf_sd_nametoindex(file,'lon')
>> indexb=hdf_sd_nametoindex(file,'lat')
>> indexc=hdf_sd_nametoindex(file,'sst')
>> varida=hdf_sd_select(file,indexa)
>> varidb=hdf_sd_select(file,indexb)
>> varidc=hdf_sd_select(file,indexc)
>> hdf_sd_getdata,varida,loni
>> hdf_sd_getdata,varidb,lati
>> hdf_sd_getdata,varidc,ssti
>> hdf_sd_endaccess,varida
>> hdf_sd_endaccess,varidb
>> hdf_sd_endaccess,varidc
>> hdf_sd_end,file
>
>> ;bsloni=loni(4715:5057)
>> ;bslati=lati(1006:1142)
>> end
>> I want to extract the latitudes (1006 to 1142) and longitudes (4715 to
>> 5057) and the corresponding sea surface temperatures (sst's) .At the
>> end I need to end up with something like:
>> 40.75 36.74 sst1
>> 40.75 36.88 sst2
>> 40.82 37.12 sst3
>> ............................... and so on. How can i do this? Defining
>> a bsloni and bslati gives me the latitudes and longitudes but how do i
>> get the corresponding sst's? With some kind of a where function? or a
>> few for loops?or some other way?
>
> --
> Matthew Savoie - Senior Software Developer
> National Snow and Ice Data Center
> (303) 735-0785 http://nsidc.org
Hi Matt,
Yes, I want to grab the coordinates I want and the corresponding
sst's. Maybe I wrote something wrong. But it is the Black Sea region
actually, Eastern Europe. when I print the longitudes 4715:5057, I
get the coordinates between , 27.22*** up to 42.25*** and for the
latitudes 1006:1142 , I get, 45.77***** to 39.79*****. Which is the
region I want. I just could not get the corresponding sst and actually
write this to another file. lets say 'abc.txt' . For which I want to
end up with:
lon1 lat1 sst1
lon2 lat2 sst2 and so on...
|
|
|