Re: fatal:The result of the conditional expression yields a missing value

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 14 2011 - 07:27:55 MST

119 contour_ri = wrf_contour(a,wks,ri_plane(0,:,:),opts_ri)

Line 1896 of WRFUserARW.ncl is an "end if" for the line 1872

opts_ri=True and you do set the following in the main script
opts_ri@ContourParameters = (/.2 /)

so a guess is that the input array "ri_plane(0,:,:)"
whihj is "data" below has all missing values

1864 ; The ContourParameters resource can either be a scalar that
1865 ; represents the contour level spacing, or it can be an array
1866 ; of three elements that represent the minimum level, the maximum
1867 ; level, and the level spacing.
1868 ;
1869 mx = max(data)
1870 mn = min(data)
1871
1872 if(mn.ne.mx.and.opts.and.isatt(opts,"ContourParameters")) then
1873 if(dimsizes(opts@ContourParameters) .eq. 1) then
1874
1875 ; Only the contour interval is specified.
1876 nlev = tointeger((mx-mn)/opts@ContourParameters)+1
1877 levels = nice_mnmxintvl(mn,mx,nlev,True)
1878 if(levels(0) .lt. 0.) then
1879 ; Set a zero contour.
1880 nlev = tointeger(levels(0)/opts@ContourParameters) - 1
1881 levels(0) = nlev*opts@ContourParameters
1882 end if
1883 nlev = tointeger((levels(1)-levels(0))/opts@ContourParameters)+1
1884 levels(1) = levels(0) + nlev*opts@ContourParameters
1885 levels(2) = opts@ContourParameters
1886
1887 ; Min level, max level, and level spacing are specified by user.
1888 else
1889 if(dimsizes(opts@ContourParameters) .eq. 3) then
1890 levels = opts@ContourParameters
1891 else
1892 print("wrf_contour: Warning: illegal setting for
ContourParameters attribute")
1893 end if
1894 end if
1895
1896 end if
1

On 2/13/11 6:48 PM, wei huang wrote:
> Hi,
> error line(119) in blue color(contour_ri =
> wrf_contour(a,wks,ri_plane(0,:,:),opts_ri)). Your cooperation will be
> highly appreciated.
>
> Thanks again,
>
> ;*************************************
>
> wks = gsn_open_wks("x11","ri")
>
> gsn_define_colormap(wks,"BlWhRe")
>
> res= True; Set up some basic plot resources
>
> res@gsnDraw= False; don't draw
>
> res@gsnFrame= False
>
> pltres = True
>
> ;*******************************
>
> FirstTime = res
>
> rh= wrf_user_getvar(a,"rh",-1)
>
> printVarSummary(rh)
>
> ;
>
> if ( FirstTime ) then; get height info for labels
>
> zmin = 0.
>
> zmax = max(z)/1000.
>
> nz= floattoint(zmax/2 + 1)
>
> FirstTime = False
>
> end if
>
> ;***************************
>
> ip = 1;Just do the one (constant y coord) plot
>
> opts = True; setting start and end times
>
> plane = new(4,float)
>
> if(ip .eq. 1) then
>
> plane = (/0,84,200,84/) ; start x;y & end x;y point
>
> end if
>
> ;******************************
>
> ; Interpolate data vertically (in z)
>
> rh_plane = wrf_user_intrp3d(rh,z,"v",plane,0.,opts)
>
> ri_plane = wrf_user_intrp3d(RI,z,"v",plane,0.,opts)
>
> printVarSummary(rh_plane)
>
> printVarSummary(ri_plane)
>
> dim = dimsizes(rh_plane); Find the data span - for use in labels
>
> zspan = dim(0)
>
> ; Options for XY Plots
>
> opts_xy= res
>
> opts_xy@tiYAxisString= "Height (km)"
>
> opts_xy@cnMissingValPerimOn= True
>
> opts_xy@cnMissingValFillColor= 0
>
> opts_xy@cnMissingValFillPattern = 11
>
> opts_xy@tmYLMode= "Explicit"
>
> opts_xy@tmYLValues= fspan(0,zspan,nz); Create tick marks
>
> opts_xy@tmYLLabels= sprintf("%.1f",fspan(zmin,zmax,nz)); Create labels
>
> opts_xy@PlotOrientation <mailto:opts_xy@PlotOrientation>=
> ri_plane@Orientation
>
> ; Plotting options for rh
>
> opts_rh = opts_xy
>
> opts_rh@ContourParameters = (/ 10., 90., 10. /)
>
> opts_rh@cnFillOn= True
>
>
> ; Plotting options for ri
>
> opts_ri = opts_xy
>
> opts_ri@ContourParameters = (/.2 /)
>
> ; Get the contour info for the rh and ri
>
> contour_rh = wrf_contour(a,wks,rh_plane(0,:,:),opts_rh)
>
> contour_ri = wrf_contour(a,wks,ri_plane(0,:,:),opts_ri)
>
> plot = wrf_overlays(a,wks,(/contour_rh,contour_ri/),pltres)
>
> end
>
> ;************************************
>
> Variable: z
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 6
>
> FieldType :104
>
> MemoryOrder : XYZ
>
> description : Height
>
> units :m
>
> stagger :
>
> coordinates : XLONG XLAT
>
> (0)min(U)=0.0100291max(U)=62.1447
>
> Variable: U
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 1
>
> _FillValue :-999
>
> (0)
>
> (0)min=0.0100291max=62.1447
>
> (0)min(dUdz)=-0.0857187max(dUdz)=0.195239
>
> (0)min(dUdz)=0.10001max(dUdz)=0.195239
>
> Variable: dUdz
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 1
>
> _FillValue :-999
>
> (0)
>
> (0)min=0.10001max=0.195239
>
> Variable: N
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> (0)min(RI)=0.103217max(RI)=1.95101
>
> Variable: RI
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 1
>
> _FillValue :-999
>
> (0)
>
> (0)min=0.103217max=1.95101
>
> Variable: rh
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 6
>
> description : Relative Humidity
>
> units :%
>
> FieldType :104
>
> MemoryOrder : XYZ
>
> stagger :
>
> coordinates : XLONG XLAT
>
> Variable: rh_plane
>
> Type: float
>
> Total Size: 1360000 bytes
>
> 340000 values
>
> Number of Dimensions: 3
>
> Dimensions and sizes:[Time | 25] x [Vertical | 100] x [Horizontal | 136]
>
> Coordinates:
>
> Number Of Attributes: 4
>
> _FillValue :-999
>
> units :%
>
> description : Relative Humidity
>
> Orientation : Cross-Sesion: (0,84) to (135,84)
>
> Variable: ri_plane
>
> Type: float
>
> Total Size: 1360000 bytes
>
> 340000 values
>
> Number of Dimensions: 3
>
> Dimensions and sizes:[Time | 25] x [Vertical | 100] x [Horizontal | 136]
>
> Coordinates:
>
> Number Of Attributes: 3
>
> _FillValue :-999
>
> description :
>
> Orientation : Cross-Sesion: (0,84) to (135,84)
>
> fatal:The result of the conditional expression yields a missing value.
> NCL can not determine branch, see ismissing function
>
> fatal:Execute: Error occurred at or near line 1896 in file
> \$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>
> fatal:Execute: Error occurred at or near line 2671 in file
> \$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>
> fatal:Execute: Error occurred at or near line 119 in file
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 14 07:28:00 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 09:43:19 MST