Re: Type mismatch error

From: Michel dos Santos Mesquita <Michel.Mesquita_at_nyahnyahspammersnyahnyah>
Date: Tue, 23 Jun 2009 18:31:55 +0200

Hi Dennis,

Thank you so much!!! It worked now!

Kindest regards,

Michel

On Jun 23, 2009, at 5:54 PM, Dennis Shea wrote:

> Hello,
>
> The first rule of data processing is to look at
> your data. If you do an "ncdump -h" or
> ncl_filedump on the file you will see:
>
> short uwnd(time, level, lat, lon)
>
> The variable is of type *short*. It must be unpacked
> prior to use.
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml
>
> u = *short2flt*( f->uwnd )
>
>
>
> Michel dos Santos Mesquita wrote:
>> Hi,
>>
>> I am trying to calculate the climatology of uwind for the DJF
>> season using 'month_to_season'. My script works fine for the NCEP
>> file 'hgt.mon.mean.nc', but it does not work when I use the file
>> 'uwnd.mon.mean.nc'. The error message I get is:
>>
>> fatal:Assignment type mismatch, right hand side can't be coerced
>> to type of left hand side
>> fatal:Execute: Error occurred at or near line 5885 in file /usr/
>> share/ ncarg/nclscripts/csm/contributed.ncl
>>
>> fatal:Execute: Error occurred at or near line 5972 in file /usr/
>> share/ ncarg/nclscripts/csm/contributed.ncl
>>
>> fatal:Execute: Error occurred at or near line 23 in file
>> regress_250u.ncl ----------> this is the line of the
>> 'month_to_season' function
>>
>> * And my script is:
>>
>> in = addfile("uwnd.mon.mean.nc","r")
>> lev = in->level
>> print(lev)
>> levind = ind(lev.eq.250) ; index for 250hPa
>> print(levind)
>> tmp = in->uwnd(0:731,levind,:,:) ; all data except the few
>> months in 2009
>> ; includes level (250)
>>
>> tmp&time = ut_calendar(tmp&time,1)
>>
>> printVarSummary(tmp)
>>
>> xDJF2 = month_to_seasonN(tmp, "DJF")
>> printVarSummary(xDJF2)
>> xDJF = xDJF2(0,{197901:200712},:,:)
>>
>> I thank you in advance for any help I can get!
>>
>> Thanks,
>>
>> Michel
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 23 2009 - 10:31:55 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 25 2009 - 06:30:15 MDT