Hi!
I am working with SMI and Bin Level 3 data daily . I do not have Seadas and I am using Matlab to read and process the HDF files. I've been reading and working with SMI files using Matlab and I am doing fine. Matlab loads into memory a 2160x4320 (=No) matrix and I found in the forum the rule to construct the respective lat/long matrixes.
But because I need to work with many parameters I find that using Bin data is easier because all what I need is in the same file. However, when I read the Bin file with Matlab, it loads a long vector of length N where N is NOT the product of 2160x4320, that is N<N0. So I assume that all data in the BIN correspond to points in water bodies and there are not points over land (as opposed to a SMI file that has grid points over land with fill values) and this is why N<No. Correct?
In any case, I find that I do not have enough information to assign a lat and long to each of the data points in the Bin file. I have not found such information in the documentation or FAQ. My objective is to map the BIN data into a 2160x4320 matrix with the VDATA from the BIN and fill or blanks in the grid points that correspond to land.
I found this IDL code which assigns lats/long for bin data. It is found in
http://oceancolor.gsfc.nasa.gov/DOCS/idl/l3bin/ll2bin.pro I can translate it into Matlab but there are couple of inputs that I do not know: the input parameters nrows and bins. What are they and how can I find them in the BIN hdf file?
Second , I need to know a bit about the logic of this IDL code. For the SMI HDF file, I used the following scheme to generate a grid of lats and longs (chunk of Matlab here):
----------------------
incr=360/4320;
mid=incr/2;
lat=[90-mid:-incr:-90]; % generate a vector from 90-mid to -90 in steps of incr
lon=[-180+mid:incr:180-mid]; % generate a vector from -180+mid to 180-mid in
% steps of incr
%%% generate a 2160x4320 matrix of latitudes and longitudes
mat_lat = repmat(lat',1,4320);
mat_lon= repmat(lon,2160,1);
----------------------
Does the BIN data follow this same logic for spacing and size of grid?
Anybody out there can help?
Thanks!
Santiago