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?
-- 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 > Try > > t = in->data > 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 > t_at_lon2d = lon2d > > > Carolina Dougnac Valdivia wrote: >> Hello, >> I need to know how to graph data netCDF (downloaded from CLASS) >> satellite >> GOES-12. >> The ncdump shows me: >> >> netcdf goes { >> dimensions: >> lines = 367 ; >> elems = 916 ; >> bands = 1 ; >> auditCount = 2 ; >> auditSize = 80 ; >> variables: >> int version ; >> version:long_name = "McIDAS area file version" ; >> int sensorID ; >> sensorID:long_name = "McIDAS sensor number" ; >> int imageDate ; >> imageDate:long_name = "image year and day of year" ; >> imageDate:units = "ccyyddd" ; >> int imageTime ; >> imageTime:long_name = "image time in UTC" ; >> imageTime:units = "hhmmss UTC" ; >> int startLine ; >> startLine:long_name = "starting image line" ; >> startLine:units = "satellite coordinates" ; >> int startElem ; >> startElem:long_name = "starting image element" ; >> startElem:units = "satellite coordinates" ; >> int numLines ; >> numLines:long_name = "number of lines" ; >> int numElems ; >> numElems:long_name = "number of elements" ; >> int dataWidth ; >> dataWidth:long_name = "number of bytes per source data >> point" ; >> dataWidth:units = "bytes/data point" ; >> int lineRes ; >> lineRes:long_name = "resolution of each pixel in line >> direction" ; >> lineRes:units = "km" ; >> int elemRes ; >> elemRes:long_name = "resolution of each pixel in element >> direction" ; >> elemRes:units = "km" ; >> int prefixSize ; >> prefixSize:long_name = "line prefix size" ; >> prefixSize:units = "bytes" ; >> int crDate ; >> crDate:long_name = "image creation year and day of year" >> ; >> crDate:units = "ccyyddd" ; >> int crTime ; >> crTime:long_name = "image creation time in UTC" ; >> crTime:units = "hhmmss UTC" ; >> int bands(bands) ; >> bands:long_name = "bands" ; >> char auditTrail(auditCount, auditSize) ; >> auditTrail:long_name = "audit trail" ; >> float data(bands, lines, elems) ; >> data:long_name = "data" ; >> data:type = "GVAR" ; >> data:units = "unitless" ; >> float latitude(lines, elems) ; >> latitude:long_name = "latitude" ; >> latitude:units = "degrees" ; >> float longitude(lines, elems) ; >> longitude:long_name = "longitude" ; >> longitude:units = "degrees" ; >> data: >> >> version = 4 ; >> >> sensorID = 78 ; >> >> imageDate = 2008176 ; >> >> imageTime = 234500 ; >> >> startLine = 6997 ; >> >> startElem = 8397 ; >> >> numLines = 367 ; >> >> numElems = 916 ; >> >> dataWidth = 2 ; >> >> lineRes = 16 ; >> >> elemRes = 16 ; >> >> prefixSize = 232 ; >> >> crDate = 2008176 ; >> >> crTime = 234514 ; >> >> bands = 3 ; >> >> auditTrail = >> "08179 3151 IMGCOPY DELIVERY/INL0215875.1 DELIVERY/NCL0215875.3 >> LINELE=6995 839", >> " 6 I PLACE=ULEFT BAND=3 DOC=YES MAG=-4 -4 SIZE=367 915 >> " ; >> >> data = >> 6912, 6848, 6368, 6624, 6656, 6560, ... >> >> >> >> And when I write: >> >> in = addfile("goes.nc","r") >> t = in->data >> lat2d = in->latitude >> lon2d = in->longitude >> printVarSummary (t) >> printVarSummary (lat2d) >> printVarSummary (lon2d) >> >> >> 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: lat2d >> Type: float >> Total Size: 1344688 bytes >> 336172 values >> Number of Dimensions: 2 >> Dimensions and sizes: [lines | 367] x [elems | 916] >> Coordinates: >> Number Of Attributes: 2 >> long_name : latitude >> units : degrees >> >> >> >> Variable: lon2d >> Type: float >> Total Size: 1344688 bytes >> 336172 values >> Number of Dimensions: 2 >> Dimensions and sizes: [lines | 367] x [elems | 916] >> Coordinates: >> Number Of Attributes: 2 >> long_name : longitude >> units : degrees >> >> >> >> How do I make a script that makes a graph of the data in a given >> latitude >> and longitude? Help me pleace. >> >> Greetings. >> > > _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Aug 14 2008 - 00:14:46 MDT
This archive was generated by hypermail 2.2.0 : Thu Aug 14 2008 - 08:32:16 MDT