<div dir="ltr">How do I get North to be on the top of my plots using WRF_lc_8.ncl? I am using the same code given on the website, where the plots shown have north in the upward direction. However, on my plot which is attached, north is towards the upper right corner of the plot... it is not directly upward. What should I be doing to fix this?<div><br></div><div>I am using the lambert conformal grid in WRF. My code is below (same as the website) Thanks! :</div><div><br></div><div><br></div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap">;----------------------------------------------------------------------
; WRF_lc_8.ncl
;
; Concepts illustrated:
; - Plotting WRF data that's on a Lambert Conformal map projection
; - Using gsn_csm_vector_scalar_map to plot WRF-ARW data
; - Drawing wind barbs over filled contours
; - Creating a color map using named colors
; - Drawing raster contours
;----------------------------------------------------------------------
; WRF: near surface winds and total precipitation
;----------------------------------------------------------------------
; These files are loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
;
; Open file
; Read U10 and V10, Cumulus (rinc) and Non-cumulus (rainnc) prc
;
f = addfile ("<a href="http://wrfout_d01_000000_25time.nc">wrfout_d01_000000_25time.nc</a>","r")
rainc = f->RAINC ; (Time, south_north, west_east)
rainnc = f->RAINNC
u10 = f->U10 ; (Time, south_north, west_east)
v10 = f->V10
times = wrf_user_getvar(f,"times",-1)
ntim = dimsizes(times) ; # time steps
;
; Use NCL operator > to make sure all values >=0.0
; Sum components and assign attributes
;
rainc = rainc > 0.0
rainnc = rainnc > 0.0
rainTot = rainc + rainnc
rainTot@description = "Total Precipitation"
rainTot@units = rainc@units
wks = gsn_open_wks("png","WRF_lc")
colors = (/"white","azure" \
,"green","palegreen","yellowgreen", "greenyellow" \
,"yellow","goldenrod","orange","orangered" \
,"red","deeppinK", "violet","darkviolet" \
,"blueviolet","blue" /)
res = True ; plot mods desired
res@gsnMaximize = True ; maximize size
res@gsnScalarContour = True ; contours desired
res@gsnLeftString = "Wind Vectors (m/s)"
res@gsnRightString = "Total Precipitation (mm)"
res@cnFillOn = True ; color plot desired
res@cnFillPalette = colors ; define colors for contour plot
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@cnFillMode = "RasterFill" ; raster
res@cnLevelSelectionMode = "ExplicitLevels" ; explicit [unequal] cn levels
res@cnLevels = (/0,0.1,1,2.5,5,7.5,10,15,20,25,37.5,50,75,100,125,150/)
res@vcGlyphStyle = "WindBarb"
res@vcRefLengthF = 0.025 ; ref vec length
res@vcMinDistanceF = 0.025 ; larger means sparser
res@vcWindBarbTickLengthF = 0.4 ; default 0.3
res@vcRefAnnoOn = False
res = wrf_map_resources(f,res)
res@gsnAddCyclic = False ; regional data: not cyclic
res@tfDoNDCOverlay = True
res@mpFillOn = False
res@mpGeophysicalLineColor = "black" ; wrf_map_resources uses "gray"
res@mpUSStateLineColor = "black"
res@mpGeophysicalLineThicknessF = 2.0 ; wrf_map_resources uses 0.5
res@mpUSStateLineThicknessF = 2.0
;
; Plot one time and level for demo
; . create u and v on a common grid for visualization: nothing fancy
;
nt = 12
;;do nt=0,ntim-1 ; uncomment to loop
res@tiMainString = times(nt)
plot = gsn_csm_vector_scalar_map(wks,u10(nt,:,:),v10(nt,:,:),rainTot(nt,:,:),res)
;;end do
end</pre></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
<tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" target="_blank" style="color:#4453ea">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>