Re: Help: about short2flt

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 13 2010 - 11:42:46 MDT

All correct ... but if I were doing it I'd use
the following:

        sst = short2flt( f->sst )

or in the particular case below

        sst = short2flt( f->sst(0,:,:) )

Please read the documentation at:

http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml

On 04/13/2010 11:32 AM, Rick Brownrigg wrote:
> Also, as written, the line:
>
> sst = (/short2flt(sst)/)
>
> will likely generate a "Assignment type mismatch..." error, as it
> attempts to assign a float-array to a variable of type short. You'll
> need a new variable (also, the (/.../) notation is not strictly
> necessary):
>
> sstFlt = short2flt(sst)
>
>
>
> On Apr 13, 2010, at 11:23 AM, Michael Notaro wrote:
>
>> Be sure to load the contributed library.
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>
>>
>>
>> On Apr 13, 2010, at 12:14 PM, Kekuan Chu wrote:
>>
>>> Dear Sir/Madam:
>>> I tried to convert short type array to float, with the following
>>> command
>>>
>>> " filename = "amsr-avhrr-v2.20080910.nc"
>>> in = addfile(filename,"r")
>>> sst = in->sst(0,0,:,:)
>>> sst = (/short2flt(sst)/)
>>> sst = sst*0.01 "
>>>
>>> The error is:
>>>
>>> Copyright (C) 1995-2009 - All Rights Reserved
>>> University Corporation for Atmospheric Research
>>> NCAR Command Language Version 5.1.1
>>> The use of this software is governed by a License Agreement.
>>> See http://www.ncl.ucar.edu/ for more details.
>>> fatal:Undefined identifier: (short2flt) is undefined, can't continue
>>> fatal:Execute: Error occurred at or near line 11 in file plot_sst.ncl
>>>
>>>
>>> How to handle this problem?
>>> Thank you very much!
>>>
>>> BEST
>>>
>>> Kekuan Chu
>>> 4/13/2010
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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 Apr 13 11:43:02 2010

This archive was generated by hypermail 2.1.8 : Wed Apr 14 2010 - 09:15:22 MDT