<div dir="ltr">Thanks for helping with this Rick!<div><br></div><div>I simplified what I have down considerably and now I think I'm much closer to getting it working. For my WRF data, I have it translating to a grid, and this returns variables called S_time and e_time that have the correct values. For some reason, when I try calling them in my gridpoint function I get an error though and I'm not sure why.</div><div><br></div><div>For the SNOTEL data, I have precip and time values subsetted (using TL_start and TL_end as my variables), but when I put them into cd_calendar it outputs an integer (that I believe to be hours since 1900). Using string to integer outputs the same.</div><div><br></div><div>So my 2 questions are 1. Why am I getting this error on my WRF data and 2. What is the easiest way to make the time values for my SNOTEL data plotable (since we cannot plot date strings).</div><div><br></div><div>I'll attach the data file here and my new code file. Thank you so much for the help!<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-Zach Rieck<div><a href="mailto:zrr817@gmail.com" target="_blank">zrr817@gmail.com</a></div><div>(513)-502-5652</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 22, 2019 at 9:58 AM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@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 dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Zach,</div><div><br></div><div>Not totally sure what's going on here.  With regard to the Dec 2000, when I open your file, I see that the range Jan1-Mar31 2001 is (8192:8218). Try printing those values and your original indices to verify.  As for the string of 5's, I'm getting 2s. <br></div><div><br></div><div>In any case, I get a string of about a dozen warning messages out of these two lines:</div><div><br></div><div>   time2int = stringtointeger(time2)<br>    prec2int = stringtointeger(prec2)</div><div><br></div><div>Your file has a header line, so this likely should be something like:</div><div>   time2int = stringtointeger(time2(1:))<br>    prec2int = stringtointeger(prec2(1:))</div><div><br></div><div>prec2 is a float field -- is the truncation to integer intended?  Also, time2 is a yyyy-mm-dd-0000z field, and is getting truncated to just the year -- is this intended too?  If not perhaps take a look at the various time/string/calendar functions at the following link to see if there's something that better suits your requirements:</div><div><br></div><div>    <a href="http://www.ncl.ucar.edu/Document/Functions/date.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/date.shtml</a></div><div><br></div><div>I hope that helps...</div><div>Rick</div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 21, 2019 at 5:45 PM Zach Rieck <<a href="mailto:zrr817@gmail.com" target="_blank">zrr817@gmail.com</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">To Whom it May Concern-<div><br></div><div>I'm trying to subset my data so I can use a section of it for comparison. My data runs from 1978 through 2013, but I'm trying to grab just Jan 1- Mar 31 2001. I subsetted this by determining the range of values I needed from the array to accomplish this and storing them as separate functions. However, when I outputted the values, I saw that the prec2_f (y-axis) variable was only outputting a bunch of 5s, which aren't even a value within that range of data. I also noticed my date2_f variable (x-axis) is slightly off and is showing dates from Dec 2000.</div><div><br></div><div> I was wondering if you might be able to help me determine why my values are off? I have attached both the code and data. Thanks in advance for the help!</div><div><br></div><div>Respectfully,</div><div><br clear="all"><div><div dir="ltr" class="gmail-m_2507350455400566062gmail-m_-1028467494418709791gmail_signature"><div dir="ltr">-Zach Rieck<div><a href="mailto:zrr817@gmail.com" target="_blank">zrr817@gmail.com</a></div><div>(513)-502-5652</div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>