---------- Forwarded message ----------
From: Oswald Jason Lobo <ojlobo_at_gmail.com>
Date: Tue, Sep 29, 2009 at 1:10 PM
Subject: Problem with Overlaying plot
To: ncl-talk-request_at_ucar.edu
Hi,
I'm trying to plot a ttest of pressure/height vs latitude for temperature.
The problem i'm facing is that only half the plot gets hatched. Is there any
way that i can get it to hatch over the entire plot. I have attached a
picture of my plot and also my code and var summary. I also get an error
which states
warning:ScalarFieldSetValues: coordinate array sfXArray requires 149206043
elements:defaulting
(0) get_lat_values: Warning: Your latitude values do not fall between
-90 and 90 inclusive.
(0) You will not get 'nice' latitude labels.
My code
load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
plot = new(3,graphic)
header =
(/"2xCO2-1xCO2~C~Temperature(K)","2xCO2_CCN-2xCO2~C~Temperature(K)","2xCO2_CCN-1xCO2~C~Temperature(K)"/)
f1=addfile("ttest-ht-vs-lat-tCO2_atm800-CO2_400.nc","r")
f2=addfile("ttest-ht-vs-lat-tgeo-erad115-CO2_atm800.nc","r")
f3=addfile("ttest-ht-vs-lat-tgeo-erad115-CO2_400.nc","r")
diff1=f1->diff
t1 = f1->t
diff2=f2->diff
t2 = f2->t
diff3=f3->diff
t3 = f3->t
printMinMax(diff3,True)
printVarSummary(diff3)
printMinMax(t3,True)
printVarSummary(t3)
wks = gsn_open_wks ("eps", "temp_ht_ttest" )
gsn_define_colormap(wks,"BlueDarkRed18")
res = True
res_at_gsnDraw = False
res_at_gsnFrame = False
res_at_tmXBMode = "Explicit"
res_at_tmXBValues=(/-90,-60,-30,0,30,60,90/)
res_at_tmXBLabels=(/"SP","60S","30S","EQ","30N","60N","NP"/)
res_at_tmYLMode = "Explicit"
res_at_tmYLValues=(/1000,750,250,100,50,25,10/)
res_at_tmYLLabels=(/1000,750,250,100,50,25,10/)
res_at_tmXBLabelFontHeightF = 0.04
res_at_tmXTOn = False
res_at_tmYLOn = False
res_at_tiYAxisString =""
res_at_tiXAxisString =""
res_at_cnInfoLabelOn=False
res_at_tiYAxisFontHeightF = 0.05
res_at_gsnLeftStringFontHeightF = 0.04
res_at_cnLineLabelsOn = False
res_at_cnFillOn = True
res_at_lbLabelBarOn= False
res_at_cnLevelSelectionMode = "ExplicitLevels"
res_at_cnLevels = (/-8,-7,-6,-5,-4,-3,-2,-1,-.5,0.5,1,2,3,4,5/)
res_at_cnFillColors =(/2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19/)
res_at_vpWidthF =0.7
res_at_vpHeightF =0.7
res2 = True
res2_at_gsnDraw = False
res2_at_gsnFrame = False
res2_at_gsnAddCyclic = True
res2_at_tiYAxisFontHeightF = 0.05
res2_at_tmXBLabelsOn = False
res2_at_cnFillOn = True
res2_at_cnMonoFillColor= True
res2_at_cnMonoFillPattern = True
res2_at_cnFillPattern =3
res2_at_cnLinesOn = False
res2_at_cnLineLabelsOn = False
res2_at_lbLabelBarOn = False
res2_at_cnInfoLabelOn = False
res2_at_cnMonoFillScale = True
res2_at_cnFillScaleF=0.4
res2_at_vpWidthF =0.7
res2_at_vpHeightF =0.7
res_at_gsnLeftString = header(0)
plot(0)=gsn_csm_pres_hgt(wks,diff1,res)
plott=gsn_csm_pres_hgt(wks,t1,res2)
overlay(plot(0),plott)
delete(res_at_gsnLeftString)
delete(plott)
res_at_gsnLeftString = header(1)
plot(1)=gsn_csm_pres_hgt(wks,t1,res)
plott=gsn_csm_pres_hgt(wks,t2,res2)
overlay(plot(1),plott)
delete(res_at_gsnLeftString)
delete(plott)
res_at_gsnLeftString = header(2)
plot(2)=gsn_csm_pres_hgt(wks,diff3,res)
plott=gsn_csm_pres_hgt(wks,t3,res2)
overlay(plot(2),plott)
delete(res_at_gsnLeftString)
delete(plott)
res_pan = True
res_pan_at_gsnFrame = False
res_pan_at_gsnPanelRowSpec=True
res_pan_at_gsnPanelXWhiteSpacePercent = 0
res_pan_at_gsnPanelYWhiteSpacePercent=0
res_pan_at_gsnPanelLabelBar = True
res_pan_at_lbLabelFontHeightF = 0.02
res_pan_at_lbLabelAutoStride = True
res_pan_at_pmLabelBarWidthF =1
res_pan_at_gsnPanelDebug = True
res_pan_at_gsnPanelXF=(/0.05,0.5,0.3/)
res_pan_at_gsnPanelYF=(/-1,-1,0.47/)
gsn_panel(wks,plot,(/2,1/),res_pan)
frame(wks)
end
Var summary
(0)
(0) min=-9.20668 max=0.762985
Variable: diff3
Type: float
Total Size: 9984 bytes
2496 values
Number of Dimensions: 2
Dimensions and sizes: [lev | 26] x [lat | 96]
Coordinates:
lev: [3.54463800000001..992.5560999999998]
lat: [ -90.. 90]
Number Of Attributes: 2
_FillValue : -999
average_op_ncl : dim_avg over dimension(s): time
(0)
(0) min=-9.20668 max=0.762985
Variable: t3
Type: float
Total Size: 9984 bytes
2496 values
Number of Dimensions: 2
Dimensions and sizes: [lev | 26] x [lat | 96]
Coordinates:
lev: [3.54463800000001..992.5560999999998]
lat: [ -90.. 90]
Number Of Attributes: 2
average_op_ncl : dim_avg over dimension(s): time
_FillValue : -999
Thanks.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Tue Sep 29 2009 - 10:11:39 MDT