Yes, if I worked perfectly.
Thank you
-- Carolina Dougnac Valdivia. Departamento de Fisica y Astronomia Facultad de Ciencias, Universidad de Valparaiso Av. Gran Bretana 1111, Casilla 5030, Valparaiso, Chile Tel. (+56 32) 2995519 Fax. (+56 32) 2508135 http://www.dfa.uv.cl > The documentation does not state that the input "data" > array must be one dimensional [1D] or > two dimensional [2D] > > > http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map_ce.shtml > > Your data is three-dimensional [3D] > > [bands | 1] x [lines | 367] x [elems | 916] > > Since NCL has zero-based subscripting, the following should work > > plot = gsn_csm_contour_map(wks, t(0,:,:), res) > > ==== > For "fun" add > > x = t(0,:,:) > printVarSummary(x) > > Note the dimensionality *and* a new attribute > > ==== > See Section 2.8 ans 2.9 of the Mini-Reference Manual > > http://www.ncl.ucar.edu/Document/Manuals/ > > I suggest you look-at/download the mini-language > and graphics reference manuals > > > Carolina Dougnac Valdivia wrote: >> Hi, >> >> when I run: >> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" >> >> in = addfile("goes.nc","r") >> t = in->data >> printVarSummary (t) >> >> lat2d = in->latitude >> lon2d = in->longitude >> ; change to recognized units >> lat2d_at_units = "degrees_north" >> lon2d_at_units = "degrees_east" >> ; associate 2D coordinates with variable >> t_at_lat2d=lat2d ; agregando atributos a t >> t_at_lon2d=lon2d ; agregando atributos a t >> >> printVarSummary (t) >> >> ;*********************************************************************** >> >> wks = gsn_open_wks("ps", "sat") >> gsn_define_colormap(wks,"gsdtol") ; choose colormap >> >> res = True >> res_at_cnFillOn = True ; color Fill >> res_at_cnFillMode = "RasterFill" ; Raster Mode >> res_at_cnLinesOn = False ; Turn off contour lines >> >> res_at_gsnSpreadColors = True ; use full colormap >> res_at_gsnSpreadColorStart = 11 ; start at color 11 >> res_at_gsnSpreadColorEnd = 32 ; end at color 32 >> res_at_lbLabelStride = 3 ; every third label bar >> label >> >> res_at_tiMainString = "eos-dis data on a ce projection" >> >> plot = gsn_csm_contour_map(wks,t, res) >> >> >> >> >> >> NCL shows me: >> >> Variable: t >> Type: float >> Total Size: 1344688 bytes >> 336172 values >> Number of Dimensions: 3 >> Dimensions and sizes: [bands | 1] x [lines | 367] x [elems | 916] >> Coordinates: >> bands: [3..3] >> Number Of Attributes: 3 >> long_name : data >> type : GVAR >> units : unitless >> >> >> Variable: t >> Type: float >> Total Size: 1344688 bytes >> 336172 values >> Number of Dimensions: 3 >> Dimensions and sizes: [bands | 1] x [lines | 367] x [elems | 916] >> Coordinates: >> bands: [3..3] >> Number Of Attributes: 5 >> lon2d : <ARRAY of 336172 elements> >> lat2d : <ARRAY of 336172 elements> >> long_name : data >> type : GVAR >> units : unitless >> (0) gsn_csm_contour_map_ce: Fatal: the input data array must be 1D or 2D >> fatal:Illegal right-hand side type for assignment >> fatal:Execute: Error occurred at or near line 55 in file resumen.ncl >> >> ncclose: ncid 0: NetCDF: Not a valid ID >> >> >> >> >> Where am I wrong? >> > > _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Aug 14 2008 - 08:04:18 MDT
This archive was generated by hypermail 2.2.0 : Thu Aug 14 2008 - 08:32:16 MDT