WRF overlays

From: James Correia <jimmyc42_at_nyahnyahspammersnyahnyah>
Date: Tue, 3 Jun 2008 13:56:48 -0700

Hi All-
I am trying to overlay some variables using the wrf_contour function. I have
completely given up on the whole zooming in feature listed at the WRF-NCL
website. It appears these will work in the future NCL release at least thats
what I am guessing.

My attempt to use wrf_overlay always results in an error. The error is:
fatal:syntax error: line xxx in the file vort.ncl before or near wrf_overlay
plot = wrf_overlay
______________^

Does anybody have an example script using the 5.0.0 NCL release that can
accomplish:
1. zooming in to a region of the domain
2. overlay two variables (one with shading and one with contouring)
3. maximize the plot size to fit the page.

Thanks
jimmyc

Due to the length of the code, I have provided my plotting procedure:
  res = True
  colors = (/"white","black" \ ; {fore/back}ground
            ,"white" \
            ,"orange" \
            ,"red","violet" \
            ,"blueviolet","blue" /)
  gsn_define_colormap(wks, colors)
  res_at_gsnMaximize = True ; maximize size
  res_at_gsnSpreadColors = True ; use full range of colormap
  res_at_gsnRightString = "Vorticity and W"
  res_at_gsnLeftString = "Wind speed"
  res_at_mpGeophysicalLineThicknessF = 2.0
  res_at_mpUSStateLineThicknessF = 2.0
;************************************************
; Use WRF_contributed procedure to set map resources
;************************************************
  WRF_map_c(f, res, 0) ; reads info from file

;************************************************
; set True for native (direct) mapping (faster plotting)
; set False for non-native mappings
;************************************************
  res_at_tfDoNDCOverlay = True

;************************************************
; associate the 2-dimensional coordinates to the variable for plotting
; only if not a native projection [ res_at_tfDoNDCOverlay=False ]
;************************************************
  if (.not.res_at_tfDoNDCOverlay) then
      lat2d = f->XLAT(0,:,:)
      lon2d = f->XLONG(0,:,:)

      u10_at_lat2d = lat2d
      u10_at_lon2d = lon2d
      v10_at_lat2d = lat2d
      v10_at_lon2d = lon2d

      rainTot_at_lat2d = lat2d
      rainTot_at_lon2d = lon2d
  end if

nt=64
x1 = 120
x2 = 210
;x1 = 120
;x2 = 210
y1 = 80 ;-20
y2 = 140;-20
zres = True
zres_at_ZoomIn = True
zres_at_Xstart = x1
zres_at_Xend = x2
zres_at_Ystart = y1
zres_at_Yend = y2
  res_at_cnFillMode = "RasterFill" ; raster
  res_at_cnLevels = (/0.5,1,2,4,6,8,12/)
  res_at_cnFillOn = True ; color plot desired
  res_at_cnLinesOn = False ; turn off contour lines
  res_at_cnLineLabelsOn = False ; turn off contour labels
  res_at_cnLevelSelectionMode = "ExplicitLevels" ; explicit [unequal] cn
levels

     w = f->W(64,:,:,:)
    wa = new((/nlevs,224,299/),float)
      do k=0,33
        wa(k,:,:) = (w(k,:,:) + w(k+1,:,:))/2.
      end do
    delete(w)

     fill = wrf_contour(f,wks,wa(4,y1:y2,x1:x2),res)
;draw(fill)
;frame(wks)

  resa = True
  resa_at_cnLevels = (/-6,-4,-3,-2,-1,-0.5,0.5,1,2,3,4,6/)
  resa_at_cnFillOn = False ; color plot desired
  resa_at_cnLinesOn = True ; turn off contour lines
  resa_at_cnLineLabelsOn = True ; turn off contour labels
  resa_at_cnLevelSelectionMode = "ExplicitLevels" ; explicit [unequal] cn
levels

     con = wrf_contour(f,wks,vor(nt,y1:y2,x1:x2),resa)
     plot = wrf_overlay(wks,(/fill,con/),zres)

;also tried using True in place of zres; same problem

;draw(con)
;frame(wks)
end

-- 
James Correia Jr.
Post Doc
Climate Physics Group, PNNL

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 03 2008 - 14:56:48 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 04 2008 - 15:43:54 MDT