Re: Using addfile for .hdf file on server

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 03 2014 - 11:23:44 MST

Liz,

This file is not OpenDap enabled, so you can not use ncl to access it directly.

You need to download it and the process it.

I tried download this dataset to NCAR's yellowstone, and use ncl_filedump:

ncl_filedump MCD43A3.A2013065.h12v04.005.2013082100754.hdf.he5

Which worked file.

Also, the error message you got did not like any error message for NCL.
What kind of machine you are using?

Wei

huangwei@ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Mar 3, 2014, at 10:54 AM, burakows@ucar.edu wrote:

> Hi,
>
> I am trying to use addfile to open a file on a USGS server using the
> following code (from example 4 in the online addfile documentation):
>
>>> url = "http://e4ftl01.cr.usgs.gov/MOTA/MCD43A3.005/2013.03.06/"
>
>>> fn = "MCD43A3.A2013065.h12v04.005.2013082100754.hdf"
>
>>> a = addfile ( url + fn , "r")
>
> However, I get an error:
>
> syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or
> SCAN_ERROR
> context: <!DOCTYPE^ HTML PUBLIC "-//IETF//DTD HTML
> 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not
> Found</h1><p>The requested URL
> /MOTA/MCD43A3.005/2013.03.06/MCD43A3.A2013065.h12v04.005.2013082100754.hdf.dds
> was not found on this server.</p></body></html>
> fatal:NetCDF: Malformed or inaccessible DAP DDS
> fatal:Could not open
> (http://e4ftl01.cr.usgs.gov/MOTA/MCD43A3.005/2013.03.06/MCD43A3.A2013065.h12v04.005.2013082100754.hdf)
>
> I thought hdf was a supported file format. I'm not sure why I am getting
> this error. I know the file exists because I can access it directly from
> the site. However, I will need to 100's of files from the online archive.
>
> I can pull the file using wget, but ncl_filedump also results in an error,
> so I think it has something to do with the file format.
>
>>> ncl_filedump MCD43A3.A2013065.h12v04.005.2013082100754.hdf
>
> fatal:syntax error: line 7 before or near MCD43A3
> ncl_filedump MCD43A3
> -------------------^
>
> Similarly, using ncl_convert2nc results in an error:
>
>>> ncl_convert2nc MCD43A3.A2013065.h12v04.005.2013082100754.hdf
>
> fatal:syntax error: line 3 before or near MCD43A3
> ncl_convert2nc MCD43A3
> ---------------------^
>
> fatal:error in statement
>>> I am using ncl/6.1.2.
>
> Thanks,
>
> Liz.
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 3 11:23:56 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST