Hi all,
I am struggling to create Height-Time plot using weighting for temporal
smoothing.
But, I got error message warning that *Number of dimensions on right hand
side do not match number of dimension in left hand side*. Here is the
detail data that i used:
*Variable: U*
*Type: float*
Total Size: 277348608 bytes
69337152 values
Number of Dimensions: 4
*Dimensions and sizes: [time | 388] x [level | 17] x [lat | 73] x [lon |
144]*
Coordinates:
time: [1569072..1851744]
level: [1000..10]
lat: [90..-90]
lon: [ 0..357.5]
Number Of Attributes: 18
long_name : Monthly U-wind on Pressure Levels
unpacked_valid_range : ( -140, 175 )
actual_range : ( -58.91001, 103.1551 )
units : m/s
_FillValue : -32767
precision : 2
least_significant_digit : 1
GRIB_id : 33
GRIB_name : UGRD
var_desc : u-wind
dataset : NCEP/DOE AMIP-II Reanalysis (Reanalysis-2) Monthly Averages
level_desc : Pressure Levels
statistic : Individual Obs
parent_stat : Other
standard_name : eastward_wind
cell_methods : time: mean (monthly from 6-hourly values)
valid_range : ( -140, 174.99 )
missing_value : -32767
*And the script that i used is:*
f = addfile ("/home/NCL/Time_Height_NCL/ZONAL_WIND_R2/test_palette/
uwnd.mon.mean_2.nc", "r")
U = short2flt (f->uwnd)
printVarSummary(U)
;================================================
; smooth data
;================================================
* wgt = (/ 1., 3., 4., 3., 1./) ; wgts
for temporal smooth*
* wgt = wgt/sum(wgt) ; normalize
*
* slice = U(time|:, level|:, lat|0, lon|0) ; trick
to copy meta data*
* slice = wgt_runave(U(lat|30,level|:,time|:,lon|0), wgt, 0)*
;================================================
; plot
;================================================
wks = gsn_open_wks ("ps", "test") ; open ps file
gsn_define_colormap(wks,"BlWhRe") ; choose colormap
res = True ; plot mods desired
res@cnFillOn = True ; turn on color
res@cnLinesOn = False ; no contour lines
res@gsnSpreadColors = True ; use full range of
colors
res@lbLabelAutoStride = True ; optimal labels
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels
res@cnMinLevelValF = -6. ; set min contour level
res@cnMaxLevelValF = 6. ; set max contour level
res@cnLevelSpacingF = 0.5 ; set contour spacing
plot = gsn_csm_pres_hgt (wks,slice,res)
end
I'm also still confused with the weighting command in NCL : wgt = (/ 1.,
3., 4., 3., 1./), is this the 5 point running average using the cyclic
option?
and what does the number mean?
Thanks a lot for the hints.
Antonio,
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 1 08:58:28 2012
This archive was generated by hypermail 2.1.8 : Fri Aug 03 2012 - 14:39:58 MDT