<div dir="ltr"><div><div>Thanks David, your suggestion solved a couple of things: first, it took care of ncl_filedump, and also has my environment set up properly to run 6.3.0 out of my local directory; it seems that aliasing things is not a substitute for setting paths correctly. One last little bit a fun, a direct example of what I was describing. Here is the same GRIB file header as reported by 6.1.2:<br><br>[cpc-work2 ~]$ ncl_filedump /cpc/home/ebecker/ghcn_cams/ghcn_cams_1948_cur_t126.grb<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><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><br></div>and here is 6.3.0, notice the different variable name:<br><br>[cpc-work2 ~]$ ncl_filedump /cpc/home/ebecker/ghcn_cams/ghcn_cams_1948_cur_t126.grb<br><br> Copyright (C) 1995-2015 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.3.0<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><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_S123 ( initial_time0_hours, lat_126, lon_126 )<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br></div><br> I am guessing this means that when NCL opens a GRIB file and you give it a variable name, it matches up what you asked for with a GRIB table and accesses the data that way, and that 6.1.2 and 6.3.0 have different GRIB table versions. Is this correct?<br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 5:52 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">ncl_filedump is a csh script that runs NCL It finds NCL by looking in<br>
the user's path. If you have your path set to use NCL 6.1.2 then it<br>
doesn't matter which version of ncl_filedump you use. It will always<br>
find the 6.1.2 version of NCL. So it makes sense that if you source<br>
your .bashrc to use NCL 6.3.0, then ncl_filedump will use the 6.3.0<br>
version of NCL and give you the new name of this variable with the<br>
'S'. The errors you are getting are caused by you running NCL 6.1.2<br>
but trying to bring in 6.3.0 versions of the NCL source-code function<br>
libraries. You can see this from your output.<br>
<span class=""> Copyright (C) 1995-2013 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.1.2<br>
</span>...<br>
<span class="">fatal:syntax error: line 631 in file<br>
/cpc/home/dbarandiaran/ncl-6.<wbr>3.0/lib/ncarg/nclscripts/<wbr>utilities.ncl<br>
before or near ; Draw box.<br>
<br>
</span>-----<br>
This is probably a result of having your PATH and NCARG_ROOT<br>
environment variables out of sync.<br>
<br>
Try setting them as follows on the command line:<br>
<br>
export NCARG_ROOT=/cpc/home/<wbr>dbarandiaran/ncl-6.3.0/l<br>
export PATH=$NCARG_ROOT/bin:$PATH<br>
<br>
-dave<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Thu, Feb 2, 2017 at 2:34 PM, Daniel Barandiaran - NOAA Affiliate<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:daniel.barandiaran@noaa.gov">daniel.barandiaran@noaa.gov</a>> wrote:<br>
> Indeed. More strangeness: When I use ncl_filedump the variable is listed as<br>
> TMP_126_HTGL_123, not..._S123. If I am running 6.1.2 then the script will<br>
> read ..._123 but not _S123. When I source my .bashrc to use 6.3.0, then the<br>
> script will read ..._S123 but not ..._123. Furthermore, even if I alias<br>
> ncl_filedump to the 6.3.0/bin/ncl_filedump, it still executes using 6.1.2,<br>
> 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/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
> fatal:syntax error: line 631 in file<br>
> /cpc/home/dbarandiaran/ncl-6.<wbr>3.0/lib/ncarg/nclscripts/<wbr>utilities.ncl before<br>
> or near ; Draw box.<br>
><br>
> gsn_polygon_ndc(wks,xbox+xpos(<wbr>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<br>
> /cpc/home/dbarandiaran/ncl-6.<wbr>3.0/lib/ncarg/nclscripts/<wbr>utilities.ncl before<br>
> or near \n<br>
> gsn_polyline_ndc(wks,xbox+<wbr>xpos(i),ybox+ypos(i),lnres)<br>
> ------------------------------<wbr>----------------------------^<br>
><br>
><br>
> fatal:syntax error: possibly an undefined procedure<br>
><br>
> fatal:syntax error: line 638 in file<br>
> /cpc/home/dbarandiaran/ncl-6.<wbr>3.0/lib/ncarg/nclscripts/<wbr>utilities.ncl before<br>
> or near \n<br>
><br>
> gsn_text_ndc(wks,label_<wbr>strings(i),font_space+xpos(i),<wbr>ypos(i)+font_space,txres)<br>
> ------------------------------<wbr>------------------------------<wbr>-------------------------^<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<br>
> /cpc/home/dbarandiaran/ncl-6.<wbr>3.0/lib/ncarg/nclscripts/<wbr>utilities.ncl<br>
><br>
><br>
> Variable: f<br>
> Type: file<br>
> filename: ghcn_cams_1948_cur_t126<br>
> path: /cpc/home/ebecker/ghcn_cams/<wbr>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>
><br>
> On Thu, Feb 2, 2017 at 4:23 PM, Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br>
>><br>
>> Punch line:<br>
>><br>
>> GRIB is a moving target :-(<br>
>><br>
>> On Thu, Feb 2, 2017 at 2:18 PM, David Brown <<a href="mailto:dbrown@ucar.edu">dbrown@ucar.edu</a>> wrote:<br>
>>><br>
>>> 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/<wbr>pmb/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>
>>> <<a href="mailto:daniel.barandiaran@noaa.gov">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<br>
>>> > =addfile("/cpc/home/ebecker/<wbr>ghcn_cams/ghcn_cams_1948_cur_<wbr>t126.grb","r")<br>
>>> > TIME = cd_calendar(f->initial_time0_<wbr>hours,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,{<wbr>minlat:maxlat},{minlon:maxlon}<wbr>)<br>
>>> ><br>
>>> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;<br>
>>> ><br>
>>> > And the error code that comes out:<br>
>>> ><br>
>>> > fatal:["Execute.c":6332]:<wbr>variable (TMP_126_HTGL_123) is not in file (f)<br>
>>> ><br>
>>> > fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 163 in<br>
>>> > 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<br>
>>> > 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">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<br>
>>> >> 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<br>
>>> >> 6.3.0 ncl<br>
>>> >> executable.<br>
>>> >><br>
>>> >> We should try to figure out why you can't open your GRIB file with<br>
>>> >> 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<br>
>>> >> were<br>
>>> >> some updates to the GRIB reader. Maybe this update is affecting you?<br>
>>> >> 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_<wbr>releases.shtml#<wbr>FileIOImprovements6.2.0</a><br>
>>> >><br>
>>> >> Also, you might want to read the "file I/O improvements" section of<br>
>>> >> 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/<wbr>current_release.shtml#<wbr>Improvements6.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">daniel.barandiaran@noaa.gov</a>> wrote:<br>
>>> >>><br>
>>> >>> It seems a little strange to me as well, but the bottom line is that<br>
>>> >>> I<br>
>>> >>> could open the GRIB file no problem using the 6.1.2 installed on our<br>
>>> >>> server,<br>
>>> >>> but could not using my test-install of 6.3.0. Paths in our machine<br>
>>> >>> are<br>
>>> >>> preset, and I'm not even sure exactly where they all point to. In<br>
>>> >>> order to<br>
>>> >>> ensure I was running the test install I put an alias in my .bashrc,<br>
>>> >>> 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">guidocioni@gmail.com</a>><br>
>>> >>> 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<br>
>>> >>>> installation<br>
>>> >>>> of NCL, or maybe you didn’t set the GRIB_API path properly? Just<br>
>>> >>>> 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">daniel.barandiaran@noaa.gov</a>> ha scritto:<br>
>>> >>>><br>
>>> >>>> Our work machine here at CPC is running ncl-6.1.2. I requested an<br>
>>> >>>> update<br>
>>> >>>> and got turned down by the IT folks; their reason had something to<br>
>>> >>>> do with<br>
>>> >>>> old netCDF packages and an eventual upgrade of our Linux<br>
>>> >>>> environment, at<br>
>>> >>>> which time it would be easier to upgrade. In the meantime I tried to<br>
>>> >>>> unpack<br>
>>> >>>> the latest binaries into my personal work directory and set paths<br>
>>> >>>> appropriately, but sure enough there were some serious problems,<br>
>>> >>>> like not<br>
>>> >>>> being able to read variables out of a GRIB file. I have therefore<br>
>>> >>>> mostly<br>
>>> >>>> resigned myself to working with 6.1.2, but this morning I thought<br>
>>> >>>> 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<br>
>>> >>>> 6.3.0 while<br>
>>> >>>> still running 6.1.2? And what about the ESMF regridding, could I<br>
>>> >>>> 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">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/<wbr>mailman/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">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/<wbr>mailman/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">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/<wbr>mailman/listinfo/ncl-talk</a><br>
>>> ><br>
>>> ______________________________<wbr>_________________<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/<wbr>mailman/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>
</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>