<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello everyone,</p>
<p>I'm attempting to calculating, and plot changes for extreme value
from sea surface height from an ensemble outputs.</p>
<p>For e.g i am trying to analyse the change between 1986-2006 and
2081-2100 at the 99% percentiles from the ensemble from <font
style="font-size: 11pt;" class="" size="2"><span class=""
lang="en-US">the change in statistics (mean, standard
deviation and change of both skewness and kutosis). I adapted
my script from extval_6.ncl<br>
</span></font></p>
<p><font style="font-size: 11pt;" class="" size="2"><span class=""
lang="en-US">Is the below the correct way?</span></font></p>
<p><font style="font-size: 11pt;" class="" size="2"><span class=""
lang="en-US">;************************************************<br>
; extvalv_6.ncl<br>
;<br>
; Concepts illustrated:<br>
; - Using extval_mlegev and extval_gev<br>
; - Calculate basic statistics <br>
; - Basic statistics of the original sample<br>
; - Estimate GEV distribution parameters<br>
; - Creating a 'text' object to attach to a plot<br>
;************************************************<br>
<br>
fn = "zo_hist_1850-2005_ens_1-100.nc" ; define filename
[time | 1872] x [ens | 100] x [depth | 1] x [lat | 45] x [lon
| 90]<br>
<br>
in = addfile(fn,"r") ;
open netcdf file<br>
ts = in->zo ;
read in variable<br>
printVarSummary(ts)<br>
<br>
;************************************************<br>
; calculate deviation from zonal mean<br>
;************************************************<br>
anom = dim_rmvmean_n_Wrap(ts,0)<br>
printVarSummary(anom)<br>
<br>
;***************************************************************<br>
;--- "Normal" (conventional) statistical estimates for full
sample <br>
;***************************************************************<br>
<br>
xStat4 = dim_stat4_n(ts, 0) ; 1st 4 moments of original
sample<br>
printVarSummary(xStat4 ) <br>
<br>
xAvg = xStat4(0) ; original sample mean<br>
xStd = sqrt(xStat4(1)) ; " sample std dev<br>
xSkew = xStat4(2) ; skewness; departure from
symmetry<br>
xKurt = xStat4(3) ; kurtosis; relative to a
normal distribution<br>
xLow = min(ts)<br>
xMed = dim_median_n(ts,0) ; median of original sample<br>
xHi = max(ts)<br>
<br>
</span></font></p>
<p><font style="font-size: 11pt;" class="" size="2"><span class=""
lang="en-US"><br>
;***************************************************************<br>
;--- PLOTS<br>
;***************************************************************<br>
<br>
wks = gsn_open_wks ("pdf","ext6") ; send
graphics to PNG file<br>
<br>
gsn_define_colormap(wks,"default") <br>
plot = new(2, "graphic")<br>
<br>
;************************************************<br>
; Panel<br>
;************************************************<br>
<br>
resP = True ; modify
the panel plot<br>
resP@gsnMaximize = True ; ps, eps,
pdf<br>
resP@gsnPanelMainString = "River Flow Rate" ; use this
for NCL V6.4.0 and later<br>
resP@txFontHeightF = 0.020<br>
gsn_panel(wks,plot,(/1,2/), resP) ; now draw
as one plot<br>
<br>
;***************************************************************<br>
;--- create histogram for the original sample<br>
;***************************************************************<br>
<br>
resh = True<br>
resh@gsnDraw = False<br>
resh@gsnFrame = False<br>
resh2gsnHistogramNumberOfBins = 11<br>
<br>
resh@gsFillColor = "green"<br>
resh@tiMainString = "SSH: N="+ntim<br>
plt_hist = gsn_histogram(wks, ts ,resh) <br>
<br>
;***************************************************************<br>
;--- text object original sample statistics; place on
histogram <br>
;***************************************************************<br>
<br>
txres = True<br>
txres@txFont = "helvetica-bold"<br>
txres@txFontHeightF = 0.0150<br>
textSample = (/" Mean="+sprintf("%5.1f", xAvg) +"~C~"+ \<br>
" Std="+sprintf("%5.1f", xStd) +"~C~"+ \<br>
" Skew="+sprintf("%5.2f", xSkew) +"~C~"+
\<br>
" Kurt="+sprintf("%5.2f", xKurt) +"~C~"+
\<br>
" xLow="+sprintf("%5.1f", xLow) +"~C~"+ \<br>
" xMed="+sprintf("%5.1f", xMed) +"~C~"+ \<br>
" xHi="+sprintf("%5.1f", xHi ) /)<br>
txBoxSample = gsn_create_text(wks,textSample, txres)<br>
<br>
amres = True<br>
amres@amParallelPosF = 0.30 ; move legend to
the right<br>
amres@amOrthogonalPosF = -0.10 ; move the
legend up<br>
annoSample = gsn_add_annotation(plt_hist, txBoxSample,
amres) ; Attach string to plot<br>
<br>
draw(plt_hist)<br>
frame(wks)<br>
</span></font></p>
<p><font style="font-size: 11pt;" class="" size="2"><span class=""
lang="en-US"><br>
</span></font></p>
<p><br>
</p>
<pre class="moz-signature" cols="72"><font style="font-size: 11pt;" class="" size="2"><span class="" lang="en-US">the change in statistics</span></font>--
Sri Nandini-Weiß
Research Scientist
Universität Hamburg
Center for Earth System Research and Sustainability (CEN)
Cluster of Excellence 'Climate, Climatic Change, and Society' (CLICCS)
Bundesstrasse 53, 20146 Hamburg
Tel: +49 (0) 40 42838 7472</pre>
</body>
</html>