Dear,
I have a radar data file, whose format is netcdf. I want to plot a radar
echo(unit:dbz) picture using NCL.
The head file of this radar data file is as following:
netcdf \1306250900 {
dimensions:
longtitude = 1019 ;
latitude = 881 ;
layer = 20 ;
variables:
float longtitude(longtitude) ;
longtitude:units = "degrees_east" ;
float latitude(latitude) ;
latitude:units = "degrees_north" ;
int layer(layer) ;
layer:units = "meter" ;
byte reflectivity(layer, latitude, longtitude) ;
reflectivity:name = "Reflectivity" ;
reflectivity:units = "dBZ" ;
reflectivity:scale_factor = 0.5f ;
reflectivity:add_offset = -33s ;
reflectivity:data_type = "unsigned byte" ;
reflectivity:formula = "dBZ=-33+0.5*N" ;
reflectivity:valid_min = 0s ;
reflectivity:valid_max = 255s ;
reflectivity:no_data = 0s ;
reflectivity:bad_data = 1s ;
reflectivity:no_observation = 2s ;
reflectivity:censored_data = 3s ;
// global attributes:
...}
The script file that I wrote to read this data file and plot the radar echo
at 5th level 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"
begin
dbz=new((/881,1019/),"float")
in=addfile("1306250900.nc","r")
dbz=byte2flt(in->reflectivity(4,:,:))
lon=in->longtitude
lat=in->latitude
res=True
res@gsnMaximize=True
res@cnFillOn=True
res@cnLinesOn=False
res@sfXCStartV = 115 ; Define where contour plot
res@sfXCEndV = 118 ; should lie on the map plot.
res@sfYCStartV = 38
res@sfYCEndV = 42
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes" ; Medium resolution database
res@mpOutlineOn = True ; Turn on map outlines
res@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
res@mpLimitMode = "LatLon" ; Limit the map view.
res@mpMinLonF = 115
res@mpMaxLonF = 118
res@mpMinLatF = 38
res@mpMaxLatF = 42
res@tmXTOn=False
res@tmYROn=False
res@cnLevelSelectionMode="ExplicitLevels"
res@cnLevels=ispan(-5,65,5)
wks=gsn_open_wks("x11","radarecho")
gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
plot=gsn_csm_contour_map_ce(wks,dbz({latitude|38:42},{longtitude|115:118}),
res)
end
The distribution of the output plot radar echo is same as the reality.
However the value of the output plot radar echo is significantly larger than
the reality, even the value of some reality strong radar echo region is
negative.
How can I solve this problem?
Thank you!
Yours,
Hui He
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 2 03:27:00 2013
This archive was generated by hypermail 2.1.8 : Fri Jul 05 2013 - 13:06:49 MDT