[ncl-talk] Trying to zoom in on Texas from WRF data, but am having issues with data scaling to map projection

Andrew Schwartz aschwa at ucar.edu
Mon Mar 13 14:16:02 MDT 2017


I am working on zooming in on Texas/ New Mexico for a case study that I'm
performing with the WRF. I have the actual map zoomed in to the region that
I want, but the plotting of the qnifa variable doesn't scale and stays as
if the map projected is that of the CONUS. Can anyone tell me what I'm
doing wrong? I have attached two plots to illustrate the issue. The plot of
the CONUS is correct in its placement and areas of qnifa, the zoomed plot
is not.

Thanks in advance for the help!

-Andrew

load "$CSM/gsn_code.ncl"
load "$CSM/gsn_csm.ncl"
load "$CSM/contributed.ncl"

begin
  res = True
  res at cnLinesOn          = False
  res at cnFillOn           = True               ; color plot desired
  res at cnLineLabelsOn     = False              ; turn off contour lines
  res at cnInfoLabelOn       = False           ; turn off cn info label

  res at mpGeophysicalLineColor= "black" ; color of continental outlines
  res at mpPerimOn             = True ; draw box around map
  res at mpPerimDrawOrder      = "PostDraw"
  res at mpGridLineDashPattern = 2 ; lat/lon lines as dashed
  res at mpOutlineBoundarySets = "GeophysicalAndUSStates"
  res at mpUSStateLineColor    = "black"

  cmap = read_colormap_file("CBR_drywet")

  ff = addfile("wrfout.nc","r")
  if (ff at MAP_PROJ .eq. 1) then
    res at mpProjection        = "LambertConformal"
  end if
  res at mpLambertMeridianF    = ff at CEN_LON
  res at mpLambertParallel1F   = ff at TRUELAT1
  res at mpLambertParallel2F   = ff at TRUELAT2
  res at gsnAddCyclic          = False
  res at tfDoNDCOverlay        = True
  res at mpLimitMode           = "Corners"
  xlats = ff->XLAT
  xlons = ff->XLONG
  ijdim = dimsizes(xlats)
  imax = ijdim(1)
  jmax = ijdim(2)
  res at mpLeftCornerLatF      = 37
  res at mpLeftCornerLonF      = -110
  res at mpRightCornerLatF     = 28
  res at mpRightCornerLonF     = -96
  res at mpFillOn                    = True

  res at cnLevelSelectionMode = "ExplicitLevels"
  res at cnLevels  = (/4E6,8E6,16E6,32E6,64E6/)
  res at cnFillColors = (/7,6,5,4,3,2/)
  res at cnMissingValFillColor = 13

  hgt = ff->QNIFA(0,0,:,:)

  res at tiMainString = "Ice-Friendly Aerosol Concentration at Lowest Model
Level  ~C~   W/ IC_BC and -30% SMOIS 19:00Z February 24, 2007"
  res at tiMainFontHeightF = 0.015
  res at gsnRightString = " "
  res at gsnLeftString = " "
  res at gsnMaximize      = True
  res at gsnFrame     = False            ; Don't advance the frame

    wks = gsn_open_wks("png","qnifa_plot")
    gsn_define_colormap(wks, "CBR_drywet")

    map = gsn_csm_contour_map(wks,hgt,res)

  frame(wks)

end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170313/2f169b70/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qnifa_plot_dec30_smois.png
Type: image/png
Size: 171479 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170313/2f169b70/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qnifa_plot_TxCloseUp.png
Type: image/png
Size: 65680 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170313/2f169b70/attachment-0001.png 


More information about the ncl-talk mailing list