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

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


Hi Dennis,
Thank you for the reply and clarification as well.

On Wed, Nov 6, 2019 at 3:00 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: climo_3.ncl + loop + conventional subscripts (zoe jacobs)
>    2. Re: Assignment type mismatch, right hand side can't be
>       coerced to type of left hand side (zoe jacobs)
>    3. convert string to fortran character (Zhifeng Yang)
>    4. Remove Global mean SST from the SST data (dickson mbigi)
>    5. Re: convert string to fortran character (Rick Brownrigg)
>    6. Re: convert string to fortran character (Dennis Shea)
>    7. Re: Remove Global mean SST from the SST data (Dennis Shea)
>    8. Need a data file of NCL examples (Feiyu Wang)
>    9. Re: Amplitude and Phase of the seasonal cycle
>       (Sri.durgesh Nandini-Weiss)
>   10. Re: convert string to fortran character (Zhifeng Yang)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 5 Nov 2019 00:59:53 +0330
> From: zoe jacobs <zoejacobs1990 at gmail.com>
> To: Dennis Shea <shea at ucar.edu>, ncl-talk at ucar.edu
> Subject: Re: [ncl-talk] climo_3.ncl + loop + conventional subscripts
> Message-ID:
>         <CAL-eqBk1biqZmXhjo80FgsYWZ6BrBUEUZMq=
> DeipmdYqjukZ0g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Dennis,
> It is ok now. Many thanks for your help and advice.
> Best wishes,
>
> On Mon, Nov 4, 2019 at 6:13 PM Dennis Shea <shea at ucar.edu> wrote:
>
> > A quick overview of the script.  It will 'work '
> >
> > However, I would suggest you use
> >      res at cnLevelSelectionMode = "ExplicitLevels"
> > and
> >      res at cnFillMode   = "RasterFill"
> > ===
> > Also, your script will need to be changed to accommodate the
> precipitation
> > variable plot values
> > There are many examples of how to do this.
> >
> > eg: *http://www.ncl.ucar.edu/Applications/HiResPrc.shtml*
> > <http://www.ncl.ucar.edu/Applications/HiResPrc.shtml>
> >
> > On Sat, Nov 2, 2019 at 11:26 PM zoe jacobs <zoejacobs1990 at gmail.com>
> > wrote:
> >
> >> Dear Dennis,
> >> Many thanks for your help. I used the attached script. I just want to
> >> check with you to make sure that the script is correct. Would you please
> >> check it?
> >> Best wishes,
> >>
> >> On Mon, Oct 28, 2019 at 12:31 AM Dennis Shea <shea at ucar.edu> wrote:
> >>
> >>> The following is untested. However, it gives you the idea.
> >>> It is your responsibility to look up documentation and look at the
> >>> printed output.
> >>>
> >>>
> >>>
> >>>  fils = systemfunc ("ls precip.*.nc") ; file paths
> >>>  a    = addfiles (fils, "r")
> >>>  printVarSummary (a)
> >>>
> >>> ;************************************************
> >>> ; Read the file
> >>> ;************************************************
> >>>
> >>>   ymdStrt = 19790101                            ; climatology start
> >>> year/month/day
> >>>   ymdLast = 20151231                             ;      "      last
> >>>  year/month/day
> >>>   time    = a[:]->time
> >>>   yyyymmdd= cd_calendar(time, -2)       ; note -2
> >>> print(yyyymmdd)
> >>>   ntStrt = ind(yyyymmdd.eq.ymdStrt)                ; start time index
> >>>   ntLast = ind(yyyymmdd.eq.ymdLast)              ; last  time index
> >>> print("ntStrt="+ntStrt+"  ntLast="+ntLast)
> >>>    prc   = a[:]->precip(ntStrt:ntLast,:,:)               ; read precip
> >>> from all files
> >>>
> >>>    printVarSummary (prc)
> >>>    printMinMax (prc,0)
> >>>   print("=====")
> >>>                    ; you decide what you need
> >>>    prcMonth = *calculate_monthly_values(*
> >>> <
> http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_monthly_values.shtml
> >prc,
> >>> "avg", 0, False)   ; monthly mean
> >>>  ;;prcMonth = *calculate_monthly_values(*
> >>> <
> http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_monthly_values.shtml
> >prc,
> >>> "sum", 0, False)  ; monthly total
> >>>
> >>>    printVarSummary (prcMonth)
> >>>    printMinMax (prcMonth,0)
> >>>    print("=====")
> >>>    opt = True                          ; examine data distribute
> >>> [information only]
> >>>    opt at PrintStat = True
> >>>    stat_prc = stat_dispersion(prcMonth, opt )
> >>>
> >>>    prcClm   = *clmMonTLL*
> >>> <
> http://www.ncl.ucar.edu/Document/Functions/Contributed/clmMonTLL.shtml
> >(prcMonth)
> >>> ; Compute monthly climatology
> >>>    printVarSummary (prcClm)
> >>>    printMinMax (prcClm,0)
> >>>
> >>> ====
> >>> Add the plot code.
> >>> Look carefully at: http://www.ncl.ucar.edu/Applications/HiResPrc.shtml
> >>>
> >>> EG: The following may be inappropriate for your dataset but this is the
> >>> idea.
> >>>
> >>>  res at cnLevelSelectionMode = "ExplicitLevels"
> >>>  res at cnLevels             = (/ 0.01, 0.02, 0.04, 0.08, 0.16, \
> >>>                                0.32, 0.64, 0.96/)
> >>>  res at cnFillColors         = (/"white","cyan", "green","yellow",\
> >>>                               "darkorange","red","magenta","purple",\
> >>>                               "black"/)
> >>>
> >>>
> >>> On Sun, Oct 27, 2019 at 2:48 PM Dennis Shea <shea at ucar.edu> wrote:
> >>>
> >>>>
> >>>> [0]
> >>>> As noted on ncl-talk many time the first rule of data processing is
> >>>> *Look at your data!"
> >>>> The temperature data were *monthly means* [K].
> >>>> The precipitation data are* daily* totals [mm/day]. How do I know? I
> >>>> looked at the README file at the URL. You should do that.
> >>>>
> >>>> [1]
> >>>> a =* addfiles*
> >>>> <http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml>
> >>>> (fils, "r")
> >>>>
> >>>> You have the following which is appropriate for an *addfile*
> >>>> <http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>
> >>>> reference
> >>>>        time   = a->time
> >>>>
> >>>> However, you are using *addfiles*
> >>>> <http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml>
> >>>> It should be:
> >>>>        time   = a*[:]*->time   ; *[:]* syntax is appropriate for an
> >>>> *addfiles* reference
> >>>>
> >>>> [2]
> >>>> Did you read the documentation for *cd_calendar *
> >>>> <
> http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml>as
> >>>> I suggested? The whole point of using *cd_calendar* is to return
> >>>> 'human-readable' start and end times from which the actual start/stop
> time
> >>>> index values could be determined.. Your script uses the actual time
> values
> >>>> [ 692496 , 1016808 ] mixed with human-readable yyyymm.  Further, you
> used
> >>>>
> >>>>     yyyymm = cd_calendar(time, *-1*)         ; -1 returns YYYYMM
> >>>>
> >>>> The precipitation files contain [as noted] daily values. You must use
> a
> >>>> human readable time like YYYYMMDD [eg: 19790101]. The us
> >>>>
> >>>>     yyyymmdd = cd_calendar(time, *-2*)         ; -2 returns YYYYMMDD
> >>>>
> >>>> This converts the actual time values [eg:      692496] to
> >>>> 'human-readable' yyyymmdd [year=>yyyy, month=>mm, day=dd>*
> >>>> 692496=>197901*01] values.
> >>>>
> >>>>
> >>>> ===
> >>>> Also, your script will need to be changed to accommodate the
> >>>> precipitation variable plot values
> >>>> There are many examples of how to do this.
> >>>>
> >>>> eg: *http://www.ncl.ucar.edu/Applications/HiResPrc.shtml*
> >>>> <http://www.ncl.ucar.edu/Applications/HiResPrc.shtml>
> >>>> ===
> >>>> In a previous email, you mentioned that you converted degrees Kelvin
> to
> >>>> C.
> >>>> It is best to self-document the  variable with its new units.
> >>>>
> >>>>    tmp = tmp-273.15
> >>>>    tmp at units = "degC"  ; this will be automatically plotted
> >>>> ===
> >>>> Good Luck
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Sat, Oct 26, 2019 at 8:19 AM zoe jacobs <zoejacobs1990 at gmail.com>
> >>>> wrote:
> >>>>
> >>>>> Dear all,
> >>>>> I would like to have climatology precipitation like temperature
> >>>>> climatology discussed through previous emails. However, there are
> >>>>> precipitation files for each year from 1979- 2015 (
> >>>>> ftp://ftp.cdc.noaa.gov/Datasets/cpc_global_precip/). In the first
> >>>>> step, I tried to merge all those files as one, and then use Dennis
> script
> >>>>> to plot a map. I faced some errors and need your advice please. the
> script
> >>>>> I am running has been attached.Many thanks in advance,
> >>>>> Best regardsn Sat, Oct 26, 2019 at 3:20 PM zoe jacobs <
> >>>>> zoejacobs1990 at gmail.com> wrote:
> >>>>>
> >>>>>> I just noticed that I could use res at gsnRightString = " deg C" .
> >>>>>> Once again, many thanks for your guide.
> >>>>>> Best wishes,
> >>>>>>
> >>>>>>
> >>>>>> On Fri, Oct 25, 2019 at 11:07 PM Dennis Shea <shea at ucar.edu> wrote:
> >>>>>>
> >>>>>>> I forgot to mention that plots can be done in 'portrait' [default]
> >>>>>>> or 'landscape' mode.
> >>>>>>>
> >>>>>>> You should experiment to see which is appropriate for your needs.
> >>>>>>>
> >>>>>>> resP at gsnPaperOrientation = "landscape"        ; "portrait" is
> >>>>>>> default
> >>>>>>>
> >>>>>>>   do nmo=0,11                                   ; loop over the
> >>>>>>> months
> >>>>>>>      res at gsnLeftString     = months(nmo)
> >>>>>>>      plot(nmo) = gsn_csm_contour_map(wks,tmpClm(nmo,:,:), res)  ;
> >>>>>>> create plot
> >>>>>>>   end do
> >>>>>>>
> >>>>>>>   if (resP at gsnPaperOrientation .eq."landscape") then
> >>>>>>>
> >>>>>>> gsn_panel(wks,plot,(/3,4/),resP)
> ; 3 rows
> >>>>>>> x 4 columns
> >>>>>>>   else
> >>>>>>>       gsn_panel(wks,plot,(/4,3/),resP)            ; portrait
> >>>>>>> ; 4 rows x 3 columns
> >>>>>>>   end if
> >>>>>>>
> >>>>>>> On Fri, Oct 25, 2019 at 12:15 PM Dennis Shea <shea at ucar.edu>
> wrote:
> >>>>>>>
> >>>>>>>> Hello,
> >>>>>>>>
> >>>>>>>> We do not usually do this but this is offline from ncl-talk.
> >>>>>>>>
> >>>>>>>> [1]
> >>>>>>>> Conventional subscripts start at 1 for Fortran and Matlab.  Hence,
> >>>>>>>> for 12 months [nmos=12]
> >>>>>>>>      Fortran: do nmo=1,nmos
> >>>>>>>>      Matlab: for 1:nmos   or 1:1:nmos  [I am not a Matlab user so
> >>>>>>>> this is a guess.]
> >>>>>>>> NCL 'conventional' subscripts start at 0 [like C/C++/IDL/Python]
> >>>>>>>>      NCL: do nmo=0,ntim-1
> >>>>>>>>
> >>>>>>>> [2] Dave illustrated 'coordinate subscripting' which uses the *{*
> >>>>>>>> ...*}* syntax.
> >>>>>>>>
> >>>>>>>> The script I am attaching uses conventional subscripting. Just
> like
> >>>>>>>> Matlab/Fortran except it uses a range fro 0 to 11 [12 elements].
> >>>>>>>>
> >>>>>>>> [3] Please carefully read the documentation for *clmMonTLL*
> >>>>>>>> <
> http://www.ncl.ucar.edu/Document/Functions/Contributed/clmMonTLL.shtml>,
> >>>>>>>> *cd_calendar*
> >>>>>>>> <
> http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml>
> >>>>>>>> ,* ind*
> >>>>>>>> <http://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml>
> >>>>>>>>
> >>>>>>>> [4] Look at the output from '*printVarSummary*
> >>>>>>>> <
> http://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml
> >'.
> >>>>>>>> USE *printVarSummary *frequently.
> >>>>>>>>      Note the dimensions and added attributes:
> >>>>>>>>      time_op_ncl : Climatology: 29 years
> >>>>>>>>      info : function clmMonTLL: contributed.ncl
> >>>>>>>>
> >>>>>>>> [5] NCL offer a large number of color tables [palettes]:
> >>>>>>>>
> >>>>>>>> *
> http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml*
> >>>>>>>> <
> http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml>
> >>>>>>>>      Using a color map that emphasizes features can be very
> useful.
> >>>>>>>>
> >>>>>>>> [6] You must invest the time to learn any new language.
> >>>>>>>> Karin Meier-Fliesher and Michael Bottinger [DKRZ] wrote a
> wonderful
> >>>>>>>> tutorial.
> >>>>>>>>
> >>>>>>>> *http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/*
> >>>>>>>> <http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/>
> >>>>>>>>
> >>>>>>>> I suggest you read it.
> >>>>>>>>
> >>>>>>>> Good luck
> >>>>>>>> ==============
> >>>>>>>> *%>* ncl  zoe_jacobs.hgcn_cams.ncl
> >>>>>>>>
> >>>>>>>> will produce a png file.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Fri, Oct 25, 2019 at 11:16 AM Dave Allured - NOAA Affiliate via
> >>>>>>>> ncl-talk <ncl-talk at ucar.edu> wrote:
> >>>>>>>>
> >>>>>>>>> 1.  In your example, please notice that the month loop has a
> >>>>>>>>> stride of 3.  Therefore it is making plots for only four
> months:  January,
> >>>>>>>>> April, July, and October.
> >>>>>>>>>
> >>>>>>>>> If you want all 12 months, remove the stride.  Then make sure the
> >>>>>>>>> array "plot" is dimensioned 12.  I think you can interchangeably
> use either
> >>>>>>>>> a 1-D or 2-D plot array (i.e. 3*4), your choice.
> >>>>>>>>>
> >>>>>>>>> The secondary index "i" is used to write the four plots into
> >>>>>>>>> positions 0, 1, 2, 3 in the "plot" graphics array.  If you are
> making 12
> >>>>>>>>> plots, you do not really need to use a secondary index.
> >>>>>>>>>
> >>>>>>>>> Panel plotting uses a graphics array containing multiple plots.
> >>>>>>>>> Please study basic examples and documentation for making panel
> plots.
> >>>>>>>>>
> >>>>>>>>> 2.  That data file has full coordinates.  Therefore you can use
> >>>>>>>>> either conventional or coordinate subscripting, or mixed, your
> choice.
> >>>>>>>>>
> >>>>>>>>> I suggest using one of the date functions with coordinate
> >>>>>>>>> subscripting, to index the time subset that you want.  Something
> like this:
> >>>>>>>>>
> >>>>>>>>>     time_units = f->air&time at units
> >>>>>>>>>     time1 = cd_inv_calendar (year1, 1, 1, 0, 0, 0, time_units, 0)
> >>>>>>>>>     time2 = cd_inv_calendar (year2, 12, 31, 23, 0, 0, time_units,
> >>>>>>>>> 0)
> >>>>>>>>>     air_subset = f->air({time1:time2},:,:)
> >>>>>>>>>
> >>>>>>>>> Use printVarSummary to ensure that the subset has the dimension
> >>>>>>>>> sizes that you expect.  Then you can proceed to compute the
> climatology.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Fri, Oct 25, 2019 at 10:14 AM zoe jacobs via ncl-talk <
> >>>>>>>>> ncl-talk at ucar.edu> wrote:
> >>>>>>>>>
> >>>>>>>>>> Hi all,
> >>>>>>>>>> regarding climo_3.ncl (
> >>>>>>>>>> https://www.ncl.ucar.edu/Applications/Scripts/climo_3.ncl) ,
> >>>>>>>>>> I have 2 questions:
> >>>>>>>>>> 1. I need to plot all months on one panel (say 3*4), and cannot
> >>>>>>>>>> understand the logic behind the below loop, which used in the
> climo_3.ncl
> >>>>>>>>>> script :
> >>>>>>>>>>
> >>>>>>>>>> i = -1                                        ; Climatologies
> >>>>>>>>>>   do nmo=0,11,3                                 ; loop over the
> months
> >>>>>>>>>>      i = i+1
> >>>>>>>>>>      res at gsnCenterString   = months(nmo)+":"+time(0)/100 +"-"+
> time(ntim-1)/100
> >>>>>>>>>>      plot(i) = gsn_csm_contour_map(wks,prcClm(nmo,:,:), res)  ;
> create plot
> >>>>>>>>>>   end do
> >>>>>>>>>>
> >>>>>>>>>> How  does it  work??/
> >>>>>>>>>>
> >>>>>>>>>> 2. I would like to show climotology temperature from 1987-
> 2015. Data which I am using is air.mon.mean.nc  (
> https://www.esrl.noaa.gov/psd/data/gridded/data.ghcncams.html)  and it is
> using conventional subscripts. I am not familiar with conventional
> subscripts. So how can I convert coordinate subscripting to conventional
> subscripts?!!
> >>>>>>>>>>
> >>>>>>>>>> Please kindly advice me .
> >>>>>>>>>>
> >>>>>>>>>> Many thanks in advance,
> >>>>>>>>>>
> >>>>>>>>>> Best regards,
> >>>>>>>>>>
> >>>>>>>>>> _______________________________________________
> >>>>>>>>> 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/1b9f6820/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 5 Nov 2019 01:44:32 +0330
> From: zoe jacobs <zoejacobs1990 at gmail.com>
> To: Rick Brownrigg <brownrig at ucar.edu>, ncl-talk at ucar.edu
> Subject: Re: [ncl-talk] Assignment type mismatch, right hand side
>         can't be coerced to type of left hand side
> Message-ID:
>         <
> CAL-eqBkqvmkZRkLp76M0asTFBjnudRT9-J+e5HvoXCk0atQZrg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Rick,
> Many thanks for your help. it is working now. However, I noticed when I
> plot the data for two different dates ( 1979-2015 & 2000-2015), I get the
> same result. What is my mistake? Would you please advise me in this regard?
> Best wishes,
>
> On Mon, Nov 4, 2019 at 5:55 PM Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> > Hi,
> >
> > Docs for clmMonTLL says that the input variable can be of type float or
> > "numeric", but it really must be either float or double. Notice that your
> > variable "u" is of type short, and that further there are "add_offset"
> and
> > "scale_factor" attributes that must be applied to the data to get the
> > actual values. "short2flt()" is exactly the function you want; I think
> this
> > will do it:
> >
> >      uClm = clmMonTLL (short2flt(u))
> >      vClm = clmMonTLL (short2flt(v))
> >
> >      http://ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml
> >
> > There are numerous examples of how to write NetCDF file at the following
> > link. I recommend the "inefficient" way. Its much easier and not that
> > inefficient unless you are dealing with lots of really big variables or
> are
> > writing files on a production basis.
> >
> >     http://ncl.ucar.edu/Applications/write_netcdf.shtml
> >
> > Hope that helps...
> > Rick
> >
> >
> > On Mon, Nov 4, 2019 at 5:42 AM zoe jacobs via ncl-talk <
> ncl-talk at ucar.edu>
> > wrote:
> >
> >> Dear All,
> >> I attempted to plot climatological wind speed during 1979-2015. But I
> >> faced an error and have no idea from where this problem arose. ( I
> checked
> >> the NCL website but was not enough:
> >>
> https://www.ncl.ucar.edu/Document/Language/error_messages.shtml#AssignMismatch
> >> ).Please have a look at the attached script, error message, and data
> file.
> >> I also have another question, after having climatological wind, how can
> I
> >> have the result as nc file?
> >> I am waiting for your helpful suggestions.
> >> Many thanks in advance.
> >>  adaptor.mars.internal-1572848815.075499-2543-15...
> >> <
> https://drive.google.com/file/d/1DAUj5O8_HRB80p6f2ieiubdjqGlUokTL/view?usp=drive_web
> >
> >> ,
> >> _______________________________________________
> >> 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/ccd3c492/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Mon, 4 Nov 2019 21:40:53 -0500
> From: Zhifeng Yang <yangzf01 at gmail.com>
> To: Talk NCL <ncl-talk at ucar.edu>
> Subject: [ncl-talk] convert string to fortran character
> Message-ID:
>         <CAF92WDMVbWr+S60Qn=5W1BCqvGpGNyBoBfCy_re=8HqO=
> QhGuQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi
> I am reading wrf output which has variable Times as character. When I read
> it using NCL, the Times variable is still character, not string. I want to
> change the Times variable using NCL. For example,
>
> Variable: times
>
> Type: character
>
> Total Size: 19 bytes
>
>             19 values
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [Time | 1] x [DateStrLen | 19]
>
> Coordinates:
>
> Number Of Attributes: 0
>
> (0,0) 2
>
> (0,1) 0
>
> (0,2) 1
>
> (0,3) 4
>
> (0,4) -
>
> (0,5) 0
>
> (0,6) 5
>
> (0,7) -
>
> (0,8) 2
>
> (0,9) 5
>
> (0,10) _
>
> (0,11) 0
>
> (0,12) 0
>
> (0,13) :
>
> (0,14) 0
>
> (0,15) 0
>
> (0,16) :
>
> (0,17) 0
>
> (0,18) 0
>
> I want to change 4 to 5. I tried
>
> times(0, 3) = "5"
> "5" is a string, not a character. I got the following error.
>
> fatal:Assignment type mismatch, right hand side can't be coerced to type of
> left hand side
>
> Do you have any suggestions? Thank you
>
> Zhifeng
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191104/fbfaace7/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 5 Nov 2019 11:00:42 +0800
> From: dickson mbigi <dickson.mbigi at gmail.com>
> To: ncl-talk at ucar.edu
> Subject: [ncl-talk] Remove Global mean SST from the SST data
> Message-ID:
>         <CALUZNzO1rVr9izVxcjB=oeK8m7eLAqfp89fhpP=
> 3EN2qYM7PLg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/ece8bdc9/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 5
> Date: Mon, 4 Nov 2019 20:05:11 -0700
> From: Rick Brownrigg <brownrig at ucar.edu>
> To: Zhifeng Yang <yangzf01 at gmail.com>
> Cc: Talk NCL <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] convert string to fortran character
> Message-ID:
>         <
> CAGKRhbEoazaqKupXVsgRCtL61rrLpcbPY9JA7cvxZok0ozJxUA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> You can convert characters to strings via the tostring() function:
>
>     http://ncl.ucar.edu/Document/Functions/Built-in/tostring.shtml
>
> With regard to "...change 4 to 5."  I'm not sure what you are trying to do
> there, but NCL is strongly typed, in both data type and array dimensions.
> Perhaps use tostring() in conjunction with a new array name (?)
>
> Rick
>
> On Mon, Nov 4, 2019 at 7:41 PM Zhifeng Yang via ncl-talk <
> ncl-talk at ucar.edu>
> wrote:
>
> > Hi
> > I am reading wrf output which has variable Times as character. When I
> read
> > it using NCL, the Times variable is still character, not string. I want
> to
> > change the Times variable using NCL. For example,
> >
> > Variable: times
> >
> > Type: character
> >
> > Total Size: 19 bytes
> >
> >             19 values
> >
> > Number of Dimensions: 2
> >
> > Dimensions and sizes: [Time | 1] x [DateStrLen | 19]
> >
> > Coordinates:
> >
> > Number Of Attributes: 0
> >
> > (0,0) 2
> >
> > (0,1) 0
> >
> > (0,2) 1
> >
> > (0,3) 4
> >
> > (0,4) -
> >
> > (0,5) 0
> >
> > (0,6) 5
> >
> > (0,7) -
> >
> > (0,8) 2
> >
> > (0,9) 5
> >
> > (0,10) _
> >
> > (0,11) 0
> >
> > (0,12) 0
> >
> > (0,13) :
> >
> > (0,14) 0
> >
> > (0,15) 0
> >
> > (0,16) :
> >
> > (0,17) 0
> >
> > (0,18) 0
> >
> > I want to change 4 to 5. I tried
> >
> > times(0, 3) = "5"
> > "5" is a string, not a character. I got the following error.
> >
> > fatal:Assignment type mismatch, right hand side can't be coerced to type
> > of left hand side
> >
> > Do you have any suggestions? Thank you
> >
> > Zhifeng
> >
> >
> > _______________________________________________
> > 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/20191104/0e3f70f8/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 6
> Date: Mon, 4 Nov 2019 21:25:03 -0700
> From: Dennis Shea <shea at ucar.edu>
> To: Rick Brownrigg <brownrig at ucar.edu>
> Cc: Talk NCL <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] convert string to fortran character
> Message-ID:
>         <
> CAOF1d_4uMJ_VMpgAn6o_cXQwHjukpSnhrPJNmVFRth-tJiVz4w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> The question is not clear. Possibly:
>
> times = f->Times
> times(0,3) = tochar(tostring(5))
> print(times)
>
> On Mon, Nov 4, 2019 at 8:10 PM Rick Brownrigg via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> > Hi,
> >
> > You can convert characters to strings via the tostring() function:
> >
> >     http://ncl.ucar.edu/Document/Functions/Built-in/tostring.shtml
> >
> > With regard to "...change 4 to 5."  I'm not sure what you are trying to
> do
> > there, but NCL is strongly typed, in both data type and array dimensions.
> > Perhaps use tostring() in conjunction with a new array name (?)
> >
> > Rick
> >
> > On Mon, Nov 4, 2019 at 7:41 PM Zhifeng Yang via ncl-talk <
> > ncl-talk at ucar.edu> wrote:
> >
> >> Hi
> >> I am reading wrf output which has variable Times as character. When I
> >> read it using NCL, the Times variable is still character, not string. I
> >> want to change the Times variable using NCL. For example,
> >>
> >> Variable: times
> >>
> >> Type: character
> >>
> >> Total Size: 19 bytes
> >>
> >>             19 values
> >>
> >> Number of Dimensions: 2
> >>
> >> Dimensions and sizes: [Time | 1] x [DateStrLen | 19]
> >>
> >> Coordinates:
> >>
> >> Number Of Attributes: 0
> >>
> >> (0,0) 2
> >>
> >> (0,1) 0
> >>
> >> (0,2) 1
> >>
> >> (0,3) 4
> >>
> >> (0,4) -
> >>
> >> (0,5) 0
> >>
> >> (0,6) 5
> >>
> >> (0,7) -
> >>
> >> (0,8) 2
> >>
> >> (0,9) 5
> >>
> >> (0,10) _
> >>
> >> (0,11) 0
> >>
> >> (0,12) 0
> >>
> >> (0,13) :
> >>
> >> (0,14) 0
> >>
> >> (0,15) 0
> >>
> >> (0,16) :
> >>
> >> (0,17) 0
> >>
> >> (0,18) 0
> >>
> >> I want to change 4 to 5. I tried
> >>
> >> times(0, 3) = "5"
> >> "5" is a string, not a character. I got the following error.
> >>
> >> fatal:Assignment type mismatch, right hand side can't be coerced to type
> >> of left hand side
> >>
> >> Do you have any suggestions? Thank you
> >>
> >> Zhifeng
> >>
> >>
> >> _______________________________________________
> >> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191104/f9677955/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 7
> Date: Mon, 4 Nov 2019 21:30:25 -0700
> From: Dennis Shea <shea at ucar.edu>
> To: dickson mbigi <dickson.mbigi at gmail.com>
> Cc: Ncl-talk <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] Remove Global mean SST from the SST data
> Message-ID:
>         <CAOF1d_4WD+gTnpF5sC4r2xK=
> 7nTGMukWZmi1TKtD-UULqznzgA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191104/0229480c/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 8
> Date: Tue, 5 Nov 2019 15:37:24 +0800 (CST)
> From: "Feiyu Wang" <leightonw at 126.com>
> To: ncl-talk at ucar.edu
> Subject: [ncl-talk] Need a data file of NCL examples
> Message-ID: <3e952b3c.5190.16e3a7f309f.Coremail.leightonw at 126.com>
> Content-Type: text/plain; charset="gbk"
>
>
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/6ce78c71/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 9
> Date: Tue, 5 Nov 2019 12:06:01 +0100
> From: "Sri.durgesh Nandini-Weiss"
>         <sri.durgesh.nandini-weiss at uni-hamburg.de>
> To: ncl-talk at ucar.edu
> Subject: Re: [ncl-talk] Amplitude and Phase of the seasonal cycle
> Message-ID: <4d29b832-6b26-67c3-4c3d-e063b83bf1bf at uni-hamburg.de>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
> On 11/4/19 3:27 PM, Sri.durgesh Nandini-Weiss via ncl-talk wrote:
> > Hello everyone,
> >
> > I am learning, and trying to compute and plot the phase and amplitude
> > of the seasonal cycle, e.g. for Sea surface height over a period.
> >
> > Can someone please let me know if the script fanal_4.ncl using Fourier
> > ( transformation) analysis is the correct way to do this?
> >
> > Thanx in advance
> >
> > Sri
> >
> >
> >
> --
> Dr. 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
>
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 5 Nov 2019 07:55:47 -0500
> From: Zhifeng Yang <yangzf01 at gmail.com>
> To: Dennis Shea <shea at ucar.edu>
> Cc: Talk NCL <ncl-talk at ucar.edu>
> Subject: Re: [ncl-talk] convert string to fortran character
> Message-ID:
>         <CAF92WDNjULUR-ZRjfkM+EusKa0yvnxnPqLdx07dQ9P=
> VNmz6Cw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Dennis and Rick,
> I found tochar will give me an array with 2 dimensions. Now I can use the
> following to get what I want
> times = f->Times
> times_tmp = tochar(tostring(5))
> times(0,3) = times_tmp(0)
>
> then it works. Thank you for your help.
>
> Best,
> Zhifeng
>
> On Mon, Nov 4, 2019 at 11:25 PM Dennis Shea <shea at ucar.edu> wrote:
>
> > The question is not clear. Possibly:
> >
> > times = f->Times
> > times(0,3) = tochar(tostring(5))
> > print(times)
> >
> > On Mon, Nov 4, 2019 at 8:10 PM Rick Brownrigg via ncl-talk <
> > ncl-talk at ucar.edu> wrote:
> >
> >> Hi,
> >>
> >> You can convert characters to strings via the tostring() function:
> >>
> >>     http://ncl.ucar.edu/Document/Functions/Built-in/tostring.shtml
> >>
> >> With regard to "...change 4 to 5."  I'm not sure what you are trying to
> >> do there, but NCL is strongly typed, in both data type and array
> >> dimensions. Perhaps use tostring() in conjunction with a new array name
> (?)
> >>
> >> Rick
> >>
> >> On Mon, Nov 4, 2019 at 7:41 PM Zhifeng Yang via ncl-talk <
> >> ncl-talk at ucar.edu> wrote:
> >>
> >>> Hi
> >>> I am reading wrf output which has variable Times as character. When I
> >>> read it using NCL, the Times variable is still character, not string. I
> >>> want to change the Times variable using NCL. For example,
> >>>
> >>> Variable: times
> >>>
> >>> Type: character
> >>>
> >>> Total Size: 19 bytes
> >>>
> >>>             19 values
> >>>
> >>> Number of Dimensions: 2
> >>>
> >>> Dimensions and sizes: [Time | 1] x [DateStrLen | 19]
> >>>
> >>> Coordinates:
> >>>
> >>> Number Of Attributes: 0
> >>>
> >>> (0,0) 2
> >>>
> >>> (0,1) 0
> >>>
> >>> (0,2) 1
> >>>
> >>> (0,3) 4
> >>>
> >>> (0,4) -
> >>>
> >>> (0,5) 0
> >>>
> >>> (0,6) 5
> >>>
> >>> (0,7) -
> >>>
> >>> (0,8) 2
> >>>
> >>> (0,9) 5
> >>>
> >>> (0,10) _
> >>>
> >>> (0,11) 0
> >>>
> >>> (0,12) 0
> >>>
> >>> (0,13) :
> >>>
> >>> (0,14) 0
> >>>
> >>> (0,15) 0
> >>>
> >>> (0,16) :
> >>>
> >>> (0,17) 0
> >>>
> >>> (0,18) 0
> >>>
> >>> I want to change 4 to 5. I tried
> >>>
> >>> times(0, 3) = "5"
> >>> "5" is a string, not a character. I got the following error.
> >>>
> >>> fatal:Assignment type mismatch, right hand side can't be coerced to
> type
> >>> of left hand side
> >>>
> >>> Do you have any suggestions? Thank you
> >>>
> >>> Zhifeng
> >>>
> >>>
> >>> _______________________________________________
> >>> 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
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191105/cf1921e9/attachment-0001.html
> >
>
> ------------------------------
>
> 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 5
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191107/97a8f2ec/attachment.html>


More information about the ncl-talk mailing list