[ncl-talk] Error while handling multiple WRF output files

Mary Haley haley at ucar.edu
Wed Sep 6 09:09:38 MDT 2017


The error message is telling you that there's something wrong with argument
0 passed to wrf_contour.  Argument 0 refers to the first argument in the
list, which is "a(itime)" in this case.

The issue is that when you use addfiles to open a series of files, you need
to use square brackets, [], to access a single file, and not curved
brackets, (). This is because addfiles returns a "List" object, and lists
in NCL need to be access with square brackets.

You have:

        contour = wrf_contour(a(itime),wks,t,t_res)

and this should be:

        contour = wrf_contour(a[itime],wks,t,t_res)

--Mary



On Mon, Sep 4, 2017 at 4:40 AM, swati shewale <shewaleswati16 at gmail.com>
wrote:

> Hiiii
>
> I want to do panel plotting using WRF output. I have total 8 files, each
> contains single time step (one day, 3 hrly datafiles so total 8 files). out
> of eight times I want to plot 6 time step (panel plot) for variable slp and
> temperature.
>
> It shows below error.
>
> fatal:Argument type mismatch on argument (0) of (wrf_contour) can not
> coerce
> fatal:["Execute.c":8567]:Execute: Error occurred at or near line 44 in
> file temp.ncl
> (0)    Error: gsn_panel: all of the plots passed to gsn_panel appear to be
> invalid
>
>  Attached herewith script.
>
> Thank you in advance. Any help will be appreciated
>
>
>
> _______________________________________________
> 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/20170906/f3e73698/attachment.html>


More information about the ncl-talk mailing list