Hi,I will want to overlay two domain contour at contour plot in one frame.But, image is appeared each domain in two frame(one frame : contour plot + domain 1 other frame : contour plot + domain 2)I want contour plot + domain 1 + domain 2
help me~
Here is my code:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
FILES = systemfunc("ls ../geo_em*nc") numFILES = dimsizes(FILES)
type = "x11" wks = gsn_open_wks(type,"geo_test") gsn_define_colormap(wks,"gui_default")
res = True res_at_InitTime = False res_at_Footer = False
res_at_cnFillOn = True
pltres = True mpres = True mpres_at_mpGeophysicalLineColor = "black" mpres_at_mpGridLineColor = "black"
lnres = True lnres_at_gsLineThicknessF = 1.8 lnres_at_gsLineColor = "white" lnres_at_gsLineLabelFontColor = "red" lnres_at_gsLineLabelFontHeightF = 0.0145
do ifil = 1, numFILES-1 in_file = addfile(FILES(0) , "r") hgt_m = wrf_user_getvar(in_file,"HGT_M",0)
pltres_at_FramePlot = False contour=wrf_contour(in_file,wks,hgt_m,res) plot = wrf_map_overlays(in_file,wks,(/contour/),pltres,mpres)
in_file = addfile(FILES(ifil) , "r")
if ( ifil .gt. 0 ) then
overlay(plot,contour)
hgt = wrf_user_getvar(in_file,"HGT_M",0)
lat = in_file->XLAT_M(0,:,:) lon = in_file->XLONG_M(0,:,:)
dims = dimsizes(hgt) r2 = dimsizes(dims) r21 = dims(r2-1) r22 = dims(r2-2)
xbox = (/lon(0,0), lon(0,r21-1), lon(r22-1, r21-1), \ lon(r22-1,0), lon(0,0)/) ybox = (/lat(0,0), lat(0,r21-1), lat(r22-1, r21-1), \ lat(r22-1,0), lat(0,0)/)
x_out = new(dimsizes(xbox), typeof(xbox)) y_out = new(dimsizes(ybox), typeof(ybox))
if ( ifil .eq. 1 ) n_d0 = ifil + 1 lnres_at_gsLineLabelString = "d0"+n_d0 else n_d0 = ifil + 1 lnres_at_gsLineLabelString = "d0"+n_d0 end if
datatondc(plot, xbox, ybox, x_out, y_out) gsn_polyline_ndc(wks, x_out, y_out, lnres)
delete(hgt) delete(lat) delete(lon) frame(wks) end if end do
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 03 2009 - 07:31:56 MDT
This archive was generated by hypermail 2.2.0 : Thu Sep 03 2009 - 21:03:38 MDT