<div dir="ltr">Indeed. More strangeness: When I use ncl_filedump the variable is listed as TMP_126_HTGL_123, not..._S123. If I am running 6.1.2 then the script will read ..._123 but not _S123. When I source my .bashrc to use 6.3.0, then the script will read ..._S123 but not ..._123. Furthermore, even if I alias ncl_filedump to the 6.3.0/bin/ncl_filedump, it still executes using 6.1.2, which results in some errors, and still lists the variable as ..._123:<br><br> Copyright (C) 1995-2013 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.1.2<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.<br>fatal:syntax error: line 631 in file /cpc/home/dbarandiaran/ncl-6.3.0/lib/ncarg/nclscripts/utilities.ncl before or near ; Draw box.<br> <br> gsn_polygon_ndc(wks,xbox+xpos(i),ybox+ypos(i),gnres) ; Draw box.<br>^<br><br><br>fatal:syntax error: possibly an undefined procedure<br><br>fatal:syntax error: line 634 in file /cpc/home/dbarandiaran/ncl-6.3.0/lib/ncarg/nclscripts/utilities.ncl before or near \n <br> gsn_polyline_ndc(wks,xbox+xpos(i),ybox+ypos(i),lnres)<br>----------------------------------------------------------^<br><br><br>fatal:syntax error: possibly an undefined procedure<br><br>fatal:syntax error: line 638 in file /cpc/home/dbarandiaran/ncl-6.3.0/lib/ncarg/nclscripts/utilities.ncl before or near \n <br> gsn_text_ndc(wks,label_strings(i),font_space+xpos(i),ypos(i)+font_space,txres)<br>-------------------------------------------------------------------------------------^<br><br><br>fatal:syntax error: possibly an undefined procedure<br><br>fatal:Syntax Error in block, block not executed<br><br>fatal:error at line 645 in file /cpc/home/dbarandiaran/ncl-6.3.0/lib/ncarg/nclscripts/utilities.ncl<br><br><br>Variable: f<br>Type: file<br>filename: ghcn_cams_1948_cur_t126<br>path: /cpc/home/ebecker/ghcn_cams/ghcn_cams_1948_cur_t126.grb<br> file global attributes:<br> dimensions:<br> initial_time0_hours = 828<br> lat_126 = 190<br> lon_126 = 384<br> variables:<br> float TMP_126_HTGL_123 ( initial_time0_hours, lat_126, lon_126 )<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 4:23 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Punch line:<br><br></div>GRIB is a moving target :-(<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 2:18 PM, David Brown <span dir="ltr"><<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Daniel,<br>
I think the problem is simply that the name of this variable has been<br>
changed for more recent versions of NCL. I found the file you are<br>
trying to read at <a href="http://ftp.cpc.ncep.noaa.gov" rel="noreferrer" target="_blank">ftp.cpc.ncep.noaa.gov</a>. ncl_filedump now reports the<br>
name as TMP_126_HTGL_S123. The name change was made in order to<br>
characterize the last number as representing a statistical processing<br>
method defined in this GRIB1 table:<br>
<a href="http://www.nco.ncep.noaa.gov/pmb/docs/on388/table5.html" rel="noreferrer" target="_blank">http://www.nco.ncep.noaa.gov/p<wbr>mb/docs/on388/table5.html</a>, where 123 is<br>
listed as "Average of N uninitialized analyses, starting at the<br>
reference time, at intervals of P2".<br>
Sorry for the confusion, but particularly with GRIB files, it is<br>
important to recognize that NCL creates these names based on<br>
information in the GRIB file. As the code evolves, occasionally names<br>
have needed to be modified slightly. Anytime you encounter the message<br>
that a variable is not in the file, it is wise to use ncl_filedump to<br>
see if the name actually appears in the file.<br>
-dave<br>
<br>
<br>
<br>
On Thu, Feb 2, 2017 at 1:46 PM, Daniel Barandiaran - NOAA Affiliate<br>
<div class="m_6749624725275708199HOEnZb"><div class="m_6749624725275708199h5"><<a href="mailto:daniel.barandiaran@noaa.gov" target="_blank">daniel.barandiaran@noaa.gov</a>> wrote:<br>
> Here is the relevant code for the problem with the GRIB read:<br>
><br>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;<br>
><br>
> f =addfile("/cpc/home/ebecker/gh<wbr>cn_cams/ghcn_cams_1948_cur_t12<wbr>6.grb","r")<br>
> TIME = cd_calendar(f->initial_time0_h<wbr>ours,0)<br>
> inntime = dimsizes(TIME(:,0))<br>
> inyrmin = 1981<br>
> inyrmax = toint(datmaxyr)<br>
> innyr = inyrmax - inyrmin + 3<br>
> ntime = innyr * 12<br>
> tind := ind(TIME(:,0).ge.inyrmin)<br>
><br>
> year = fspan(inyrmin,inyrmax+2,innyr)<br>
> year!0 = "year"<br>
> year&year = year<br>
><br>
> time = fspan(0,ntime-1,ntime)<br>
> time!0 = "time"<br>
> time&time = time<br>
> time@units = "months since 1981-01-01 00:00:00"<br>
> delete(TIME)<br>
> TIME = cd_calendar(time,0)<br>
><br>
> lat = f->lat_126({minlat:maxlat})<br>
> nlat = dimsizes(lat)<br>
> lon = f->lon_126({minlon:maxlon})<br>
> nlon = dimsizes(lon)<br>
><br>
> lat!0 = "lat"<br>
> lat&lat = lat<br>
> lat@units = "degrees_north"<br>
><br>
> lon!0 = "lon"<br>
> lon&lon = lon<br>
> lon@units = "degrees_east"<br>
><br>
> tin = f->TMP_126_HTGL_123(tind,{minl<wbr>at:maxlat},{minlon:maxlon})<br>
><br>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;<br>
><br>
> And the error code that comes out:<br>
><br>
> fatal:["Execute.c":6332]:varia<wbr>ble (TMP_126_HTGL_123) is not in file (f)<br>
><br>
> fatal:["Execute.c":8575]:Execu<wbr>te: Error occurred at or near line 163 in file<br>
> tmp_cv_fcst_namer.ncl<br>
><br>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;<br>
><br>
><br>
> This script works fine in 6.1.2, and the variable name is given explicitly<br>
> rather than using a GRIB table.<br>
><br>
><br>
> On Thu, Feb 2, 2017 at 3:23 PM, Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:<br>
>><br>
>> Hi Daniel,<br>
>><br>
>> Unfortunately you won't be able to point to a 6.3.0 contributed.ncl while<br>
>> using a 6.1.2 "ncl", because it is very likely that contributed.ncl is<br>
>> depending on a new built-in function that's only available in the 6.3.0 ncl<br>
>> executable.<br>
>><br>
>> We should try to figure out why you can't open your GRIB file with 6.3.0.<br>
>> We try *very hard* to be backwards compatible, but sometimes with GRIB<br>
>> files, there are things we have to change, usually having to do with<br>
>> variable names. I don't know if that's what's happening in your case.<br>
>><br>
>> Are you getting an error? It would be helpful if we could see it.<br>
>><br>
>> Also in NCL V6.2.0, which was released between 6.1.2 and 6.3.0, there were<br>
>> some updates to the GRIB reader. Maybe this update is affecting you? You can<br>
>> read more about these updates at:<br>
>><br>
>> <a href="http://www.ncl.ucar.edu/prev_releases.shtml#FileIOImprovements6.2.0" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/prev_r<wbr>eleases.shtml#FileIOImprovemen<wbr>ts6.2.0</a><br>
>><br>
>> Also, you might want to read the "file I/O improvements" section of our<br>
>> 6.3.0 release notes:<br>
>><br>
>> <a href="http://www.ncl.ucar.edu/current_release.shtml#Improvements6.3.0" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/curren<wbr>t_release.shtml#Improvements6.<wbr>3.0</a><br>
>><br>
>> --Mary<br>
>><br>
>><br>
>> On Thu, Feb 2, 2017 at 12:17 PM, Daniel Barandiaran - NOAA Affiliate<br>
>> <<a href="mailto:daniel.barandiaran@noaa.gov" target="_blank">daniel.barandiaran@noaa.gov</a>> wrote:<br>
>>><br>
>>> It seems a little strange to me as well, but the bottom line is that I<br>
>>> could open the GRIB file no problem using the 6.1.2 installed on our server,<br>
>>> but could not using my test-install of 6.3.0. Paths in our machine are<br>
>>> preset, and I'm not even sure exactly where they all point to. In order to<br>
>>> ensure I was running the test install I put an alias in my .bashrc, and I<br>
>>> made sure to set $NCAR_ROOT to point to the test install as well.<br>
>>><br>
>>> On Thu, Feb 2, 2017 at 2:03 PM, Guido Cioni <<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hey Daniel,<br>
>>>> I’m sure that someone will be more useful than me but…aren’t GRIB<br>
>>>> library supposed to be independent from NCL?<br>
>>>> Maybe there is something wrong on GRIB API and not on the installation<br>
>>>> of NCL, or maybe you didn’t set the GRIB_API path properly? Just saying,<br>
>>>> don’t know whether it is relevant or not :)<br>
>>>><br>
>>>> Cheers<br>
>>>><br>
>>>> Il giorno 02 feb 2017, alle ore 19:13, Daniel Barandiaran - NOAA<br>
>>>> Affiliate <<a href="mailto:daniel.barandiaran@noaa.gov" target="_blank">daniel.barandiaran@noaa.gov</a>> ha scritto:<br>
>>>><br>
>>>> Our work machine here at CPC is running ncl-6.1.2. I requested an update<br>
>>>> and got turned down by the IT folks; their reason had something to do with<br>
>>>> old netCDF packages and an eventual upgrade of our Linux environment, at<br>
>>>> which time it would be easier to upgrade. In the meantime I tried to unpack<br>
>>>> the latest binaries into my personal work directory and set paths<br>
>>>> appropriately, but sure enough there were some serious problems, like not<br>
>>>> being able to read variables out of a GRIB file. I have therefore mostly<br>
>>>> resigned myself to working with 6.1.2, but this morning I thought that a lot<br>
>>>> of the functions I am pining for reside in contributed.ncl, so I was<br>
>>>> wondering if I could point to the contributed.ncl that came with 6.3.0 while<br>
>>>> still running 6.1.2? And what about the ESMF regridding, could I point to<br>
>>>> the ESMF_regridding.ncl script and use those functions as well?<br>
>>>><br>
>>>> --<br>
>>>> Danny Barandiaran, Ph.D.<br>
>>>> Contract Scientist-INNOVIM<br>
>>>> Climate Prediction Center/NCEP/NWS, W/NP5<br>
>>>> National Center for Weather and Climate Prediction<br>
>>>><br>
>>>> ______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Danny Barandiaran, Ph.D.<br>
>>> Contract Scientist-INNOVIM<br>
>>> Climate Prediction Center/NCEP/NWS, W/NP5<br>
>>> National Center for Weather and Climate Prediction<br>
>>><br>
>>><br>
>>> ______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
>>><br>
>><br>
><br>
><br>
><br>
> --<br>
> Danny Barandiaran, Ph.D.<br>
> Contract Scientist-INNOVIM<br>
> Climate Prediction Center/NCEP/NWS, W/NP5<br>
> National Center for Weather and Climate Prediction<br>
><br>
><br>
> ______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
><br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Danny Barandiaran, Ph.D.<br></div>Contract Scientist-INNOVIM<br><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span><font size="2"><span style="font-family:arial,helvetica,sans-serif">Climate Prediction Center/NCEP/NWS, W/NP5 <br>National Center for Weather and Climate Prediction</span></font></span></span></span><br><br></div></div>
</div>