<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Adam,<div><br></div><div>Thanks for your kind help. I tried to follow your instructions; however, I am getting the following errors.</div><div><br></div><div><div>fatal:NclOneDValGetClosestIndex: Non-monotonic coordinate value being used, can't complete coordinate subscript</div><div>fatal:Could not obtain coordinate indexes, unable to perform subscript</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 54 in file subs_time.ncl</div></div><div><br></div><div>54 line:</div><div> plot = gsn_csm_contour_map(wks,prc_reorder({19980501},:,:),res)  <br></div><div><br></div><div>When I used yours suggestion like plot = gsn_csm_contour_map(wks,prc_reorder({19980422},:,:),res), I got the same problem.</div><div><br></div><div>Any suggestions, please?</div><div><br></div><div>Jalal</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 19, 2019 at 3:19 AM Adam Phillips <<a href="mailto:asphilli@ucar.edu">asphilli@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">Hi Jalal,<div>Within your script you are calling cd_calendar, and then subsequently calling day_of_year. </div><div><div>time@units = "days since 1998-1-1 12:00:00"</div><div>utc_date = cd_calendar(time, -5)</div><div>dyear = day_of_year(utc_date(:,0),utc_date(:,1),utc_date(:,2))</div></div><div><br></div><div>day_of_year will return numbers ranging from 1-365, and thus the values can repeat if you have multiple years. This is not the type of array that should be used for coordinate subscripting. I would recommend calling cd_calendar, but retrieving the values in YYYYMMDD format, then assign this array as a coordinate variable to your prc_reorder array:</div><div>delete(prc_reorder&time)   ; may not be needed</div><div>prc_reorder&time = cd_calendar(time, -2)</div><div><br></div><div>then you should be able to use the following coordinate subscripting to plot:</div><div>plot = gsn_csm_contour_map(wks,prc_reorder({19980422},:,:),res)</div><div><br></div><div>Hope that helps. If you have any further questions let ncl-talk know.</div><div>Adam</div><div><br></div><div> </div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-957394614251590624gmail_attr">On Wed, Jan 16, 2019 at 11:11 PM Md. Jalal Uddin <<a href="mailto:dmjalal90@gmail.com" target="_blank">dmjalal90@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 dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,</div><div dir="ltr"><br></div><div dir="ltr">I used cd_calendar to convert utc_date and day_of_year to find the day of year. Now, I want to subscript the time coordinate and plot. Could anyone help me? Please find the script in the attached.</div><div dir="ltr"><br clear="all"><div><div>Variable: time</div><div>Type: double</div><div>Total Size: 22776 bytes</div><div>            2847 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">  </span>[time | 2847]</div><div>Coordinates: </div><div>            time: [ 120..6939]</div><div>Number Of Attributes: 5</div><div>  standard_name :<span style="white-space:pre-wrap">    </span>time</div><div>  long_name :<span style="white-space:pre-wrap">       </span>Time</div><div>  units :<span style="white-space:pre-wrap">   </span>days since 1998-1-1 12:00:00</div><div>  calendar :<span style="white-space:pre-wrap">        </span>standard</div><div>  axis :<span style="white-space:pre-wrap">        </span>T</div></div><div><br></div><div>Best regards,</div><div>Jalal</div><div><br></div>-- <br><div dir="ltr" class="gmail-m_-957394614251590624gmail-m_-3551261291670573621gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font color="#000000" size="2"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology (English Language)<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a>  <br>Facebook: jalal.hossen.39  <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a>   <br>Twitter: dmjalal90  <br>Skype: dmjalal90</font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-957394614251590624gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font color="#000000" size="2"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology (English Language)<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a>  <br>Facebook: jalal.hossen.39  <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a>   <br>Twitter: dmjalal90  <br>Skype: dmjalal90</font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>