<div dir="ltr">Hi Mary,<div><br></div><div>Nope, you're the first - figured you may have had other busy/important things along the way. I figured this was the intended use. If getting the executable is easy, that would be great - I have some real-time code that reads files as they are delivered and built in small pieces, so it would stand to benefit a good bit from using both of these new implementations.</div><div><br></div><div>The machine in questions is RHEL5 with gcc 4.1.2.</div><div><br></div><div>Thanks again!</div><div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 18, 2014 at 1:37 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.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 class="gmail_default" style="font-size:small">Hi Kyle,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">My apologies, it appears that nobody responded to your post, unless they did so offline.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm scratching my head over this bug, because I'm sure I've been using "isfilepresent" in the manner that you described, but yet it's not working for me at the moment.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I consider this a serious bug and will file a report on it shortly. If we get it fixed, do you want an updated "ncl" binary with the fix? I would only need to give you a new "ncl" executable.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Sep 9, 2014 at 4:55 PM, Kyle Griffin <span dir="ltr"><<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Just setting up 6.2.1 today, and finding that files that CAN be opened with addfile does not register with isfilepresent. While I could use filexists to duplicate the old functionality of the command, it would be nice to be able to take advantage of the "is this an openable file" check before feeding it to addfile later in my script.<div><br></div><div>Specifically, the files that are causing this issue are ones that are GRIB2 files but do not contain a file extension. While I can give it the appropriate file extension to make addfile work (it checks for 'file_name.grb2' as well as simply 'file_name'), this feature does not seem to exist with isfilepresent and the function returns false for all calls with or without file extensions.</div><div><br></div><div>I feel this isn't the desired implementation of this change to the function, and I think it might be an easy fix. Any insights? I've included some command-line interaction with the file below (specific file doesn't matter, as this issue should be true for any GRIB or GRIB2 file that is on the file system but has no extension).</div><div><br></div><div>Let me know if I can/should provide further evidence, and thanks!</div><div><br></div><div><br></div><div>Kyle</div><div><br></div><div><br></div><div><br></div><div>
<p>ncl 0> print(isfilepresent("/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000.grb"))</p>
<p>fatal:NetCDF: Unknown file format</p>
<p>fatal:Could not open (/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000)</p>
<p>(0)<span>        </span>False</p>
<p>ncl 1> print(isfilepresent("/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000.grb2"))</p>
<p>fatal:NetCDF: Unknown file format</p>
<p>fatal:Could not open (/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000)</p>
<p>(0)<span>        </span>False</p>
<p>ncl 2> a=addfile("/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000.grb","r") </p>
<p>ncl 3> printVarSummary(a)</p>
<p><br></p>
<p>Variable: a</p>
<p>Type: file</p>
<p>File path:<span>        </span>/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000</p>
<p>Number of global attributes:<span>        </span> 0</p>
<p>Number of dimensions:<span>        </span> 15</p>
<p>Number of variables:<span>        </span> 108</p>
<p>ncl 4> print(isfilepresent("/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000")) </p>
<p>fatal:NetCDF: Unknown file format</p>
<p>fatal:Could not open (/cas2/unidata/GRIB/gfs0p5deg/GFS_140909_18_000)</p>
<p>(0)<span>        </span>False</p><div><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>