<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'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("h5", "FileStructure", "Advanced")</div><div>f = addfile("GFED4.0s_1997.hdf5","r")</div><div>grps = getfilegroups(f,"/",0)</div><div>print(grps)</div><div>grps2 = getfilegroups(f,"/emissions/",0)</div><div>print(grps2)</div><div>lat = f->lat</div><div>lon = f->lon</div><div>printVarSummary(lat)</div><div>printVarSummary(lon)</div><div>g = f=>ancill</div><div>gridarea = g->grid_cell_area</div><div>printVarSummary(gridarea)</div><div>emissions = f=>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 = "GFED4s biomass burning carbon emissions" ;</span></p>
<p class=""><span class=""> <span class="">        </span><span class="">        </span>string C:units = "g C / m^2 / month" ;</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 = "GFED4s biomass burning dry matter emissions" ;</span></p>
<p class=""><span class=""> <span class="">        </span><span class="">        </span>string DM:units = "kg DM / m^2 / month" ;</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 = "Fraction of total GFED4s biomass burning emissions originating from \"small fire burned area\"" ;</span></p>
<p class=""><span class=""> <span class="">        </span><span class="">        </span>string small_fire_fraction:units = "Unitless (fraction)" ;</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 = "Contribution of agricultural waste burning to total monthly biomass burning carbon emissions" ;</span></p>
<p class=""><span class=""> <span class="">        </span><span class="">        </span>string C_AGRI:units = "Unitless" ;</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 = "Contribution of boreal forest fires to total monthly biomass burning carbon emissions" ;</span></p>
<p class=""><span class=""> <span class="">        </span><span class="">        </span>string C_BORF:units = "Unitless" ;</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>