<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>When you encounter an error like this, I <b>s</b>uggest that you examine the 'tm' resources.</div><div><br></div><div>At the top of the NCL home page: (a) click 'Resources'; (b) click 'tm' [Tickmark].</div><div><br></div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/tm.shtml"><b>http://www.ncl.ucar.edu/Document/Graphics/Resources/tm.shtml</b></a></div><div><br></div><div>tmXLabels <--- No such label. Misspelled!<br></div><div><br></div><div>There is a <br></div><div><br></div><div>tmXBLabels<--- ?what you want?</div><div><br></div><div>=======</div><div>A less sophisticated method:</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymm_to_yyyyfrac.shtml"><b>http://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymm_to_yyyyfrac.shtml</b></a></div><div><br></div><div><a href="http://www.ncl.ucar.edu/Applications/time.shtml"><b>http://www.ncl.ucar.edu/Applications/time.shtml</b></a></div><div><br></div><div><pre> tstart = 2000
tend = 2006
yyyymm = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymm_time.shtml"><b>yyyymm_time</b></a>(tstart, tend, "integer")<br></pre><pre>or<br> yyyymm = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml"><strong>cd_calendar</strong></a>(time, <b>-1</b>)
<br>then<br> <br> yyyyfrac = yyyymm_to_yyyyfrac(yyyymm,0) ; create fractional years for plotting purposes
; XB axis<br> plot = gsn_csm_xy(wks,yyyyfrac, y,res)</pre></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 11, 2018 at 11:34 AM Amal Inge <<a href="mailto:amalingenieur89@gmail.com">amalingenieur89@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>Thanks Rick, it works now but it's not reading the tickmarks it gives me this warning:</div><div>warning:tmXValues is not a valid resource in xy_xy at this time<br>warning:tmXLabels is not a valid resource in xy_xy at this time<br>warning:tmXValues is not a valid resource in xy_xy at this time<br>warning:tmXLabels is not a valid resource in xy_xy at this time</div><div><br></div><div>the plot attached<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 11 déc. 2018 à 18:53, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> a écrit :<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>Did you add this line ath the top, as per the documentation?</div><div><br></div><div><pre>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br><br> <a href="https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml</a><br><br><br><br><br></pre></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 11, 2018 at 10:21 AM Amal Inge <<a href="mailto:amalingenieur89@gmail.com" target="_blank">amalingenieur89@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>hi Carl,</div><div>i made some modification in the script attached but I had this error;</div><div> <br>fatal:syntax error: line 49 in file xy.ncl before or near ; sets the correct time labels<br> <br>time_axis_labels(x, res, restime) ; sets the correct time labels<br>^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:Syntax Error in block, block not executed<br>fatal:error at line 52 in file xy.ncl<br><br><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 11 déc. 2018 à 14:47, Carl Schreck <<a href="mailto:cjschrec@ncsu.edu" target="_blank">cjschrec@ncsu.edu</a>> a écrit :<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">Please see <a href="https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml</a> and the examples therein.</div><div dir="ltr"><br></div><div>Does it work if you uncomment line 49? If not, can you be more specific on what "doesn't work"?</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 11, 2018 at 3:24 AM Amal Inge <<a href="mailto:amalingenieur89@gmail.com" target="_blank">amalingenieur89@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"><br><div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div>Dear NCL experts,</div><div><br></div><div>I want to plot a time series of monthly data of nc file with the script attached but it didn't work, i think that I should convert the time "since seconds" to month-year.</div><div>how could i do this please?</div><div><br></div><div>many thanks</div><div>Amal<br></div><div><br></div><div>netcdf dox01_med_0-52 {<br>dimensions:<br> time = UNLIMITED ; // (215 currently)<br> lev = 13 ;<br> lat = 253 ;<br> lon = 670 ;<br>variables:<br> double time(time) ;<br> time:axis = "T" ;<br> time:calendar = "standard" ;<br> time:units = "seconds since 1970-01-01 00:00:00" ;<br> time:long_name = "time" ;<br> time:standard_name = "time" ;<br> float lev(lev) ;<br> lev:_CoordinateZisPositive = "down" ;<br> lev:_CoordinateAxisType = "Height" ;<br> lev:axis = "Z" ;<br> lev:positive = "down" ;<br> lev:units = "m" ;<br> lev:long_name = "depth" ;<br> lev:standard_name = "depth" ;<br> float lat(lat) ;<br> lat:axis = "Y" ;<br> lat:units = "degrees_north" ;<br> lat:long_name = "latitude" ;<br> lat:standard_name = "latitude" ;<br> float lon(lon) ;<br> lon:axis = "X" ;<br> lon:units = "degrees_east" ;<br> lon:long_name = "longitude" ;<br> lon:standard_name = "longitude" ;<br> float dox(time, lev, lat, lon) ;<br> dox:missing_value = 1.e+20f ;<br> dox:_ChunkSizes = 1, 22, 84, 161 ;<br> dox:units = "millimol m-3" ;<br> dox:long_name = "Mole concentration of Dissolved Molecular Oxygen in sea water" ;<br> dox:standard_name = "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water" ;<br> dox:_FillValue = 1.e+20f ;<br><br>// global attributes:<br> :creation_date = "Tue Dec 4 23:27:50 CET 2018" ;<br> :Conventions = "None" ;<br> :source_file = "<a href="http://dox_med_0-52.nc" target="_blank">dox_med_0-52.nc</a>" ;<br> :title = "NCL Efficient Approach to netCDF Creation" ;<br>}<br><br></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_-1194078348243592842gmail-m_-6435081289964089730gmail-m_3488289325832636817gmail-m_-408716523230057499gmail-m_1236975114054032346gmail_signature"><div dir="ltr"><div><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"><br><table style="background-color:transparent;max-width:100%;border-collapse:collapse;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px" cellspacing="2" cellpadding="2" border="0"><tbody><tr><td width="71" height="71" align="center"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="https://ncics.org/" style="color:rgb(17,85,204)" target="_blank"><img src="https://ncics.org/ncics/img/NCICS_logo-131x131.png"></a></span></span></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Research Scholar</b></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://ncsu.edu/" style="color:rgb(38,58,143);font-weight:bold" target="_blank">North Carolina State University</a><br></span></span><a href="https://ncics.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">North Carolina Institute for Climate Studies (NCICS)</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: <a href="tel:(828)%20257-3140" value="+18282573140" style="color:rgb(17,85,204)" target="_blank">+1 828 257 3140</a><br></span></span><span style="font-family:arial,helvetica,sans-serif;font-size:11px">c: <a href="tel:(828)%20484-1702" value="+18284841702" style="color:rgb(17,85,204)" target="_blank">+1 828 484 1702</a><br></span><a href="http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">Publications</a><br><a href="https://ncics.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">ncics.org/mjo</a><br><a href="https://www.cyclonecenter.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">CycloneCenter.org</a><br></td></tr></tbody></table></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>
</blockquote></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>
</blockquote></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>