Re: Undefined identifier: (center_finite_diff_n) is undefined, can't continue

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 04 2012 - 16:19:43 MST

Hi Alexander,

The docs state this is a new function in NCL5.2.0, and you indicate you are running 5.1.1 (?)

http://www.ncl.ucar.edu/Document/Functions/Built-in/center_finite_diff_n.shtml

Rick

On Jan 4, 2012, at 4:10 PM, Alexander Semenov wrote:

>
>
>
> Dear Ncl users,
>
> Please help me find out the problem in my code!
>
>
> I run NCL 5.1.1
>
>
>
> The shortest NCL script possible that illustrates the bug. RED is where error comes!
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
>
> begin
>
> f = addfile ("/import/wrkdir1/asemenov/WRF/WRFV3/case_study_30_km/wrfout_d01_2011-03-15_00:00:00"+".nc", "r")
> fout = addfile ("eady.nc","c")
>
> res = True
> ; !!!!!!!!!!!!!! here come resources !!!!!!!!!!!!!!!!
> times = chartostring(f->Times)
> ntim = dimsizes(times)
>
> print ("Creating array...")
> temp = f->T
> egr = temp
> egr@_FillValue = -999.
> egr = egr@_FillValue
> egr@description = "eady growth rate"
> egr@units = "s-1"
> delete(temp)
>
>
> do nt=0,ntim-1
>
> print (times(nt))
>
> res@tiMainString = times(nt)
>
>
> ; get coriolis
> ;--------------------------------------------------------------------
> cor = f->F(nt,:,:)
> printVarSummary (cor)
> ;printMinMax (cor,True)
>
> ; get theta, wind and z
> ;--------------------------------------------------------------------
> z = wrf_user_getvar(f,"z",nt)
> t = wrf_user_getvar(f,"theta",nt)
> u = wrf_user_getvar(f,"ua",nt)
> v = wrf_user_getvar(f,"va",nt)
> speed = (u*u + v*v)^0.5
> copy_VarCoords (u,speed)
>
> lv=0
> x=233
> y=228
> print("T: "+t(lv,x,y)+" Z: "+z(lv,x,y))
>
> ; calculate vertical gradients dtdz and dudz
> ;--------------------------------------------------------------------
> dtdz = center_finite_diff_n(t,z,False,0,0)
> dtdz@_FillValue = -999.
> dtdz = where ( dtdz .lt. 10e-3, dtdz@_FillValue, dtdz)
> copy_VarCoords (t,dtdz)
> ;printVarSummary (dtdz)
> ;printMinMax (dtdz,True)
>
> do lv=0,31
> print("T: "+t(lv,x,y)+" Z: "+z(lv,x,y)+" dTdZ: "+dtdz(lv,x,y))
> end do
>
>
> 3) The exact error message is
>
> fatal:Undefined identifier: (center_finite_diff_n) is undefined, can't continue
> fatal:Execute: Error occurred at or near line 150 in file EADY2.ncl
>
> 4) The type of system you're on (usually "uname -a" is enough).
> Linux pacman1 2.6.18-238.19.1.563g0000.el5 #1 SMP Fri Jul 15 20:26:36 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
>
>
>
> -
> regards
>
> *******************************************************
> Alexander Semenov
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
>
>
>
> --
> regards
>
> *******************************************************
> Alexander Semenov
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 4 16:19:52 2012

This archive was generated by hypermail 2.1.8 : Wed Jan 18 2012 - 09:21:55 MST