<div dir="ltr"><div>Dear Dennis,</div><div>So many thanks for your advice. I made corrections to my script as you suggested, and attempted to calculate and plot the average AOD for 2011-06-28 but I still get errors. I attached the script and the errors. <br></div><div><br></div><div>As you can see from the error message, NCL says :<span style="background-color:rgb(255,229,153)">fatal: No coordinate variable exists for dimension (Time) in variable (x)</span></div><div><span style="background-color:rgb(213,166,189)"><span style="background-color:rgb(255,255,255)">I wonder about variable x; I did not define such a variable.</span><br></span></div><div><br></div><div>Please advise me on how to sort this issue out.</div><div>Many thanks in advance, <br></div><div>Best wishes,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 7, 2022 at 6:02 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@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>As noted in the documentation, <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml" target="_blank"><b>calculate_daily_values</b></a> requires that the variable have a **time coordinate** that is recognized by cd_calendar. <br><pre> Times = f->Times ; Times(Time, DateStrLen) (type character)
Time = <b>wrf_times_c</b>( Times, 0 ) ; "hours since" initial time on file (double); units recognized by cd_calendar</pre></div><div> a2 = f->TAUAER ; (Time, south_north, west_east)</div><div> a2&Time = Time ; associate the 'Time' coordinate with the variable using standard NCL & syntax<br></div><div> printVarSummary(a2)</div><div> print("------------------------------------") <br><pre> a2Day = calculate_daily_values (a2, "avg", 0, opt)
printVarSummary(a2Day)
printMinMax (a2Day,1)</pre></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 5, 2022 at 9:30 AM Setareh Rahimi 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>Dear NCL users,</div><div><br></div><div>I am trying to plot the daily average of AOD (aerosol optical depth) from WRF-chem outputs. However, I can not define the time so that NCL plots the daily average of AOD.(the script has been attached, and the model output is too large and I just used ncdump to show the header of some varibles ).<br></div><div>I tried the following commands:</div><div> <br></div><div><br></div><div><span style="background-color:rgb(255,229,153)">times = wrf_user_getvar(f,"times",-1)<br>printVarSummary(times)<br>print(times)<br>ymdh = cd_calendar(a2×, -2)<br> print(ymdh)</span></div><div><br></div><div>but faced an error.</div><div>Would you please kindly advise me on how can I calculate the daily average of AOD from the hourly output of WRF-chem?</div><div>Many thanks in advance,</div><div>Best wishes,<br></div><div>-- <br><div dir="ltr">S.Rahimi<br><br></div></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><br>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">S.Rahimi<br><br></div>