[ncl-talk] issue with gsn_csm_xy

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Thu Jun 29 15:30:57 MDT 2023


I think NCL arg numbering is zero based, so arg (3) is hres.  Now there
might be something going on with hres, elsewhere in your code.
printVarSummary (hres)

Also note that you are setting hres to True, but not attaching any
attributes.  Perhaps try False.

If that doesn't get it, then look at printVarSummary for all four args.
Compare with the documented function prototype.


On Thu, Jun 29, 2023 at 2:50 PM Laura Fowler via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello:
> I am totally baffled about the error message I get when using the function
> gsn_csm_xy (see error below).
>
> fatal:Argument type mismatch on argument (3) of (gsn_csm_xy) can not coerce
>
> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 263 in
> file var3_profile.ncl
>
> Here are the few lines that are causing me trouble:
>
> hres = True
>
> qco_area_avg!0 = "nFixed"
>
> qco_area_avg&nFixed = zFixed
>
> printVarSummary(qco_area_avg)
>
> wks = gsn_open_wks("png","test_mpas")
> plot = gsn_csm_xy(wks,qco_area_avg&nFixed,qco_area_avg,hres)
>
> The output from these few lines are:
>
> Variable: qco_area_avg
>
> Type: float
>
> Total Size: 280 bytes
>
>             70 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [nFixed | 70]
>
> Coordinates:
>
>             nFixed: [8000..14900]
>
> Number Of Attributes: 2
>
>   _FillValue : 9.96921e+36
>   average_op_ncl : dim_avg_n over dimension(s): nLoc
>
> I do not understand where the mismatch between plot and argument (3), i.e.
> qco_area_avg comes from?
>
> Thanks for your help,
> Laura
> --
>
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
>
> !-------------------------------------------------------------------------------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230629/d4b24464/attachment-0001.htm>


More information about the ncl-talk mailing list