Go Back   HDF-EOS Forums > Library > Others

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-21-2012, 02:23 AM
rintania rintania is offline
Junior Member
 
Join Date: Apr 2011
Posts: 5
Default Error in visualizing MODIS AQUA data

Hi everyone, i need your help.
I downloaded
a. matlab m file from this http://hdfeos.org/zoo/OBPG/MODISA_sst_zoom.m
b. example hdf data: A2002185000000.L2_LAC_SST.hdf which provided by http://hdfeos.org/zoo/index_openOBPG_Examples.php.
( Ocean Biology Processing Group --> MODISA--> swath )

i run it succesfully...but it didnt work properly (error) when i tried to use other hdf data (A2012174055000.L2_LAC_SST.hdf) that downloaded from
http://oceancolor.gsfc.nasa.gov/cgi/...id=170&hgt=254

any solution???..please help me..
Thank u



FYI
My computer: processor 2.0 GHz, 800 Mhz FSB, 1 MB L2 cache
3GB DDR3 Memory
Matlab R2009a

Last edited by rintania; 07-21-2012 at 02:27 AM. Reason: uncomplete
Reply With Quote
  #2  
Old 07-24-2012, 09:19 AM
kyang kyang is offline
Member
 
Join Date: Nov 2009
Posts: 37
Default

Actually A2012174055000.L2_LAC_SST.hdf becomes simpler. You don't need to interpolate the latitude ang longitude at all. I guess that if you just comment out the following block, you may get it displayed. I think this new example may need to be added to the zoo page.

Kent


----
% We need to interpolate lat and lon to match the size of data.
[numlat, numlon] = size(data);
numCol = size(nlat,2);
step1 = 8;
step2 = 9;

for i = 1 : numlat
for j = 1 : numCol
if(j==1)
lat(i,j) = nlat(i,j);
lon(i,j) = nlon(i,j);
continue;
end

if(j>=2 && j<=numCol-1)
count = step1*(j-2)+1;
arr_fill = linspace(nlat(i,j-1), nlat(i,j), step1+1);
lat(i, count+1:count+step1) = arr_fill(2:step1+1);
arr_fill = linspace(nlon(i,j-1), nlon(i,j), step1+1);
lon(i, count+1:count+step1) = arr_fill(2:step1+1);
continue;
end

if(j == numCol)
count = step1*(j-2) + 1;
arr_fill = linspace(nlat(i,j-1), nlat(i,j), step2+1);
lat(i, count+1:count+step2) = arr_fill(2:step2+1);
arr_fill = linspace(nlon(i,j-1), nlon(i,j), step2+1);
lon(i, count+1:count+step2) = arr_fill(2:step2+1);
continue;
end
end
end
Reply With Quote
  #3  
Old 07-27-2012, 03:18 AM
rintania rintania is offline
Junior Member
 
Join Date: Apr 2011
Posts: 5
Default

thank u kent...
it's working now.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:57 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
About Us | Contact Info | Archive Info | Disclaimer
Sponsored by NASA Cooperative Agreement Grant Number NNX08AO77A / Maintained by The HDF Group