Yes thanks solved.<div><br></div><div>I now have average over 28 days.</div><div><br></div><div>In order to have a 24 hour average for these 28 days is there a similar function available or do I need to write a do loop ?</div><div><br></div><div><br></div><div><br>On Wednesday, September 22, 2021, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@ucar.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>HI,</div><div><br></div><div><span style="font-family:arial,sans-serif">The docs say that function should be in:<br></span><pre><span style="font-family:arial,sans-serif">    $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.ncl<br><br>which in your case, looks like that would be:<br><br>    /opt/ncl-6.5/lib/ncarg/<wbr>nclscripts/csm/contributed.ncl</span></pre></div><div><span style="font-family:arial,sans-serif">and in ncl vers. >= 6.4.0 that script should be loaded automatically.  Do you have this file on your system and does it contain the function?<br></span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">(see  <a href="http://ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml" target="_blank">http://ncl.ucar.edu/Document/<wbr>Functions/Contributed/<wbr>calculate_daily_values.shtml</a>)</span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">Rick<br></span></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 22, 2021 at 1:10 AM ali mughal 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 dir="ltr"><div dir="ltr"><div dir="ltr">Why is the following script providing error? I am using ncl 6.5<div><br></div><div>load "/opt/ncl-6.5/lib/ncarg/<wbr>nclscripts/wrf/WRF_<wbr>contributed.ncl"<br></div><div><br></div><div><div>a=addfile("BEM_April","r")</div><div>xb=a->TA_MEAN(24:695,0,:,:)</div><div>times=a->Times(24:695,:)</div><div>xb&Time :=  wrf_times_c(times, 0)</div><div>xbDayAvg = calculate_daily_values(xb, "avg", 0, False)</div></div><div><br></div><div><b>Error</b></div><div><br></div><div><div>fatal:Undefined identifier: (calculate_daily_values) is undefined, can't continue</div></div><div><br></div></div></div></div></div>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>