[ncl-talk] Are recent versions of contributed.ncl backward-compatible?

Dennis Shea shea at ucar.edu
Thu Feb 2 14:23:38 MST 2017


Punch line:

GRIB is a moving target  :-(

On Thu, Feb 2, 2017 at 2:18 PM, David Brown <dbrown at ucar.edu> wrote:

> Hi Daniel,
> I think the problem is simply that the name of this variable has been
> changed for more recent versions of NCL. I found the file you are
> trying to read at ftp.cpc.ncep.noaa.gov. ncl_filedump now reports the
> name as TMP_126_HTGL_S123. The name change was made in order to
> characterize the last number as representing a statistical processing
> method defined in this GRIB1 table:
> http://www.nco.ncep.noaa.gov/pmb/docs/on388/table5.html, where 123 is
> listed as "Average of N uninitialized analyses, starting at the
> reference time, at intervals of P2".
> Sorry for the confusion, but particularly with GRIB files, it is
> important to recognize that NCL creates these names based on
> information in the GRIB file. As the code evolves, occasionally names
> have needed to be modified slightly. Anytime you encounter the message
> that a variable is not in the file, it is wise to use ncl_filedump to
> see if the name actually appears in the file.
>  -dave
>
>
>
> On Thu, Feb 2, 2017 at 1:46 PM, Daniel Barandiaran - NOAA Affiliate
> <daniel.barandiaran at noaa.gov> wrote:
> > Here is the relevant code for the problem with the GRIB read:
> >
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >
> > f =addfile("/cpc/home/ebecker/ghcn_cams/ghcn_cams_1948_cur_
> t126.grb","r")
> > TIME  = cd_calendar(f->initial_time0_hours,0)
> > inntime     = dimsizes(TIME(:,0))
> > inyrmin     = 1981
> > inyrmax     = toint(datmaxyr)
> > innyr = inyrmax - inyrmin + 3
> > ntime = innyr * 12
> > tind  := ind(TIME(:,0).ge.inyrmin)
> >
> > year  = fspan(inyrmin,inyrmax+2,innyr)
> > year!0      = "year"
> > year&year   = year
> >
> > time  = fspan(0,ntime-1,ntime)
> > time!0      = "time"
> > time&time   = time
> > time at units  = "months since 1981-01-01 00:00:00"
> > delete(TIME)
> > TIME  = cd_calendar(time,0)
> >
> > lat   = f->lat_126({minlat:maxlat})
> > nlat  = dimsizes(lat)
> > lon   = f->lon_126({minlon:maxlon})
> > nlon  = dimsizes(lon)
> >
> > lat!0 = "lat"
> > lat&lat     = lat
> > lat at units   = "degrees_north"
> >
> > lon!0 = "lon"
> > lon&lon     = lon
> > lon at units   = "degrees_east"
> >
> > tin   = f->TMP_126_HTGL_123(tind,{minlat:maxlat},{minlon:maxlon})
> >
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >
> > And the error code that comes out:
> >
> > fatal:["Execute.c":6332]:variable (TMP_126_HTGL_123) is not in file (f)
> >
> > fatal:["Execute.c":8575]:Execute: Error occurred at or near line 163 in
> file
> > tmp_cv_fcst_namer.ncl
> >
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >
> >
> > This script works fine in 6.1.2, and the variable name is given
> explicitly
> > rather than using a GRIB table.
> >
> >
> > On Thu, Feb 2, 2017 at 3:23 PM, Mary Haley <haley at ucar.edu> wrote:
> >>
> >> Hi Daniel,
> >>
> >> Unfortunately you won't be able to point to a 6.3.0 contributed.ncl
> while
> >> using a 6.1.2 "ncl", because it is very likely that contributed.ncl is
> >> depending on a new built-in function that's only available in the 6.3.0
> ncl
> >> executable.
> >>
> >> We should try to figure out why you can't open your GRIB file with
> 6.3.0.
> >> We try *very hard* to be backwards compatible, but sometimes with GRIB
> >> files, there are things we have to change, usually having to do with
> >> variable names. I don't know if that's what's happening in your case.
> >>
> >> Are you getting an error? It would be helpful if we could see it.
> >>
> >> Also in NCL V6.2.0, which was released between 6.1.2 and 6.3.0, there
> were
> >> some updates to the GRIB reader. Maybe this update is affecting you?
> You can
> >> read more about these updates at:
> >>
> >> http://www.ncl.ucar.edu/prev_releases.shtml#FileIOImprovements6.2.0
> >>
> >> Also, you might want to read the "file I/O improvements" section of our
> >> 6.3.0 release notes:
> >>
> >> http://www.ncl.ucar.edu/current_release.shtml#Improvements6.3.0
> >>
> >> --Mary
> >>
> >>
> >> On Thu, Feb 2, 2017 at 12:17 PM, Daniel Barandiaran - NOAA Affiliate
> >> <daniel.barandiaran at noaa.gov> wrote:
> >>>
> >>> It seems a little strange to me as well, but the bottom line is that I
> >>> could open the GRIB file no problem using the 6.1.2 installed on our
> server,
> >>> but could not using my test-install of 6.3.0. Paths in our machine are
> >>> preset, and I'm not even sure exactly where they all point to. In
> order to
> >>> ensure I was running the test install I put an alias in my .bashrc,
> and I
> >>> made sure to set $NCAR_ROOT to point to the test install as well.
> >>>
> >>> On Thu, Feb 2, 2017 at 2:03 PM, Guido Cioni <guidocioni at gmail.com>
> wrote:
> >>>>
> >>>> Hey Daniel,
> >>>> I’m sure that someone will be more useful than me but…aren’t GRIB
> >>>> library supposed to be independent from NCL?
> >>>> Maybe there is something wrong on GRIB API and not on the installation
> >>>> of NCL, or maybe you didn’t set the GRIB_API path properly? Just
> saying,
> >>>> don’t know whether it is relevant or not :)
> >>>>
> >>>> Cheers
> >>>>
> >>>> Il giorno 02 feb 2017, alle ore 19:13, Daniel Barandiaran - NOAA
> >>>> Affiliate <daniel.barandiaran at noaa.gov> ha scritto:
> >>>>
> >>>> Our work machine here at CPC is running ncl-6.1.2. I requested an
> update
> >>>> and got turned down by the IT folks; their reason had something to do
> with
> >>>> old netCDF packages and an eventual upgrade of our Linux environment,
> at
> >>>> which time it would be easier to upgrade. In the meantime I tried to
> unpack
> >>>> the latest binaries into my personal work directory and set paths
> >>>> appropriately, but sure enough there were some serious problems, like
> not
> >>>> being able to read variables out of a GRIB file. I have therefore
> mostly
> >>>> resigned myself to working with 6.1.2, but this morning I thought
> that a lot
> >>>> of the functions I am pining for reside in contributed.ncl, so I was
> >>>> wondering if I could point to the contributed.ncl that came with
> 6.3.0 while
> >>>> still running 6.1.2? And what about the ESMF regridding, could I
> point to
> >>>> the ESMF_regridding.ncl script and use those functions as well?
> >>>>
> >>>> --
> >>>> Danny Barandiaran, Ph.D.
> >>>> Contract Scientist-INNOVIM
> >>>> Climate Prediction Center/NCEP/NWS, W/NP5
> >>>> National Center for Weather and Climate Prediction
> >>>>
> >>>> _______________________________________________
> >>>> ncl-talk mailing list
> >>>> ncl-talk at ucar.edu
> >>>> List instructions, subscriber options, unsubscribe:
> >>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Danny Barandiaran, Ph.D.
> >>> Contract Scientist-INNOVIM
> >>> Climate Prediction Center/NCEP/NWS, W/NP5
> >>> National Center for Weather and Climate Prediction
> >>>
> >>>
> >>> _______________________________________________
> >>> ncl-talk mailing list
> >>> ncl-talk at ucar.edu
> >>> List instructions, subscriber options, unsubscribe:
> >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>>
> >>
> >
> >
> >
> > --
> > Danny Barandiaran, Ph.D.
> > Contract Scientist-INNOVIM
> > Climate Prediction Center/NCEP/NWS, W/NP5
> > National Center for Weather and Climate Prediction
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170202/aaa824de/attachment.html 


More information about the ncl-talk mailing list