Dear all:
Recently I've writtern a code to plot a zonal profile of U-velocity along the equator, but there is always a warning such as:
get_lon_values: Warning: The range your of longitude values is greater than 360.
And the figure is not correct.
The code is as following:
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
path="~/data/"
f0=addfile(path+"uwnd.daily.hc.nc","r")
u=f0->uwnd(:,{925},{0},:)
uavg=dim_avg_Wrap(u(lon|:,time|:))
printVarSummary(uavg)
;***************************************************
wks=gsn_open_wks("x11","U along equator")
resL=True
resL@xyLineThicknesses = 2. ; thicker line
resL@tiYAxisString = "U avg" ; axis string
plot = gsn_csm_xy(wks,uavg&lon,uavg,resL)
end
The data summary is:
netcdf uwnd.daily.hc {
dimensions:
time = 61 ;
lev = 17 ;
lat = 73 ;
lon = 144 ;
variables:
float uwnd(time, lev, lat, lon) ;
uwnd:missing_value = -9.99e+36f ;
uwnd:long_name = "U-velocity" ;
uwnd:units = "ms^-1" ;
uwnd:_FillValue = -9.99e+36f ;
float time(time) ;
time:long_name = "time" ;
time:units = "days since 2100-1-1 0:0" ;
int lev(lev) ;
lev:long_name = "pressure" ;
lev:units = "hPa" ;
float lat(lat) ;
lat:units = "degrees_north" ;
lat:long_name = "Latitude" ;
float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "Longitude" ;
}
And the longitude is about:
Variable: lon (file variable)
Type: float
Total Size: 576 bytes
144 values
Number of Dimensions: 1
Dimensions and sizes: [lon | 144]
Coordinates:
lon: [ 0..357.5]
Number Of Attributes: 2
units : degrees_east
long_name : Longitude
The figture is in the attachment, I'd like to know how to plot it correctly. Thanks for your help.
2010-11-03
B. Liu
NUIST, Nanjing, PRC
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Mon Nov 08 2010 - 08:08:50 MST