<div dir="ltr"><div>The attached calculates the ensemble (N=100) mean wave height, standard deviation, skewness and kurtosis at each time step.<br></div><div>Then it plots ensembl mean time series.</div><div><br></div><div>This should get you started.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 30, 2019 at 10:08 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Possibly:  <br></div><div>   (a) For each time period<br></div><div>   (b) For each statistic, <br></div><div>   (c) For each location or for all locations [45*90] sort into ascending order and pick the highest 1%<br></div><div>--------<br></div><div>If you can make the file available, I can take a look.</div><div><br></div><div>Dropbox or ftp</div><div><br></div><div>ftp <a href="http://ftp.cgd.ucar.edu" target="_blank">ftp.cgd.ucar.edu</a></div><div>anonymous</div><div>your_email</div><div>cd incoming</div><div>put <a href="http://zo_hist_1850-2005_ens_1-100.nc" target="_blank">zo_hist_1850-2005_ens_1-100.nc</a></div><div>quit</div><div><br></div><div>After successful file transfer, send me an email.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 30, 2019 at 9:16 AM Sri.durgesh Nandini-Weiss via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div 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" size="2"><span 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" size="2"><span lang="en-US">Is the below the correct way?</span></font></p>
    <p><font style="font-size:11pt" size="2"><span 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  = "<a href="http://zo_hist_1850-2005_ens_1-100.nc" target="_blank">zo_hist_1850-2005_ens_1-100.nc</a>" ; 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" size="2"><span 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" size="2"><span lang="en-US"><br>
        </span></font></p>
    <p><br>
    </p>
    <pre cols="72"><font style="font-size:11pt" size="2"><span 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>
  </div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>