When NCL complains about "argument (0)" this means the first argument to whatever function or procedure you're calling. Of course, since short2flt_hdf only takes one argument, there's not much else it can mean!
Anyway, it's telling you that whatever you are passing into this function is the wrong type. This function expects a "short" type:
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt_hdf.shtml
You may need to do this:
if(typeof( f->$vNam$).eq."short") then
x = short2flt_hdf( f->$vNam$ )
else
x = f->$vNam$
end if
On May 21, 2012, at 12:10 AM, Abhik Santra wrote:
> Hi,
>
> I am using "short2flt_hdf" function in NCL v5.2.1 to extract a variable from .HDF files. But it is showing some error: "fatal:Argument type mismatch on argument (0) of (short2flt_hdf) can not coerce". I am new to handle .HDF files. So, can anyone help to solve this problem? The part of the code where the error occurs are as follows:
>
> f = addfile(diri+fili(nf), "r")
> ; read data
> x = short2flt_hdf( f->$vNam$ )
> lat2d = short2flt_hdf( f->geolocation(:,:,0) )
> lon2d = short2flt_hdf( f->geolocation(:,:,1) )
> nx = product(dimsizes(x))
>
> Thank you in advance.
>
>
> With regards,
> --
> Abhik Santra
> CSIR Research Fellow,
> Forecasting Research Division,
> Indian Institute of Tropical Meteorology,
> Pune - 411008.
> India
> _______________________________________________
> 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 Mon May 21 09:36:10 2012
This archive was generated by hypermail 2.1.8 : Fri May 25 2012 - 08:35:50 MDT