Hello NCL-talk,
I'm trying to create a contour plot with the variable time on the
abscissa and height on the ordinate. The contours represent the target
classification of cloud particles.
Compiling my code, I get an error message I can't understand.
Maybe one of you ist able to help me, that would be great!
My code is as follows:
;************************************************************
; Target Classification 2D
;************************************************************
;************************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;************************************************************
begin
a=addfile("/localdata/Lohmueller/BA/Daten_Lindenberg/Classification/20130101_lindenberg_classification.nc",
"r")
time=a->time
tar=a->target_classification
height=a->height
;print(tar(2,:))
wks= gsn_open_wks("pdf","Target")
slice=tar(:,:)
;print(slice(2,:))
gsn_define_colormap(wks,"BlGrYeOrReVi200")
res = True
res@gsnMaximize = True
res@gsnPaperOrientation = "landscape"
res@cnFillOn = True
res@cnCellFillEdgeColor = "black"
res@cnFillMode = "CellFill"
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnLevelSelectionMode = "ManualLevels" ; set manual
contour levels
res@cnMinLevelValF = 0. ; set the minimum contour level
res@cnMaxLevelValF = 10. ; set the maximum contour level
res@cnConstFLabelConstantSpacingF = 1
res@cnFillColors = (/2,18,39,63,79,96,127,159,175,191,201/)
; set the colors to be used
res@cnLevelSpacingF = 1
res@lbLabelAutoStride = True
res@lbPerimOn = False
res@lbLabelStride = 2
res@tiMainString = ""
;res@trGridType = "TriangularMesh"
;plot=gsn_xy(wks,time, height, False)
time2=new(dimsizes(time),typeof(time))
height2=new(dimsizes(height),typeof(height))
time2=time
height2=height
;print(time2)
res@sfXArray = time2
res@sfYArray = height2
contour = gsn_csm_contour(wks,slice,res)
end
And the error message:
warning:ScalarFieldSetValues: coordinate array sfXArray requires 496
elements: defaulting
warning:ScalarFieldSetValues: coordinate array sfYArray requires 2879
elements: defaulting
Thank you,
Katja
-- Katja Lohmüller Institut fuer Meteorologie und Klimatologie Leibniz Universitaet Hannover Herrenhaeuser Str. 2 30419 Hannover Email: lohmueller@muk.uni-hannover.de Mobil: 0049 176 61396963 Buero: 0049 511 762 2396 _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Jul 17 03:28:07 2013
This archive was generated by hypermail 2.1.8 : Fri Jul 19 2013 - 15:39:06 MDT