[ncl-talk] Cross section overlays
Stavros Dafis
sdafis at cc.uoi.gr
Wed Oct 7 08:09:39 MDT 2015
Hello from Paris,
I am trying to overlay 3 shaded contours in a cross section plot and the only
way that I have found to make this is by using the "cnFillOpacityF" for every
contour. Is there any other way to overlay these variables (graupel, ice,
snow)? I have attached a link with my plot and part of my code:
Plot : http://oi62.tinypic.com/2iszdyx.jpg
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Plotting options for Ice
opts_qi = opts_xy
;opts_qi at ContourParameters = (/ 0., 1., 0.2 /)
opts_qi at pmLabelBarOrthogonalPosF = 0.1
;opts_qi at lbOrientation = "vertical" ; vertical
label bar
;opts_qi at pmLabelBarSide = "Right"
opts_qi at cnFillOn = True
opts_qi at cnFillOpacityF = 0.8
opts_qi at cnFillColors =
(/"White","WhiteSmoke","Chartreuse","Green","Green1","Green2","Green3",\
"DarkGreen","DarkOliveGreen4"/)
;colors2 = read_colormap_file("MPL_winter")
;opts_qi at cnFillColors = colors2
;opts_qi at gsnSpreadColorEnd = -1 ; End third from the last
color in color map
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Plotting options for Snow
opts_qs = opts_xy
;opts_qs at ContourParameters = (/ 0., 3., 0.5 /)
opts_qs at pmLabelBarOrthogonalPosF = 0.3
;opts_qs at pmLabelBarParallelPosF = 0.6
;opts_qs at pmLabelBarSide = "Right"
;opts_qs at lbOrientation = "vertical" ; vertical
label bar
opts_qs at cnFillOn = True
opts_qs at cnFillOpacityF = 0.9
opts_qs at cnFillColors =
(/"White","WhiteSmoke","Gray85","DodgerBlue","DodgerBlue1","DodgerBlue2","DodgerBlue3",
\
"DodgerBlue4","SteelBlue","SteelBlue1","SteelBlue2"/)
;colors3 = read_colormap_file("CBR_wet")
;opts_qs at cnFillColors = colors3
;opts_qs at gsnSpreadColorEnd = -1 ; End third from the last
color in color map
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Plotting options for Temperature
opts_tc = opts_xy
opts_tc at cnInfoLabelZone = 1
opts_tc at cnInfoLabelSide = "Top"
opts_tc at cnInfoLabelPerimOn = True
opts_tc at cnInfoLabelOrthogonalPosF = -0.00005
opts_tc at ContourParameters = (/ 5. /)
;Contour terrain cross section
contour_ter = gsn_csm_xy(wks,X_plane,ter_plane,opts_ter)
; Get the contour info for the rh and temp (the 2 plots have smooth
terrain)
contour_tc2 = wrf_contour(a,wks,tc_plane2(0:zmax_pos,:),opts_tc)
contour_qg2 = wrf_contour(a,wks,qg_plane2(0:zmax_pos,:),opts_qg)
contour_qi2 = wrf_contour(a,wks,qi_plane2(0:zmax_pos,:),opts_qi)
contour_qs2 = wrf_contour(a,wks,qs_plane2(0:zmax_pos,:),opts_qs)
;contour_GIS2 = wrf_contour(a,wks,GIS_plane2(0:zmax_pos,:),opts_GIS)
;--------------------------------------------------------------------------
; MAKE PLOTS
if (FirstTimeMap) then
lat_plane = wrf_user_intrp2d(xlat,plane,angle,opts)
lon_plane = wrf_user_intrp2d(xlon,plane,angle,opts)
mpres = True
pltres = True
pltres at FramePlot = False
optsM = res
optsM at NoHeaderFooter = True
optsM at cnFillOn = True
optsM at lbTitleOn = False
contour = wrf_contour(a,wks,ter,optsM)
;plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
lnres = True
lnres at gsLineThicknessF = 2.0
lnres at gsLineColor = "Red"
; do ii = 0,dimsX(0)-2
;
gsn_polyline(wks,plot,(/lon_plane(ii),lon_plane(ii+1)/),(/lat_plane(ii),lat_plane(ii+1)/),lnres)
;end do
frame(wks)
delete(lon_plane)
delete(lat_plane)
;pltres at FramePlot = True
; pltres at PanelPlot = True
end if
plot =
wrf_overlays(a,wks,(/contour_qs2,contour_qi2,contour_qg2,contour_tc2,contour_ter/),pltres)
; plot x-section
thank you in advance for any comments!
--
Stavros Dafis
MSc student Atmospheric Sciences and Environment
University of Ioannina
LATMOS Laboratoire Atmosphères, Milieux,Observations Spatiales; Versailles,
France.
Tel: +30 2651008499, Mobile: +30 6970420242
e-mails: sdafis at noa.gr or dafis91 at yahoo.gr or sdafis at cc.uoi.gr
Weather charts: http://www.metar.gr
http://www.meteovolos.gr
More information about the ncl-talk
mailing list