<div dir="ltr"><div>Bonjour Adriana,</div><div><br></div><div>The<b> <span style="color:rgb(241,194,50)">golden rule of data processing</span> </b>:<b> "Look at your data" </b> :-)<br></div><div><br></div><div>NCL examples are for illustration on how to process and plot. The following example:<br></div><div><br></div><div><a href="https://www.ncl.ucar.edu/Applications/gfed.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Applications/gfed.shtml</a><br>
"gfed_3.ncl"</div><div><br></div><div>expects a file containing "<b>groups" with <span style="color:rgb(0,0,255)">monthly mean data only</span>.</b> <span style="color:rgb(255,0,0)"><b>No daily data.</b></span></div><div><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,0)">As noted in the documentation: </span><b>Convert all yearly (12 months) GFED HDF5 files ...</b></span></div><div><br></div><div>See attached: <b>dump.hdf5.GFED4.1s_1997</b></div><div><b><br></b></div><div><b>%> <a href="https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml">ncl_filedump</a> </b>GFED4.1s_1997.hdf5<b> >! </b>dump.hdf5.GFED4.1s_1997</div><div><br></div><div>Specifically: It has groups: <b>ancill</b>, <b>biosphere</b>, <b>burned _area, emissions.</b></div><div>Each group has its own set of variables. Group <b>emissions</b> has *many* variables.<br></div><div><b></b></div><div><br></div><div>eg: group: <b>biosphere</b>/</div><div>contains "groups" with months: <b>01, 02, ..., 12.</b> <br></div><div>Within each <b>monthly</b> group, the variables are: <b>BB, NPP, Rh</b></div><div><br></div><div>Hence, data import paths would be:<br></div><div>biosphere/01/BB, biosphere/01/NPP, biosphere/01/Rh</div><div>biosphere/02/BB, biosphere/02/NPP, biosphere/02/Rh</div><div>etc</div><div><br></div><div>For some user applications, this approach works. If a user wants a specific variable for a particular month <br></div><div><br></div><div> npp = f->biosphere/02/NPP ; get NPP for February of current year [ <b>(:,:)</b> ], two dimensions<br></div><div><br></div><div>However, if a user wants to perform statistics over many years, this approach is rather cumbersome. <br></div><div>It is incumbent on the user to import each year-month value and correctly place into an array (say): npp(time,lat,lon)</div><div>for subsequent processing.</div><div><br></div><div>---</div><div>The "<b>GFED4.1s_2017_<span style="color:rgb(255,0,255)">beta</span>.hdf5</b>" you refer to contains monthly and *<b>daily</b>* data. The <b>ancill </b>group is the same. <br></div><div>However, there is *no* <b>burned_area </b>group. [a] I looked, [b] I used the following</div><div><br></div><div>ncl 0> f = addfile("GFED4.1s_2017_beta.hdf5","r")<br>ncl 1> gNames = getfilegrpnames (f) ; get names of all groups on file <br>ncl 2> nNames = dimsizes (gNames) ; number of groups on the file<br>ncl 3> print (nNames) <br>ncl 4> print(gNames)</div><div><br></div><div>Variable: gNames<br>Type: string<br>Total Size: 400 bytes<br> 50 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [50]<br>Coordinates: <br>(0) /ancill<br>(1) /emissions<br>(2) /emissions/01<br>(3) /emissions/02<br>(4) /emissions/03<br>(5) /emissions/04<br>(6) /emissions/05<br>(7) /emissions/06<br>(8) /emissions/07<br>(9) /emissions/08<br>(10) /emissions/09<br>(11) /emissions/10<br>(12) /emissions/11<br>(13) /emissions/12<br>(14) /emissions/01/daily_fraction<br>(15) /emissions/01/diurnal_cycle<br>(16) /emissions/01/partitioning<br>(17) /emissions/02/daily_fraction<br>(18) /emissions/02/diurnal_cycle</div><div>[snip]<br></div><div><br></div><div>I added the following print to gfed_3.ncl <br></div><div>To see where the Segfault is coming from I added the following two print statements to the gfed_3.ncl example:</div><div><br></div><div><b>print("burned_area")</b><br> bf = get_gefd_var(f, "burned_area", "burned_fraction", time, lat,lon) <span style="color:rgb(255,0,0)"><b>; <== Segfault</b></span><br><b>print("burned_area_source")</b><br> src = get_gefd_var(f, "burned_area", "source", time, lat,lon)</div><div><br></div><div>This Segfault occurred when NCL is trying to access a group that does not exist!</div><div>Likely, a warging should have been issued but .... it was not.<br></div><div><br></div><div>====</div><div>I'll stop here. Hopefully, this explanation is of some value.</div><div>You could alter gfed_3.ncl to extract the desired data. However, it will require some work. I'll help you if you want.</div><div><br></div><div>Cheers</div><div>D<br></div><div><br></div><br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2019 at 8:36 AM Adriana via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I am using one ncl example script for read and convert GFED4 (hdf5) <br>
files in netcdf files. I have downoaled the example 3 from here:<br>
<a href="https://www.ncl.ucar.edu/Applications/gfed.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Applications/gfed.shtml</a><br>
"gfed_3.ncl"<br>
<br>
But now when I try to run for read and convert my file doesn't work<br>
My current version of ncl is 6.6.2<br>
I attached the ncl_script with my little modification.<br>
<br>
There is any "knowed" problems with this?<br>
<br>
I appreciate any help<br>
<br>
Thank you<br>
<br>
Adriana<br>
<br>
<br>
-- <br>
Adriana Bossolasco<br>
LPC2E UMR 7328 (CNRS, Université d'Orléans)<br>
3A avenue de la Recherche Scientifique<br>
45071 Orléans Cedex 2 - FRANCE<br>
Tel +33 (0)2 38 25 52 85<br>
e-mail: <a href="mailto:adriana.bossolasco@cnrs-orleans.fr" target="_blank">adriana.bossolasco@cnrs-orleans.fr</a>_______________________________________________<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/mailman/listinfo/ncl-talk</a></blockquote></div>