<div dir="ltr">David,<div><br></div><div>     I am working on Version 6.1.2.  I created one variable to output in my NCL script instead of the fn file.  Thus, I commented all the fn and fi below for consistency.  I got <span style="font-size:12.8px">the error message &quot;NclFileAddGrp: Old File Structure DO NOT Support Group&quot; over and over again and wonder how to fix this error?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">    Thanks,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">                    Yi-Chih<br></span><div><br></div><div><div style="font-size:12.8px"><div>;<span style="color:rgb(0,0,0);font-family:courier;font-size:13.3333px"> fn = &quot;/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc/" target="_blank">nc4uvt.nc</a>&quot;</span></div><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0)">; fi = addfile(fn, &quot;r&quot;)</pre></div><div style="font-size:12.8px">;  fAtt@source_file   = fn</div></div></div><div style="font-size:12.8px"><br></div><div><div><span style="font-size:12.8px">; time = fi-&gt;time</span></div><div><span style="font-size:12.8px">; lev = fi-&gt;lev</span></div><div><span style="font-size:12.8px">; lat = fi-&gt;lat</span></div><div><span style="font-size:12.8px">; lon = fi-&gt;lon</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">; t = fi-&gt;T</span></div><div><span style="font-size:12.8px">; u = fi-&gt;U</span></div><div><span style="font-size:12.8px">; v = fi-&gt;V</span></div><div style="font-size:12.8px"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 16, 2017 at 3:09 AM, David Brown <span dir="ltr">&lt;<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yi-Chih,<br>
<br>
I tried running the script you pointed to using NCL 6.4.0 and there<br>
were no errors. I am not sure what you mean<br>
by &quot;commented the three lines below&quot;. Which lines specifically are you<br>
referring to? Also which version of NCL are you running?<br>
 -dave<br>
<div><div class="h5"><br>
<br>
On Sat, Aug 12, 2017 at 3:10 AM, Yi-Chih Huang &lt;<a href="mailto:dscpln@gmail.com">dscpln@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt;     I am trying to write out one variable in HDF5 format in an NCL script<br>
&gt; following the commands on the web page<br>
&gt; <a href="https://www.ncl.ucar.edu/Applications/hdf5.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/hdf5.shtml</a>.  Because the output data<br>
&gt; are calculated in the NCL script, I commented the three lines below.<br>
&gt; However, I got the error message &quot;NclFileAddGrp: Old File Structure DO NOT<br>
&gt; Support Group.&quot; as follows.  Could anyone indicate how to fix this error?<br>
&gt;<br>
&gt;     Thanks much,<br>
&gt;<br>
&gt;                    Yi-Chih<br>
&gt;<br>
&gt;<br>
&gt; fatal:[&quot;FileSupport.c&quot;:1638]:_<wbr>NclFileAddGrp: Old File Structure DO NOT<br>
&gt; Support Group.<br>
&gt; ^Mfatal:[&quot;FileSupport.c&quot;:1638]<wbr>:_NclFileAddGrp: Old File Structure DO NOT<br>
&gt; Support Group.<br>
&gt; ^Mfatal:[&quot;FileSupport.c&quot;:1638]<wbr>:_NclFileAddGrp: Old File Structure DO NOT<br>
&gt; Support Group.<br>
&gt; ^Mfatal:[&quot;Execute.c&quot;:8128]:<wbr>Execute: Error occurred at or near line 340 in<br>
&gt; file q_ln-ln_pre_q01.ncl<br>
&gt;<br>
&gt; ##############################<wbr>############<br>
&gt; ; fn = &quot;/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc" rel="noreferrer" target="_blank">nc4uvt.nc</a>&quot;<br>
&gt;<br>
&gt; ; fi = addfile(fn, &quot;r&quot;)<br>
&gt;<br>
&gt; ;  fAtt@source_file   = fn<br>
&gt;<br>
&gt; ##############################<wbr>############     as on the web page<br>
&gt; <a href="https://www.ncl.ucar.edu/Applications/hdf5.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/hdf5.shtml</a><br>
&gt;<br>
&gt;       Write HDF5 file with group:<br>
&gt;<br>
&gt;  setfileoption(&quot;nc&quot;, &quot;FileStructure&quot;, &quot;Advanced&quot;)<br>
&gt;<br>
&gt;  fn = &quot;/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc" rel="noreferrer" target="_blank">nc4uvt.nc</a>&quot;<br>
&gt;<br>
&gt;  fi = addfile(fn, &quot;r&quot;)<br>
&gt;<br>
&gt; ;printVarSummary(fi)<br>
&gt; ;print(fi)<br>
&gt;<br>
&gt;  time = fi-&gt;time<br>
&gt;  lev = fi-&gt;lev<br>
&gt;  lat = fi-&gt;lat<br>
&gt;  lon = fi-&gt;lon<br>
&gt;<br>
&gt;  t = fi-&gt;T<br>
&gt;  u = fi-&gt;U<br>
&gt;  v = fi-&gt;V<br>
&gt;<br>
&gt; ;printVarSummary(t)<br>
&gt; ;printVarSummary(u)<br>
&gt; ;printVarSummary(v)<br>
&gt;<br>
&gt; ;print(&quot;t(0,0,0,0) = &quot; + t(0,0,0,0))<br>
&gt; ;print(&quot;u(0,1,1,1) = &quot; + u(0,1,1,1))<br>
&gt; ;print(&quot;v(0,2,2,2) = &quot; + v(0,2,2,2))<br>
&gt;<br>
&gt; ;print(&quot;t&amp;lat(0) = &quot; + t&amp;lat(0))<br>
&gt; ;print(&quot;t@units = &quot; + t@units)<br>
&gt; ;print(&quot;u@units = &quot; + u@units)<br>
&gt; ;print(&quot;v@units = &quot; + v@units)<br>
&gt;<br>
&gt; ;u1 = fi-&gt;U(::2)<br>
&gt; ;v1 = fi-&gt;V(3:121:3)<br>
&gt;<br>
&gt;  ntim  = dimsizes(time)       ; get dimension sizes<br>
&gt;  nlev  = dimsizes(lev)<br>
&gt;  nlat  = dimsizes(lat)<br>
&gt;  nlon  = dimsizes(lon)<br>
&gt;<br>
&gt; ;-----------------------------<wbr>------------------------------<wbr>-<br>
&gt;  setfileoption(&quot;h5&quot;, &quot;FileStructure&quot;, &quot;Advanced&quot;)<br>
&gt;<br>
&gt;  fon = &quot;ncl_wrt_uvt.h5&quot;<br>
&gt;  system(&quot;/bin/rm -f &quot; + fon) ; remove if exists<br>
&gt;  fo = addfile(fon, &quot;c&quot;)<br>
&gt;<br>
&gt; ;=============================<wbr>==============================<wbr>========<br>
&gt; ; explicitly declare file definition mode. Improve efficiency.<br>
&gt; ;=============================<wbr>==============================<wbr>========<br>
&gt; ;setfileoption(fo,&quot;<wbr>CompressionLevel&quot;, 6)<br>
&gt; ;setfileoption(fo,&quot;CacheSize&quot;, 3200000)<br>
&gt; ;setfileoption(fo,&quot;<wbr>CacheNelems&quot;, 1027)<br>
&gt; ;setfileoption(fo,&quot;<wbr>CachePreemption&quot;, 0.25)<br>
&gt;<br>
&gt; ..............<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
&gt;<br>
</blockquote></div><br></div>