<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Soma,</div><div class=""><br class=""></div><div class="">You’re welcome!<div class=""><br class=""></div><div class="">Sometimes debugging a script involves trial and error, but in this case I just happened to notice that your script used two different time arrays for <font face="Menlo" class="">time_axis_labels</font> and <font face="Menlo" class="">gsn_csm_hov</font>, while all of the examples on the <a href="https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml" class="">time_axis_labels documentation page</a> use the same time dimension for both <font face="Menlo" class="">time_axis_labels</font> and whichever <font face="Menlo" class="">gsn_csm_*</font> function it calls.</div><div class=""><br class=""></div><div class="">Regarding the other small mistake you mentioned: the version of the script that you provided in your original email only has 77 lines, so I’d need an updated version of the script to help with the issue on line 85.</div><div class=""><br class=""></div><div class="">Kevin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 28, 2018, at 12:23 PM, Soma Roy <<a href="mailto:somaroy892@gmail.com" class="">somaroy892@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Awesome, thanks! <div dir="auto" class=""><br class=""></div><div dir="auto" class="">It worked. But is this process is just to check by trail and error?</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I did a small mistake at line no 85.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thank you again.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Soma</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Jun 28, 2018, 23:47 Kevin Hallock <<a href="mailto:hallock@ucar.edu" target="_blank" rel="noreferrer" class="">hallock@ucar.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Soma,<div class=""><br class=""></div><div class="">Thanks for sharing your file.</div><div class=""><br class=""></div><div class="">I was able to clean up the Y-axis labels by replacing:</div><div class=""><font face="Menlo" class=""> restick@ttmMajorStride = 25<br class=""> time_axis_labels(ts&time,res,restick)<br class=""></font><br class=""></div><div class="">with:</div><div class=""><font face="Menlo" class=""> restick@ttmMajorStride = <b class="">7</b><br class=""> time_axis_labels(<b class="">xDay</b>&time,res,restick)<br class=""></font><br class=""></div><div class="">You can modify the interval between major tick marks as needed.</div><div class=""><br class=""></div><div class="">Kevin</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 28, 2018, at 11:56 AM, Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer" target="_blank" class="">somaroy892@gmail.com</a>> wrote:</div><br class="m_-6273046461189209469m_-559133010665769597Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1Qa144nlu5gSNitlM6i5YT0F8_bZa-Wme/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" rel="noreferrer noreferrer" target="_blank" class=""><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png" class=""> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom" class="">spatial_leh.nc</span></a><img style="opacity:0.55;float:right;display:none" class=""></div>Sending you the sample file here as I am unable to put it in ftp.<br class=""><div class=""><br class=""></div><div class="">Soma</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Jun 28, 2018 at 10:54 PM, Kevin Hallock <span dir="ltr" class=""><<a href="mailto:hallock@ucar.edu" rel="noreferrer noreferrer" target="_blank" class="">hallock@ucar.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Soma,<div class=""><br class=""></div><div class="">It’s hard to determine exactly what the problem is without a copy of your data file to test the script myself, but I suspect there may be something odd happening with the <font face="Menlo" class="">time_axis_labels</font> and <font face="Menlo" class="">gsn_csm_hov</font> calls:</div><div class=""><font face="Menlo" class=""> time_axis_labels(ts&time,res,restick)<br class=""> plot = gsn_csm_hov(wks,xDay(:,:,{78}),res) ; lat vs time.<br class=""></font><br class=""></div><div class="">In particular, I noticed that the time dimensions on the variables <font face="Menlo" class="">ts</font> and <font face="Menlo" class="">xDay</font> are different sizes (248 for <font face="Menlo" class="">ts</font>, 31 for <font face="Menlo" class="">xDay</font>). You may want to try using <font face="Menlo" class="">xDay&time</font> in your <font face="Menlo" class="">time_axis_labels</font> call, although you might also need to adjust the value of <font face="Menlo" class="">restick@ttmMajorStride</font> to account for the smaller time dimension on <font face="Menlo" class="">xDay</font>.</div><div class=""><br class=""></div><div class="">If you are still having trouble generating correct Y-axis labels after trying this, would you perhaps be able to provide us with a copy of your data file? (See uploading instructions: <a href="https://www.ncl.ucar.edu/ftp_files.shtml" rel="noreferrer noreferrer" target="_blank" class="">https://www.ncl.ucar.edu/ftp_files.shtml</a>)</div><div class=""><br class=""></div><div class="">I hope this helps,</div><div class="">Kevin</div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="m_-6273046461189209469m_-559133010665769597h5"><div class="">On Jun 28, 2018, at 10:26 AM, Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer" target="_blank" class="">somaroy892@gmail.com</a>> wrote:</div><br class="m_-6273046461189209469m_-559133010665769597m_-991648963885420994Apple-interchange-newline"></div></div><div class=""><div class=""><div class="m_-6273046461189209469m_-559133010665769597h5"><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">I am trying to calculate daily mean values from daily 4 time steps and plot a date vs latitude plot.</div><div class=""><br class=""></div><div class="">Date on Y-axis is not coming clearly. </div><div class=""><br class=""></div><div class="">PrintVarSummary of the data is as follows;</div><div class=""><br class=""></div><div class=""><div class="">Variable: tem</div><div class="">Type: float</div><div class="">Total Size: 6416172 bytes</div><div class=""> 1604043 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 123] x [latitude | 161] x [longitude | 81]</div><div class="">Coordinates:</div><div class=""> time: [969336..970068]</div><div class=""> latitude: [ 0..40]</div><div class=""> longitude: [65..85]</div><div class="">Number Of Attributes: 6</div><div class=""> missing_value : -32767</div><div class=""> missing_value_original : -32767</div><div class=""> _FillValue : -32767</div><div class=""> _FillValue_original : -32767</div><div class=""> long_name : 2 metre temperature</div><div class=""> units : K</div><div class=""><br class=""></div><div class="">Variable: cd_date</div><div class="">Type: double</div><div class="">Total Size: 1992 bytes</div><div class=""> 249 values</div><div class="">Number of Dimensions: 1</div><div class="">Dimensions and sizes: [249]</div><div class="">Coordinates:</div><div class="">Number Of Attributes: 2</div><div class=""> units : days since 1990-01-01 00:00:00</div><div class=""> calendar : gregorian</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Variable: cd_date</div><div class="">Type: double</div><div class="">Total Size: 1992 bytes</div><div class=""> 249 values</div><div class="">Number of Dimensions: 1</div><div class="">Dimensions and sizes: [249]</div><div class="">Coordinates:</div><div class="">Number Of Attributes: 2</div><div class=""> units : days since 1990-01-01 00:00:00</div><div class=""> calendar : gregorian</div><div class="">(0) 2010080100</div><div class="">(1) 2010080106</div><div class="">(2) 2010080112</div><div class="">(3) 2010080118</div><div class="">(4) 2010080200</div><div class="">(5) 2010080206</div><div class="">(6) 2010080212</div><div class="">(7) 2010080218</div><div class="">........................................</div><div class="">(120) 2010083100</div><div class="">(121) 2010083106</div><div class="">(122) 2010083112</div><div class="">(123) 2010083118</div><div class=""><br class=""></div><div class="">(124) 2010080103</div><div class="">(125) 2010080109</div><div class="">(126) 2010080115</div><div class="">(127) 2010080121</div><div class="">(128) 2010080203</div><div class="">(129) 2010080209</div><div class="">.........................................</div><div class="">(244) 2010083103</div><div class="">(245) 2010083109</div><div class="">(246) 2010083115</div><div class="">(247) 2010083121</div><div class="">(248) 2010090100</div><div class=""><br class=""></div><div class="">Variable: temp</div><div class="">Type: float</div><div class="">Total Size: 12988836 bytes</div><div class=""> 3247209 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 249] x [latitude | 161] x [longitude | 81]</div><div class="">Coordinates:</div><div class=""> time: [969336..970080]</div><div class=""> latitude: [ 0..40]</div><div class=""> longitude: [65..85]</div><div class="">Number Of Attributes: 6</div><div class=""> units : K</div><div class=""> long_name : 2 metre temperature</div><div class=""> _FillValue_original : -32767</div><div class=""> _FillValue : -32767</div><div class=""> missing_value_original : -32767</div><div class=""> missing_value : -32767</div><div class=""><br class=""></div><div class="">Variable: ts1</div><div class="">Type: short</div><div class="">Total Size: 6468336 bytes</div><div class=""> 3234168 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 248] x [latitude | 161] x [longitude | 81]</div><div class="">Coordinates:</div><div class=""> time: [969336..970077]</div><div class=""> latitude: [ 0..40]</div><div class=""> longitude: [65..85]</div><div class="">Number Of Attributes: 6</div><div class=""> scale_factor : 0.0008040587614255413</div><div class=""> add_offset : 289.9817757049943</div><div class=""> _FillValue : -32767</div><div class=""> missing_value : -32767</div><div class=""> units : K</div><div class=""> long_name : 2 metre temperature</div><div class=""><br class=""></div><div class="">Variable: ts</div><div class="">Type: float</div><div class="">Total Size: 12936672 bytes</div><div class=""> 3234168 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 248] x [latitude | 161] x [longitude | 81]</div><div class="">Coordinates:</div><div class=""> time: [969336..970077]</div><div class=""> latitude: [ 0..40]</div><div class=""> longitude: [65..85]</div><div class="">Number Of Attributes: 1</div><div class=""> _FillValue : -32767</div><div class=""><br class=""></div><div class="">Variable: tim</div><div class="">Type: integer</div><div class="">Total Size: 996 bytes</div><div class=""> 249 values</div><div class="">Number of Dimensions: 1</div><div class="">Dimensions and sizes: [time | 249]</div><div class="">Coordinates:</div><div class=""> time: [969336..970080]</div><div class="">Number Of Attributes: 3</div><div class=""> units : hours since 1900-01-01 00:00:0.0</div><div class=""> long_name : time</div><div class=""> calendar : gregorian</div><div class=""><br class=""></div><div class=""><div class="">Variable: xDay</div><div class="">Type: float</div><div class="">Total Size: 1617084 bytes</div><div class=""> 404271 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 31] x [latitude | 161] x [longitude | 81]</div><div class="">Coordinates:</div><div class=""> time: [969336..970056]</div><div class=""> latitude: [ 0..40]</div><div class=""> longitude: [65..85]</div><div class="">Number Of Attributes: 8</div><div class=""> _FillValue : -32767</div><div class=""> missing_value : -32767</div><div class=""> missing_value_original : -32767</div><div class=""> _FillValue_original : -32767</div><div class=""> long_name : 2 metre temperature</div><div class=""> units : K</div><div class=""> time : 969336</div><div class=""> NCL_tag : calculate_daily_values: arith=avg</div></div></div><div class=""><br class=""></div><div class="">Output figure file and script are attached below.</div><div class=""><br class=""></div><div class="">Kindly inform me how to fix it.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Soma</div><div class=""><br class=""></div><div class=""><br class=""></div></div>
</div></div><span id="m_-6273046461189209469m_-559133010665769597m_-991648963885420994cid:0DD0FB2F-85A1-4E24-8147-399CA9DBC34C@scd.ucar.edu" class=""><time_lat.png></span><span id="m_-6273046461189209469m_-559133010665769597m_-991648963885420994cid:EBD8D353-679D-40AA-AD3D-38421962B32A@scd.ucar.edu" class=""><test.ncl></span>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" rel="noreferrer noreferrer" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></body></html>