Error: Undefined identifier

From: Guilherme Martins <jgmsantos_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 29 2011 - 10:28:17 MST

Hi users,

I need a help. I did this script below:

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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin

f = addfile("/home/gui/gui/NCEP-R2-MENSAL/air.mon.mean.nc","r")

temp = short2flt(f->air)
temp = temp - 273.15

do y = -40,-40
   do x = 270,270
      do t = 0,10-1
         tempn(t,0,{y},{x}) = temp(t,0,{y},{x})
      end do
   end do
end do

valorp = .25
n = dimsizes(tempn)
percentil = round(valorp*n,3)-1

print(tempn(percentil))

end

But I got the error:

fatal:Undefined identifier: (tempn) is undefined, can't continue
fatal:Execute: Error occurred at or near line 16 in file teste04.ncl

I can't understand when the NCL told me "Undefined identifier".

May anyone help me?

Thanks,

Guilherme.

-- 
Guilherme Martins
Homepage: http://guilhermemartins.hd1.com.br/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 29 10:29:05 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST