<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 "NclFileAddGrp: Old File Structure DO NOT Support Group" 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 = "/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc/" target="_blank">nc4uvt.nc</a>"</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, "r")</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->time</span></div><div><span style="font-size:12.8px">; lev = fi->lev</span></div><div><span style="font-size:12.8px">; lat = fi->lat</span></div><div><span style="font-size:12.8px">; lon = fi->lon</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">; t = fi->T</span></div><div><span style="font-size:12.8px">; u = fi->U</span></div><div><span style="font-size:12.8px">; v = fi->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"><<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>></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 "commented the three lines below". 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 <<a href="mailto:dscpln@gmail.com">dscpln@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to write out one variable in HDF5 format in an NCL script<br>
> following the commands on the web page<br>
> <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>
> are calculated in the NCL script, I commented the three lines below.<br>
> However, I got the error message "NclFileAddGrp: Old File Structure DO NOT<br>
> Support Group." as follows. Could anyone indicate how to fix this error?<br>
><br>
> Thanks much,<br>
><br>
> Yi-Chih<br>
><br>
><br>
> fatal:["FileSupport.c":1638]:_<wbr>NclFileAddGrp: Old File Structure DO NOT<br>
> Support Group.<br>
> ^Mfatal:["FileSupport.c":1638]<wbr>:_NclFileAddGrp: Old File Structure DO NOT<br>
> Support Group.<br>
> ^Mfatal:["FileSupport.c":1638]<wbr>:_NclFileAddGrp: Old File Structure DO NOT<br>
> Support Group.<br>
> ^Mfatal:["Execute.c":8128]:<wbr>Execute: Error occurred at or near line 340 in<br>
> file q_ln-ln_pre_q01.ncl<br>
><br>
> ##############################<wbr>############<br>
> ; fn = "/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc" rel="noreferrer" target="_blank">nc4uvt.nc</a>"<br>
><br>
> ; fi = addfile(fn, "r")<br>
><br>
> ; fAtt@source_file = fn<br>
><br>
> ##############################<wbr>############ as on the web page<br>
> <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>
><br>
> Write HDF5 file with group:<br>
><br>
> setfileoption("nc", "FileStructure", "Advanced")<br>
><br>
> fn = "/Users/huangwei/myncl/nc4_<wbr>work/wrtgroup/<a href="http://nc4uvt.nc" rel="noreferrer" target="_blank">nc4uvt.nc</a>"<br>
><br>
> fi = addfile(fn, "r")<br>
><br>
> ;printVarSummary(fi)<br>
> ;print(fi)<br>
><br>
> time = fi->time<br>
> lev = fi->lev<br>
> lat = fi->lat<br>
> lon = fi->lon<br>
><br>
> t = fi->T<br>
> u = fi->U<br>
> v = fi->V<br>
><br>
> ;printVarSummary(t)<br>
> ;printVarSummary(u)<br>
> ;printVarSummary(v)<br>
><br>
> ;print("t(0,0,0,0) = " + t(0,0,0,0))<br>
> ;print("u(0,1,1,1) = " + u(0,1,1,1))<br>
> ;print("v(0,2,2,2) = " + v(0,2,2,2))<br>
><br>
> ;print("t&lat(0) = " + t&lat(0))<br>
> ;print("t@units = " + t@units)<br>
> ;print("u@units = " + u@units)<br>
> ;print("v@units = " + v@units)<br>
><br>
> ;u1 = fi->U(::2)<br>
> ;v1 = fi->V(3:121:3)<br>
><br>
> ntim = dimsizes(time) ; get dimension sizes<br>
> nlev = dimsizes(lev)<br>
> nlat = dimsizes(lat)<br>
> nlon = dimsizes(lon)<br>
><br>
> ;-----------------------------<wbr>------------------------------<wbr>-<br>
> setfileoption("h5", "FileStructure", "Advanced")<br>
><br>
> fon = "ncl_wrt_uvt.h5"<br>
> system("/bin/rm -f " + fon) ; remove if exists<br>
> fo = addfile(fon, "c")<br>
><br>
> ;=============================<wbr>==============================<wbr>========<br>
> ; explicitly declare file definition mode. Improve efficiency.<br>
> ;=============================<wbr>==============================<wbr>========<br>
> ;setfileoption(fo,"<wbr>CompressionLevel", 6)<br>
> ;setfileoption(fo,"CacheSize", 3200000)<br>
> ;setfileoption(fo,"<wbr>CacheNelems", 1027)<br>
> ;setfileoption(fo,"<wbr>CachePreemption", 0.25)<br>
><br>
> ..............<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
</blockquote></div><br></div>