<div dir="ltr"><div><div>Hi Will,<br><br></div>Yes, the behavior you describe is easily duplicated. I've filed a bug ticket, NCL-2722, and will look into it. Hopeful nothing difficult to take care of.<br><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 19, 2018 at 9:51 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@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><div><div>Hi Will, <br><br></div>That's an "interesting" little bit of behaviour, and I will see if I can't duplicate it first thing in the morning and get back to you.<br><br></div>Thanks for reporting...<br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Feb 19, 2018 at 3:22 PM, Will Hobbs <span dir="ltr"><<a href="mailto:will.hobbs@utas.edu.au" target="_blank">will.hobbs@utas.edu.au</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 link="#0563C1" vlink="#954F72" lang="EN-AU">
<div class="m_6063558206142753991m_8212906661065011664WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi all<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Looking for some input on a slightly annoying feature of the write_table() function (well, it was annoying when I couldn’t figure it out)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The following bit of code runs just fine as written. However, change diro = “~/” and I get a Segmentation fault. I assume (but don’t know) this is because my HLUres has the tilde set for use with function
codes in strings, but I’ve not had the same issue with filepaths in any other NCL I/O function (e.g. asciiwrite(), addfile() ). Indeed, the asciiwrite() statement in the snippet below works fine with the tilde, it only fails with the write_table() statement.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Will <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">begin<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">diro = “/Users/whobbs/” <i.e. your home directory><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> filo = "foo.csv"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> model = "random_model"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> expt = "random_expt_name"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> Dbnd = (/1025.23,1026.39,1026.99,1027<wbr>.82/)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">if (.not.fileexists(diro+filo)) then<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> asciiwrite(diro+filo, "model,expt,SAMW_upper,SAMW_IW<wbr>, IW_CDW,CDW_BW")<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">end if<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">oList = [/model, expt, str_join(sprintf("%6.2f",Dbnd)<wbr>,",") /]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">write_table(diro+filo, "a", oList, "%s,%s,%s")<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">end<u></u><u></u></span></p>
</div>
<p style="font-size:10pt;line-height:10pt;font-family:Calibri,sans-serif"><br>
<br>
University of Tasmania Electronic Communications Policy (December, 2014). <br>
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained
in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
</p>
</div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>