<div dir="ltr"><font face="arial, sans-serif" color="#000000">Dear all,</font><div><font face="arial, sans-serif" color="#000000">I would like to plot a variable (dust) from model output [like the previous discussion] and also overlay wind vectors on the plot. I did some changes in the script but got some errors. Please have a look at the attached script and image showing the errors. I do not know why <span style="font-variant-ligatures:no-common-ligatures">(plot1) is undefined! May I ask you please to guide me on how to address this issue?</span></font></div><div><font face="arial, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">Many thanks in advance,</span></font></div><div><font face="arial, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">Best wishes,</span></font></div>
</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 8, 2019 at 4:35 PM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com">setareh.rahimi@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">Dear Dennis,<div>Thank you so much for your explanations and guidance. However, I noticed that the results for every year are similar to each other. Please have look at the attached files. This is not reasonable. I see no problems in the script, so why this happened?</div><div>Best wishes,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 8, 2019 at 4:36 AM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">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>The issue is the variable "time". This a subtle issue.<br></div><div><br> f = <b>addfile</b>("<a href="http://khuzetan_DUST04.2000010100.nc" target="_blank">khuzetan_DUST04.2000010100.nc</a>", "r")<br> time = f->time<br> timeb = f->time_bnds</div><div><br></div><div> ymdh_tag = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml" target="_blank"><b>cd_calendar</b></a>(time ,-3)<br> ymdh_Strt= <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml" target="_blank"><b>cd_calendar</b></a>(timeb(:,0),-3) ; beginning time 'bound'<br> ymdh_Last= <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml" target="_blank"><b>cd_calendar</b></a>(timeb(:,1),-3) ; ending time 'bound'<br><br> print(timeb(:,0)+" "+timeb(:,1)+" "+time+" " \<br> +ymdh_Strt +" "+ymdh_Last +" "+ymdh_tag)</div><div>=============</div><div>One month of time values. Here 124 (31*4) January hours.</div><div><br></div><div>(0) timeb_0 timeb_1 time ymdh_Strt ymdh_Last ymdh_tag</div><div> 439032 439038 439038 2000<b>010100</b> 2000<span style="color:rgb(255,0,0)"><b>010106</b></span> 2000<span style="color:rgb(255,0,0)"><b>010106</b></span></div><div><b> : : : : : :</b></div><div>(123) 439770 439776 439776 2000<b>013118</b> 2000<span style="color:rgb(0,0,255)"><b>020100</b></span> 2000<b><span style="color:rgb(0,0,255)">020100</span><br></b></div><div>===============<b><br></b></div><div><b>The last tag value [timeb(:,1)] for the month of JANUARY is FEBRUARY !!! <br></b></div><div><b><span style="color:rgb(255,0,255)">My personal view </span>is that this is not the appropriate time tag. <br></b></div><div><b>Rather, the timeb(:,0)] should be used. <br></b></div><div>================<br></div><div><br></div><div>In a nutshell, the work-around is to reassign the time coordinate associated with each variable.<br></div><div><br></div><div> timebnd = a[:]->time_bnds<br> time0 = timebnd(:,0) ; extract the start bound<br></div><div> [SNIP]<br> x = a[:]->emflx ; read emission flux from all files<br> x&time = time0 ; reassign original 'tag' time</div><div>[SNIP]</div><div> u = b[:]->uas(:,0,:,:) ; read U from all files<br> u&time = time0 ; reassign original 'tag' time<br><br> v = b[:]->vas(:,0,:,:) ; read V from all files<br> v&time = time0 ; reassign original 'tag' time<br> </div><div> </div><div>=========</div><div>Comments: <br></div><div>[0] You MUST examine the time variable more carefully.</div><div> Using yyyymmdd start/stop dates is not appropriate for yyyymmddhh.<br></div><div>[1] You do <b>not </b>have to compute the daily mean values</div><div>[2]<a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_monthly_values.shtml" target="_blank"> <b>calculate_monthly_values</b></a> will accept 6-hrly data</div><div>[3] <a href="http://www.ncl.ucar.edu/Applications/rcm.shtml" target="_blank"><b>http://www.ncl.ucar.edu/Applications/rcm.shtml</b></a></div><div>Examples 5,6,7: illustrate how to plot variables for the Regional Climate Model (RCM).</div><div>=========<br></div><div>See Attached<br></div><div><br></div><div><b></b></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 7, 2019 at 6:10 AM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@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">Dear all,<div><br></div><div>I need to plot the monthly average from a model output, which gives me 4times data per day( at 00, 06,12,18). So I first need to convert hourly data tp daily data and then convert to monthly. And finally calculates the climatology average of those monthly data from 2000-2014.</div><div>However, once I ran my script I faced some error:</div><div>1. I did not have data for 2015, but when using print <span style="background-color:rgb(180,167,214)">(yyyymmdd) </span><span style="background-color:rgb(255,255,255)"> year 2015 printed. ( please have a look at the attachment number 1)</span></div><div><span style="background-color:rgb(255,255,255)">2. After reading variable x this warning comes up: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:14px;background-color:rgb(180,167,214)">Aggregated dimension coordinate values are non-monotonic; check aggregated file ordering (warning attached)</span></div>
<div>3. Once using <span style="background-color:rgb(213,166,189)">clmMonTLL function</span><span style="color:rgb(0,0,0);white-space:pre-wrap;background-color:rgb(255,255,255)"> ( available on : </span><a href="https://www.ncl.ucar.edu/Applications/Scripts/climo_3.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/climo_3.ncl</a>), NCL tells that : <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:14px"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:14px;background-color:rgb(207,226,243)">clmMonTLL: dimension must be a multiple of 12 .</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:14px;background-color:rgb(255,255,255)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);background-color:rgb(255,255,255)"><font face="arial, sans-serif">I just wonder why this happened. I used 15 years with 12 months for each year!! ( attached)</font></span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);background-color:rgb(255,255,255)"><font face="arial, sans-serif">I attached the script and data for the year 2000. </font></span><span style="font-family:arial,sans-serif;color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">Could you please kindly guide me what are my mistakes?</span></div><span style="font-family:arial,sans-serif;color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">Best wishes,</span><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/12-n6pQ4JF6nwIRBVW4iaTKaznfP1FGet/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:medium none" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">str.zip</span></a><img style="opacity: 0.55; float: right; display: none;"></div><div></div><div> </div><div>-- </div>
<div><div dir="ltr">S.Rahimi<br><br></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></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">S.Rahimi<br><br></div>