Re: map of wrf model and persiann model have not the sama dimension why?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sat Oct 31 2009 - 09:03:09 MDT

Dear Rolande,

You can't send large files to ncl-talk because many mailers cannot
handle these files. The file you sent was over 5 megabytes, and
there's a limit of 1 megabyte for ncl-talk postings. You can make
large *.ps files smaller by using "convert" from ImageMagick (http://
www.imagemagick.org/script/index.php) to trim out the white space
and specify a smaller geometry:

    convert -geometry 750x750 -trim wrf.ps wrf.png

Your message did make it into my personal mailbox, however, so I was
able to see what the problem is.

The reason why the panel plot is not right is because you are trying
to panel plots of different sizes. gsn_panel only works on plots of
the same size.

You created the first 9 plots with wrf_xxx routines, and then the
last 3 plots with gsn_csm_xxxx, and hence the plots are slightly
different in size. For example, the gsn_csm_xxxx plots have tickmarks
on the top and right axes, and the wrf_xxxxx plots don't. The
gsn_csm_xxxx plots have a subtitle of "mm/6H" at the top, and
the wrf_xxxx plots don't.

My recommendation is to use wrf_xxxx for all twelve plots, or to
panel the plots yourself using vpXXX resources. For an example, see
examples 20 and 9 at:

    http://www.ncl.ucar.edu/Applications/panel.shtml

I've reattached the image as a PNG file so ncl-talk users can see
what the original plot looked like.

--Mary

On Oct 31, 2009, at 4:52 AM, Rolande Tchouaken wrote:

