Re: need help wrf contour attribute error

From: Jeff Willison <jawill20_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 12 2011 - 13:49:10 MST

I believe the only two syntax options for ContourParameters are either (/
minimum, maximum, spacing /) or just (/spacing/). So try
opts@ContourParameters=(/0.0,0.8,0.2/) or opts@ContourParameters=(/0.2/)

See the routine here:
http://www.ncl.ucar.edu/Document/Functions/WRF_arw/WRFUserARW.ncl

-Jeff Willison

From: mark vogel <mdvogelii@gmail.com>
Subject: need help wrf contour attribute error
To: NCL USERS <ncl-talk@ucar.edu>
Message-ID:
    <CAL2Saxp+JZL2JA0m=pLYAiNdc775Y3=qyC3PgLR78Uh6oWJxXA@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111112/74e4f3ae/attachment.html

------------------------------

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

End of ncl-talk Digest, Vol 96, Issue 21
****************************************

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

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