<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<p class="p1">Hi Mr. Shea,</p>
<p class="p1">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. </p>
<p class="p1">Thanks very much,</p>
<p class="p1">Yun</p>
<p></p>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Dennis Shea <shea@ucar.edu><br>
<b>Sent:</b> Friday, March 11, 2016 11:12 AM<br>
<b>To:</b> Yun Yue<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] read a variable name has space from hdf file</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Please use ncl_fildump to provide a view of how NCL 'sees' the file.<br>
<br>
</div>
<div>ncl_filedump ...MODIS...hdf | less<br>
<br>
</div>
<div>If it is a HDF-EOS file, just add a .he2 on the command line.<br>
<br>
ncl_filedump ...MODIS...hdf.he2 | less<br>
<br>
========<br>
</div>
<div>Do you see any variable names with a space? Likely not. NCL applies an underscore.<br>
<br>
</div>
<div>If you can not figure out the issue send the file tp<br>
<br>
</div>
<div>ftp <a href="http://ftp.cgd.ucar.edu" id="LPlnk964906">ftp.cgd.ucar.edu</a><br>
</div>
<div>anonymous<br>
</div>
<div>email<br>
</div>
<div>cd incoming<br>
</div>
<div>put ...MIDIS_FILE...<br>
</div>
<div>quit<br>
<br>
</div>
<div>Then send the name of the file because we can not look a ./tp/incoming<br>
<br>
</div>
<div>Cheers<br>
</div>
<div><br>
<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Mar 11, 2016 at 9:07 AM, Yun Yue <span dir="ltr">
<<a href="mailto:yunyue@huskers.unl.edu" target="_blank">yunyue@huskers.unl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Hi NCL users,
<div>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</div>
<div><br>
</div>
<div>f = addfile(filename,"r")</div>
<div>x = f->$"fire mask"$</div>
<div>The error is variable is not in file (f)</div>
<div><br>
</div>
<div>There's no error when I read other variables without space.</div>
<div>Does anyone know how to fix this? I appreciate any help.</div>
<div>Thanks,</div>
<div>Yun</div>
</div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>