<div dir="ltr"><div>Many thanks Dave, able to follow the instructions and create the plot.</div><div><br></div><div>Debasish.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Sep 4, 2026 at 3:30 PM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</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>Debasish, attached is a demo program to align station data with model data. Also see attached output. There is more than one way to do this. I decided to create integer dates in YYYYDDD format, to be able to cross-reference the dates. This seemed like the simplest way, given the format of your input data.</div><div><br></div><div>This demo adds an extra "column" for station data values, next to the model data values. Then a search loop plus NCL's "ind" function is used, to find each position where the station date matches the model date. You will need to find a way to add the year number to both model and station data that you showed.</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 4, 2026 at 9:27 AM Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@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"><div>Thanks Dave. Able to bring both data in julian day format and common starting time. But having issues with two unequal records, one from the model and one from the station observations (several days in obs are missing). Attached are two examples of output. And the missing days are random among different stations. Not able to use regline_stats etc because of unequal length. How to match these two to create the same length considering the random nature of missing days in Station obs. Any help would be appreciated.</div><div><br></div><div>Thanks</div><div>Debasish </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 30, 2026 at 11:56 AM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</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>Oops, I forgot that you are making a scatter plot. This means that you need an X axis that is linear in time. Therefore, you must use a numeric time line, not a decimal coded time line. So use the method that I mentioned first, to convert both inputs to a common time line such as "days since".</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 29, 2026 at 10:53 AM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</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>Put both the obs and model data on a common time line. For the obs (station) data, it looks like you need to combine the year number into the calculation. You did not show any time information for the model data, but I am sure it is something simple like "days since" or "hours since". I suggest convert both to "days since", since the obs data is already based on day numbers.</div><div><br></div><div>Also when calculating the new time lines, you must pick a common starting point. I suggest YYYY January 1, where YYYY is the starting year of either data set.</div><div><br></div><div>Alternatively, you could use a decimal coded time line such as YYYYDDD or YYYYMMDD, rather than a pure numeric time line. With this type, dates are absolute in one sense, so there is no need to pick a common starting date.</div><div><br></div><div>For the scatter plot, you compare both time lines and pick out the dates in common. This is possible with any kind of time line, as long as both are computed accurately, and roundoff error is resolved. My final advice is, pick whichever method seems easiest to create the time lines.</div><div><br></div><div>NCL has date functions to assist with creating and converting time lines.</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/date.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/date.shtml</a><br></div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 27, 2026 at 2:20 PM Debasish Hazra 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>Hi,</div><div>I am trying to plot a scatter plot using Ncl and plotting daily averaged station data vs model output using more than 2 years data. However, I am seeing more than one data gaps in station data, like below (first value is in Julian days, second is precip value for a station of that day), but model data has values in all days. </div><div><br></div><div>350,0.418833<br>351,0.494576<br>355,0.389460<br>356,0.406334<br></div><div>...SNIP...</div><div>362,0.113083<br>363,0.124250<br>364,0.081895<br>365,0.159218<br> 2,0.125749<br> 3,0.217326<br> 4,0.276310</div><div><br></div><div>How to match those two data set in terms of exact days before the scatter plot ? Any help ? </div><div>Thanks</div><div>Debasish</div></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>