[ncl-talk] Remove Global mean SST from the SST data

dickson mbigi dickson.mbigi at gmail.com
Wed Nov 6 17:16:22 MST 2019


Hi Adam,
Thank you so much. It worked well

On Wed, Nov 6, 2019 at 9:21 AM <ncl-talk-request at ucar.edu> wrote:

> Send ncl-talk mailing list submissions to
>         ncl-talk at ucar.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> or, via email, send a message with subject or body 'help' to
>         ncl-talk-request at ucar.edu
>
> You can reach the person managing the list at
>         ncl-talk-owner at ucar.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ncl-talk digest..."
>
>
> Today's Topics:
>
>    1. Re: Remove Global mean SST from the SST data (Adam Phillips)
>    2. Re: Need a data file of NCL examples (Adam Phillips)
>    3. Re: Need a data file of NCL examples (Dennis Shea)
>    4. Re: calculating and plotting change in standard deviation and
>       change of both skewness and kutosis at 99% percentile (Dennis Shea)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 5 Nov 2019 15:02:33 -0700
> From: Adam Phillips <asphilli at ucar.edu>
> To: Dennis Shea <shea at ucar.edu>
> Cc: Ncl-talk <ncl-talk at ucar.edu>, dickson mbigi
>         <dickson.mbigi at gmail.com>
> Subject: Re: [ncl-talk] Remove Global mean SST from the SST data
> Message-ID:
>         <CACvWuqBjQuL79cangN79TpOEb0bTvN+-kuM8SNJmC=
> ruHP4okg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Dickson,
> If you want to remove the global mean value from each timestep at each grid
> point, you could do something like this:
> ;arr is a 3D array dimensioned time x lat x lon, with coordinate variables
> of the same name.
> pi=4.*atan(1.0)
> rad=(pi/180.)
> coswgt=cos(rad*arr&lat)
> coswgt!0 = "lat"
> coswgt&lat= arr&lat
> do ff = 0,dimsizes(arr&time)-1
>      arr(ff,:,:) = (/ arr(ff,:,:) -
> wgt_areaave(arr(ff,{-60:70},:),coswgt({-60.:60.}),1.0,0) /)
> end do
>
> Note that in the above I'm weighting the area by the cosine of the
> latitude.
> Hope that helps!
> Adam
>
> On Mon, Nov 4, 2019 at 9:31 PM Dennis Shea via ncl-talk <ncl-talk at ucar.edu
> >
> wrote:
>
> > One approach:
> >
> >
> > ;--- Global: only 60S-60N
> >
> >   sstGlb    = f->SST(iStrt:iLast,{-60:60},:)          ; read Global data
> (limit 60S to 60N)
> >   printVarSummary(sstGlb)
> >
> >   sstGlbClm = clmMonTLL(sstGlb)                       ; climatology for
> clm period
> >   printVarSummary(sstGlbClm)
> >
> >   sstGlbAnom= calcMonAnomTLL ( sstGlb , sstGlbClm )   ; anomalies at
> each grid point
> >   printVarSummary(sstGlbAnom)                         ; from base
> climatology
> >
> >
> > On Mon, Nov 4, 2019 at 8:00 PM dickson mbigi via ncl-talk <
> > ncl-talk at ucar.edu> wrote:
> >
> >> Dear concerned expert,
> >> I am preparing a script to perfom  decadal MAM EOF over Indian oceans
> >> using ERSSTV5 data set.
> >> Steps prior to do EOF:
> >> 1) Select the three months of March-May and do the seasonal mean;
> >> 2) Do a 9-year running average (Lanczos filter)
> >> 3) Do the linear regression on the global mean SST and keep the residual
> >> for latter EOF analysis (i.e. remove the global mean component at each
> grid
> >> point).
> >>
> >> I cannot figure out the third step on how to remove the global mean
> >> component at each grid point.
> >>
> >> Kindly I am writing to ask for any assistance or directive regarding the
> >> said concern.
> >>
> >> Regards,
> >> Dickson.
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/ad0ab518/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 5 Nov 2019 15:05:50 -0700
> From: Adam Phillips <asphilli at ucar.edu>
> To: Feiyu Wang <leightonw at 126.com>
> Cc: Ncl-talk <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] Need a data file of NCL examples
> Message-ID:
>         <CACvWuqDC-jAFkjvac4pTjB33NfbWJfh9jj-tS11Tw=
> brT+S40w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Feiyu,
> ESMF_regrid can use an existing weight file, or it can create one for you
> to use. Please review the documentation on the ESMF Regridding page here:
> http://www.ncl.ucar.edu/Applications/ESMF.shtml
>
> To my knowledge, NCL/NCAR does not have the weight files used in the ESMF
> regridding examples.
> Adam
>
> On Tue, Nov 5, 2019 at 12:37 AM Feiyu Wang via ncl-talk <ncl-talk at ucar.edu
> >
> wrote:
>
> >
> > Dear Sir or Madam,
> > When using the ESMF_regrid.ncl, it dosen't work without a weight file.
> > Would you please provide the wgt_file such as CAMSE_2_FV.nc and
> HOMME_to_FV.nc
> > for me?
> > Much thanks and best wishes.
> >
> > Feiyu Wang
> > TEL:18681849808
> > E-mail: leightonw at 126.com
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/b6453aa4/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 5 Nov 2019 17:41:12 -0700
> From: Dennis Shea <shea at ucar.edu>
> To: Adam Phillips <asphilli at ucar.edu>
> Cc: Ncl-talk <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] Need a data file of NCL examples
> Message-ID:
>         <
> CAOF1d_5QnWa0VvBzgUoDpPx6dWHWF81sG+tSxQvkp6sHvJUhgw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Specific to Adam's response:
>
> http://www.ncl.ucar.edu/Applications/ESMF.shtml
> ESMF_regrid_17.ncl
> ===
> The example uses: the following files:
>
>     CAMSE_file = "b.e10.B1850CN.ne30_g16.001_ANN_climo.nc"
>        FV_file = "fv_sstghgcl_aero_01.cam2.h0.1999-01.nc"
>
> You should be able to substitute any SE and FV files you have locally
> available.
>
> Run the script: It will produce the desired weight file:
> *CAMSE_2_FV.nc*Then you can use:
>
> *   ESMF_wgts_17.ncl*
>
>
> *Goos Luck*
>
>
>
>
>
> On Tue, Nov 5, 2019 at 3:06 PM Adam Phillips via ncl-talk <
> ncl-talk at ucar.edu>
> wrote:
>
> > Hi Feiyu,
> > ESMF_regrid can use an existing weight file, or it can create one for you
> > to use. Please review the documentation on the ESMF Regridding page here:
> > http://www.ncl.ucar.edu/Applications/ESMF.shtml
> >
> > To my knowledge, NCL/NCAR does not have the weight files used in the ESMF
> > regridding examples.
> > Adam
> >
> > On Tue, Nov 5, 2019 at 12:37 AM Feiyu Wang via ncl-talk <
> ncl-talk at ucar.edu>
> > wrote:
> >
> >>
> >> Dear Sir or Madam,
> >> When using the ESMF_regrid.ncl, it dosen't work without a weight file.
> >> Would you please provide the wgt_file such as CAMSE_2_FV.nc and
> HOMME_to_FV.nc
> >> for me?
> >> Much thanks and best wishes.
> >>
> >> Feiyu Wang
> >> TEL:18681849808
> >> E-mail: leightonw at 126.com
> >>
> >>
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> > --
> > Adam Phillips
> > Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> > www.cgd.ucar.edu/staff/asphilli/   303-497-1726
> >
> > <http://www.cgd.ucar.edu/staff/asphilli>
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/24a729f6/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 5 Nov 2019 18:21:11 -0700
> From: Dennis Shea <shea at ucar.edu>
> To: "Sri.durgesh Nandini-Weiss"
>         <sri.durgesh.nandini-weiss at uni-hamburg.de>
> Cc: Ncl-talk <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] calculating and plotting change in standard
>         deviation and change of both skewness and kutosis at 99% percentile
> Message-ID:
>         <CAOF1d_7-oD3D=
> S-UAgMP-Y-eFRUj9TqDRx0OZN5BGP4h--Cepg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> The attached calculates the ensemble (N=100) mean wave height, standard
> deviation, skewness and kurtosis at each time step.
> Then it plots ensembl mean time series.
>
> This should get you started.
>
> On Wed, Oct 30, 2019 at 10:08 AM Dennis Shea <shea at ucar.edu> wrote:
>
> > Possibly:
> >    (a) For each time period
> >    (b) For each statistic,
> >    (c) For each location or for all locations [45*90] sort into ascending
> > order and pick the highest 1%
> > --------
> > If you can make the file available, I can take a look.
> >
> > Dropbox or ftp
> >
> > ftp ftp.cgd.ucar.edu
> > anonymous
> > your_email
> > cd incoming
> > put zo_hist_1850-2005_ens_1-100.nc
> > quit
> >
> > After successful file transfer, send me an email.
> >
> > On Wed, Oct 30, 2019 at 9:16 AM Sri.durgesh Nandini-Weiss via ncl-talk <
> > ncl-talk at ucar.edu> wrote:
> >
> >> Hello everyone,
> >>
> >> I'm attempting to calculating, and plot changes for extreme value from
> >> sea surface height from an ensemble outputs.
> >>
> >> For e.g i am trying to analyse the change between 1986-2006 and
> 2081-2100
> >> at the 99% percentiles from the ensemble from the change in statistics
> >> (mean,  standard deviation and  change of both skewness and kutosis). I
> >> adapted my script from extval_6.ncl
> >>
> >> Is the below the correct way?
> >>
> >> ;************************************************
> >> ; extvalv_6.ncl
> >> ;
> >> ; Concepts illustrated:
> >> ;   - Using extval_mlegev  and extval_gev
> >> ;   - Calculate basic statistics
> >> ;     - Basic statistics of the original sample
> >> ;     - Estimate GEV distribution parameters
> >> ;   - Creating a 'text' object to attach to a plot
> >> ;************************************************
> >>
> >>    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]
> >>
> >>    in  = addfile(fn,"r")                                 ; open netcdf
> >> file
> >>    ts  = in->zo                                          ; read in
> >> variable
> >>    printVarSummary(ts)
> >>
> >> ;************************************************
> >> ;  calculate deviation from zonal mean
> >> ;************************************************
> >>    anom = dim_rmvmean_n_Wrap(ts,0)
> >>    printVarSummary(anom)
> >>
> >> ;***************************************************************
> >> ;--- "Normal" (conventional) statistical estimates for full sample
> >> ;***************************************************************
> >>
> >>    xStat4 = dim_stat4_n(ts, 0)  ; 1st 4 moments of original sample
> >>    printVarSummary(xStat4 )
> >>
> >>    xAvg   = xStat4(0)              ; original sample mean
> >>    xStd   = sqrt(xStat4(1))        ;    "     sample std dev
> >>    xSkew  = xStat4(2)              ; skewness; departure from symmetry
> >>    xKurt  = xStat4(3)              ; kurtosis; relative to a normal
> >> distribution
> >>    xLow   = min(ts)
> >>    xMed   = dim_median_n(ts,0)  ; median of original sample
> >>    xHi    = max(ts)
> >>
> >>
> >> ;***************************************************************
> >> ;--- PLOTS
> >> ;***************************************************************
> >>
> >>    wks  = gsn_open_wks ("pdf","ext6")                ; send graphics to
> >> PNG file
> >>
> >>    gsn_define_colormap(wks,"default")
> >>    plot = new(2, "graphic")
> >>
> >> ;************************************************
> >> ; Panel
> >> ;************************************************
> >>
> >>    resP                     = True                  ; modify the panel
> >> plot
> >>    resP at gsnMaximize         = True                  ; ps, eps, pdf
> >>    resP at gsnPanelMainString  = "River Flow Rate"     ; use this for NCL
> >> V6.4.0 and later
> >>    resP at txFontHeightF       = 0.020
> >>    gsn_panel(wks,plot,(/1,2/), resP)                ; now draw as one
> plot
> >>
> >> ;***************************************************************
> >> ;--- create histogram for the original sample
> >> ;***************************************************************
> >>
> >>    resh = True
> >>    resh at gsnDraw      = False
> >>    resh at gsnFrame     = False
> >>    resh2gsnHistogramNumberOfBins = 11
> >>
> >>    resh at gsFillColor  = "green"
> >>    resh at tiMainString = "SSH: N="+ntim
> >>    plt_hist          = gsn_histogram(wks, ts ,resh)
> >>
> >> ;***************************************************************
> >> ;--- text object original sample statistics; place on histogram
> >> ;***************************************************************
> >>
> >>    txres                       = True
> >>    txres at txFont                = "helvetica-bold"
> >>    txres at txFontHeightF         = 0.0150
> >>    textSample  = (/"  Mean="+sprintf("%5.1f", xAvg) +"~C~"+  \
> >>                    "   Std="+sprintf("%5.1f", xStd) +"~C~"+  \
> >>                    "  Skew="+sprintf("%5.2f", xSkew) +"~C~"+  \
> >>                    "  Kurt="+sprintf("%5.2f", xKurt) +"~C~"+  \
> >>                    "  xLow="+sprintf("%5.1f", xLow) +"~C~"+  \
> >>                    "  xMed="+sprintf("%5.1f", xMed) +"~C~"+  \
> >>                    "   xHi="+sprintf("%5.1f", xHi ) /)
> >>    txBoxSample  = gsn_create_text(wks,textSample, txres)
> >>
> >>    amres  = True
> >>    amres at amParallelPosF   =  0.30             ; move legend to the
> right
> >>    amres at amOrthogonalPosF = -0.10             ; move the legend up
> >>    annoSample = gsn_add_annotation(plt_hist, txBoxSample, amres)  ;
> >> Attach string to plot
> >>
> >>    draw(plt_hist)
> >>    frame(wks)
> >>
> >>
> >>
> >> the change in statistics--
> >>  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
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment.html
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Sri_Nw.stats.ncl_v0
> Type: application/octet-stream
> Size: 3345 bytes
> Desc: not available
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment.obj
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: EnsWaveStat.000001.png
> Type: image/png
> Size: 101221 bytes
> Desc: not available
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: EnsWaveStat.000002.png
> Type: image/png
> Size: 113690 bytes
> Desc: not available
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment-0001.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: EnsWaveStat.000003.png
> Type: image/png
> Size: 99119 bytes
> Desc: not available
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment-0002.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: EnsWaveStat.000004.png
> Type: image/png
> Size: 89518 bytes
> Desc: not available
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/082cb017/attachment-0003.png
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> ------------------------------
>
> End of ncl-talk Digest, Vol 192, Issue 6
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191107/9948c693/attachment.html>


More information about the ncl-talk mailing list