<p dir="ltr">Alessandra gave you the needed lines. <br>
Though this error also suggests you&#39;re using an older version of NCL, you shouldn&#39;t need those lines in new versions. <br>
To prevent future confusion and errors it&#39;s strongly recommended you upgrade to the current version 6.3.0. </p>
<div class="gmail_quote">On 5 Feb 2016 9:03 a.m., &quot;alesall&quot; &lt;<a href="mailto:alesall@iri.columbia.edu">alesall@iri.columbia.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>the error message is:</div><div><br></div><div>fatal:Undefined identifier: (byte2flt) is undefined, can&#39;t continue</div><div><br></div><div>it is not finding the function “byte2flt&quot;</div><div>on the documentation page, this one: &lt;<a href="http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml" target="_blank">http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml</a>&gt;</div><div>it says that such function is in the “contributed” file.</div><div><br></div><div>you need to add statements such as:</div><div><pre>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/<a href="http://ncl.ucar.edu/Document/Functions/Contributed/contrib.shtml" target="_blank">contributed.ncl</a>&quot;</pre><div>at the beginning of your script, actually before the “begin”</div></div><div><br></div><div>I have all of these in my scripts:</div><div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div></div><div><br></div><div>hope this helps!</div><div><br></div><div><br></div><br><div>
<div>-- <br>Alessandra Giannini<br>IRI for Climate and Society - The Earth Institute at Columbia University<br>P.O. Box 1000, Palisades NY 10964-8000<br>phone/fax: <a href="tel:%2B1%20845%20680-4473" value="+18456804473" target="_blank">+1 845 680-4473</a>/4864 - email: <a href="mailto:alesall@iri.columbia.edu" target="_blank">alesall@iri.columbia.edu</a></div>

