- 积分
- 1912
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-10-8
- 最后登录
- 1970-1-1
![未绑定新浪微博用户 新浪微博达人勋](source/plugin/sina_login/img/gray.png)
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
为何ncl画ERA在分析资料风场总是报错,以下是代码。求各位大侠赐教
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
f=addfile("/home/newcmaq/history/data/Interim/era201512.nc","r")
wks = gsn_open_wks("png","wind")
v500 = f->v(16,15,:,:)
u500 = f->u(16,15,:,:)
v1=v500*0.00186544395079936
u1=u500*0.00193238582520567
lat=f->latitude
lon=f->longitude
lat@units="degrees_north"
lon@units="degrees_east"
v1!0="lat"
v1!1="lon"
u1!0="lat"
u1!1="lon"
; Set some Basic Plot options
res=True
res@gsnAddCyclic = False
res@gsnMaximize = True
res@mpMinLatF = 16.
res@mpMaxLatF = 54.
res@mpMinLonF = 73.
res@mpMaxLonF = 135.
;res@gsnDraw = False
;res@gsnFrame = False
res@mpDataBaseVersion = "MediumRes"
res@mpDataSetName = "Earth..4"
res@mpOutlineOn = True ; Turn on map outlines
res@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
;China:states
res@mpProvincialLineColor="black"
res@mpProvincialLineThicknessF=1
res@mpLandFillColor = "white"
res@mpInlandWaterFillColor = "white"
res@mpOceanFillColor = "blue"
res@mpOutlineBoundarySets = "NoBoundaries"
; res@mpFillDrawOrder = "PostDraw"
; res@vcRefMagnitudeF = 40. ; make vectors larger
; res@vcRefLengthF = 0.045 ; ref vec length
; res@vcMinDistanceF = 0.001 ; thin out vectors
res@vcGlyphStyle = "WindBarb"
res@vcMinDistanceF = 0.07
res@vcWindBarbColor = "Blue"
res@vpXF = 0 ;左边距
res@vpYF = 0 ;上边距
res@vpWidthF = 1.0 ; height and width of plot
res@vpHeightF = 0.8
plot = gsn_csm_vector_map(wks,u1,v1,res)
end
ERA文件信息
netcdf era201512 {
dimensions:
longitude = 480 ;
latitude = 241 ;
level = 16 ;
time = UNLIMITED ; // (124 currently)
variables:
float longitude(longitude) ;
longitude:units = "degrees_east" ;
longitude:long_name = "longitude" ;
float latitude(latitude) ;
latitude:units = "degrees_north" ;
latitude:long_name = "latitude" ;
int level(level) ;
level:units = "millibars" ;
level:long_name = "pressure_level" ;
int time(time) ;
time:units = "hours since 1900-01-01 00:00:0.0" ;
time:long_name = "time" ;
time:calendar = "gregorian" ;
short z(time, level, latitude, longitude) ;
z:scale_factor = 0.982048464609433 ;
z:add_offset = 26467.8468663927 ;
z:_FillValue = -32767s ;
z:missing_value = -32767s ;
z:units = "m**2 s**-2" ;
z:long_name = "Geopotential" ;
z:standard_name = "geopotential" ;
short r(time, level, latitude, longitude) ;
r:scale_factor = 0.00239670312113763 ;
r:add_offset = 55.4724063275471 ;
r:_FillValue = -32767s ;
r:missing_value = -32767s ;
r:units = "%" ;
r:long_name = "Relative humidity" ;
r:standard_name = "relative_humidity" ;
short u(time, level, latitude, longitude) ;
u:scale_factor = 0.00193238582520567 ;
u:add_offset = 12.7802990658765 ;
u:_FillValue = -32767s ;
u:missing_value = -32767s ;
u:units = "m s**-1" ;
u:long_name = "U component of wind" ;
u:standard_name = "eastward_wind" ;
short v(time, level, latitude, longitude) ;
v:scale_factor = 0.00186544395079936 ;
v:add_offset = 2.08933827411835 ;
v:_FillValue = -32767s ;
v:missing_value = -32767s ;
v:units = "m s**-1" ;
v:long_name = "V component of wind" ;
v:standard_name = "northward_wind" ;
// global attributes:
:Conventions = "CF-1.6" ;
:history = "2016-08-02 02:33:26 GMT by grib_to_netcdf-1.16.0: grib_to_netcdf /data/data01/scratch/_mars-atls09-95e2cf679cd58ee9b4db4dd119a05a8d-Fo1V4j.grib -o /data/data01/scratch/_grib2netcdf-atls00-95e2cf679cd58ee9b4db4dd119a05a8d-_h3EqG.nc -utime" ;
}
报错信息:
(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
|
|