<div dir="ltr">Dilip,<br><br>The message "possibly an undefined procedure" is an important clue.  This sometimes means that you forgot to load a library function.  (The other common meaning is a spelling mistake.)  This load statement was in the example that I showed you earlier, so you need to add this at the top of your script:<br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br><br>Also for this to work, you must have "begin" and "end" at the top and bottom of your code, and load statements must be placed *before* the begin statement.  Like this:<br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br>begin<br>    ... your main code ...<br>end<br><br>--Dave<br><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 19, 2018 at 1:07 PM, Dilip V <span dir="ltr"><<a href="mailto:dilip.v@students.iiserpune.ac.in" target="_blank">dilip.v@students.iiserpune.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span style="font-size:14px;float:none;display:inline">I tried keeping my time coordinates as it is and then tried to plot. It gave me an error in that says</span><div style="font-size:14px">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-------------</div><div style="font-size:14px"><div>fatal:syntax error: line 242 in file pract7.ncl before or near \n </div><div>time_axis_labels(oxn&time,res,<wbr>restick)</div><div>------------------------------<wbr>--------^</div><div><br></div><div>fatal:syntax error: possibly an undefined procedure</div></div><div style="font-size:14px">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------</div><div style="font-size:14px"><br></div><div style="font-size:14px"><b>I am not able to plot my contour with the 'time_axis_labels' function. </b></div><div style="font-size:14px"><br></div><div style="font-size:14px">Here is my code,</div><div style="font-size:14px">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>---------------</div><div style="font-size:14px"><div>f = addfile("<a href="http://precip_2005.nc/" style="color:rgb(17,85,204)" target="_blank">precip_2005.nc</a>","r")</div><div>p1 = f->precip(:,{16.25:26.75},{74.<wbr>75:86.25})</div><div>pr1 = p1(lat|:,lon|:,time|:)  </div><div>g = addfile("<a href="http://precip.day.ltm.nc/" style="color:rgb(17,85,204)" target="_blank">precip.day.ltm.nc</a>","r<wbr>") </div><div>prm = g->precip(:,{16.25:26.75},{74.<wbr>75:86.25})</div><div>prmq = prm(lat|:,lon|:,time|:)</div><div>time = f->time</div><div>prnew1 = new((/22,24,365/),float)</div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div><br></div><div>;computing anomoly at all points</div></span><div>do i = 0,21</div><div>    do j = 0,23</div><div>        do k = 0,364</div><div>            prnew1(i,j,k) = pr1(i,j,k)-prmq(i,j,k)</div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div>        end do </div><div>    end do</div><div>end do</div></span><div>prnew1!0 = "lat"</div><div>prnew1!1 = "lon"</div><div>prnew1!2 = "time"</div><div>prn = prnew1(time|:,lat|:,lon|:)</div><div>copy_VarAtts(p1,prn)</div><div>copy_VarCoords(p1,prn)</div><div>prn@long_name = "Daily Anomoly (data-clim)"</div><div>prn1 = prn(lon|:,lat|:,time|:)</div><div>pn = prn1(time|:,lat|:,lon|:)</div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div><br></div><div>;applying fft over anomoly at all points</div></span><div>ft1 = new((/2,365,22,24/),float)</div><div>do h = 0,21</div><div>    do k = 0,23</div><div>        gt = cfftf(pn(:,h,k),0.0,0)</div><div>        ft1(0,:,h,k) = gt(0,:)</div><div>        ft1(1,:,h,k) = gt(1,:)</div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div>    end do</div><div>end do</div><div><br></div><div>;filtering out unwanted frequencies</div></span><div>do h = 0,21</div><div>    do k = 0,23</div><div>        ft1(0,13:352,h,k) = 0.0</div><div>        ft1(1,13:352,h,k) = 0.0</div><div>        ft1(0,360:,h,k)   = 0.0</div><div>        ft1(1,360:,h,k)   = 0.0</div><div>        ft1(0,0:5,h,k)    = 0.0</div><div>        ft1(1,0:5,h,k)    = 0.0</div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div>    end do</div><div>end do</div><div><br></div><div>;ifft of required frequencies</div></span><div>ift1 = new((/365,22,24/),float)</div><div>do h = 0,21</div><div>    do k = 0,23</div><div>        kt = cfftb(ft1(:,:,h,k),1)</div><div>        ift1(:,h,k) = kt(:)</div><div>    end do</div><div>end do</div><div>copy_VarAtts(pn,ift1)</div><div>copy_VarCoords(pn,ift1)</div><div>oxn = ift1(lon|:,lat|:,time|:)</div><div>oxn@long_name = "30-60 day anomaly of precipitation"</div><div><br></div><div>wks   = gsn_open_wks ("png", "lat_time3" )  ; send graphics to PNG file </div><span class="gmail-m_-7075976704541193597gmail-im" style="color:rgb(80,0,80)"><div> res                  = True                ; plot mods desired</div></span><div> res@cnFillOn         = True                ; color on</div><div> res@lbLabelStride    = 2                ; every other label</div><div> res@lbOrientation    = "Vertical"          ; vertical label bar</div><div> res@pmLabelBarOrthogonalPosF = -0.04       ; move label bar closer to axis</div><div> res@cnLinesOn        = False               ; turn off contour lines</div><div> res@cnFillPalette    = "ViBlGrWhYeOrRe"    ; set color map</div><div> </div><div> res@tiMainString     = "Anomalies at 80.25E central india"  ; title</div><div><br></div><div> res@vpXF             = 0.12                ; default is 0.2 (aspect ratio)</div><div> res@vpYF             = 0.8                 ; default is 0.8</div><div> res@vpHeightF        = 0.4                 ; default is 0.6</div><div> res@vpWidthF         = 0.75                ; default is 0.6</div><div><br></div><div> res@cnLevelSelectionMode = "AutomaticLevels" ; manual levels</div><div><br></div><div> restick = True</div><div> restick@ttmFormat = "%d %c %Y"</div><div>time_axis_labels(oxn&time,res,<wbr>restick)</div><div>plot = gsn_csm_contour(wks,oxn({80.25<wbr>},:,200:215), res)</div></div><div style="font-size:14px">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-----------------</div></div></blockquote></div></div></div></div>