<div dir="ltr">Additional information: If we do an addfile(&quot;&lt;filename&gt;&quot;,&quot;r&quot;), we can open and read the file. If we use &quot;w&quot;, well, we can open the file but assigning an existing variable to an internal variable fails on the assign (var = a-&gt;QRAIN). Of course, because it fails there, we can&#39;t see if it&#39;d also fail on write. <div><br></div><div>Thanks</div><div>Gerry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 1, 2015 at 7:15 PM, Gerry Creager - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:gerry.creager@noaa.gov" target="_blank">gerry.creager@noaa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I&#39;ve started looking at this with Dusty. Appreciate any thought you might have as to why we&#39;re failing.<div><br></div><div>I&#39;ve uploaded the input file (wrfinput_d02) to the FTP incoming site. I&#39;m testing with the script:<div><br></div><div><div>var = &quot;QRAIN&quot;</div><div>print(var)</div></div><div><div>a=addfile(&quot;<a href="http://wrfinput_d02.nc" target="_blank">wrfinput_d02.nc</a>&quot;, &quot;w&quot;)</div><div>var_orig=a-&gt;QRAIN</div><div>print(var_orig)</div></div><div><br></div><div><br></div><div>The result looks like:gerry@loki:~/NEWSe/NCL&gt; ncl test.ncl </div><div> Copyright (C) 1995-2015 - All Rights Reserved</div><div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.3.0</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</div><div><br></div><div><br></div><div>Variable: var</div><div>Type: string</div><div>Total Size: 8 bytes</div><div>            1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[1]</div><div>Coordinates: </div><div>(0)<span style="white-space:pre-wrap">        </span>QRAIN</div><div>fatal:[&quot;NclNetCDF4.c&quot;:3073]:NclNetCDF4.c: Error in nc_def_var_chunking in file (<a href="http://wrfinput_d02.nc" target="_blank">wrfinput_d02.nc</a>) for writing, at line: 3073</div><div><br></div><div>line 3074 of NclNetCDF4.c: NetCDF: Attempt to define var properties, like deflate, after enddef.</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, May 29, 2015 at 8:54 PM, Dustan Wheatley - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dustan.wheatley@noaa.gov" target="_blank">dustan.wheatley@noaa.gov</a>&gt;</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"><span style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px">I am trying to overwrite a netcdf4 file analogous to what is shown at </span><a href="https://exchange.ou.edu/owa/redir.aspx?C=owjNhXjJeU2q3l_CtHOdFTi5otfobdIIrQJSmDqpIJwEqeu5PSxBrYF-uWWKJzwXX3oP_TJTgXA.&amp;URL=http%3a%2f%2fwww.ncl.ucar.edu%2fApplications%2fchange_netCDF.shtml" style="font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px" target="_blank">http://www.ncl.ucar.edu/Applications/change_netCDF.shtml</a><span style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px">.  In the attached ncl script, I open the file to be modified at line 35 and attempt the modification at line 73 (with a lot of calculations in between).  While I have double-checked that the modified field (var_mod) has the same dimensionality as the original variable (QRAIN), I am still get a segmentation fault/core dump.  Never had this problem when I tried to manipulate netcdf3 files.  Could it possibly be related to the netcdf4 compression?  It’s possible I may be trying to do something that’s no longer possible.</span><br style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px">Thanks in advance for any suggestions.</span><br style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:&#39;Segoe UI&#39;,Helvetica,Arial,sans-serif;font-size:13px">-Dusty Wheatley</span><br></div>
<br></div></div>_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Gerry Creager<div>NSSL/CIMMS</div><div><a href="tel:405.325.6371" value="+14053256371" target="_blank">405.325.6371</a></div><div>++++++++++++++++++++++</div><div><div>“Big whorls have little whorls,</div><div>That feed on their velocity; </div><div>And little whorls have lesser whorls, </div><div>And so on to viscosity.” </div><div>Lewis Fry Richardson (1881-1953)</div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Gerry Creager<div>NSSL/CIMMS</div><div>405.325.6371</div><div>++++++++++++++++++++++</div><div><div>“Big whorls have little whorls,</div><div>That feed on their velocity; </div><div>And little whorls have lesser whorls, </div><div>And so on to viscosity.” </div><div>Lewis Fry Richardson (1881-1953)</div></div></div></div>
</div>