<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">the error message is:</div><div class=""><br class=""></div><div class="">fatal:Undefined identifier: (byte2flt) is undefined, can't continue</div><div class=""><br class=""></div><div class="">it is not finding the function “byte2flt"</div><div class="">on the documentation page, this one: &lt;<a href="http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml" class="">http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml</a>&gt;</div><div class="">it says that such function is in the “contributed” file.</div><div class=""><br class=""></div><div class="">you need to add statements such as:</div><div class=""><pre class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/<a href="http://ncl.ucar.edu/Document/Functions/Contributed/contrib.shtml" class="">contributed.ncl</a>"</pre><div class="">at the beginning of your script, actually before the “begin”</div></div><div class=""><br class=""></div><div class="">I have all of these in my scripts:</div><div class=""><br class=""></div><div class=""><div class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div></div><div class=""><br class=""></div><div class="">hope this helps!</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div class="">
<div class="">--&nbsp;<br class="">Alessandra Giannini<br class="">IRI for Climate and Society - The Earth Institute at Columbia University<br class="">P.O. Box 1000, Palisades NY 10964-8000<br class="">phone/fax: +1 845 680-4473/4864 - email:&nbsp;<a href="mailto:alesall@iri.columbia.edu" class="">alesall@iri.columbia.edu</a></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 5, 2016, at 8:57 AM, Benjamin Alabi &lt;<a href="mailto:alabibenjamin2@gmail.com" class="">alabibenjamin2@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class="">Goodday sir,<br class=""></div>I appreciate your effort in guiding me. I'm new in this platform, please dont be offended by sending the message three times, I'm just learning to get help from here. <br class=""></div>I used the script, <br class="">begin<br class="">file_name_read = "merg_2012090101_4km-pixel"<br class=""><br class="">ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte")) +75.0<br class=""><br class=""><br class="">lon_g = fspan(0.0182,360,9896)<br class="">lat_g = fspan(59.982,59.982-0.036383683*3298,3298)<br class="">&nbsp;<br class="">lon_g@units&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "degrees_east"<br class="">lon_g@long_name&nbsp; = "longitude"<br class="">lon_g@short_name = "longitude"<br class="">lon_g!0 = "lon"<br class="">lon_g&amp;lon = lon_g<br class=""><br class="">lat_g@units&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "degrees_north"<br class="">lat_g@long_name&nbsp; = "latitude"<br class="">lat_g@short_name = "latitude"<br class="">lat_g!0 = "lat"<br class="">lat_g&amp;lat = lat_g<br class=""><br class=""><br class="">ir_u!0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "time"<br class="">ir_u!1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "lat"<br class="">ir_u!2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "lon"<br class=""><br class="">ir_u&amp;lat&nbsp;&nbsp;&nbsp; = lat_g<br class="">ir_u&amp;lon&nbsp;&nbsp;&nbsp; = lon_g<br class=""><br class="">ir_u@_FillValue= 255+75.0<br class=""><br class=""><br class="">wks = gsn_open_wks("X11","")<br class="">res = True<br class="">res@cnFillOn = True<br class="">res@cnFillMode = "RasterFill"<br class="">res@cnLinesOn = False<br class="">plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)<br class=""><br class="">ncout = addfile(file_name_read+".nc","c")<br class="">ncout-&gt;ir_data = ir_u<br class=""><br class="">end<br class=""><br class=""></div>But it was generating this error:<br class="">fatal:Undefined identifier: (byte2flt) is undefined, can't continue<br class="">fatal:["Execute.c":7741]:Execute: Error occurred at or near line 41<br class=""><br class=""></div>Waiting for guide, Thanks.<br class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Feb 4, 2016 at 8:07 PM, Alan Brammer <span dir="ltr" class="">&lt;<a href="mailto:abrammer@albany.edu" target="_blank" class="">abrammer@albany.edu</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Forgot the offset, which is mentioned in the link Kevin sent.&nbsp;<div class=""><br class=""></div><div class=""><br class=""><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class="">ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte"))<b class=""> +75.</b></div></div></div></div><div class=""><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class="">ir_u@_FillValue= 255<b class="">+75.</b></div></div></div></div></div><div class=""><br class=""></div><div class="">"<span style="white-space:pre-wrap" class="">Each record is a 9896 x 3298 Fortran array of IR brightness temperatures that have </span><span style="white-space:pre-wrap" class="">been scaled to fit into 1-byte by subtracting "75" from each datum.  Therefore it </span><span style="white-space:pre-wrap" class="">is necessary for the user to add a value of "75" to each data value when using the </span><span style="white-space:pre-wrap" class="">data."</span></div><div class=""><div class="h5"><br class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 4 Feb 2016, at 13:30, Alan Brammer &lt;<a href="mailto:abrammer@albany.edu" target="_blank" class="">abrammer@albany.edu</a>&gt; wrote:</div><br class=""><div class=""><div style="word-wrap:break-word" class="">ok, wow. Don’t send the same message 3 times, if the first answers weren’t complete at least expand and attempt something not just copy paste the same lines again. &nbsp;<div class=""><br class=""></div><div class=""><div class="">as said before .Z means it’s compressed. &nbsp;gunzip&nbsp;merg_2016020123_4km-pixel.Z &nbsp;will uncompress it. Then you have a binary file as a small amount of googling would have told you. &nbsp;</div><div class="">The same search would have linked you to various messages on here and various scripts where other people have included simple examples of this file type (myself included). Here is an example of reading and making a simple plot.&nbsp; There are plenty of examples on how to write netcdf on the NCL website so you should develop code from there.&nbsp; Most simple example at bottom of script below.&nbsp;</div><div class=""><a href="https://www.ncl.ucar.edu/Applications/o-netcdf.shtml" target="_blank" class="">https://www.ncl.ucar.edu/Applications/o-netcdf.shtml</a></div><div class=""><br class=""></div><div class="">Read the documentation on the below functions and understand what is occurring .</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">begin</div><div class=""><div class="">file_name_read = "merg_2016020123_4km-pixel"</div><div class=""><br class=""></div><div class="">ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte"))&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">lon_g = fspan(0.0182,360,9896)</div><div class="">lat_g = fspan(59.982,59.982-0.036383683*3298,3298)</div><div class="">&nbsp;</div><div class="">lon_g@units &nbsp; &nbsp; &nbsp;= "degrees_east"</div><div class="">lon_g@long_name &nbsp;= "longitude"</div><div class="">lon_g@short_name = "longitude"</div><div class="">lon_g!0 = "lon"</div><div class="">lon_g&amp;lon = lon_g</div><div class=""><br class=""></div><div class="">lat_g@units &nbsp; &nbsp; &nbsp;= "degrees_north"</div><div class="">lat_g@long_name &nbsp;= "latitude"</div><div class="">lat_g@short_name = "latitude"</div><div class="">lat_g!0 = "lat"</div><div class="">lat_g&amp;lat = lat_g</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">ir_u!0 &nbsp; &nbsp; &nbsp;= "time"</div><div class="">ir_u!1 &nbsp; &nbsp; &nbsp;= "lat"</div><div class="">ir_u!2 &nbsp; &nbsp; &nbsp;= "lon"</div><div class=""><br class=""></div><div class="">ir_u&amp;lat &nbsp; &nbsp;= lat_g</div><div class="">ir_u&amp;lon &nbsp; &nbsp;= lon_g</div><div class=""><br class=""></div><div class="">ir_u@_FillValue= 255</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">wks = gsn_open_wks("X11","")</div><div class="">res = True</div><div class="">res@cnFillOn = True</div><div class="">res@cnFillMode = "RasterFill"</div><div class="">res@cnLinesOn = False</div><div class="">plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)</div></div><div class=""><br class=""></div><div class="">ncout = addfile(file_name_read+”.nc”,”c”)</div><div class="">ncout-&gt;ir_data = ir_u</div><div class=""><br class=""></div><div class="">end</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 4 Feb 2016, at 13:04, Benjamin Alabi &lt;<a href="mailto:alabibenjamin2@gmail.com" target="_blank" class="">alabibenjamin2@gmail.com</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">Thanks for your assistance sir. I've tried the cdo to get general information on the data, but it didn't work<br class="">I need help from someone that can guide me to convert this data format - 'merg_2012091000_4km-pixel.Z' to netcdf format.<br class="">I
 download Gobally-merged (60N-60S) pixel-resolution IR brightness 
temperature data (equivalent blackbody temps), merged from all available
 geostationary satellites (GOES-8/10, METEOSAT-7/5)<br class="">This is the link:<br class=""><a href="http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&amp;dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&amp;project=TRMM&amp;dataGroup=Ancillary&amp;version=001&amp;CGISESSID=25c6337b80163b3743e8bea85d015558" target="_blank" class="">http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&amp;dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&amp;project=TRMM&amp;dataGroup=Ancillary&amp;version=001&amp;CGISESSID=25c6337b80163b3743e8bea85d015558</a>.<br class=""></div>I really want it to be in netcdf format.<br class=""><br class=""></div>Regard<br class=""><br class=""><br class=""></div><br class=""></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></body></html>