<div dir="ltr">Hi,<div><br></div><div>I was trying to read global fire emission dataset v4 in hdf4 format. I searched online and couldn&#39;t find any examples how to read groups within group. My code is as follows:</div><div><br></div><div><div>; read hdf5 fire dataset</div><div>begin</div><div>setfileoption(&quot;h5&quot;, &quot;FileStructure&quot;, &quot;Advanced&quot;)</div><div>f = addfile(&quot;GFED4.0s_1997.hdf5&quot;,&quot;r&quot;)</div><div>grps = getfilegroups(f,&quot;/&quot;,0)</div><div>print(grps)</div><div>grps2 = getfilegroups(f,&quot;/emissions/&quot;,0)</div><div>print(grps2)</div><div>lat = f-&gt;lat</div><div>lon = f-&gt;lon</div><div>printVarSummary(lat)</div><div>printVarSummary(lon)</div><div>g = f=&gt;ancill</div><div>gridarea = g-&gt;grid_cell_area</div><div>printVarSummary(gridarea)</div><div>emissions = f=&gt;emissions</div></div><div><br></div><div>in the dataset, emissions is a group which contains two subgroups (month and partitioning) (see below). </div><div><br></div><div>







<p class=""><span class="">group: emissions {</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">  group: \01 {</span></p>
<p class=""><span class="">    dimensions:</span></p>
<p class=""><span class="">    <span class="">        </span>phony_dim_52 = 720 ;</span></p>
<p class=""><span class="">    <span class="">        </span>phony_dim_53 = 1440 ;</span></p>
<p class=""><span class="">    variables:</span></p>
<p class=""><span class="">    <span class="">        </span>float C(phony_dim_52, phony_dim_53) ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string C:long_name = &quot;GFED4s biomass burning carbon emissions&quot; ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string C:units = &quot;g C / m^2 / month&quot; ;</span></p>
<p class=""><span class="">    <span class="">        </span>float DM(phony_dim_52, phony_dim_53) ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string DM:long_name = &quot;GFED4s biomass burning dry matter emissions&quot; ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string DM:units = &quot;kg DM / m^2 / month&quot; ;</span></p>
<p class=""><span class="">    <span class="">        </span>float small_fire_fraction(phony_dim_52, phony_dim_53) ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string small_fire_fraction:long_name = &quot;Fraction of total GFED4s biomass burning emissions originating from \&quot;small fire burned area\&quot;&quot; ;</span></p>
<p class=""><span class="">    <span class="">        </span><span class="">        </span>string small_fire_fraction:units = &quot;Unitless (fraction)&quot; ;</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    group: partitioning {</span></p>
<p class=""><span class="">      dimensions:</span></p>
<p class=""><span class="">      <span class="">        </span>phony_dim_50 = 720 ;</span></p>
<p class=""><span class="">      <span class="">        </span>phony_dim_51 = 1440 ;</span></p>
<p class=""><span class="">      variables:</span></p>
<p class=""><span class="">      <span class="">        </span>float C_AGRI(phony_dim_50, phony_dim_51) ;</span></p>
<p class=""><span class="">      <span class="">        </span><span class="">        </span>string C_AGRI:long_name = &quot;Contribution of agricultural waste burning to total monthly biomass burning carbon emissions&quot; ;</span></p>
<p class=""><span class="">      <span class="">        </span><span class="">        </span>string C_AGRI:units = &quot;Unitless&quot; ;</span></p>
<p class=""><span class="">      <span class="">        </span>float C_BORF(phony_dim_50, phony_dim_51) ;</span></p>
<p class=""><span class="">      <span class="">        </span><span class="">        </span>string C_BORF:long_name = &quot;Contribution of boreal forest fires to total monthly biomass burning carbon emissions&quot; ;</span></p>
<p class=""><span class="">      <span class="">        </span><span class="">        </span>string C_BORF:units = &quot;Unitless&quot; ;</span></p></div><div><br></div><div>So my question is how to read the monthly emissions and partitioning associated with each month into an array. </div><div>Thanks,</div><div>Lei Meng</div><div><br></div></div>