Re: help

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 17 2009 - 12:15:54 MST

Sending a script and providing no example of the
graphic does not make answering your question easy.

[1]
Why are you loading contributed.ncl multiple times?
What are "gsn_code_new.ncl" and "WRFUserARW_new.ncl?
What is "new" about them?

What version of NCL are you using??

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"

[2]
Please make an image accessible. The preferred way would be
to provide a URL that we can click on to view the graphic.
As noted on the NCL "Support" link

"Since image files (e.g. PS files) can be large, please convert to (say)
PNG or GIF. If possible, make the images available via the www."

[3]
Do you have a .hluresfile in your home directory?

http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml

This .hluresfile would make the default background 'white'.

[4]
You are using 'wrf_contour'. These are WRF created. Perhaps,
'wrfhelp@ucar.edu' would be a btter place to post your question?

Regards

Rolande Tchouaken wrote:
> Good morning sir,
>
> I have done a pannel who contain sea level pression of wrf model and sea
> level pression of NCEP model, but in each map contours of sea level
> pression are ther but another color is in each map; this color is
> unifirrm. I don't know xhat can I do to move this color.
>
> thank for your comprehension.
>
> Tis is my scrip
>
> 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("/media/disk/simulation_rolande/wrfprd_cu1_mp6_blp1_ssp1_ralw1_rasw1_180709/wrfout_d01_2009-07-18_00:00:00.nc","r")
> a2 =
> addfile("/media/disk/simulation_rolande/wrfprd_cu1_mp6_blp1_ssp1_ralw1_rasw1_180709/wrfout_d01_2009-07-18_06:00:00.nc","r")
> a3 =
> addfile("/media/disk/simulation_rolande/wrfprd_cu1_mp6_blp1_ssp1_ralw1_rasw1_180709/wrfout_d01_2009-07-18_12:00:00.nc","r")
>
> ;;;;;;;;;;;;pr lire les fichiers de 12h ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> a4 =
> addfile("/media/disk/simulation_rolande/wrfprd_cu1_mp6_blp1_ssp1_ralw1_rasw1_180709/wrfout_d01_2009-07-18_18:00:00.nc","r")
>
>
>
> a6 = addfile("/media/disk/simulation_rolande/slp_day.nc","r")
> slpwrf0= wrf_user_getvar(a1,"slp",0)
> slpwrf6= wrf_user_getvar(a2,"slp",0)
> slpwrf12= wrf_user_getvar(a3,"slp",0)
> slpwrf18= wrf_user_getvar(a4,"slp",0)
>
>
> slpncep1 =short2flt(a6->slp)
> slpncep = slpncep1 /100
> copy_VarCoords(slpncep1,slpncep)
>
> wks = gsn_open_wks("ps" ,"slp18")
>
>
>
> pltres = True
> mpres = True
> res = True
>
> opts_r = True
> res@cnFillOn = True
> res@NoTitles = True
> res@lbLabelBarOn = False ; turn off individual c
> res@UnitLabel = ""
> res@mpMinLonF = 0.2 ; select a subregion
> res@mpMaxLonF = 22
> res@mpMinLatF = 0.1
> res@mpMaxLatF = 14
>
>
> res@gsnDraw = False ; don't draw
> res@gsnFrame = False ; don't advance frame
> ;;;;;;;;;;;;;;;;;;;;;;;;draw national boundery
> map;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Map
> stuff
> ;
> res@mpDataBaseVersion = "Ncarg4_0" ; use finer
> database ;
> res@mpOutlineOn =
> True ;
> res@mpFillOn = False ; turn off gray
> fill ;
> res@mpOutlineBoundarySets = "National" ; turn on country
> boundaries ;
>
> res@mpNationalLineColor = "Black" ;"Red"
> res@mpNationalLineDashPattern = 0 ;1 ;for dashpattern
> res@mpNationalLineThicknessF = 1.5
>
> res@mpGeophysicalLineColor = "Black" ; color of cont.
> outlines ;
> res@mpGeophysicalLineThicknessF = 1.5 ; thickness of
> outlines;; ;
>
>
> res@cnFillOn = True
> res@cnFillDrawOrder = "Predraw"
> ;;;;;;;;;;;;;;;to add national boundary
> country;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,,,,,
>
> resm = True
>
> resm@mpOutlineBoundarySets = "National" ; turn on country
> boundaries
> resm@mpGeophysicalLineColor = "Black" ; color of
> cont. outlines
> resm@mpGeophysicalLineThicknessF = 1.5 ; 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 = 0.1
> resm@mpLeftCornerLonF = 0.2
> resm@mpRightCornerLatF = 14
> resm@mpRightCornerLonF = 22
>
> res@vpWidthF = .870 ;7*.118 ;0.2
> res@vpHeightF =13.6 ;8*.09 ;0.8
>
> res = True
> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
> res@cnMinLevelValF = 900. ; set min contour level
> res@cnMaxLevelValF = 1100. ; set max contour level
> res@cnLevelSpacingF = 1. ; set contour spacing
> res@cnLineColor = "Blue"
> res@cnLinesOn = True
> res@cnLineLabelsOn = True
> res@cnFillColors = (/"White","White"/)
> res@gsnContourZeroLineThicknessF = 2. ; doubles thickness of zero
> contour
> res@gsnContourNegLineDashPattern = 1 ; sets negative contours to
> dash pattern 1
> ; opts_psl@UnitLabel = ""
> res@cnInfoLabelOn = False
> res@cnLineLabelFontHeightF = 0.01
> res@cnLineLabelPerimOn = False
>
>
>
> res5 = res
> slpwrf0@description = ""
> slpwrf0@UnitLabel = ""
> res5@cnFillon = True
> cont_slpwrf0 = wrf_contour(a1,wks, slpwrf0,res5)
>
> res6 =res
> slpwrf6@description = ""
> res6@cnFillon = True
> cont_slpwrf6 = wrf_contour(a1,wks, slpwrf6, res6)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> res7 = res
> slpwrf12@description = ""
> res7@cnFillon = True
> cont_slpwrf12 = wrf_contour(a1,wks, slpwrf12, res7)
>
> res8 =res
> slpwrf18@description = ""
> res8@cnFillon = True
> cont_slpwrf18= wrf_contour(a1,wks, slpwrf18, res8)
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,
> res@mpOutlineBoundarySets = "National" ; turn on country
> boundaries
> res@mpGeophysicalLineColor = "Black" ; color of cont. outlines
> res@mpGeophysicalLineThicknessF = 1.5 ; thickness of outlines
> res@gsLineDashPattern = 1.8
> res@mpDataBaseVersion = "Ncarg4_1" ; use finer
> database ;
> res@mpOutlineOn =
> True ;
> res@mpFillOn = False ; turn off gray
> fill ;
> res@mpOutlineBoundarySets = "National" ; turn on country
> boundaries ;
> res@mpNationalLineColor = "Black" ;"Red"
> res@mpNationalLineDashPattern = 0 ;1 ;for dashpattern
> res@mpNationalLineThicknessF = 1.5
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,
> res9 =res
>
> map4=gsn_csm_contour_map_ce(wks,slpncep(0,:,:),res9)
>
> res0 =res
> map5=gsn_csm_contour_map(wks,slpncep(1, :, :),res0) ; create plot ;object
>
> res1 =res
> map6=gsn_csm_contour_map(wks,slpncep(2, :, :),res1)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> res2 =res
> map7=gsn_csm_contour_map(wks,slpncep(3, :, :),res2)
>
>
>
> ; Generate maps.
> resm = True
> map = new(8,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)
>
> 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_slpwrf0/),wrfres)
>
> wrf_map_overlay(wks,map1,((/cont_slpwrf6/)),wrfres)
>
> wrf_map_overlay(wks,map2,((/cont_slpwrf12/)),wrfres)
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> wrf_map_overlay(wks,map3,((/cont_slpwrf18/)),wrfres)
>
>
> pnlres = True
> ;pnlres@pmLabelBarOrthogonalPosF = -0.01
> 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 = "pression au niveau de la mer du 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@lbTitleOn = True ; turn on title
> ; ;pnlres@lbTitlePosition = "Bottom"
> ; pnlres@lbTitleString = "(degC)"
> pnlres@lbTitleFontHeightF= .015 ; make title smaller
>
> pnlres@gsnPanelFigureStringsFontHeightF = 0.008
> pnlres@gsnPanelFigureStrings= (/"WRF 00h","NCEP 00h","WRF 06h","NCEP
> 06h","WRF 12h",\
> "NCEP 12h","WRF 18h","NCEP 18h"/)
>
> gsn_panel(wks,(/map0,map4,map1,map5,map2,map6,map3,map7/),(/4,2/),pnlres)
>
>
> end
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 17 12:16:30 2009

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2009 - 17:27:42 MST