need help wrf contour attribute error

From: mark vogel <mdvogelii_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 12 2011 - 09:52:46 MST

Dear all
I try to draw cloud mixing ratio for wrf but I got the error message like
this

(0) wrf_contour: Warning: illegal setting for ContourParameters
attribute
(0) wrf_contour: Warning: illegal setting for ContourParameters
attribute
This is my scripts please help

; Example script to produce plots for a WRF real-data run,
; with the ARW coordinate dynamics option.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "./WRFUserARW.ncl"

begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
  ;a = addfile("wrfout_d03_2006-05-06_13:00:00.nc","r")

  a = addfile("../GEM_09_15/wrfout_d01_2007-06-10_18:00:00.nc","r")

; We generate plots, but what kind do we prefer?
; type = "x11"
; type = "pdf"
  type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"QCLOUD-GEM_1018Z")

  setvalues NhlGetWorkspaceObjectId()
    "wsMaximumSize" : 33554432
  end setvalues

; Set some Basic Plot options
  res = True
  res@MainTitle = "REAL-TIME WRF"

  pltres = True
  mpres = True
  map = wrf_map(wks,a,mpres)
; What times and how many time steps are in the data set?
  times = wrf_user_list_times(a) ; get times in the file
  ntimes = dimsizes(times) ; number of times in the file

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    res@TimeLabel = times(0) ; Set Valid time to use on plots

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      opts = res
      opts@cnFillOn = True
      gsn_define_colormap(wks,"colors") ; choose a colormap
        opts@ContourParameters = (/0,0.1,0.2,0.4,0.6,0.8/)
     ; opts@cnFillOn = True
        opts@cnFillColors =
(/"White","Grey","Blue","Green","Yellow","Red"/) ; choose a colormap
    ; opts@ContourParameters = (/ 0.2,0.4,0.6,0.8,1/)
      opts@lbBoxLinesOn = False
      res@cnLabelBarEndStyle = "IncludeMinMaxLabels" ; turn on end
labels

      gsn_define_colormap(wks,"colors") ; choose a colormap
      pressure = 850. ; 500 hPa
ntimes = 2
do it = 0, ntimes-1
    ; TERRAIN
      p = wrf_user_getvar(a,"pressure",it)
      ter = wrf_user_getvar(a,"QCLOUD",it)
      tc_plane = wrf_user_intrp3d(ter, p,"h",pressure,0.,False)
; tc_plane = ter(0,:,:)
      tc_plane = tc_plane*1000
      tc_plane@units = "g/kg"
      contour = wrf_contour(a,wks,tc_plane,opts)
 ; wrf_map_overlay(wks, map,(/contour/),True)
      plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
   end do

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 12 09:52:53 2011

This archive was generated by hypermail 2.1.8 : Mon Nov 14 2011 - 10:41:55 MST