[gradsusr] SeaWIFS NDVI data

Huddleston, John Huddleston at cira.colostate.edu
Fri Apr 2 17:34:43 EDT 2010


Matt,

I put together a control file and the only way that grads can open that file is if the 'dtype hdf4' or 'dtype hdfsds'

So, even though the ncdump and hdfdump show it to be a netCDF format, GrADS can only read it as hdf4.

Do you have a NASA link to the file specifications so I can figure out the rest of the control file?

John

John Huddleston, PhD

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Huddleston, John
Sent: Friday, April 02, 2010 8:18 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] SeaWIFS NDVI data

Matt

The BZ2 file in your previous email points to a netCDF file, see the description from the file included here. Yes, GrADS can read this file format.


netcdf S20100652010072 {
dimensions:
        fakeDim0 = 4320 ;
        fakeDim1 = 8640 ;

variables:
        short l3m_data(fakeDim0, fakeDim1) ;
                l3m_data:Fill = -1s ;
                l3m_data:Scaling = "linear" ;
                l3m_data:Scaling Equation = "(Slope*l3m_data) + Intercept = Parameter value" ;
                l3m_data:Slope = 1.4728233e-05f ;
                l3m_data:Intercept = -0.050000001f ;

// global attributes:
                :Product Name = "S20100652010072.L3m_8D_LAND_NDVI_4km" ;
                :Sensor Name = "SeaWiFS" ;
                :Sensor = "SeaWiFS" ;
                :Title = "SeaWiFS Level-3 Standard Mapped Image" ;
                :Data Center = "" ;
                :Station Name = "" ;
                :Station Latitude = 0.f ;
                :Station Longitude = 0.f ;
                :Mission = "SeaStar SeaWiFS" ;

John Huddleston, PhD

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Matt Alonso
Sent: Friday, April 02, 2010 6:21 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] SeaWIFS NDVI data

Hi Ramon,

I remember reading that GrADS could handle HDF files which is why I was so surprised that I was having issues getting the data into GrADS; again I think this is a user-error and not a problem w/GrADS itself.

When I try to open the file in grads (v2.0.7a) using sdfopen it says that the file has no discernable x-coordinate.  I tried constructing a ctl file for it as well but that too failed.

I can't find the exact link right now but I'm 99.9% sure that the file is in HDF format.  I also attached the output of the GDAL (http://gdal.org/) utility gdalinfo, the top line of which says that the driver it is using is the "HDF4Image/HDF4 Dataset".  I did a test plot of the data using gdal_translate to convert it into a png and the output matches what is on NASA's site which leads me to believe that GDAL is correct in interpreting this file as HDF(4).

My interpretation of all of this could be way off though as I am really just grasping for straws here.

Thanks,
Matt
On Fri, Apr 2, 2010 at 12:18 AM, Ramon Solano <rsolanob at gmail.com<mailto:rsolanob at gmail.com>> wrote:
Hello Matt,

GrADS has no problem working with HDF files, no matter if they are projected or not; what matters is if they are stored as a regular grid. You may have geolocation problems if the file is projected into something like a sinusoidal or some other not so common projection, but still you can have access to the actual data, do the processing and at the end to export the results to your favorite software (ENVI, Imagine, etc).

Of course, the first thing you need to have is the internal structure of the data file (data type, dimensions, data layers, interleaving, etc). I ran a HDF diagnostic utility on the file you mentioned and it appears that the file does not contain any grid, are you sure it is a HDF file? Looks more like a plain binary file, but that's just my guessing (HDF files are self described).

Regards,
Ramon
---

On Mar 31, 2010, at 6:41 AM, Matt Alonso wrote:

Hi All,

Sorry to bother folks w/this but I was wondering if anyone has had any success working w/SeaWIFS data (http://oceandata.sci.gsfc.nasa.gov/SeaWiFS/Mapped/8Day/NDVI/2010/) in GrADS.  I've been struggling w/creating the appropriate CTL for the HDF data.  When I open the most recent 8day composite 4km file (http://oceandata.sci.gsfc.nasa.gov/cgi/getfile/S20100652010072.L3m_8D_LAND_NDVI_4km.bz2) I'm having problems trying to read the file into GrADS.

Any info on this matter would be greatly appreciated.  Thanks in advance.

Cheers,
Matt
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr


_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100402/3ab9fe49/attachment-0003.html 


More information about the gradsusr mailing list