<div dir="ltr">Hi Prasad,<div>Please do not write to individuals who respond to ncl-talk and not to ncl-talk itself, as that way others can assist and see the resolution of the issue. My original email still stands: The range of values specified in tmXBValues needs to match the range of x-axis coordinate values of the plotted array. In your case, from your printVarSummary output, you have latitudes that are around 30N:</div><div>lat: [29.84782..33.84531]<br></div><div>so you will want to set tmXBValues to have values between 29.84 and 33.84. For example:</div><div>resx@tmXBMode = "Explicit"</div><div>resx@tmXBValues = fspan(29.5,34,10)</div><div>resx@tmXBLabels = resx@tmXBValues </div><div><br></div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2019 at 1:12 AM Prasad Kunjeer <<a href="mailto:pskunjeer@gmail.com">pskunjeer@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>Sir,</div><div>As suggested by you, I have drawn in default mode without specifying the explicit x labels. The output is enclosed as an attachment. The figure shows only one lat value of 30N. The output of the printVarSummary(slice1) is</div><div><br></div><div>Variable: slice1<br>Type: float<br>Total Size: 19328 bytes<br>            4832 values<br>Number of Dimensions: 2<br>Dimensions and sizes:  [lev | 32] x [lat | 151]<br>Coordinates: <br>            lev: [996.9073..5.045747]<br>            lat: [29.84782..33.84531]<br>Number Of Attributes: 8<br>  lon :    76.08612<br>  Time :     2018-09-20_15:00:00<br>  FieldType :     104<br>  MemoryOrder :   XYZ<br>  description :   x-wind component<br>  units :    m s-1<br>  stagger :      <br>  coordinates :     XLONG XLAT<br></div><div><br></div><div>The Variable does not have longitude value, is this giving the problem in an explicit mode where I am specifying the longitude value. <br></div><div><br></div><div>I have tried explicit mode without longitudinal value but this also gives no x value labels. <br></div><div><br></div><div><div><div dir="ltr" class="gmail-m_-8235131767705523497gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:10pt;font-family:Mangal,serif" lang="HI">Regards<br>प्रसाद कुंजीर</span><span style="font-size:9pt;font-family:Arial,sans-serif">/ </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Prasad Kunjeer<br>
</span><span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">वैज्ञानिक -</span></span><span lang="hi"> सी</span><span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI"> / </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Scientist - C<br>
</span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">केन्द्रीय जल और विद्युत अनुसंधान</span><span style="font-size:10.5pt;font-family:Arial,sans-serif" lang="HI"> </span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">शाला / </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Central Water and Power Research Station<br>
</span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">पुणे </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">411 024/ Pune 411 024</span></span></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 11, 2019 at 9:44 PM Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">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">Hi Prasad,<div>Whenever you are trying to set explicit tickmarks and they disappear, then it is likely that the domain of your set tm??Values is outside the corresponding range of the data coordinate variable (in this case the latitudes of your slice1 array). Try commenting out the resources that start with res@tmXB*, and labels should appear (although they likely will not be what you want). Once you see the range of the default tick mark labels, that indicates what the range should be for your res@tmXBValues resource. </div><div><br></div><div>If the above does not help please respond to ncl-talk with the output from printVarSummary(slice1)</div><div>Adam</div><div><br></div><div><br></div><div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 11, 2019 at 12:30 AM Prasad Kunjeer 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"><div>Sir,</div><div>I am using the following script to plot U wind from WRF output file. I am able to plot the figure, but the X-axis tick marks are not appearing. The script is follow<br></div><div><br></div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br><br>begin<br><br>    fName = "/home/emsuser/Build_WRF/wrfprd/results/do3/t/<a href="http://do3.nc" target="_blank">do3.nc</a>"<br>    f = addfile(fName, "r")<br><br>    U1           = f->U<br>    U            = wrf_user_unstagger(U1,U1@stagger)<br>    lat          = f->XLAT(0,:,0)            <br>    lon          = f->XLONG(0,0,:)  <br>    znu          = f->ZNU(0,:) ; eta levels<br>    lev          = znu*1000 ; [996.9073..5.045747]<br>    Time         = chartostring( f->Times(:,:) )<br><br>    U!1 = "lev"<br>    lev@units= "hPa"<br>    U!0 = "Time"<br>    U!2 = "lat"<br>    lat@units = "degree_north"<br>    U!3 = "lon"<br>    lon@units = "degree_east"<br><br>    U&lev = lev<br>    U&Time = Time<br>    U&lat = lat<br>    U&lon = lon<br><br>    wgt   = (/ 1., 3., 4., 3., 1./)                  ; wgts for temporal smooth<br>    wgt   = wgt/sum(wgt)                             ; normalize<br><br>    lat2d          = f->XLAT(0,:,:)            <br>    lon2d          = f->XLONG(0,:,:) <br><br>    slice         = U(lev|:,Time|:,lat|:,lon|:)      ; trick to copy meta data<br>    slice1        = U(lev|:,Time|1,lat|84:234,lon|175)<br>    printVarSummary(slice1)<br><br> <br>    wks = gsn_open_wks("png" ,"WRF_U_Wind_New_1")       ; open workstation<br>   <br>;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>; Create resources for cross section(s)<br>;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>   resx = True<br>   resx@gsnMaximize          = True  <br>   resx@cnFillOn             = True            ; turn on color fill<br>   resx@cnLinesOn            = False           ; turn lines on/off         ; True is default<br>   resx@cnLineLabelsOn       = False           ; turn line labels on/off   ; True is default<br>   resx@cnFillPalette        = "ncl_default"<br><br>   nLabels                   = 8               ; arbitrary <br>   resx@tmXBMode             = "Explicit"<br>   resx@tmXBLabels           = new(nLabels,"string")<br>   resx@tmXBValues           := toint(fspan(84,234,nLabels))<br>   do i=0,nLabels-1<br>       x = lon2d(resx@tmXBValues(i),176)<br>       y = lat2d(resx@tmXBValues(i),176)<br>       resx@tmXBLabels(i) = sprintf("%5.1f", y)+"~C~"+sprintf("%5.1f", x)<br>       print(resx@tmXBLabels(i))<br>   end do <br><br>   plot  = gsn_csm_pres_hgt(wks, slice1, resx)   <br><br>end</div><div><br></div><div>I have attached the plot for ready reference. Any help is highly appreciated.<br></div><div><br></div><div><div><div dir="ltr" class="gmail-m_-8235131767705523497gmail-m_-9110161608410825246gmail-m_-4381391483137654933gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:10pt;font-family:Mangal,serif" lang="HI">Regards<br>प्रसाद कुंजीर</span><span style="font-size:9pt;font-family:Arial,sans-serif">/ </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Prasad Kunjeer<br>
</span><span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">वैज्ञानिक -</span></span><span lang="hi"> सी</span><span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI"> / </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Scientist - C<br>
</span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">केन्द्रीय जल और विद्युत अनुसंधान</span><span style="font-size:10.5pt;font-family:Arial,sans-serif" lang="HI"> </span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">शाला / </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">Central Water and Power Research Station<br>
</span><span style="font-size:10.5pt;font-family:Mangal,serif" lang="HI">पुणे </span><span style="font-size:10.5pt;font-family:Arial,sans-serif">411 024/ Pune 411 024</span></span></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></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-8235131767705523497gmail-m_-9110161608410825246gmail_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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_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>