Hello everybody: I'm having problems with cape script...
I get this error
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_11:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_12:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_13:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_14:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_15:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_16:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_17:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_18:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_19:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_20:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_21:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_22:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-14_23:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
(0) Working on time: 2011-06-15_00:00:00
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
warning:ContourPlotInitialize: scalar field is constant; ContourPlot not
possible:[errno=1102]
warning:ContourPlotSetValues: Invalid level values set: using AUTOMATICLEVELS
mode
warning:ContourPlotSetValues: Data values out of range of levels set by
MANUALLEVELS mode
I try changing
res@cnLevelSelectionMode = "ManualLevels"
to Automatic level but I have the same problem
SCRIPT
======
; Example script to produce cape/cin/lcl/lfc plots
load "/usr/local/ncarg/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/local/ncarg/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "./shapefiles_faster.ncl"
begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("wrfout_d01.nc","r")
; We generate plots, but what kind do we prefer?
; type = "x11"
; type = "pdf"
type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"cape")
gsn_define_colormap(wks,"WhViBlGrYeOrReWh")
; Set some basic resources
res = True
res@MainTitle = "WRF - Pronostico"
res@Footer=False
res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF = 0
res@cnConstFLabelOn = False
pltres = True
pltres@PanelPlot = True
mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpGridSpacingF = 10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
FirstTime = True
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 1,ntimes-1,1 ; TIME LOOP
print("Working on time: " + times(it) )
;ARWres@TimeLabel = times(it) ; Set Valid time to use on plots
res@TimeLabel = times(it) ; set Valid time to use on plot
cape2d = wrf_user_getvar(a,"cape_2d",it)
cape3d = wrf_user_getvar(a,"cape_3d",it)
; extract the data from the multi-dimensional fields
cape = cape3d(0,:,:,:)
cin = cape3d(1,:,:,:)
opts = res
opts@cnFillOn = True
opts@cnLineLabelsOn = False
opts@FieldTitle = "cape"
opts@ContourParameters = (/ 250., 3250., 250./)
do il = 0,9 ; only interested in the first
10 levels
ilev = il + 1
opts@PlotLevelID = "nivel " + ilev
contour = wrf_contour(a,wks,cape(il,:,:),opts)
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
draw(plot)
draw_shapefile_lines(wks,plot)
frame(wks)
end do
end do ; END OF TIME LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 14 06:30:36 2011
This archive was generated by hypermail 2.1.8 : Mon Jun 20 2011 - 12:30:20 MDT