[ncl-talk] (FillValue) which is undefined and fatal:_NclBuildArray errors

Adam Phillips asphilli at ucar.edu
Tue Feb 8 15:58:48 MST 2022


Hi Jason,
Thank you for providing the script and data file. I see a few issues:
- I merged parts of your 1st script with your second script, as the 2nd
script didn't have ntStrt/ntLast set.
- Your y array is mostly filled with _FillValues, and trend_manken does not
allow missing values.
- y at _Fillvalue = -999 should be y at _FillValue = -999
- For this line: dplt = new ( (/ny,nrow/), typeof(y), y at _FillValue), nrow
is a 2D array, and that's why you are getting your first error message. (I
swapped nrow out for 11323, but not sure if that's what you want.)

As your data is mostly missing, I am unsure what to suggest if you really
want to use trend_manken. If all you want is a linear trend line, you can
use dtrend_msg_n
<https://www.ncl.ucar.edu/Document/Functions/Built-in/dtrend_msg_n.shtml>
and the returned slope/y_intercept attributes to construct a trend line for
your data.

Hope that helps!
Adam


On Tue, Feb 8, 2022 at 6:49 AM Herb, Jason via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello All,
>
> I am trying to put a trend line and associated trend text information on
> my plots. I am getting the following errors when attempting to plot. Script
> is attached and a sample file. Any suggestions?
>
> warning:Attempt to reference attribute (FillValue) which is undefined
> fatal:_NclBuildArray: each element of a literal array must have the same
> number of dimensions
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 61 in
> file trend1.ncl
>
> fatal:["Execute.c":8016]:Number of subscripts on left-hand-side do not
> match
>                         number of dimensions of variable: (2),  Subscripts
> used: (1)
>
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 80 in
> file trend1.ncl
>
> (0)     gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes, or
> one must be one-dimensional and both have the same rightmost dimension.
>
> Thanks,
> Jason
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220208/fe464e59/attachment.html>


More information about the ncl-talk mailing list