</div>
<br><div><blockquote type="cite"><div>On Feb 5, 2016, at 8:57 AM, Benjamin Alabi &lt;<a href="mailto:alabibenjamin2@gmail.com" target="_blank">alabibenjamin2@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr"><div><div><div><div>Goodday sir,<br></div>I appreciate your effort in guiding me. I&#39;m new in this platform, please dont be offended by sending the message three times, I&#39;m just learning to get help from here. <br></div>I used the script, <br>begin<br>file_name_read = &quot;merg_<a href="tel:2012090101" value="+12012090101" target="_blank">2012090101</a>_4km-pixel&quot;<br><br>ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),&quot;ubyte&quot;)) +75.0<br><br><br>lon_g = fspan(0.0182,360,9896)<br>lat_g = fspan(59.982,59.982-0.036383683*3298,3298)<br> <br>lon_g@units      = &quot;degrees_east&quot;<br>lon_g@long_name  = &quot;longitude&quot;<br>lon_g@short_name = &quot;longitude&quot;<br>lon_g!0 = &quot;lon&quot;<br>lon_g&amp;lon = lon_g<br><br>lat_g@units      = &quot;degrees_north&quot;<br>lat_g@long_name  = &quot;latitude&quot;<br>lat_g@short_name = &quot;latitude&quot;<br>lat_g!0 = &quot;lat&quot;<br>lat_g&amp;lat = lat_g<br><br><br>ir_u!0      = &quot;time&quot;<br>ir_u!1      = &quot;lat&quot;<br>ir_u!2      = &quot;lon&quot;<br><br>ir_u&amp;lat    = lat_g<br>ir_u&amp;lon    = lon_g<br><br>ir_u@_FillValue= 255+75.0<br><br><br>wks = gsn_open_wks(&quot;X11&quot;,&quot;&quot;)<br>res = True<br>res@cnFillOn = True<br>res@cnFillMode = &quot;RasterFill&quot;<br>res@cnLinesOn = False<br>plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)<br><br>ncout = addfile(file_name_read+&quot;.nc&quot;,&quot;c&quot;)<br>ncout-&gt;ir_data = ir_u<br><br>end<br><br></div>But it was generating this error:<br>fatal:Undefined identifier: (byte2flt) is undefined, can&#39;t continue<br>fatal:[&quot;Execute.c&quot;:7741]:Execute: Error occurred at or near line 41<br><br></div>Waiting for guide, Thanks.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 8:07 PM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Forgot the offset, which is mentioned in the link Kevin sent. <div><br></div><div><br><div style="word-wrap:break-word"><div><div><div>ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),&quot;ubyte&quot;))<b> +75.</b></div></div></div></div><div><div style="word-wrap:break-word"><div><div><div>ir_u@_FillValue= 255<b>+75.</b></div></div></div></div></div><div><br></div><div>&quot;<span style="white-space:pre-wrap">Each record is a 9896 x 3298 Fortran array of IR brightness temperatures that have </span><span style="white-space:pre-wrap">been scaled to fit into 1-byte by subtracting &quot;75&quot; from each datum.  Therefore it </span><span style="white-space:pre-wrap">is necessary for the user to add a value of &quot;75&quot; to each data value when using the </span><span style="white-space:pre-wrap">data.&quot;</span></div><div><div><br><br><div><blockquote type="cite"><div>On 4 Feb 2016, at 13:30, Alan Brammer &lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word">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.  <div><br></div><div><div>as said before .Z means it’s compressed.  gunzip merg_<a href="tel:2016020123" value="+12016020123" target="_blank">2016020123</a>_4km-pixel.Z  will uncompress it. Then you have a binary file as a small amount of googling would have told you.  </div><div>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.  There are plenty of examples on how to write netcdf on the NCL website so you should develop code from there.  Most simple example at bottom of script below. </div><div><a href="https://www.ncl.ucar.edu/Applications/o-netcdf.shtml" target="_blank">https://www.ncl.ucar.edu/Applications/o-netcdf.shtml</a></div><div><br></div><div>Read the documentation on the below functions and understand what is occurring .</div><div><br></div><div><br></div><div>begin</div><div><div>file_name_read = &quot;merg_<a href="tel:2016020123" value="+12016020123" target="_blank">2016020123</a>_4km-pixel&quot;</div><div><br></div><div>ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),&quot;ubyte&quot;)) </div><div><br></div><div><br></div><div>lon_g = fspan(0.0182,360,9896)</div><div>lat_g = fspan(59.982,59.982-0.036383683*3298,3298)</div><div> </div><div>lon_g@units      = &quot;degrees_east&quot;</div><div>lon_g@long_name  = &quot;longitude&quot;</div><div>lon_g@short_name = &quot;longitude&quot;</div><div>lon_g!0 = &quot;lon&quot;</div><div>lon_g&amp;lon = lon_g</div><div><br></div><div>lat_g@units      = &quot;degrees_north&quot;</div><div>lat_g@long_name  = &quot;latitude&quot;</div><div>lat_g@short_name = &quot;latitude&quot;</div><div>lat_g!0 = &quot;lat&quot;</div><div>lat_g&amp;lat = lat_g</div><div><br></div><div><br></div><div>ir_u!0      = &quot;time&quot;</div><div>ir_u!1      = &quot;lat&quot;</div><div>ir_u!2      = &quot;lon&quot;</div><div><br></div><div>ir_u&amp;lat    = lat_g</div><div>ir_u&amp;lon    = lon_g</div><div><br></div><div>ir_u@_FillValue= 255</div><div><br></div><div><br></div><div>wks = gsn_open_wks(&quot;X11&quot;,&quot;&quot;)</div><div>res = True</div><div>res@cnFillOn = True</div><div>res@cnFillMode = &quot;RasterFill&quot;</div><div>res@cnLinesOn = False</div><div>plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)</div></div><div><br></div><div>ncout = addfile(file_name_read+”.nc”,”c”)</div><div>ncout-&gt;ir_data = ir_u</div><div><br></div><div>end</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div>On 4 Feb 2016, at 13:04, Benjamin Alabi &lt;<a href="mailto:alabibenjamin2@gmail.com" target="_blank">alabibenjamin2@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr"><div><div><div>Thanks for your assistance sir. I&#39;ve tried the cdo to get general information on the data, but it didn&#39;t work<br>I need help from someone that can guide me to convert this data format - &#39;merg_<a href="tel:2012091000" value="+12012091000" target="_blank">2012091000</a>_4km-pixel.Z&#39; to netcdf format.<br>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>This is the link:<br><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">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></div>I really want it to be in netcdf format.<br><br></div>Regard<br><br><br></div><br></div>
_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div><br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div>