[ncl-talk] read a variable name has space from hdf file

Yun Yue yunyue at huskers.unl.edu
Fri Mar 11 10:33:38 MST 2016


Hi Mr. Shea,

Thanks very much, this solved my question. At the beginning I just used hdfview to see the hdf_name. When I used ncl_filedump I found there is a "_"  in the variable name.

Thanks very much,

Yun

________________________________
From: Dennis Shea <shea at ucar.edu>
Sent: Friday, March 11, 2016 11:12 AM
To: Yun Yue
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] read a variable name has space from hdf file

Please use ncl_fildump to provide a view of how NCL 'sees' the file.

ncl_filedump ...MODIS...hdf | less

If it is a HDF-EOS file, just add a .he2 on the command line.

ncl_filedump ...MODIS...hdf.he2 | less

========
Do you see any variable names with a space? Likely not. NCL applies an underscore.

If you can not figure out the issue send the file tp

ftp ftp.cgd.ucar.edu<http://ftp.cgd.ucar.edu>
anonymous
email
cd incoming
put ...MIDIS_FILE...
quit

Then send the name of the file because we can not look a ./tp/incoming

Cheers



On Fri, Mar 11, 2016 at 9:07 AM, Yun Yue <yunyue at huskers.unl.edu<mailto:yunyue at huskers.unl.edu>> wrote:
Hi NCL users,
I was using NCL to read MODIS Level 2 land data. The file format is hdf. I used the following NCL code to read a variable has space

f = addfile(filename,"r")
x = f->$"fire mask"$
The error is variable is not in file (f)

There's no error when I read other variables without space.
Does anyone know how to fix this? I appreciate any help.
Thanks,
Yun

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160311/9377fc5b/attachment.html 


More information about the ncl-talk mailing list