<div dir="ltr">I'll second the call that you should upgrade to the newest version of ncl (v6.3.0). I think your current error is occurring due to you loading shea_util before contributed. Try loading the files in this order:<div><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" </span><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </span><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </span><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" </span></font><br></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0)"><br></span></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">If that doesn't work let ncl-talk know..</font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0)">Adam</span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 8:21 AM, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <span dir="ltr"><<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Which version of ncl are you running?<br>
<br>
Kevin Havener<br>
<br>
-----Original Message-----<br>
From: Benjamin Alabi [mailto:<a href="mailto:alabibenjamin2@gmail.com">alabibenjamin2@gmail.com</a>]<br>
Sent: Friday, February 05, 2016 10:09 AM<br>
To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED<br>
Cc: alesall; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
Subject: Re: [ncl-talk] Data conversion<br>
<br>
Thanks alot for your assistance.<br>
<br>
<br>
I added the following before ' Begin' as you have instructed me load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
<br>
<br>
After running it, it's generated the following error:<br>
<br>
<br>
fatal:syntax error: line 3232 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(x, advect)<br>
---------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3255 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 3364 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(X, Xdp)<br>
------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3400 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 3478 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t, theta)<br>
--------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3482 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 3573 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t,s)<br>
---------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3576 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 3666 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t, theta)<br>
--------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 3706 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t,pv)<br>
----------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3709 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 3802 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t, theta)<br>
--------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 3813 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t,s)<br>
---------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 3852 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t,pv)<br>
----------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 3855 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 4205 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(runs(0,:,:), maxrun) -----------------------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 4210 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:syntax error: line 4254 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(t, dthdz)<br>
--------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 4261 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(u, brunt)<br>
--------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 4267 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(u, dudz)<br>
-------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 4273 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(v, dvdz)<br>
-------------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:syntax error: line 4279 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n<br>
copy_VarCoords(u, Ri)<br>
-----------------------^<br>
<br>
fatal:syntax error: possibly an undefined procedure fatal:Syntax Error in block, block not executed fatal:error at line 4284 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl<br>
<br>
fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000<br>
fatal:ContourPlotDraw: draw error<br>
warning:WorkstationDeactivate: workstation not active or not opened<br>
<br>
<br>
On Fri, Feb 5, 2016 at 3:15 PM, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil">kevin.havener@us.af.mil</a>> wrote:<br>
<br>
<br>
And you don't want to try to add 75.0 to the fill value in the script.<br>
<br>
Kevin Havener<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ncl-talk-bounces@ucar.edu">ncl-talk-bounces@ucar.edu</a> [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu">ncl-talk-bounces@ucar.edu</a>] On Behalf Of alesall<br>
Sent: Friday, February 05, 2016 9:03 AM<br>
To: Benjamin Alabi<br>
Cc: <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
Subject: Re: [ncl-talk] Data conversion<br>
<br>
<br>
the error message is:<br>
<br>
fatal:Undefined identifier: (byte2flt) is undefined, can't continue<br>
<br>
it is not finding the function “byte2flt"<br>
on the documentation page, this one: <<a href="http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml" rel="noreferrer" target="_blank">http://ncl.ucar.edu/Document/Functions/Contributed/byte2flt.shtml</a>><br>
it says that such function is in the “contributed” file.<br>
<br>
you need to add statements such as:<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl <<a href="http://ncl.ucar.edu/Document/Functions/Contributed/contrib.shtml" rel="noreferrer" target="_blank">http://ncl.ucar.edu/Document/Functions/Contributed/contrib.shtml</a>> "<br>
<br>
at the beginning of your script, actually before the “begin”<br>
<br>
I have all of these in my scripts:<br>
<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
<br>
hope this helps!<br>
<br>
<br>
<br>
--<br>
Alessandra Giannini<br>
IRI for Climate and Society - The Earth Institute at Columbia University P.O. Box 1000, Palisades NY 10964-8000<br>
phone/fax: <a href="tel:%2B1%20845%20680-4473" value="+18456804473">+1 845 680-4473</a>/4864 - email: <a href="mailto:alesall@iri.columbia.edu">alesall@iri.columbia.edu</a><br>
<br>
<br>
On Feb 5, 2016, at 8:57 AM, Benjamin Alabi <<a href="mailto:alabibenjamin2@gmail.com">alabibenjamin2@gmail.com</a>> wrote:<br>
<br>
Goodday sir,<br>
<br>
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>
<br>
I used the script,<br>
begin<br>
file_name_read = "merg_<a href="tel:2012090101" value="+12012090101">2012090101</a>_4km-pixel"<br>
<br>
ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte")) +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 = "degrees_east"<br>
lon_g@long_name = "longitude"<br>
lon_g@short_name = "longitude"<br>
lon_g!0 = "lon"<br>
lon_g&lon = lon_g<br>
<br>
lat_g@units = "degrees_north"<br>
lat_g@long_name = "latitude"<br>
lat_g@short_name = "latitude"<br>
lat_g!0 = "lat"<br>
lat_g&lat = lat_g<br>
<br>
<br>
ir_u!0 = "time"<br>
ir_u!1 = "lat"<br>
ir_u!2 = "lon"<br>
<br>
ir_u&lat = lat_g<br>
ir_u&lon = lon_g<br>
<br>
ir_u@_FillValue= 255+75.0<br>
<br>
<br>
wks = gsn_open_wks("X11","")<br>
res = True<br>
res@cnFillOn = True<br>
res@cnFillMode = "RasterFill"<br>
res@cnLinesOn = False<br>
plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)<br>
<br>
ncout = addfile(file_name_read+".nc","c")<br>
ncout->ir_data = ir_u<br>
<br>
end<br>
<br>
<br>
But it was generating this error:<br>
fatal:Undefined identifier: (byte2flt) is undefined, can't continue<br>
fatal:["Execute.c":7741]:Execute: Error occurred at or near line 41<br>
<br>
<br>
Waiting for guide, Thanks.<br>
<br>
<br>
<br>
On Thu, Feb 4, 2016 at 8:07 PM, Alan Brammer <<a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a>> wrote:<br>
<br>
<br>
Forgot the offset, which is mentioned in the link Kevin sent.<br>
<br>
<br>
ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte")) +75.<br>
ir_u@_FillValue= 255+75.<br>
<br>
"Each record is a 9896 x 3298 Fortran array of IR brightness temperatures that have been scaled to fit into 1-byte by subtracting "75" from each datum. Therefore it is necessary for the user to add a value of "75" to each data value when using the data."<br>
<br>
<br>
<br>
On 4 Feb 2016, at 13:30, Alan Brammer <<a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a>> wrote:<br>
<br>
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.<br>
<br>
as said before .Z means it’s compressed. gunzip merg_<a href="tel:2016020123" value="+12016020123">2016020123</a>_4km-pixel.Z will uncompress it. Then you have a binary file as a small amount of googling would have told you.<br>
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.<br>
<a href="https://www.ncl.ucar.edu/Applications/o-netcdf.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Applications/o-netcdf.shtml</a><br>
<br>
Read the documentation on the below functions and understand what is occurring .<br>
<br>
<br>
begin<br>
file_name_read = "merg_<a href="tel:2016020123" value="+12016020123">2016020123</a>_4km-pixel"<br>
<br>
ir_u = byte2flt( fbindirread (file_name_read ,0, (/2,3298,9896/),"ubyte"))<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 = "degrees_east"<br>
lon_g@long_name = "longitude"<br>
lon_g@short_name = "longitude"<br>
lon_g!0 = "lon"<br>
lon_g&lon = lon_g<br>
<br>
lat_g@units = "degrees_north"<br>
lat_g@long_name = "latitude"<br>
lat_g@short_name = "latitude"<br>
lat_g!0 = "lat"<br>
lat_g&lat = lat_g<br>
<br>
<br>
ir_u!0 = "time"<br>
ir_u!1 = "lat"<br>
ir_u!2 = "lon"<br>
<br>
ir_u&lat = lat_g<br>
ir_u&lon = lon_g<br>
<br>
ir_u@_FillValue= 255<br>
<br>
<br>
wks = gsn_open_wks("X11","")<br>
res = True<br>
res@cnFillOn = True<br>
res@cnFillMode = "RasterFill"<br>
res@cnLinesOn = False<br>
plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)<br>
<br>
ncout = addfile(file_name_read+”.nc”,”c”)<br>
ncout->ir_data = ir_u<br>
<br>
end<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 4 Feb 2016, at 13:04, Benjamin Alabi <<a href="mailto:alabibenjamin2@gmail.com">alabibenjamin2@gmail.com</a>> wrote:<br>
<br>
Thanks for your assistance sir. I've tried the cdo to get general information on the data, but it didn't work<br>
I need help from someone that can guide me to convert this data format - 'merg_<a href="tel:2012091000" value="+12012091000">2012091000</a>_4km-pixel.Z' 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&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version=001&CGISESSID=25c6337b80163b3743e8bea85d015558" rel="noreferrer" target="_blank">http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version=001&CGISESSID=25c6337b80163b3743e8bea85d015558</a>.<br>
<br>
I really want it to be in netcdf format.<br>
<br>
<br>
Regard<br>
<br>
<br>
<br>
<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>
<br>
<br>
<br>
<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>
<br>
<br>
<br>
<br>
<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>