<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Akilas,<br>
<br>
you have to tell NCL to draw the plot and advance the frame manually
because you have set <br>
<br>
<font color="#3333ff"><tt>res@gsnDraw = False</tt><tt><br>
</tt><tt>res@gsnFrame = False</tt></font><br>
<br>
To draw the plot and advance the frame the last three lines of your
script should look like<br>
<br>
<font color="#3333ff"><tt>draw(plot)</tt><tt><br>
</tt><tt>frame(wks)</tt><tt><br>
</tt><tt>end</tt></font><br>
<br>
-Karin<br>
<br>
<br>
<div class="moz-cite-prefix">Am 02.02.18 um 02:43 schrieb dale zuri
via ncl-talk:<br>
</div>
<blockquote type="cite"
cite="mid:CADWf2rKcGd4cKfCO8zFp=t2+4AJET+nVA0Y0Z=WBot8wzJ0ywg@mail.gmail.com">
<div dir="ltr">
<div>
<div>Hi Ncl user,<br>
</div>
The program is not producing any error. But the figure is not
plotted. <br>
</div>
<div>I would appreciate any help and suggestion.</div>
<div>Thanks</div>
<div>AkilaS<br>
</div>
<div><br>
</div>
<div><br>
</div>
begin<br>
;***********************************************************<br>
Model="t2m";;;;;;;change this line to include may forecast/march
forecast<br>
Model1="sst";;;;;;;change this line to include may
forecast/march forecast<br>
Model2="q2m";;;;;;;change this line to include may
forecast/march forecast<br>
Model3="t2mL";;;;;;;change this line to include may
forecast/march forecast<br>
;Box="23" ;;;;Both Temp/Prec<br>
Box="12" ;;;;Both Temp/Prec<br>
yrstrt="1980"<br>
yrend="2017"<br>
unit="Temperature(~F34~0~F~ C)"<br>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>
f = addfile("<a href="http://era1-1980.nc"
moz-do-not-send="true">era1-1980.nc</a>","r")<br>
u = f->sst ; units m/s<br>
printVarSummary(u)<br>
diri =
"/import/c1/NCARCCM/asampath/ERA-Interim/ERA-Alaska-Fire-Summer"<br>
fils = systemfunc ("csh -c 'cd " + diri + " ; ls era1*'")<br>
print(fils) ; relative path to files<br>
f1 = addfiles(fils,"r")<br>
ListSetType (f1, "cat") ; concatenate (=default)`<br>
dew =
short2flt(f1[:]->d2m(:,{55:45},{200:210})) ;
read T from all filesu =
short2flt(f1[:]->t2m(:,{55:45},{200:210})) ;air temp
Ocean ; read T from all files<br>
t2air = short2flt(f1[:]->t2m(:,{55:45},{200:210})) ;air
temp Ocean ; read T from all files<br>
t2lan = short2flt(f1[:]->t2m(:,{70:60},{200:210})) ;air
temp land ; read T from all files<br>
tsst = short2flt(f1[:]->sst(:,{55:45},{200:210})) ;sea
box ; read T from all files<br>
DEW2= (dew-273.15);;;;dew point temperature<br>
T2Air= (t2air-273.15);;;;2mtemperature Ocean<br>
TSST= (tsst-273.15);;;;SeaSurface temperature<br>
T2LAN= (t2lan-273.15);;;;air temp land<br>
AvDEW2 = dim_avg_n_Wrap(DEW2, (/1,2/)) ; ==> zAvg(nlat,nlon)<br>
AvT2Air = dim_avg_n_Wrap(T2Air, (/1,2/)) ; ==>
zAvg(nlat,nlon)<br>
<br>
AvTSST = dim_avg_n_Wrap(TSST, (/1,2/)) ; ==> zAvg(nlat,nlon)<br>
AvT2LAN = dim_avg_n_Wrap(T2LAN, (/1,2/)) ; ==>
zAvg(nlat,nlon)<br>
print(AvT2Air)<br>
print(AvT2LAN)<br>
rc = regline_stats(AvT2Air,AvTSST) ; linear regression coef<br>
print(rc)<br>
;;;;;;;;;;;Relative humidity calculation;;;;surface pressure in
mb;;;specific humidity in kg/kg;;dew point temp in degree
C;;;;;;;;;<br>
e =6.112*(exp((17.625*AvDEW2)/(243.04+AvDEW2))) ;;;;;vapor
pressure in mb<br>
q = ((0.622 * e)/(1013.25 - (0.378 * e)))*1000; <br>
print(q)<br>
rc1 = regline_stats(q,AvTSST) ; qOCean<br>
print(rc1)<br>
rc2 = regline_stats(AvT2LAN,AvT2Air) ; land-Air<br>
;************************************<br>
qx = ispan (1,228,1)<br>
;printVarSummary(qx)<br>
;print(dimsizes(liness1))<br>
;print(dimsizes(lines1))<br>
;print(dimsizes(t2))<br>
;;;;;;;Array adjustment;;;;;;;;;;;;;;;;<br>
;gg=dimsizes(qx)-dimsizes(liness1)<br>
;xgg = new(gg,float)<br>
;print(xgg)<br>
;lin1= array_append_record (xgg, liness1, 0)<br>
;print(lin1)<br>
;t resources;;;;;;;;;;;;;;;;;;O;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>
asciiwrite
("temporal_Clim_"+Model+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+".txt",
sprintf("%9.3f", AvT2Air))<br>
asciiwrite
("temporal_Clim_"+Model1+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+".txt",
sprintf("%9.3f", AvTSST))<br>
asciiwrite
("temporal_Clim_"+Model2+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+".txt",
sprintf("%9.3f", q))<br>
asciiwrite
("temporal_Clim_"+Model3+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+".txt",
sprintf("%9.3f", AvT2LAN))<br>
;wks = gsn_open_wks ("pdf",
""+Model+"-"+Model1+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+"_timeseries_")<br>
;wks = gsn_open_wks ("pdf",
""+Model2+"-"+Model1+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+"_timeseries_")<br>
wks = gsn_open_wks ("x11",
""+Model3+"-"+Model+"_PSA_"+yrstrt+"-"+yrend+"_"+Box+"_timeseries_")<br>
plots = new(1, graphic)<br>
<br>
res = True<br>
res@gsnDraw = False<br>
res@gsnFrame = False<br>
res@vpHeightF= 0.25 ; change aspect ratio of
plot<br>
res@vpWidthF = 0.4<br>
res@xyLineThicknessF = 4.<br>
res@xyDashPattern = 0<br>
res@xyMarker = 16<br>
<br>
;res@tmYLMinorOn = False ; Turn off left minor
tickmarks<br>
res@tmYLOn = True ; Turn off left tickmarks<br>
res@tmYLMinorOn = False ; Turn off left minor
tickmarks<br>
res@tmYROn = False<br>
res@tmXTOn = False<br>
; now change the size of the tickmark labels<br>
res@tmXBLabelFont = 22 ; resize tick labels<br>
res@tmXBLabelFontHeightF = 0.009 ; resize tick
labels<br>
res@tmYLLabelFont = 22 ; resize tick labels<br>
res@tmYLLabelFontHeightF = 0.013<br>
res@tiMainFont= 22<br>
res@tiMainFontHeightF = 0.013<br>
res@tiXAxisFontHeightF = 0.013<br>
res@tiYAxisFontHeightF = 0.013<br>
res@tiXAxisFont = 22<br>
res@tiYAxisFont = 22<br>
res@tiXAxisString = "Time [years]"<br>
;res@tiYAxisString = "mm/d"<br>
res@tiYAxisString ="" <br>
;*****************************<br>
; panel plot only resources<br>
resP = True ; modify the panel plot<br>
resP@gsnMaximize = True ; large format<br>
resP@gsnStringFont = "helvetica-bold"<br>
;resP@gsnPanelFigureStrings =
(/"a)","b)","c)","d)","e)","f)","g)","h)"/)<br>
;resP@gsnPanelFigureStringsFontHeightF = 0.015<br>
;resP@gsnPanelFigureStringsFont = "helvetica-bold"<br>
<br>
txres = True<br>
txres@txFontHeightF = 0.02<br>
txres@txJusti = "CenterCenter"<br>
txres@txFontThicknessF = 2.0 ; default=1.00<br>
; txres@txFontHeightF = 0.025 ; default=0.05<br>
<br>
;res@xyLineColors = (/ "Red", "Green","Red","Green"/)<br>
;res@xyMarkLineMode = "MarkLines" ; Markers *and*
lines<br>
;res@xyMarkers = (/4,4/) ; 3 different
markers<br>
;res@xyMarkerColor = (/"Red","blue"/)<br>
res@xyLineColors = (/"Red","blue"/)<br>
;;;;;;;;;;;;;;;;;;Legend Label;;;;;;;;;;;;;;;;;;<br>
;res@xyExplicitLegendLabels = (/"T2m(Air)","SST"/)<br>
res@xyExplicitLegendLabels = (/"q2m(g/kg)","SST"/)<br>
;res@xyExplicitLegendLabels = (/"T2m(Air)","T2m(Land)"/)<br>
res@pmLegendSide = "Top"<br>
res@pmLegendDisplayMode = "Always" ; Display a legend.<br>
res@pmLegendWidthF = 0.1 ; Make it smaller<br>
res@pmLegendHeightF = 0.05 ; Make it smaller<br>
res@pmLegendOrthogonalPosF = -0.4 ; Move into to plot<br>
res@pmLegendParallelPosF = 0.5 ; Move to right<br>
res@lgPerimOn = False ; No legend perimeter.<br>
res@lgLabelFont = 22 <br>
res@lgLabelFontHeightF = 0.013<br>
;;;;;;;;;;;;Tick mark line label;;;;;;;;;;;;;;;<br>
;res@tiMainString =
""+Box+"-Regcoeff("+sprintf("%1.0g",rc)+")
-"+yrstrt+"-"+yrend+""<br>
res@tiMainString =
""+Box+"-Regcoeff("+sprintf("%1.0g",rc1)+")
-"+yrstrt+"-"+yrend+""<br>
;res@tiMainString =
""+Box+"-Regcoeff("+sprintf("%1.0g",rc2)+")
-"+yrstrt+"-"+yrend+""<br>
res@tmXBMode = "Explicit"<br>
;res@trYMinF = -(max(zAvg))<br>
;res@trYMaxF = (max(zAvg1))<br>
res@trXMinF = 0<br>
res@trXMaxF =228 <br>
res@tmXBValues = ispan(0,227,6) <br>
res@tmXBLabels =
(/"1980","1981","1982","1983","1984","1985","1986", \<br>
"1987","1988","1989","1990","1991","1992","1993","1994","1995",
\<br>
"1996","1997","1998","1999","2000","2001","2002","2003","2004",
\<br>
"2005","2006","2007","2008","2009","2010","2011","2012","2013",
\<br>
"2014","2015","2016","2017"/)<br>
res@tmXBLabelAngleF = 80 <br>
plots(0) = gsn_csm_xy(wks,qx,(/AvT2Air,AvTSST/),res) ; create
plot<br>
;plots(0) = gsn_csm_xy(wks,qx,(/q,AvTSST/),res) ; create plot<br>
;plots(0) = gsn_csm_xy(wks,qx,(/AvT2LAN,AvT2Air/),res) ; create
plot<br>
end<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
</body>
</html>