<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Adv,<br>
<br>
please always reply to ncl-talk!<br>
<br>
Without any information about your data it is not possible to help.<br>
Please send the output of the printVarSummary(prob1).<br>
<br>
Does your data include the selected region of the map?<br>
<br>
Bye,<br>
Karin<br>
<br>
<div class="moz-cite-prefix">Am 13.07.15 um 17:30 schrieb Adv:<br>
</div>
<blockquote
cite="mid:CAHfbfHtwx5Lnduk1BNtmu148eiwtSvKBkA=5nZwBWe2MWPp0qA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
</div>
I get a plot not the values. I have attached here the
output of this script.<br>
</div>
I don't understand. <br>
<br>
</div>
Thanks,<br>
</div>
Adv<br>
<div>
<div>
<div>
<div> <br>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jul 13, 2015 at 1:53 AM,
Karin Meier-Fleischer <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Adv,<br>
<br>
first you have set<br>
<br>
resP@gsnFrame = False<br>
<br>
which will let NCL end without drawing a frame! Delete the
line and you<br>
will get your plot.<br>
<br>
Bye,<br>
Karin<br>
<br>
Am 13.07.15 um 04:54 schrieb Adv:<br>
<div>
<div class="h5">> Hi ,<br>
> Could someone point out the error in this script?
It plots no values.<br>
> Many times i checked, the values are proper. I
think graphical part<br>
> has issues.<br>
><br>
>
;****************************************************<br>
>
;****************************************************<br>
> load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
>
;***************************************************<br>
><br>
>
;***************************************************<br>
> begin<br>
>
;***************************************************<br>
> ;prec*.25x.25cpc1948-present-usa grid<br>
> ;others*2.25x2.25cpc1948-present-globalgrid<br>
> f1 =
addfile("tas_Amon_CCSM4_historical_r3i1p1_185001-200512.nc",<br>
> "r") ; note the "s" of addfile<br>
> u1 = f1->tas<br>
> printVarSummary(u1) ;
[time| 720]x[lat|<br>
> 91]x[lon| 180]<br>
> ;;;;;;1961-2005;;;;;;;;;;;;;;;;;<br>
> ua1=u1(lat|:,lon|:,time|1332:)<br>
> ua11=u1(time|1332:,lat|:,lon|:)<br>
> printVarSummary(ua1) ;
[time| 720]x[lat|<br>
> 91]x[lon| 180]<br>
> ua11 = ua11-273.15<br>
> ua11@units= "degC"<br>
> ;return<br>
> yyyymm = cd_calendar(ua11&time, -1)<br>
> yyyy = yyyymm/100<br>
> dimx = dimsizes(ua11)<br>
> ntim = dimx(0) ; all years and
months<br>
><br>
> year = ispan(yyyy(0), yyyy(ntim-2), 1)<br>
> print(year)<br>
> nyrs = dimsizes(year)<br>
> print(nyrs)<br>
> ;return<br>
> ;delete(u)<br>
> xann1 = month_to_annual(ua11 , 1)
; [year| 60]x[lat|<br>
> 91]x[lon| 180]<br>
> printVarSummary(xann1)<br>
> xann1&year = year<br>
> rc1 =
regCoef(year,xann1(lat|:,lon|:,year|:))<br>
> copy_VarCoords(ua11(0,:,:), rc1)<br>
> rc1=rc1*45<br>
> tval1 = onedtond(rc1@tval , dimsizes(rc1))<br>
> printVarSummary(tval1)<br>
> df1 = onedtond(rc1@nptxy, dimsizes(rc1)) - 2<br>
> printVarSummary(df1)<br>
> b = 0.5<br>
> t4=onedtond(0.5,dimsizes(rc1))<br>
> prob1 =
(1-betainc(df1/(df1+tval1^2),df1/2.0,t4))<br>
> print(prob1)<br>
> printVarSummary(prob1)<br>
> copy_VarCoords(rc1,prob1)<br>
> printVarSummary(prob1)<br>
> ;return<br>
> print(prob1)<br>
> print(min(prob1))<br>
> print(max(prob1))<br>
> printVarSummary(prob1)<br>
>
;**************************************************<br>
> ; plot parameters<br>
>
;**************************************************<br>
><br>
> wks =<br>
>
gsn_open_wks("x11","NorthernPlains_Significant_AirTemp_1961-2005")
;<br>
> Open ps file<br>
> gsn_define_colormap(wks,"gui_default")
; assign colormap<br>
> plot = new(1,graphic) ;
create a plot array<br>
><br>
> res = True<br>
> res@gsnDraw = False ; don't
draw<br>
> res@gsnFrame = False ; don't
advance frame<br>
> res@cnInfoLabelOn = False ; turn
off cn info label<br>
> res@cnLinesOn = False ;
turn off contour lines<br>
> res@cnFillOn = True ;
color plot desired<br>
> res@cnLineLabelsOn = False<br>
> res@lbLabelBarOn = False ; turn
off individual cb's<br>
> res@txFontHeightF = 0.030 ;
adjust font height of<br>
> gsnLeftString/gsnRightString titles<br>
> res@cnLevelSelectionMode = "ExplicitLevels"
; set<br>
> explicit contour levels<br>
> ; res@cnLevels = (/
10,20,30,40,50,60,70,80,90,100/)<br>
> res@cnLevels = (/
0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1/)<br>
> res@vpWidthF = 0.90 ;
change aspect ratio<br>
> of plot<br>
> res@vpHeightF = 0.90<br>
> res@vpXF = 0.05<br>
> res@vpYF = 0.95<br>
><br>
> ; map resources for projection<br>
> res@mpGridAndLimbOn = False<br>
> res@gsnTickMarksOn = False<br>
>
;***************************************************<br>
> res@mpLimitMode = "LatLon"<br>
> res@mpMinLatF = 40.<br>
> res@mpMaxLatF = 49.<br>
> res@mpMinLonF = 242.<br>
> res@mpMaxLonF = 264.<br>
> res@mpCenterLonF = 252<br>
><br>
> res@mpPerimOn = True
; draw box<br>
> around map<br>
><br>
> res@mpGeophysicalLineThicknessF = 3.0<br>
> res@mpGeophysicalLineColor = "Black"; (/22/)<br>
> ;res@mpNationalLineThicknessF = 3.0<br>
> res@mpOutlineBoundarySets =
"GeophysicalAndUSStates" ; add state<br>
> boundaries<br>
> res@mpNationalLineColor =
res@mpGeophysicalLineColor<br>
> res@mpUSStateLineThicknessF = 3.0<br>
> res@mpUSStateLineColor =
res@mpGeophysicalLineColor<br>
><br>
> res@gsnAddCyclic = False<br>
> ; to take advantage of NCL's automatic labeling,
we need to assign som<br>
> attributes:<br>
><br>
><br>
> plot(0) = gsn_csm_contour_map_ce(wks,prob1,res)<br>
> ;return<br>
> ;************************************************<br>
> ; create panel<br>
> ;************************************************<br>
> resP = True
; modify the panel plot<br>
> resP@gsnFrame = False
; don't advance the<br>
> frame, so we can use gsn_text_ndc<br>
> resP@gsnPanelLabelBar = True
; add common colorbar<br>
> resP@lbLabelFontHeightF = 0.015
; set font height of<br>
> Label Bar labels<br>
> resP@gsnPanelBottom = 0.2
; shrink panel plot<br>
> by setting bottom edge of plot<br>
> resP@gsnPanelTop = 0.9 ;
shrink panel plot by<br>
> setting top edge of plot<br>
> resP@pmLabelBarWidthF = 0.7 ;
make thinner<br>
> resP@pmLabelBarHeightF = 0.09<br>
> resP@gsnPanelYWhiteSpacePercent = 5.
; increase spacing<br>
> along Y-axis between panel plots<br>
> resP@txString =
"NorthernPlains_AirTemperature_Significant_1961-2005"<br>
> gsn_panel(wks,plot,(/1,1/),resP)
; now draw as one plot<br>
><br>
><br>
><br>
> end<br>
><br>
> Thank you,<br>
> Adv<br>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
</div>
</div>
</blockquote>
</body>
</html>