<div dir="ltr">Hi Jason,<div>Thank you for providing the script and data file. I see a few issues:</div><div>- I merged parts of your 1st script with your second script, as the 2nd script didn't have ntStrt/ntLast set.<br>- Your y array is mostly filled with _FillValues, and trend_manken does not allow missing values.</div><div>- y@_Fillvalue = -999 should be y@_FillValue = -999</div><div>- For this line: dplt = new ( (/ny,nrow/), typeof(y), y@_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.)</div><div><br></div><div>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 <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dtrend_msg_n.shtml">dtrend_msg_n</a> and the returned slope/y_intercept attributes to construct a trend line for your data. <br></div><div><br></div><div>Hope that helps!</div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 8, 2022 at 6:49 AM Herb, Jason via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello All,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
warning:Attempt to reference attribute (FillValue) which is undefined
<div>fatal:_NclBuildArray: each element of a literal array must have the same number of dimensions</div>
<div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 61 in file trend1.ncl</div>
<div><br>
</div>
<div>fatal:["Execute.c":8016]:Number of subscripts on left-hand-side do not match</div>
<div>                        number of dimensions of variable: (2),  Subscripts used: (1)</div>
<div><br>
</div>
<div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 80 in file trend1.ncl</div>
<div><br>
</div>
<span>(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.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Jason<br>
</div>
</div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>