Re: NCL Errors

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri, 04 Jan 2008 10:01:18 -0700

Hi Vinit,

That error message is created when you try to read in a variable that
isn't present in the file pointed to by f..

For instance, if I have a netCDF file whose header looks like this:
;------------------------------------------------------------------
netcdf hulme.precip.19001998 {
dimensions:
         time = 1188 ;
         lat = 71 ;
         lon = 96 ;
variables:
         int time(time) ;
                 time:long_name = "Time_expressed_in_YYYYMM" ;
                 time:units = "months" ;
                 time:_FillValue = -999 ;
         float lat(lat) ;
         float lon(lon) ;
         float PPT(time, lat, lon) ;
                 PPT:long_name = "Daily_Precipitation" ;
                 PPT:units = "mm/day" ;
                 PPT:_FillValue = 1.e+36f ;
;----------------------------------------------------------------

and in a ncl script I have this:

f = addfile("hulme.precip.19001998.nc","r") ; data file is in
                                               ; same location as script
ppt = f->RAIN

you would get the following error message:
fatal:Either file (f) isn't defined or variable (RAIN) is not a variable
in the file
fatal:Execute: Error occurred at or near line 3

Make sure the netCDF file that you are looking at has a variable named
"U" present...

Adam

Asher, Vinit N wrote:
> Hi users,
>
> I have been consistently getting the following error in my NCL scripts
> for implementing vectors and streamlines.
>
> either the variable f isnt defined or the variable U is not a variable
> in the file.
>
> Even while trying the same NCL code as present on the website examples I
> got the same error. Kindly help.
>
> Vinit Asher.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 04 2008 - 10:01:18 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 07 2008 - 11:19:46 MST