<div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">To confirm Dennis' suspicion that this file is invalid, h5dump also fails on this file:</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br>$ h5dump 3A-MO.GPM.DPR.V2-20170217.<wbr>20151201-S000000-E235959.12.<wbr>V05A.HDF5<br>h5dump error: unable to open file "3A-MO.GPM.DPR.V2-20170217.<wbr>20151201-S000000-E235959.12.<wbr>V05A.HDF5"</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">The reason NCL gives a NetCDF library error message is that it first checks to see whether the file is HDF5. When that fails it tries to open it as a NetCDF file, which results in an error message from the NetCDF library.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"> -dave</div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 23, 2018 at 11:12 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@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 Laura<br><br></div></div>I may be wrong about NCL's standard variable & file structures but I am pretty sure it is based on the classic netCDF-3 file and variable models. <br><br>[a] <br>There is no concept of multiple levels of data. netCDF-3 files are 'flat.' To accommodate this 'flat' nature, all variable names must be unique. <br><br>[b] <br>HDF5/netCDF4 allow multiple levels [eg: 'groups']. A variable [eg: FOO] can exist in several groups with the same name and refer to completely different quantities.<br></div><div><div><br></div><div>---<br><br></div><div>From setfileoption<br></div><div><p>
"In version <b>6.1.1</b>, this option only has an effect for classic model NetCDF files (including NetCDF4 classic files).
But other than the difference in print output, there should be no difference in the way classic model NetCDF
is read or written, regardless of the file structure.
</p><p>
However, beginning with <a href="http://www.ncl.ucar.edu/prev_releases.shtml#6.2.0" target="_blank">version 6.2.0</a>,
this option will work for HDF-EOS5 and shapefiles. Choosing the <i>"Advanced"</i> file structure will allow the user
to <b>view these file formats using a representation closer to the structure implied by the native format.</b>
Conversely, the <i>"Standard"</i> structure will remain available to let you to view the contents as you alway have;
in other words backwards compatibility is maintained.
Eventually other supported formats that can make ues of the advanced features, including HDF4 and HDFEOS2, may
also be enabled to use the <i>"Advanced"</i> file structure.
</p><p>[Further ...]<br>
</p><p>
Like full model NetCDF4, HDF5 will be implemented using the <i>"Advanced"</i> file structure only." <br></p><p>The above should read:</p><p>Like full model NetCDF4, HDF5 will be <b>automatically</b> implemented using the <i>"Advanced"</i> file structure only." <br></p><p>&&&&&&&&&&&&&</p><p>There is a GPM example at:<br></p><p><a href="https://www.ncl.ucar.edu/Applications/HiResPrc.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/HiResPrc.shtml</a></p><p><a href="https://www.ncl.ucar.edu/Applications/Scripts/gpm_1.ncl" target="_blank">gpm_1.ncl</a></p><p>&&&&&&&&&&&&&</p><div>I think there is something wrong with the file you ftp'd:<br></div><div><br>%> ncl_filedump 3A-MO.GPM.DPR.V2-20170217.2015<wbr>1201-S000000-E235959.12.V05A.<wbr>HDF5<br><br> Copyright (C) 1995-2017 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.5.0 -29Mar2018_0148<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>Assertion failed: (0), function NC4_open, file nc4file.c, line 2874.<br>Abort<br><br>-----<br><br>%> ncdump -k<b> 3A</b>-MO.GPM.DPR.V2-20170217.2015<wbr>1201-S000000-E235959.12.V05A.<wbr>HDF5<br><br>Assertion failed: (0), function NC4_open, file nc4file.c, line 2874.<br><br>-----<br><br></div>To illustrate that 'ncdump -k' works, I have used it on a different GPM file:<br><br>%> ncdump -k <b>3B-</b>MO.MS.MRG.3IMERG.20140312-S<wbr>000000-E235959.03.V03D.HDF5<br><br><b>netCDF-4<br><br>-----<br></b></div><div><b>For NCL-core developres, the file is at:<br><br>/glade/p/ncldev/data/gpm<br></b></div><div><p><br></p><p><br></p></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 22, 2018 at 2:19 PM, Laura Fowler <span dir="ltr"><<a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello:<br>
Just a couple of quick questions:<br>
<br>
<br>
1. I am reading an HDF5 file containing GPM data and I was wondering<br>
if there was a description of the command:<br>
setfileoption("h5","FileStruct<wbr>ure","Advanced")<br>
<br>
In the online documentation, I found that setfileoption is described<br>
for netCDF and GRIB, but not for HDF5?<br>
<br>
<br>
2. I read the HDF5 file and define the group g2 as:<br>
<br>
g2 = f=>/Grids/G2<br>
mean = g2->precipRateNearSurfaceUncon<wbr>ditional<br>
.<br>
.<br>
.<br>
<br>
After I plot the variable mean, I am trying to open an other group g2 as:<br>
ichn = 3<br>
g2 = f=>/Grids/G2/precipRateNearSur<wbr>face<br>
mean = g2->mean(:,ichn,:,:)<br>
<br>
Then, I get the error message:<br>
fatal:["Execute.c":132]:variab<wbr>le (mean) is not in file<br>
(3A-MO.GPM.DPR.V2-20170217.201<wbr>51201-S000000-E235959.12.V05A.<wbr>HDF5)<br>
fatal:["Execute.c":6316]:varia<wbr>ble (mean) is not in file (g2)<br>
fatal:["Execute.c":8575]:Execu<wbr>te: Error occurred at or near line 95 in<br>
file read.ncl<br>
<br>
<br>
If I add the 2 lines:<br>
delete(mean)<br>
delete(g2)<br>
<br>
then I get the following error:<br>
fatal:file (g2) isn't defined<br>
<br>
<br>
Is there a way to reuse g2 for the second group? I thought that<br>
deleting it first would work but it does not?<br>
<br>
Thanks,<br>
Laura<br>
<br>
<br>
<br>
-- <br>
!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------<br>
Laura D. Fowler<br>
Mesoscale and Microscale Meteorology Division (MMM)<br>
National Center for Atmospheric Research<br>
P.O. Box 3000, Boulder CO 80307-3000<br>
<br>
e-mail: <a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a><br>
phone: 303-497-1628<br>
<br>
!-----------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------<br>
______________________________<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>
</blockquote></div><br></div>
</div></div><br>______________________________<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>