|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
thank u kent...
it's working now. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|