<div dir="ltr">Hello Everyone,<div>I need to modify the interval on x and y axes according to my necessity but I am not able to do that. I have attached the screenshot of my ncl window and my is my code is as following: <div><br></div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ;Load the required library files</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div><br></div><div>begin ;NCL script always start with 'begin' </div><div><br></div><div> a = addfile("<a href="http://wrfout_d01_2014-08-08_00.nc">wrfout_d01_2014-08-08_00.nc</a>","r") ;Loads the required nc file</div><div><br></div><div>; Type of plot outputfile </div><div>;type = "x11"</div><div>; type = "pdf"</div><div>; type = "ps"</div><div>; type = "ncgm"</div><div> type = "png"</div><div>;type@wkWidth = 600</div><div>;type@wkHeight = 800</div><div> wks = gsn_open_wks(type,"final_gsn") ; Create op plot file with name</div><div><br></div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>; First get the variables we will need </div><div><span class="" style="white-space:pre">        </span>tk2 = wrf_user_getvar(a,"HGT",0) ; T2 in Kelvin</div><div><span class="" style="white-space:pre">        </span>tc2 = tk2-273.16 ; T2 in C </div><div><span class="" style="white-space:pre">        </span>lat = wrf_user_getvar(a,"XLAT",0)</div><div><span class="" style="white-space:pre">        </span>lon = wrf_user_getvar(a,"XLONG",0)</div><div><span class="" style="white-space:pre">        </span>;print(lat(:,0))<span class="" style="white-space:pre">                        </span>;all lat values</div><div><span class="" style="white-space:pre">        </span>;print(lon(0,:))<span class="" style="white-space:pre">                        </span>;all lon values</div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>; Plotting options for T </div><div><span class="" style="white-space:pre">        </span>res = True </div><div><span class="" style="white-space:pre">        </span>res@gsnDraw = False <span class="" style="white-space:pre">        </span>;Don't draw yet</div><div> <span class="" style="white-space:pre">        </span>res@gsnFrame = False<span class="" style="white-space:pre">                </span>;Don't advance the frame(plot file will create but nothing will draw)</div><div><span class="" style="white-space:pre">        </span>res@gsnSpreadColors = True <span class="" style="white-space:pre">        </span>; use full range of colormap</div><div><span class="" style="white-space:pre">        </span>res@gsnMaximize = True <span class="" style="white-space:pre">        </span>;maximize plot in frame</div><div><span class="" style="white-space:pre">        </span>res@cnFillOn = True <span class="" style="white-space:pre">                        </span>;Turn On the contour color</div><div><span class="" style="white-space:pre">        </span>res@cnLinesOn = False<span class="" style="white-space:pre">                        </span>;Turn Off the contour lines</div><div><br></div><div><span class="" style="white-space:pre">        </span>res@lbTitleOn = False<span class="" style="white-space:pre">                        </span>;Turn off the color bar text<span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">        </span>res@lbOrientation = "Vertical"<span class="" style="white-space:pre">                </span>;color bar orientation</div><div><br></div><div><span class="" style="white-space:pre">        </span>;res@pmLabelBarSide = "Right"<span class="" style="white-space:pre">                </span>;color bar position<span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span>res@pmTickMarkDisplayMode = "Always" <span class="" style="white-space:pre">        </span></div><div><br></div><div><span class="" style="white-space:pre">        </span>res@mpGridAndLimbOn = False</div><div><span class="" style="white-space:pre">        </span>res@mpOutlineOn = False ;NCL Map outline off(Outline taking from shapefile)</div><div><span class="" style="white-space:pre">        </span>res@mpFillOn = False</div><div><span class="" style="white-space:pre">        </span>;res@mpTickMarkDisplayMode = "Never"<span class="" style="white-space:pre">        </span>;put it off otherwise some tick marks reqources will not work </div><div><br></div><div><br></div><div>;Necessary for contours to be overlaid correctly on WRF projection</div><div> <span class="" style="white-space:pre">        </span>res@tfDoNDCOverlay = True</div><div> <span class="" style="white-space:pre">        </span>;res@gsnAddCyclic = True</div><div><br></div><div><span class="" style="white-space:pre">        </span>res@tiMainString = "Terrain Height (m) "</div><div><span class="" style="white-space:pre">        </span>res@tiMainFontHeightF = 0.03 </div><div><span class="" style="white-space:pre">        </span></div><div>;<span class="" style="white-space:pre">        </span>res@tmEqualizeXYSizes = True<span class="" style="white-space:pre">        </span>;share the same label font height and major and minor tick lengths</div><div> <span class="" style="white-space:pre">        </span>res@tmXBOn = True</div><div> <span class="" style="white-space:pre">        </span>res@tmYLOn = True</div><div><span class="" style="white-space:pre">        </span>res@tmXBMode = "Manual" <span class="" style="white-space:pre">        </span>; Define your own tick mark labels.</div><div><span class="" style="white-space:pre">        </span>res@tmYLMode = "Manual" <span class="" style="white-space:pre">        </span>; Define your own tick mark labels.</div><div><span class="" style="white-space:pre">        </span>;res@tmXBLabelFontColor = 1<span class="" style="white-space:pre">        </span>; Change the color of the x-axis</div><div><span class="" style="white-space:pre">        </span>res@tmXBLabelAngleF = 0<span class="" style="white-space:pre">                        </span>; Change the angle on x-axis (bottom) values</div><div> <span class="" style="white-space:pre">        </span>res@tmXBLabelFont = 0 <span class="" style="white-space:pre">        </span>; Change font of labels.</div><div> <span class="" style="white-space:pre">        </span>res@tmYLLabelFont = 0 <span class="" style="white-space:pre">        </span>; Change font of labels.<span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span>res@tmXBLabelFontHeightF<span class="" style="white-space:pre">        </span>=0.015<span class="" style="white-space:pre">        </span>; Change font height of labels.</div><div><span class="" style="white-space:pre">        </span>res@tmYLLabelFontHeightF<span class="" style="white-space:pre">        </span>=0.02<span class="" style="white-space:pre">        </span>; Change font height of labels.</div><div><span class="" style="white-space:pre">        </span>;res@tmXBLabelFontAspectF<span class="" style="white-space:pre">        </span>= 1.3</div><div><span class="" style="white-space:pre">        </span>res@tmXBLabelFontThicknessF<span class="" style="white-space:pre">        </span>= 5</div><div><span class="" style="white-space:pre">        </span>res@tmYLLabelFontThicknessF<span class="" style="white-space:pre">        </span>= 5</div><div><br></div><div>res@tmXBTickStartF = min(lon(0,:))<span class="" style="white-space:pre">        </span></div><div>res@tmXBTickEndF = max(lon(0,:))<span class="" style="white-space:pre">        </span></div><div>res@tmXBTickSpacingF = 2</div><div>res@tmYLTickStartF = min(lat(:,0))<span class="" style="white-space:pre">        </span></div><div>res@tmYLTickEndF = max(lat(:,0))<span class="" style="white-space:pre">        </span></div><div>res@tmYLTickSpacingF = 2</div><div><span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span></div><div><br></div><div><br></div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div><br></div><div>;Set map resources based on projection on WRF output file</div><div> <span class="" style="white-space:pre">        </span>res = wrf_map_resources(a,res)</div><div><span class="" style="white-space:pre">        </span>contour_tc = gsn_csm_contour_map(wks,tc2,res) </div><div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>;Attach shapefile polylines to map </div><div><span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span>lnres = True </div><div><span class="" style="white-space:pre">        </span>lnres@NoHeaderFooterOn = True<span class="" style="white-space:pre">        </span></div><div><span class="" style="white-space:pre">        </span>lnres@gsLineColor = "Black"</div><div> <span class="" style="white-space:pre">        </span>lnres@gsLineThicknessF = 3.0</div><div><span class="" style="white-space:pre">        </span></div><div><br></div><div> poly = gsn_add_shapefile_polylines(wks,contour_tc,"india_state.shp",lnres)</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>;Now everything will be drawn</div><div>draw(contour_tc)</div><div>frame(wks)</div><div><br></div><div>end</div><div><br></div><div><br></div><div>Kindly help me.</div>Thanks & Regards<br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Arun Kumar Dwivedi,<br></div><div dir="ltr">Mob :09546189035</div></div></div></div>
</div></div></div>