> Good morning Mary,
>
> I joint to this mail my pannel who plot data of wrf model and data
> of persiann.
> You see the row fourth (row 4) who represented data of persiann
> and the rows (others rows) abowe represented map of wrf. You can
> also see that map of persiann are not well represented (they have
> spot and contours at the same time instead of spot only).
>
> Thank for your help.
> this is my scrip here:
> 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"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
>
> load "gsn_code_new.ncl"
> load "WRFUserARW_new.ncl"
>
> ;;************************************************
> begin
> ;************************************************
> ; read in netCDF file
> ;************************************************
> ;;;;;;;;;;;;;;;;;pr lire les fichiers de
> 6h ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> a1 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_CU3_MP8_BL1_SF1_RALW1_RASW1_180709/
> wrfout_d01_2009-07-18_06:00:00.nc","r")
> a2 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu2_mp8_blp2_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_06:00:00.nc","r")
> a3 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu1_mp8_blp1_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_06:00:00.nc","r")
>
> ;;;;;;;;;;;;pr lire les fichiers de 12h ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> a4 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_CU3_MP8_BL1_SF1_RALW1_RASW1_180709/
> wrfout_d01_2009-07-18_12:00:00.nc","r")
> a5 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu2_mp8_blp2_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_12:00:00.nc","r")
> a6 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu1_mp8_blp1_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_12:00:00.nc","r")
>
> ;;;;;;;;pr lire les fichiers de 18h;;;;;;;;;;;;;;;;;;
> a7 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_CU3_MP8_BL1_SF1_RALW1_RASW1_180709/
> wrfout_d01_2009-07-18_18:00:00.nc","r")
> a8 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu2_mp8_blp2_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_18:00:00.nc","r")
> a9 = addfile("/home/romeowrf/simulation_rolande/
> wrfprd_cu1_mp8_blp1_ssp1_ralw1_rasw1_180709/
> wrfout_d01_2009-07-18_18:00:00.nc","r")
>
>
>
>
> a10 = addfile("/home/romeowrf/simulation_rolande/persiannnc/
> raw6hr0919906.nc","r")
>
> ;;;;;;;;;;;pr extraire les donne de 6h a 12h le 18 ;;;;;;;;;;;;;
> a11 = addfile("/home/romeowrf/simulation_rolande/persiannnc/
> raw6hr0919912.nc","r")
>
> ;;;;;;;;;;;;pr extraire les donnees de 12h a 18h;;;;;;;;;;;;;;
>
> a12 = addfile("/home/romeowrf/simulation_rolande/persiannnc/
> raw6hr0919918.nc","r")
>
> prepper6 = a10->Prc
> prepper12 = a11->Prc
> prepper18 = a12->Prc
>
>
>
>
> prepwrfb6 = wrf_user_getvar(a2,"RAINNC",0) + wrf_user_getvar
> (a2,"RAINC",0) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfk6 =wrf_user_getvar(a3,"RAINNC",0)+ wrf_user_getvar
> (a3,"RAINC",0) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfg6 = wrf_user_getvar(a1,"RAINNC",0) + wrf_user_getvar
> (a1,"RAINC",0) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,
> prepwrfg12 = wrf_user_getvar(a4,"RAINNC",0) +wrf_user_getvar
> (a4,"RAINC",0)- (wrf_user_getvar(a1,"RAINNC",0) + wrf_user_getvar
> (a1,"RAINC",0) ) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfb12 = (wrf_user_getvar(a5,"RAINNC",0) + wrf_user_getvar
> (a5,"RAINC",0)) - (wrf_user_getvar(a2,"RAINNC",0) + wrf_user_getvar
> (a2,"RAINC",0)) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfk12 = (wrf_user_getvar(a6,"RAINNC",0) + wrf_user_getvar
> (a6,"RAINC",0)) - (wrf_user_getvar(a3,"RAINNC",0) +
> wrf_user_getvar(a3,"RAINC",0)) ;pr extraire les donnees du 18 de
> 0 a 6h
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;;
>
> prepwrfg18 = (wrf_user_getvar(a7,"RAINNC",0)+ wrf_user_getvar
> (a7,"RAINC",0) ) - (wrf_user_getvar(a4,"RAINNC",0) + wrf_user_getvar
> (a4,"RAINC",0)) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfb18 = (wrf_user_getvar(a8,"RAINNC",0)+ wrf_user_getvar
> (a8,"RAINC",0)) - (wrf_user_getvar(a5,"RAINNC",0) + wrf_user_getvar
> (a5,"RAINC",0)) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> prepwrfk18 = (wrf_user_getvar(a9,"RAINNC",0) + wrf_user_getvar
> (a9,"RAINC",0) ) - (wrf_user_getvar(a6,"RAINNC",0)+ wrf_user_getvar
> (a6,"RAINC",0)) ;pr extraire les donnees du 18 de 0 a 6h
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,
> wks = gsn_open_wks("ps" ,"wrfmp8mo")
> gsn_define_colormap(wks,"gui_default")
>
> pltres = True
> mpres = True
> res = True
> opts_r = True
>
> res@gsnSpreadColors = True ; use full range of
> colors
> res@gsnSpreadColorStart = 7
> res@gsnSpreadColorEnd = 101
> res@NoTitles = True
> ;res@mpLabelBarOrthogonalPost = -0.1
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnLevels = (/ .5, 1., 2.,5., 10.,15.,20. , \
> 30., 50, 75, 100, 110./)
>
> ;opts_r@pmLabelBarOrthogonalPosF = -0.05
> ;opts_r@lbTitleOn = True ; turn on
> title
> ; opts_r@lbTitleString = ""
>
> ;opts_r@cnLineLabelFontHeightF = 0.02
> ; opts_r@cnInfoLabelOn = False
> ; opts_r@cnConstFLabelOn = False
> ; opts_r@cnFillOn = True
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,,,
> ;res@gsnAddCyclic = False
> res = True ; plot mods desired
> res@cnLineLabelsOn = True ;
> no line labels
> res@lbLabelBarOn = False ; turn off
> individual cb's
> res@cnFillOn = True
> ;res@cnLinesOn = False
> res@cnLineLabelsOn = False
> res@gsnSpreadColors = True
> res@cnLineLabelDensityF = 1.5
> ;res@mpGridAndLimbOn = False ; lat/lon
> lines on
> ;res@mpGridSpacingF = 10.0 ; lat/lon
> lines every 10 deg
> ;res@mpGridLineDashPattern = 2 ; lat/lon
> lines as dashed
> ;res@pmTickMarkDisplayMode = "Always" ; turn on
> tickmarks
>
>
> ;res@mpPerimOn = True
> ;res@mpFillOn = False ; turn
> off map fill
> ;mpres@mpOutlineBoundarySets = "GeophysicalAndUSStates"
> res@mpOutlineBoundarySets = "National" ; turn on
> country boundaries
> ; res@mpGeophysicalLineColor = "Black" ; color of
> cont. outlines
> ; res@mpGeophysicalLineThicknessF = 1.8 ; thickness of
> outlines
> mpres@gsLineDashPattern = 1.8
>
>
> ;res@lbOrientation = "Vertical" ; vertical label
> bar
> ;res@pmLabelBarOrthogonalPosF = -0.01 ; move label bar
> closer
> ;res@lbLabelStride = 2
> ; res@cnLevelSelectionMode = "ManualLevels" ;
> manual levels
> res@cnLevelSelectionMode = "ExplicitLevels" ;
> manual levels
> ;res@cnLevels =(/ .5, 1., 2.,5., 10.,15.,20. , \
> ; 30., 50, 75, 85, 100./)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> ;;;;;;;;;;;;;;;to add national boundary
> country;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,,,,,
>
> resm = True
>
> resm@mpOutlineBoundarySets = "National" ; turn on
> country boundaries
> resm@mpGeophysicalLineColor = "Black" ; color of
> cont. outlines
> resm@mpGeophysicalLineThicknessF = 1.8 ; thickness of
> outlines
> resm@gsLineDashPattern = 1.8
> resm@mpDataBaseVersion = "Ncarg4_1" ; use finer
> database ;
> resm@mpOutlineOn =
> True ;
> resm@mpFillOn = False ; turn off gray
> fill ;
> resm@mpOutlineBoundarySets = "National" ; turn on country
> boundaries ;
>
> resm@mpNationalLineColor = "Black" ;"Red"
> resm@mpNationalLineDashPattern = 0 ;1 ;for
> dashpattern
> resm@mpNationalLineThicknessF = 1.5
>
> ;;;;;;;;;;;;;;;;;;;;to select my region;;;;;;;;;;;;;;;;;;;;;;;;;;;,
> resm@mpLeftCornerLatF = 1
> resm@mpLeftCornerLonF = 1
> resm@mpRightCornerLatF = 14
> resm@mpRightCornerLonF = 22
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; resource for my first
> plot;;;;;;;;;;;;;;;,,,,
> res1 = res
> res1@cnFillon = True
> prepwrfb6@description = ""
> cont_wrfb6 = wrf_contour(a1,wks, prepwrfb6, res1)
>
> ;;;;;;;;;;;;;;;;;;;;;;;res for my second
> plot;;;;;;;;;;;;;;;;;;;;;;;;;,
> res2 = res
> prepwrfk6@description = ""
>
> res2@cnFillon = True
> cont_wrfk6 = wrf_contour(a1,wks, prepwrfk6, res2)
>
> ;;;;;;;;;;;;;;;;;;;resource for my third plot;;;;;;;;;;;;;;;;;,,,
>
> res3 = res
> prepwrfg6@description = ""
> res3@cnFillon = True
> res3@gsnLeftString = " "
> cont_wrfg6 = wrf_contour(a1,wks, prepwrfg6, res3)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;resource for my four
> plot;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,
>
> res4 = res
> prepwrfb12@description = ""
>
> res4@cnFillon = True
> cont_wrfb12 = wrf_contour(a1,wks, prepwrfb12, res4)
>
> res5 = res
> prepwrfk12@description = ""
>
> res5@cnFillon = True
> cont_wrfk12 = wrf_contour(a1,wks, prepwrfk12, res5)
>
> res6 = res
> prepwrfg12@description = ""
>
> res6@cnFillon = True
> cont_wrfg12 = wrf_contour(a1,wks, prepwrfg12, res6)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> res7 = res
> prepwrfb18@description = ""
>
> res7@cnFillon = True
> cont_wrfb18 = wrf_contour(a1,wks, prepwrfb18, res7)
>
> res8 = res
> prepwrfk18@description = ""
>
> res8@cnFillon = True
> cont_wrfk18= wrf_contour(a1,wks, prepwrfk18, res8)
>
>
> res9 = res
> prepwrfg18@description = ""
>
> res9@cnFillon = True
> cont_wrfg18 = wrf_contour(a1,wks, prepwrfg18, res9)
>
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;,
>
> ; Generate maps.
> resm = True
> map = new(12,graphic)
> map0 = wrf_map(wks,a1,resm)
> map1 = wrf_map(wks,a1,resm)
> map2 = wrf_map(wks,a1,resm)
> map3 = wrf_map(wks,a1,resm)
> map4 = wrf_map(wks,a1,resm)
> map5 = wrf_map(wks,a1,resm)
> map6 = wrf_map(wks,a1,resm)
> map7 = wrf_map(wks,a1,resm)
> map8 = wrf_map(wks,a1,resm)
>
>
>
> res@tmXBLabelsOn =True
> res@tmXBTickSpacingF = 2.
> res@tmYLLabelsOn =True
> res@tmYLTickSpacingF = 2.
>
> res@mpGridAndLimbOn = True ; turn on lat/lon lines
> res@mpPerimOn = False ; turn off box around plot
> ; pltres@mpGridLatSpacingF = 2. ; spacing for lat lines
> ;pltres@mpGridLonSpacingF = 2. ; spacing for lon lines
>
>
> wrfres = True
> wrfres@PanelPlot = True ; Indicate these plots are to be
> paneled.
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,
> wrf_map_overlay(wks,map0,(/cont_wrfb6/),wrfres)
>
> wrf_map_overlay(wks,map1,(/cont_wrfk6/),wrfres)
>
> wrf_map_overlay(wks,map2,(/cont_wrfg6/),wrfres)
>
> wrf_map_overlay(wks,map3,(/cont_wrfb12/),wrfres)
>
> wrf_map_overlay(wks,map4,(/cont_wrfk12/),wrfres)
>
> wrf_map_overlay(wks,map5,(/cont_wrfg12/),wrfres)
>
> wrf_map_overlay(wks,map6,(/cont_wrfb18/),wrfres)
>
> wrf_map_overlay(wks,map7,(/cont_wrfk18/),wrfres)
>
> wrf_map_overlay(wks,map8,(/cont_wrfg18/),wrfres)
>
> ;;;;;;;;;;;;;;;;;to plot data persiann data cumul of
> 00-06h;;;;;;;;;;;;;;;;;;;
> res10 =res
> res10@cnFillon = True
> res10@mpLimitMode = "Corners"
> res10@mpLeftCornerLatF = 1
> res10@mpLeftCornerLonF = 1
> res10@mpRightCornerLatF = 14
> res10@mpRightCornerLonF = 22
> map9=gsn_csm_contour_map_ce(wks, prepper6(0,:,:), res10) ; create
> plot ;object
>
>
> ;*******************************************
> ;******************************
> ; eleven plot
> ;******************************
> ;;;;;;;;;;;;;;;;;;;;;;;to plot data persiann cumul of
> 06-12h;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,,
> res11 = res
> res11@cnFillon = True
> res11@mpLimitMode = "Corners"
> res11@mpLeftCornerLatF = 1
> res11@mpLeftCornerLonF = 1
> res11@mpRightCornerLatF = 14
> res11@mpRightCornerLonF = 22
> map10= gsn_csm_contour_map_ce(wks, prepper12(0,:,:), res11) ;
> create plot ;object
>
>
> ;*******************************************
>
> ;******************************
> ; twelve plot
> ;******************************
> ;;;;;;;;;;;;;;;;;;;to plot persiann data at
> 12-18h;;;;;;;;;;;;;;;;;;;;;;;;;;
> res12 = res
> res12@cnFillon = True
> res12@mpLimitMode = "Corners"
> res12@mpLeftCornerLatF = 1
> res12@mpLeftCornerLonF = 1
> res12@mpRightCornerLatF = 14
> res12@mpRightCornerLonF = 22
> map11= gsn_csm_contour_map_ce(wks, prepper18(0,:,:), res12) ;
> create plot ;object
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;;;;;;;;;;;;;;;,,
>
>
> pnlres = True
> pnlres@gsnMaximize = True
> pnlres@txString = ""
> pnlres@gsnPanelXWhiteSpacePercent = 10.
> pnlres@gsnPanelYF = (/0.95,0.95,5.5,5.5/)
> pnlres@gsnPanelLabelBar = True ; add
> common colorbar
> ; pnlres@txString = "13-18 juillet 2009" ; add
> common title
> pnlres@gsnPanelBottom = 0.10 ; add space at
> bottom
> pnlres@pmLabelBarWidthF = .6
> pnlres@tmYRLabelsOn = False ; no right labels
> pnlres@tmYROn = False ; no right
> tickmarks
> pnlres@amJust = "BottomLeft"
> pnlres@gsnPanelFigureStringsFontHeightF = 0.008
> ; pnlres@gsnPanelFigureStrings= (/"BMJ 00h-06h","BMJ 06h-12h","BMJ
> 12h-18h","KF 00h-06h","KF 06h-12h","KF 12h-18","GD 00h-06h",\
> ;"GD 06h-12h","GD 12h-18h"/) ; add strings to panel
>
>
> gsn_panel(wks,(/
> map0,map3,map6,map1,map4,map7,map2,map5,map8,map9,map10,map11/),(/
> 4,3/),pnlres)
>
>
> end
>
>
>
>
>
>
>
>
> <wrfmp8mo.ps>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Oct 31 09:03:09 2009

This archive was generated by hypermail 2.1.8 : Mon Nov 02 2009 - 08:49:47 MST