Go Back   HDF-EOS Forums > General > Questions & Answers

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 02-09-2012, 09:28 AM
nastakpa84 nastakpa84 is offline
Junior Member
 
Join Date: Feb 2012
Posts: 6
Default read a grid hdf file with Matlab code

Hello,
I have downloaded the Matlab code for a grid hdf file of SeaWifs of OBPG but it does not work.
I tried to read*chlorophyll data, that i have download from Ocean Color page but the code does not work.
Can you help me?

Anastasia.
Reply With Quote
  #2  
Unread 02-09-2012, 10:50 AM
hyoklee hyoklee is offline
Senior Member
 
Join Date: Aug 2009
Posts: 176
Default

Hi,

The data file (S20000732000080.L3m_8D_CHL_chlor_a_9km.G3.hdf) has all 0 values in the dataset.

Also, would you please post the error message you got and tell us which version of MATLAB you use?
Reply With Quote
  #3  
Unread 02-09-2012, 01:05 PM
nastakpa84 nastakpa84 is offline
Junior Member
 
Join Date: Feb 2012
Posts: 6
Default

Hi,
I am using the Matlab7.9.0(R2009b) and the error message is:
Error using ==> convertToGeoRasterRef at 49
Function MESHGRAT expected its second input argument, R, to be either a 3-element referencing vector or a 3-by-2
referencing matrix.

Error in ==> meshgrat at 130
R = convertToGeoRasterRef(R, size(Z), 'degrees', mfilename, 'R', 2);

Error in ==> surfacem>parseInputs at 114
[lat,lon] = meshgrat(lat,lon);

Error in ==> surfacem at 77
[lat, lon, alt, grid, pvPairs] = parseInputs(varargin{:});

Error in ==> surfm at 85
surfacem(lat,lon,Z,varargin{:});

Error in ==> read_hdf_seawifs_grid_file_OBPG_initial_run at 127
surfm(lat,lon,data);


Anastasia
Reply With Quote
  #4  
Unread 02-10-2012, 11:53 AM
johngevans johngevans is offline
Junior Member
 
Join Date: Feb 2012
Posts: 5
Default

What happens if you try

pcolor(lon,lat,data); shading flat
Reply With Quote
  #5  
Unread 02-14-2012, 01:29 PM
nastakpa84 nastakpa84 is offline
Junior Member
 
Join Date: Feb 2012
Posts: 6
Default

Again an error has occured.
Error using ==> pcolor at 58
Matrix dimensions must agree.
Maybe the code cannot read the data from GIOVANNI page.
If i download the chlorophyll data from the ocean color page and exactly from the Level 3 Brownser, I get a file with different name (S20000812000088.L3m_8D_CHL_chlor_a_9km.hdf), and the Matlab code can read the chlorophyll data.
I cannot understand what is happened.

Thank you.
Reply With Quote
  #6  
Unread 02-14-2012, 02:01 PM
johngevans johngevans is offline
Junior Member
 
Join Date: Feb 2012
Posts: 5
Default

Send me email at john.evans@mathworks.com and we will try to work it out with you.
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:45 PM.


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