[ncl-talk] Argument type mismatch
Alan Brammer
abrammer at albany.edu
Mon May 16 08:57:34 MDT 2016
Might help to see the output of that printVarSummary(f) line.
By subscripting the list, it should mean that wrf_contour() receives the direct pointer to the netcdf and not a list.
printVarSummary( f[0] )
should give you Type:file
> On 16 May 2016, at 09:50, Amadou Coulibaly <mpapin24 at gmail.com> wrote:
>
> Hello NCL users
>
> Using the following command:
> fils = systemfunc ("ls /home_dir/wrfout_d01_2014-12-13*")
> f = addfiles (fils, "r")
>
> printVarSummary(f) ; type list; this contiains reference (pointers) to files
>
> nfils = dimsizes(fils)
> do nf=0,nfils-1
> contour_tc = wrf_contour(f[nf], wks,tc_plane(it,level,:,:),opts)
> end do
> I am getting another error, which is:
> fatal:List subscripting used on non-list variable, can't continue
> Because the function "wrf_contour" expected "f" as nc_file rather than a list.
>
> Best
>
>
>
>
> On 16 May 2016 at 13:54, Dennis Shea <shea at ucar.edu <mailto:shea at ucar.edu>> wrote:
> fils = systemfunc ("ls /home_dir/wrfout_d01_2014-12-13*")
> f = addfiles (fils, "r")
>
> printVarSummary(f) ; type list; this contiains reference (pointers) to files
>
> nfils = dimsizes(fils)
> do nf=0,nfils-1
> contour_tc = wrf_contour(f[nf], wks,tc_plane(it,level,:,:),opts)
> end do
>
>
> On Mon, May 16, 2016 at 5:42 AM, Amadou Coulibaly <mpapin24 at gmail.com <mailto:mpapin24 at gmail.com>> wrote:
> Hello NCL users,
>
> I am getting an error when I tried to use "wrf_contour" function to my input data, which is in format "list" from:
>
> fils = systemfunc ("ls /home_dir/wrfout_d01_2014-12-13*")
> f = addfiles (fils, "r")
>
> And after using the following command:
> contour_tc = wrf_contour(f,wks,tc_plane(it,level,:,:),opts)
>
> I am getting the following error:
> fatal:Argument type mismatch on argument (0) of (wrf_contour) can not coerce
>
> Is there a way to convert "f" from list to file format, required by "wrf_contour" function?
>
> Best
>
> --
> COULIBALY AMADOU
> PhD Student on West African Climate System (WACS)
> FUTA - Federal University of Technology of Akure, Nigeria
>
> Visiting Student - University of Cologne, Germany
> Institute of Geophysics and Meteorology
> Pohligstr. 3 / Office 3.102
> D-50969 Köln
>
> Project: WASCAL (West African Science Service Centre on Climate Change and Adapted Land Use)
> Phone:(+234) 812 965 3659 <tel:%28%2B234%29%20812%20965%203659> /(+223) 90 08 26 71 <tel:%28%2B223%29%2090%2008%2026%2071> /(+226) 64 57 37 27 <tel:%28%2B226%29%2064%2057%2037%2027> /+49 15218352574 <tel:%2B49%2015218352574>
>
> E-mail: mpapin24 at gmail.com <mailto:mpapin24 at gmail.com> / coulibalya68 at yahoo.com <mailto:coulibalya68 at yahoo.com>
>
> "The time is always right to do right": Nelson Mandela
>
> "Character is like a tree and reputation like a shadow. The shadow is what we think of it; the tree is the real thing" : Abraham Lincoln
>
> "Do what you can, with what you have, where you are" Theodore Roosevelt
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
>
>
> --
> COULIBALY AMADOU
> PhD Student on West African Climate System (WACS)
> FUTA - Federal University of Technology of Akure, Nigeria
>
> Visiting Student - University of Cologne, Germany
> Institute of Geophysics and Meteorology
> Pohligstr. 3 / Office 3.102
> D-50969 Köln
>
> Project: WASCAL (West African Science Service Centre on Climate Change and Adapted Land Use)
> Phone:(+234) 812 965 3659 /(+223) 90 08 26 71 /(+226) 64 57 37 27 /+49 15218352574
>
> E-mail: mpapin24 at gmail.com <mailto:mpapin24 at gmail.com> / coulibalya68 at yahoo.com <mailto:coulibalya68 at yahoo.com>
>
> "The time is always right to do right": Nelson Mandela
>
> "Character is like a tree and reputation like a shadow. The shadow is what we think of it; the tree is the real thing" : Abraham Lincoln
>
> "Do what you can, with what you have, where you are" Theodore Roosevelt
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160516/33aa231c/attachment.html
More information about the ncl-talk
mailing list