From: Jian Zheng <jzheng8606_at_nyahnyahspammersnyahnyah>

Date: Fri Sep 20 2013 - 22:59:20 MDT

Date: Fri Sep 20 2013 - 22:59:20 MDT

You can try 6371004., which makes the result float type.

On Fri, Sep 20, 2013 at 10:30 PM, 宋靜 <kolrsong@gmail.com> wrote:

*> hello,
*

*> for such a script:
*

*>
*

*> i = ispan(0,480-1,1)
*

*> x = sin(i*250/6371004)
*

*>
*

*> however, all x is 0, which is not i want. so, how to deal with this
*

*> problem? many thanks to reply.
*

*>
*

*>
*

*> 2013/9/21 <ncl-talk-request@ucar.edu>
*

*>
*

*>> Send ncl-talk mailing list submissions to
*

*>> ncl-talk@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@ucar.edu
*

*>>
*

*>> You can reach the person managing the list at
*

*>> ncl-talk-owner@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. Fw: Re: Re: confidence interval/level ( ??? )
*

*>> 2. Re: Interchanging the colorbar and Xlabel string positions
*

*>> (Tingting Fan)
*

*>> 3. Re: Interchanging the colorbar and Xlabel string positions
*

*>> (Maria Gehne)
*

*>> 4. reading groups (Wenshan Wang)
*

*>> 5. Re: reading groups (Wei Huang)
*

*>> 6. Re: reading groups (Wei Huang)
*

*>> 7. Blank Image with wrf_map_overlays() ??? (A.J. Eiserloh)
*

*>> 8. length of vector reference (Jian Zheng)
*

*>> 9. EOF (Ipsita Putatunda)
*

*>> 10. Re: reading remss binary data in ncl (samir pokhrel)
*

*>> 11. Re: Interchanging the colorbar and Xlabel string positions
*

*>> (Marston Johnston)
*

*>> 12. Re: EOF (Dennis Shea)
*

*>> 13. Re: Fw: Re: Re: confidence interval/level (Dennis Shea)
*

*>> 14. Re: area weigthed anomalies (Dennis Shea)
*

*>>
*

*>>
*

*>> ----------------------------------------------------------------------
*

*>>
*

*>> Message: 1
*

*>> Date: Fri, 20 Sep 2013 02:10:46 +0800
*

*>> From: " ??? "<557xiaozhu@163.com>
*

*>> Subject: Fw: Re: Re: confidence interval/level
*

*>> To: "Dennis Shea"<shea@ucar.edu>
*

*>> Cc: "ncl-talk@ucar.edu USERS" <ncl-talk@ucar.edu>
*

*>> Message-ID: <1fe20120.5.141376aedb8.Coremail.557xiaozhu@163.com>
*

*>> Content-Type: text/plain; charset="utf-8"
*

*>>
*

*>>
*

*>> Hi Dennis,
*

*>> I am still confused on your example and do not know how to caculate
*

*>> spec@coher_probability exactly. Can you tell me what is the coh, why you
*

*>> set it as 0.5 in your example? Is it the confidence level(0.9, 0.95, 0.99)
*

*>> or spec@coher? What is the relationship between df and jave? Is df twice
*

*>> of jave?
*

*>> Also, I found the formula
*

*>> B=1-p**(1/(df/2-1)) (1)
*

*>> from the reference, but your example is
*

*>> p = 1.-(1.-coh)**(df/2.-1.) (2)
*

*>>
*

*>> why are they different? Is the p in (2) same as p or B in (1) ? Which
*

*>> one is the spec@coher_probability from the function specxy_anal in NCL?
*

*>>
*

*>> Thanks.
*

*>>
*

*>> 2013-09-19
*

*>>
*

*>>
*

*>>
*

*>> Xueming Zhu ???
*

*>> Key Laboratory of Research on Marine Hazards Forecasting (LoMF), SOA
*

*>> National Marine Environmental Forecasting Center (NMEFC)
*

*>> No.8, Dahuisi Road, Haidian District, Beijing, 100081
*

*>> People's Republic of China
*

*>> Tel:+86-10-82481923
*

*>>
*

*>>
*

*>>
*

*>> ????Dennis Shea <shea@ucar.edu>
*

*>> ?????2013-09-19 01:13
*

*>> ???Re: [ncl-talk] confidence interval/level
*

*>> ????"???"<557xiaozhu@163.com>
*

*>> ???"ncl-talk@ucar.edu USERS"<ncl-talk@ucar.edu>
*

*>>
*

*>>
*

*>> Comments on the Determination of Significance Levels
*

*>> of the Coherence Statistic
*

*>> Paul Julian
*

*>> Journal of the Atmospheric Sciences, 1975
*

*>> Volume 12, pp836-837
*

*>>
*

*>>
*

*>>
*

*>> http://journals.ametsoc.org/doi/pdf/10.1175/1520-0469%281975%29032%3C0836%3ACOTDOS%3E2.0.CO%3B2
*

*>>
*

*>> eg:
*

*>> coh = .5
*

*>> df = 6
*

*>> p = 1.-(1.-coh)**(df/2.-1.)
*

*>> print("p="+p)
*

*>>
*

*>>
*

*>>
*

*>> On 9/18/13 8:54 AM, ??? wrote:
*

*>> > Hi Dennis,
*

*>> > can you show me how does NCL caculate the spec@coher_probability?
*

*>> > Thanks.
*

*>> >
*

*>> > 2013-09-18
*

*>> >
*

*>> >
*

*>> >
*

*>> > ???
*

*>> >
*

*>> >
*

*>> >
*

*>> > ????Dennis Shea <shea@ucar.edu>
*

*>> > ?????2013-09-18 07:29
*

*>> > ???Re: [ncl-talk] confidence interval/level
*

*>> > ????"???"<557xiaozhu@163.com>
*

*>> > ???"ncl-talk@ucar.edu USERS"<ncl-talk@ucar.edu>
*

*>> >
*

*>> > spec = specxy_anal(x,y,d,sm,pct)
*

*>> > PHASE = spec@phase
*

*>> > PHASE@_FillValue = 1e20
*

*>> > PHASE = where(spec@coher_probability(1).le.0.95,PHASE@
*

*>> _FillValue,PHASE)
*

*>> >
*

*>> > =========
*

*>> > See: http://www.ncl.ucar.edu/Applications/xy.shtml#ex25
*

*>> >
*

*>> > The right (R) plot should
*

*>> >
*

*>> >
*

*>> > resR = True ; plot mods desired
*

*>> > resR@xyMarkLineModes = "Markers" ; choose which have markers
*

*>> > resR@xyMarkers = 16 ; choose type of marker
*

*>> > resR@xyMarkerColor = "red" ; Marker color
*

*>> > resR@xyMarkerSizeF = 0.005 ; Marker size (default 0.01)
*

*>> >
*

*>> >
*

*>> > plot = gsn_csm_xy2(wks,spec@frq,spec@coher,PHASE,resL,resR)
*

*>> >
*

*>> >
*

*>> > On 9/17/13 4:04 PM, ??? wrote:
*

*>> >> Hi all,
*

*>> >> I have tried to use the function specxy_anal get the coherance
*

*>> and phase of two timeseries data based on the example script spec_2.ncl.
*

*>> But I just want to get the coherence and phase satisfy the 0.95 confidence
*

*>> level, the picture likes that in the attachment. How can I do that?
*

*>> >> It looks like that the output of function specx_ci is not what I
*

*>> want.
*

*>> >>
*

*>> >> Any help would be appreciated. Thanks.
*

*>> >>
*

*>> >> 2013-09-18
*

*>> >>
*

*>> >>
*

*>> >>
*

*>> >> ???
*

*>> >>
*

*>> >>
*

*>> >>
*

*>> >> _______________________________________________
*

*>> >> ncl-talk mailing list
*

*>> >> 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/20130920/26966e7e/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 2
*

*>> Date: Thu, 19 Sep 2013 12:29:48 -0600
*

*>> From: "Tingting Fan" <tingting@ucar.edu>
*

*>> Subject: Re: Interchanging the colorbar and Xlabel string
*

*>> positions
*

*>> To: shejo284@gmail.com
*

*>> Cc: ncl-talk@ucar.edu
*

*>> Message-ID:
*

*>> <60f9f9a658ba24d4f8a6b41520883b6a.squirrel@webmail.cgd.ucar.edu>
*

*>> Content-Type: text/plain;charset=iso-8859-1
*

*>>
*

*>> Hi Marston,
*

*>> I guess, your problem seems there are not enough space for the horizontal
*

*>> colorbar, so colorbar would shear some space of X-axis string.
*

*>> There are two possible solutions I can think of:
*

*>> 1. You could modify the X-axis string height, " res@tiXAxisFontHeightF =
*

*>> *
*

*>> ", to make the string a little smaller.
*

*>> 2. Or, you can modify the colorbar height, "res@pmLabelBarHeightF" or
*

*>> "lbLabelFontHeightF", to make the colorbar thinner.
*

*>> Hope it will help!
*

*>> Tingting
*

*>>
*

*>> --
*

*>> Tingting Fan
*

*>> grad student visitor
*

*>> NCAR/CGD/CAS
*

*>> tel:303-497-1745
*

*>>
*

*>>
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 3
*

*>> Date: Thu, 19 Sep 2013 12:37:14 -0600
*

*>> From: Maria Gehne <mgehne@ucar.edu>
*

*>> Subject: Re: Interchanging the colorbar and Xlabel string
*

*>> positions
*

*>> To: Tingting Fan <tingting@ucar.edu>
*

*>> Cc: ncl-talk@ucar.edu
*

*>> Message-ID: <523B445A.9040407@ucar.edu>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> You can also try moving your colorbar down away from the plot with
*

*>> pmLabelBarOthogonalPosF. You may have to set aside some space at the
*

*>> bottom of the page in order to do that, so the labelbar doesn't fall off
*

*>> the page.
*

*>>
*

*>> You could also see if example 3 here helps:
*

*>> http://www.ncl.ucar.edu/Applications/labelbar.shtml
*

*>>
*

*>> Maria
*

*>>
*

*>> **
*

*>>
*

*>> On 09/19/2013 12:29 PM, Tingting Fan wrote:
*

*>> > Hi Marston,
*

*>> > I guess, your problem seems there are not enough space for the
*

*>> horizontal
*

*>> > colorbar, so colorbar would shear some space of X-axis string.
*

*>> > There are two possible solutions I can think of:
*

*>> > 1. You could modify the X-axis string height, " res@tiXAxisFontHeightF= *
*

*>> > ", to make the string a little smaller.
*

*>> > 2. Or, you can modify the colorbar height, "res@pmLabelBarHeightF" or
*

*>> > "lbLabelFontHeightF", to make the colorbar thinner.
*

*>> > Hope it will help!
*

*>> > Tingting
*

*>> >
*

*>>
*

*>>
*

*>> --
*

*>> Maria Gehne
*

*>> Postdoctoral Fellow
*

*>> NCAR/CGD/CAS
*

*>> P.O. Box 3000
*

*>> Boulder, CO 80307
*

*>>
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130919/2dbcfc9c/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 4
*

*>> Date: Thu, 19 Sep 2013 12:46:52 -0700
*

*>> From: Wenshan Wang <wenshanw@uci.edu>
*

*>> Subject: reading groups
*

*>> To: ncl-talk@ucar.edu
*

*>> Message-ID:
*

*>> <
*

*>> CAO0VvE1RNOijm0nWKwf-__M_WBSqnEB_1EXfLA8MaGU1oxMyhg@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Hello everyone,
*

*>>
*

*>> I was trying to read netCDF 4 files with groups.
*

*>> I have 6 groups.
*

*>> They all have a variable named 'snd' inside.
*

*>> The 6 'snd' are different (I used ncdump to check) but they look the same
*

*>> using NCL.
*

*>>
*

*>> Here is my script:
*

*>>
*

*>> ; Complied by Wang Wenshan 2013-09-19 Thursday 12:06:55
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
*

*>> ;*************************************************************
*

*>> ; check NCL group reading
*

*>> ;************************************************************
*

*>> begin
*

*>> ;setfileoption("nc", "usenewhlfs", True)
*

*>>
*

*>> drc = "/media/grele_data/wenshan/cesm/historical-exp/nco_grp/"
*

*>> fn = "snd_time.nc"
*

*>>
*

*>> fin = addfile(drc+fn,"r")
*

*>> setfileoption("nc", "Format", "NetCDF4Classic")
*

*>>
*

*>> nn = getfilevarnames(fin)
*

*>> ;print(nn)
*

*>> v1 = "/CCSM4_historical/snd"
*

*>> v2 = "/CESM1-BGC_esmHistorical/snd"
*

*>> v3 = "/CESM1-CAM5_historical/snd"
*

*>> v4 = "/CESM1-FASTCHEM_historical/snd"
*

*>> v5 = "/CESM1-WACCM_historical/snd"
*

*>>
*

*>> d1 = fin->$v1$
*

*>> d2 = fin->$v2$
*

*>> d3 = fin->$v3$
*

*>> d4 = fin->$v4$
*

*>> d5 = fin->$v5$
*

*>>
*

*>> ;------------------------------------------------------------
*

*>> ; second way
*

*>> ;g5 = fin=>/CESM1-WACCM_historical
*

*>> ;d5_2 = g5->snd
*

*>> ;------------------------------------------------------------
*

*>>
*

*>> print(d1+" "+d2+" "+d3+" "+d4+" "+d5)
*

*>> ;print(d1+" "+d2+" "+d3+" "+d4+" "+d5+" "+d5_2)
*

*>>
*

*>> print("done!")
*

*>> end
*

*>>
*

*>>
*

*>> The first way gave me the same 'snd'.
*

*>> The second way gave error msg:
*

*>> file: Execute.c, line:8105
*

*>> stop *ptr: 104
*

*>> stop FILE_GROUPVAL_OP: 104
*

*>>
*

*>> I am using NCL 6.1.2
*

*>> Linux grele 3.5.0-40-generic #62~precise1-Ubuntu SMP Fri Aug 23 17:38:26
*

*>> UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
*

*>>
*

*>> I put my script (grp_reading.ncl) and the testing file (snd_time.nc) on
*

*>> ftp/incoming.
*

*>>
*

*>> Thank you very much!
*

*>>
*

*>>
*

*>> Best,
*

*>> Wenshan
*

*>>
*

*>> ------------------------------------------------------------------------------
*

*>> Graduate Student Researcher
*

*>> Earth System Science
*

*>> University of California, Irvine
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130919/df41a1c8/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 5
*

*>> Date: Thu, 19 Sep 2013 14:13:27 -0600
*

*>> From: Wei Huang <huangwei@ucar.edu>
*

*>> Subject: Re: reading groups
*

*>> To: Wenshan Wang <wenshanw@uci.edu>
*

*>> Cc: ncl-talk@ucar.edu
*

*>> Message-ID: <2328442C-48D0-4662-B8F7-072C93793A8A@ucar.edu>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Wenshan,
*

*>>
*

*>> We got your data and script and reproduced the problem.
*

*>> We have created ticket: NCL-1802.
*

*>> We will check on this and get back to you soon.
*

*>>
*

*>> Thanks,
*

*>>
*

*>> Wei
*

*>>
*

*>> huangwei@ucar.edu
*

*>> VETS/CISL
*

*>> National Center for Atmospheric Research
*

*>> P.O. Box 3000 (1850 Table Mesa Dr.)
*

*>> Boulder, CO 80307-3000 USA
*

*>> (303) 497-8924
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> On Sep 19, 2013, at 1:46 PM, Wenshan Wang <wenshanw@uci.edu> wrote:
*

*>>
*

*>> > Hello everyone,
*

*>> >
*

*>> > I was trying to read netCDF 4 files with groups.
*

*>> > I have 6 groups.
*

*>> > They all have a variable named 'snd' inside.
*

*>> > The 6 'snd' are different (I used ncdump to check) but they look the
*

*>> same using NCL.
*

*>> >
*

*>> > Here is my script:
*

*>> >
*

*>> > ; Complied by Wang Wenshan 2013-09-19 Thursday 12:06:55
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
*

*>> > ;*************************************************************
*

*>> > ; check NCL group reading
*

*>> > ;************************************************************
*

*>> > begin
*

*>> > ;setfileoption("nc", "usenewhlfs", True)
*

*>> >
*

*>> > drc = "/media/grele_data/wenshan/cesm/historical-exp/nco_grp/"
*

*>> > fn = "snd_time.nc"
*

*>> >
*

*>> > fin = addfile(drc+fn,"r")
*

*>> > setfileoption("nc", "Format", "NetCDF4Classic")
*

*>> >
*

*>> > nn = getfilevarnames(fin)
*

*>> > ;print(nn)
*

*>> > v1 = "/CCSM4_historical/snd"
*

*>> > v2 = "/CESM1-BGC_esmHistorical/snd"
*

*>> > v3 = "/CESM1-CAM5_historical/snd"
*

*>> > v4 = "/CESM1-FASTCHEM_historical/snd"
*

*>> > v5 = "/CESM1-WACCM_historical/snd"
*

*>> >
*

*>> > d1 = fin->$v1$
*

*>> > d2 = fin->$v2$
*

*>> > d3 = fin->$v3$
*

*>> > d4 = fin->$v4$
*

*>> > d5 = fin->$v5$
*

*>> >
*

*>> > ;------------------------------------------------------------
*

*>> > ; second way
*

*>> > ;g5 = fin=>/CESM1-WACCM_historical
*

*>> > ;d5_2 = g5->snd
*

*>> > ;------------------------------------------------------------
*

*>> >
*

*>> > print(d1+" "+d2+" "+d3+" "+d4+" "+d5)
*

*>> > ;print(d1+" "+d2+" "+d3+" "+d4+" "+d5+" "+d5_2)
*

*>> >
*

*>> > print("done!")
*

*>> > end
*

*>> >
*

*>> >
*

*>> > The first way gave me the same 'snd'.
*

*>> > The second way gave error msg:
*

*>> > file: Execute.c, line:8105
*

*>> > stop *ptr: 104
*

*>> > stop FILE_GROUPVAL_OP: 104
*

*>> >
*

*>> > I am using NCL 6.1.2
*

*>> > Linux grele 3.5.0-40-generic #62~precise1-Ubuntu SMP Fri Aug 23
*

*>> 17:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
*

*>> >
*

*>> > I put my script (grp_reading.ncl) and the testing file (snd_time.nc)
*

*>> on ftp/incoming.
*

*>> >
*

*>> > Thank you very much!
*

*>> >
*

*>> >
*

*>> > Best,
*

*>> > Wenshan
*

*>> >
*

*>> ------------------------------------------------------------------------------
*

*>> > Graduate Student Researcher
*

*>> > Earth System Science
*

*>> > University of California, Irvine
*

*>> > _______________________________________________
*

*>> > ncl-talk mailing list
*

*>> > 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/20130919/b3fcc93e/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 6
*

*>> Date: Thu, 19 Sep 2013 14:48:22 -0600
*

*>> From: Wei Huang <huangwei@ucar.edu>
*

*>> Subject: Re: reading groups
*

*>> To: Wenshan Wang <wenshanw@uci.edu>
*

*>> Cc: ncl-talk@ucar.edu
*

*>> Message-ID: <C2828F24-1A78-45BC-8A41-88ABD0BCACBB@ucar.edu>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Wenshan,
*

*>>
*

*>> We are working on a solution for this problem.
*

*>>
*

*>> In the meantime, you may try the second way,
*

*>> but change lines:
*

*>>
*

*>> ; second way
*

*>> ;g5 = fin=>/CESM1-WACCM_historical
*

*>>
*

*>> to:
*

*>>
*

*>> ; second way
*

*>> g5n = "/CESM1-WACCM_historical"
*

*>> g5 = fin=>$g5n$
*

*>>
*

*>> Regards,
*

*>>
*

*>> Wei
*

*>>
*

*>> huangwei@ucar.edu
*

*>> VETS/CISL
*

*>> National Center for Atmospheric Research
*

*>> P.O. Box 3000 (1850 Table Mesa Dr.)
*

*>> Boulder, CO 80307-3000 USA
*

*>> (303) 497-8924
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> On Sep 19, 2013, at 1:46 PM, Wenshan Wang <wenshanw@uci.edu> wrote:
*

*>>
*

*>> > Hello everyone,
*

*>> >
*

*>> > I was trying to read netCDF 4 files with groups.
*

*>> > I have 6 groups.
*

*>> > They all have a variable named 'snd' inside.
*

*>> > The 6 'snd' are different (I used ncdump to check) but they look the
*

*>> same using NCL.
*

*>> >
*

*>> > Here is my script:
*

*>> >
*

*>> > ; Complied by Wang Wenshan 2013-09-19 Thursday 12:06:55
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
*

*>> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
*

*>> > ;*************************************************************
*

*>> > ; check NCL group reading
*

*>> > ;************************************************************
*

*>> > begin
*

*>> > ;setfileoption("nc", "usenewhlfs", True)
*

*>> >
*

*>> > drc = "/media/grele_data/wenshan/cesm/historical-exp/nco_grp/"
*

*>> > fn = "snd_time.nc"
*

*>> >
*

*>> > fin = addfile(drc+fn,"r")
*

*>> > setfileoption("nc", "Format", "NetCDF4Classic")
*

*>> >
*

*>> > nn = getfilevarnames(fin)
*

*>> > ;print(nn)
*

*>> > v1 = "/CCSM4_historical/snd"
*

*>> > v2 = "/CESM1-BGC_esmHistorical/snd"
*

*>> > v3 = "/CESM1-CAM5_historical/snd"
*

*>> > v4 = "/CESM1-FASTCHEM_historical/snd"
*

*>> > v5 = "/CESM1-WACCM_historical/snd"
*

*>> >
*

*>> > d1 = fin->$v1$
*

*>> > d2 = fin->$v2$
*

*>> > d3 = fin->$v3$
*

*>> > d4 = fin->$v4$
*

*>> > d5 = fin->$v5$
*

*>> >
*

*>> > ;------------------------------------------------------------
*

*>> > ; second way
*

*>> > ;g5 = fin=>/CESM1-WACCM_historical
*

*>> > ;d5_2 = g5->snd
*

*>> > ;------------------------------------------------------------
*

*>> >
*

*>> > print(d1+" "+d2+" "+d3+" "+d4+" "+d5)
*

*>> > ;print(d1+" "+d2+" "+d3+" "+d4+" "+d5+" "+d5_2)
*

*>> >
*

*>> > print("done!")
*

*>> > end
*

*>> >
*

*>> >
*

*>> > The first way gave me the same 'snd'.
*

*>> > The second way gave error msg:
*

*>> > file: Execute.c, line:8105
*

*>> > stop *ptr: 104
*

*>> > stop FILE_GROUPVAL_OP: 104
*

*>> >
*

*>> > I am using NCL 6.1.2
*

*>> > Linux grele 3.5.0-40-generic #62~precise1-Ubuntu SMP Fri Aug 23
*

*>> 17:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
*

*>> >
*

*>> > I put my script (grp_reading.ncl) and the testing file (snd_time.nc)
*

*>> on ftp/incoming.
*

*>> >
*

*>> > Thank you very much!
*

*>> >
*

*>> >
*

*>> > Best,
*

*>> > Wenshan
*

*>> >
*

*>> ------------------------------------------------------------------------------
*

*>> > Graduate Student Researcher
*

*>> > Earth System Science
*

*>> > University of California, Irvine
*

*>> > _______________________________________________
*

*>> > ncl-talk mailing list
*

*>> > 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/20130919/9c68eb78/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 7
*

*>> Date: Thu, 19 Sep 2013 14:00:03 -0700
*

*>> From: "A.J. Eiserloh" <arthur.eiserloh@gmail.com>
*

*>> Subject: Blank Image with wrf_map_overlays() ???
*

*>> To: "ncl-talk@ucar.edu USERS" <ncl-talk@ucar.edu>
*

*>> Message-ID:
*

*>> <CAGoaJHwOoBL6a=
*

*>> XwH0z1Hb9YF_qkmt11h4FtUC8FTVUuGVG80w@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Hi all,
*

*>>
*

*>> I am trying to do a simple wrf_map_overlays, but I keep getting a blank
*

*>> image and I do not understand why. The field that I am trying to contour
*

*>> and use for vectors I get from a seperate .nc file. Also I should mention
*

*>> that I am not using winds for the vectors. They are the x- and y-
*

*>> components of my vector value (IVT : Integrated vapor transport). All the
*

*>> data from the .nc files is there because I checked it with ncdump. Also, I
*

*>> get no errors out of the output from NCL.
*

*>>
*

*>> here is my script below:
*

*>>
*

*>>
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
*

*>> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
*

*>>
*

*>> begin
*

*>>
*

*>> case ="3dvar_t1"
*

*>> if (case.eq."run3.1" .or. case.eq."n3") then
*

*>> cmd ="ls -1 /data2/eiserloh/data/AR/" + case + "/wrfout_d02_2012*"
*

*>> ;frost
*

*>> else
*

*>> cmd ="ls -1 /data2/eiserloh/data/" + case + "/wrfout_d02_2012*"
*

*>> ;thunder
*

*>> end if
*

*>>
*

*>> files = systemfunc(cmd) + ".nc"
*

*>>
*

*>> a = addfiles(files,"r")
*

*>> time = wrf_user_list_times(a) ; get times in the files
*

*>>
*

*>> lat2d=wrf_user_getvar(a[0],"lat",0)
*

*>> lon2d=wrf_user_getvar(a[0],"lon",0)
*

*>>
*

*>> ivt_file=case+"_ivt_6hrly.nc"
*

*>> b = addfile(ivt_file,"r")
*

*>>
*

*>> times = b->times
*

*>> IVT = b->IVT
*

*>> IVT_x = b->IVT_x
*

*>> IVT_y = b->IVT_y
*

*>>
*

*>> ; IVT@lat2d = lat2d
*

*>> ; IVT@lon2d = lon2d
*

*>> ; IVT_x@lat2d = lat2d
*

*>> ; IVT_x@lon2d = lon2d
*

*>> ; IVT_y@lat2d = lat2d
*

*>> ; IVT_y@lon2d = lon2d
*

*>>
*

*>> ntimes = dimsizes(times)
*

*>>
*

*>> ; We generate plots, but what kind do we prefer?
*

*>> type = "ps"
*

*>> ; type = "png"
*

*>> type@wkOrientation = "landscape"
*

*>>
*

*>> wks = gsn_open_wks(type,case+"_ivt")
*

*>> gsn_define_colormap(wks,"BlAqGrYeOrRe")
*

*>>
*

*>> ; Set some basic resources
*

*>> res = True
*

*>> res@gsnDraw = False
*

*>> res@gsnFrame = False
*

*>>
*

*>> res@MainTitle = " "
*

*>> res@Footer = False
*

*>> MTOPosF = -0.05
*

*>>
*

*>> pltres = True
*

*>> mpres = True
*

*>> colr = "black"
*

*>> mpres@gsnMaximize = True
*

*>> mpres@mpGeophysicalLineColor = colr
*

*>> mpres@mpNationalLineColor = colr
*

*>> mpres@mpUSStateLineColor = colr
*

*>> mpres@mpGridLineColor = colr
*

*>> mpres@mpLimbLineColor = colr
*

*>> mpres@mpPerimLineColor = colr
*

*>> mpres@mpOutlineBoundarySets = "GeophysicalandUSStates"
*

*>> mpres@mpGeophysicalLineThicknessF = 1.5
*

*>> mpres@mpUSStateLineThicknessF = 1.5
*

*>> mpres@mpGridLineThicknessF = 1.0
*

*>> mpres@mpLimbLineThicknessF = 1.0
*

*>> mpres@mpNationalLineThicknessF = 1.5
*

*>> mpres@mpUSStateLineThicknessF = 1.5
*

*>> mpres@mpGridLineDashPattern = 1.5
*

*>> mpres@mpDataBaseVersion = "MediumRes"
*

*>> mpres@mpDataSetName = "Earth..4"
*

*>> pltres@PanelPlot = True
*

*>> pltres@LatLonOverlay = True
*

*>>
*

*>>
*

*>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*

*>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*

*>>
*

*>> ; What times and how many time steps are in the data set?
*

*>>
*

*>> hour_int=6
*

*>>
*

*>> ; do it = 0,ntimes-1 ; TIME LOOP
*

*>> do it =0,1
*

*>>
*

*>> f=it*hour_int
*

*>> print("Working on time: " + time(f) )
*

*>>
*

*>> res@TimeLabel = times(it) ; Set Valid time to use on plots
*

*>>
*

*>>
*

*>> ; u = wrf_user_getvar(a[f],"ua",0) ; u averaged to mass
*

*>> points
*

*>> ; v = wrf_user_getvar(a[f],"va",0) ; v averaged to mass
*

*>> points
*

*>> ; ws = ((u^2)+(v^2))^(0.5) ; Wind speed
*

*>> ter = wrf_user_getvar(a[f],"ter",0)
*

*>> ; p = wrf_user_getvar(a[f],"pressure",0)
*

*>>
*

*>> ;mandatory pressure levels
*

*>> ; mplevs=(/1000.,925.,850.,700.,500.,300./)
*

*>>
*

*>> ;get u at mandatory plevs for vectors for plot
*

*>> ; u_mpls=wrf_user_intrp3d(u,p,"h",mand_pres_levs,0.,False)
*

*>> ; v_mpls=wrf_user_intrp3d(v,p,"h",mand_pres_levs,0.,False)
*

*>>
*

*>> ; u_bar=dim_sum_n(u_mpls,0)
*

*>> ; v_bar=dim_sum_n(v_mpls,0)
*

*>>
*

*>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*

*>> ; Plotting Time
*

*>> slp = wrf_user_getvar(a[f],"slp",0) ; slp
*

*>> res@InitTime = False
*

*>> res@ValidTime = False
*

*>> res@NoHeaderFooter = True
*

*>> tt=slp
*

*>> tt@description = " Valid " + times(it)
*

*>> tt@units = "UTC"
*

*>> opts=res
*

*>> opts@ContourParameters = (/1., 2., 1./)
*

*>> opts@cnFillColors = -1
*

*>> opts@lbTitleOn = False
*

*>> opts@cnInfoLabelOn = False
*

*>> opts@sfXArray = lon2d
*

*>> opts@sfYArray = lat2d
*

*>> title = wrf_contour(a[f],wks,tt,opts)
*

*>> delete(opts)
*

*>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*

*>>
*

*>> ; Plotting options IVT contour fill
*

*>> opts = res
*

*>> opts@cnFillOn = True
*

*>> opts@ContourParameters = (/ 0., 800., 50. /)
*

*>> opts@lbOrientation = "Vertical"
*

*>> opts@pmLabelBarSide = "Right"
*

*>> opts@pmLabelBarOrthogonalPosF= -0.04
*

*>> opts@lbTitleOn = False
*

*>> opts@FieldTitle = IVT@description
*

*>> opts@sfXArray = lon2d
*

*>> opts@sfYArray = lat2d
*

*>> contour = wrf_contour(a[f],wks,IVT(it,:,:),opts)
*

*>> delete(opts)
*

*>>
*

*>> ; Plotting Opts for Terrain Contours
*

*>> opts=res
*

*>> opts@cnFillOn=False
*

*>> opts@ContourParameters=(/0.,5000.,250./)
*

*>> opts@FieldTitle = "Elevation (m)"
*

*>> opts@cnLineLabelInterval = 0
*

*>> opts@sfXArray = lon2d
*

*>> opts@sfYArray = lat2d
*

*>> terrain = wrf_contour(a[f],wks,ter,opts)
*

*>> delete(opts)
*

*>>
*

*>> ; Overplot Vectors
*

*>> opts = res
*

*>> ; opts@vcGlyphStyle = "LineArrow"
*

*>> opts@FieldTitle = "IVT Vectors" ; overwrite Field Title
*

*>> opts@NumVectors = 25 ; wind barb density
*

*>> opts@vfXArray = lon2d
*

*>> opts@vfYArray = lat2d
*

*>> vector = wrf_vector(a[f],wks,IVT_x(it,:,:),IVT_y(it,:,:),opts)
*

*>> delete(opts)
*

*>>
*

*>>
*

*>> ; MAKE PLOTS
*

*>> plot =
*

*>> wrf_map_overlays(a[f],wks,(/contour,vector,terrain,title/),pltres,mpres)
*

*>> draw(plot)
*

*>> frame(wks)
*

*>>
*

*>> end do ; END OF TIME LOOP
*

*>>
*

*>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*

*>> ; cmd = "convert "+case+"_ivt.ps -rotate '-90<' "+case+"_ivt.png"
*

*>> cmd = "convert "+case+"_ivt.ps "+case+"_ivt.png"
*

*>> system(cmd)
*

*>>
*

*>> end
*

*>>
*

*>> Thanks,
*

*>>
*

*>> --
*

*>> Arthur J. Eiserloh, Jr.
*

*>> San Jose State University
*

*>> Graduate Student
*

*>> Dept. of Meteorology and Climate Science
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130919/775f4f2e/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 8
*

*>> Date: Thu, 19 Sep 2013 15:07:35 -0600
*

*>> From: Jian Zheng <jzheng8606@gmail.com>
*

*>> Subject: length of vector reference
*

*>> To: ncl-talk@ucar.edu
*

*>> Message-ID:
*

*>> <
*

*>> CAFMEVXOHL9eYi+pMoLMPyV6d5KZwHb_cFuWnhNGsmYNLNKSHPQ@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Hi,
*

*>>
*

*>> I make a two-panel plot with different size. The length of vector
*

*>> reference
*

*>> are different in the two panels, although I have set the vcRefLengthF same
*

*>> (0.035). Using getvalues, I find the vcRefLengthF of the two plots are
*

*>> 0.0249521 and 0.0338861, respectively. Does the real length of vector
*

*>> reference equal vcRefLengthF*panel size? How to set the real length same
*

*>> for every panel regardless of the panel size?
*

*>>
*

*>> Thanks,
*

*>> Jian
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130919/d7ef41c3/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 9
*

*>> Date: Fri, 20 Sep 2013 13:44:10 +0530
*

*>> From: Ipsita Putatunda <ipsita.putatunda@gmail.com>
*

*>> Subject: EOF
*

*>> To: "ncl-talk@ucar.edu Talk" <ncl-talk@ucar.edu>
*

*>> Message-ID:
*

*>> <CA+WpEXvs_qkxcahVi4SH7wDPQ5ptJ2RW+-sO5yZYj45Vaj=
*

*>> x1A@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Hi all,
*

*>> My variable dimension is (m,n) where m=(lat*lon*time) and n=lev
*

*>> I want to get EOF of this variable for levels. Following the given
*

*>> eof_1.ncl in the NCL example how can I modify my script please suggest.
*

*>>
*

*>> Am attaching my ctl file which I have converted to .nc file as input data.
*

*>>
*

*>> Thanks in advance,
*

*>> Ipsita
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130920/fea27cc3/attachment.html
*

*>> -------------- next part --------------
*

*>> A non-text attachment was scrubbed...
*

*>> Name: Untitled Document 1
*

*>> Type: application/octet-stream
*

*>> Size: 341 bytes
*

*>> Desc: not available
*

*>> Url :
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130920/fea27cc3/attachment.obj
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 10
*

*>> Date: Fri, 20 Sep 2013 17:10:35 +0530
*

*>> From: samir pokhrel <samir@tropmet.res.in>
*

*>> Subject: Re: reading remss binary data in ncl
*

*>> To: brownrig@ucar.edu
*

*>> Cc: ncl-talk@ucar.edu
*

*>> Message-ID:
*

*>> <CACk99WC=
*

*>> EO+MzjAMeX99k6iX7HHdZr8XCTA+CryM4awcfsLVmQ@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Dear Rick,
*

*>>
*

*>> Many Thanks for the suggestion, Its working now.
*

*>>
*

*>> ubyte was the right type for fortran character (1)
*

*>>
*

*>> also function toint() is working instead of charactertointeger() or
*

*>> chartoint() that is exactly mimicking the ichar function of fortran.
*

*>>
*

*>> I think that my code can be put in the example section of binary reading
*

*>> as
*

*>> it would be very useful for the future users if NCL adminstration agrees.
*

*>> If yes then let me know to whom the code has to be sent.
*

*>>
*

*>> Sincerely
*

*>> Samir
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> On Thu, Sep 19, 2013 at 6:18 PM, <brownrig@ucar.edu> wrote:
*

*>>
*

*>> > Hi Samir,
*

*>> >
*

*>> > In answer to your second question, there are the functions
*

*>> > charactertoint()/**charactertointeger() which seem to do what ICHAR()
*

*>> > does.
*

*>> >
*

*>> > I'm not familiar with SSMI data, but a quick look over the data format
*

*>> > suggests that 'ubyte' would indeed be the right type. I don't think
*

*>> you'd
*

*>> > need something like ichar in this case, unless you needed your variable
*

*>> > wind to be explicitly 4-byte integer, in which case:
*

*>> >
*

*>> > tmp = fbinread(....)
*

*>> > wind = toint(tmp)
*

*>> >
*

*>> > Hope that helps...
*

*>> > Rick
*

*>> >
*

*>> >
*

*>> > On Thu, 19 Sep 2013 16:14:27 +0530
*

*>> > samir pokhrel <samir@tropmet.res.in> wrote:
*

*>> >
*

*>> >> Dear NCL users,
*

*>> >>
*

*>> >> I am trying to read binary SSMI data from REMSS site.
*

*>> >>
*

*>> >> The data is in written as a character in lat and lon array and read in
*

*>> >> fortran90 as
*

*>> >>
*

*>> >> CHARACTER(1) abuf(1440,720,4)
*

*>> >> READ(3,rec=1) abuf
*

*>> >>
*

*>> >>
*

*>> >> then converted using ICHAR function of fortran as follows.
*

*>> >>
*

*>> >> ssmi_data(:,:)=ICHAR(abuf(:,:)**)
*

*>> >>
*

*>> >>
*

*>> >> I am reading the first record of this data as
*

*>> >>
*

*>> >> wind = fbinrecread (dpath + infile,0,(/1440,720/),"ubyte")
*

*>> >>
*

*>> >> will "ubyte" be approprate type here?
*

*>> >>
*

*>> >> secondly
*

*>> >>
*

*>> >> Is there any NCL function similar to fortran ichar function.
*

*>> >>
*

*>> >> Any help will be highly appreciated
*

*>> >>
*

*>> >> Sincerely
*

*>> >> Samir
*

*>> >> --
*

*>> >> Samir Pokhrel
*

*>> >> Climate and Global Modelling Division
*

*>> >> Indian Institute of Tropical Meteorology
*

*>> >> NCL Post, Pashan
*

*>> >> Pune-411008
*

*>> >> INDIA
*

*>> >>
*

*>> >
*

*>> >
*

*>>
*

*>>
*

*>> --
*

*>> Samir Pokhrel
*

*>> Climate and Global Modelling Division
*

*>> Indian Institute of Tropical Meteorology
*

*>> NCL Post, Pashan
*

*>> Pune-411008
*

*>> INDIA
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130920/40d9167e/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 11
*

*>> Date: Fri, 20 Sep 2013 14:43:52 +0200
*

*>> From: Marston Johnston <shejo284@gmail.com>
*

*>> Subject: Re: Interchanging the colorbar and Xlabel string
*

*>> positions
*

*>> To: Maria Gehne <mgehne@ucar.edu>
*

*>> Cc: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>, Tingting Fan
*

*>> <tingting@ucar.edu>
*

*>> Message-ID:
*

*>> <
*

*>> CAK68gpsUTML98Vf3sKvF_gmuXhqMFDYyYxCHOru7rehAj_jbyw@mail.gmail.com>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> Thanks guys,
*

*>>
*

*>> I tried another approach and things seem to fall into place. The problem
*

*>> was not that the colorbar was taking up too much space, but rather that
*

*>> the
*

*>> xlabel string were placed below the colorbar. My panel plot has two
*

*>> columns
*

*>> and making a common colorbar solved the problem.
*

*>>
*

*>> Appreciate the advice :-)
*

*>> /M
*

*>>
*

*>>
*

*>> On Thu, Sep 19, 2013 at 8:37 PM, Maria Gehne <mgehne@ucar.edu> wrote:
*

*>>
*

*>> > You can also try moving your colorbar down away from the plot with
*

*>> > pmLabelBarOthogonalPosF. You may have to set aside some space at the
*

*>> bottom
*

*>> > of the page in order to do that, so the labelbar doesn't fall off the
*

*>> page.
*

*>> >
*

*>> > You could also see if example 3 here helps:
*

*>> > http://www.ncl.ucar.edu/Applications/labelbar.shtml
*

*>> >
*

*>> > Maria
*

*>> >
*

*>> > **
*

*>> > On 09/19/2013 12:29 PM, Tingting Fan wrote:
*

*>> >
*

*>> > Hi Marston,
*

*>> > I guess, your problem seems there are not enough space for the
*

*>> horizontal
*

*>> > colorbar, so colorbar would shear some space of X-axis string.
*

*>> > There are two possible solutions I can think of:
*

*>> > 1. You could modify the X-axis string height, " res@tiXAxisFontHeightF= *
*

*>> > ", to make the string a little smaller.
*

*>> > 2. Or, you can modify the colorbar height, "res@pmLabelBarHeightF" or
*

*>> > "lbLabelFontHeightF", to make the colorbar thinner.
*

*>> > Hope it will help!
*

*>> > Tingting
*

*>> >
*

*>> >
*

*>> >
*

*>> >
*

*>> > --
*

*>> > Maria Gehne
*

*>> > Postdoctoral Fellow
*

*>> > NCAR/CGD/CAS
*

*>> > P.O. Box 3000
*

*>> > Boulder, CO 80307
*

*>> >
*

*>> >
*

*>>
*

*>>
*

*>> --
*

*>> Only the fruitful thing is true!
*

*>> -------------- next part --------------
*

*>> An HTML attachment was scrubbed...
*

*>> URL:
*

*>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20130920/2a28a6ab/attachment.html
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 12
*

*>> Date: Fri, 20 Sep 2013 07:53:29 -0600
*

*>> From: Dennis Shea <shea@ucar.edu>
*

*>> Subject: Re: EOF
*

*>> To: Ipsita Putatunda <ipsita.putatunda@gmail.com>, "
*

*>> ncl-talk@ucar.edu
*

*>> Talk" <ncl-talk@ucar.edu>
*

*>> Message-ID: <523C5359.7060508@ucar.edu>
*

*>> Content-Type: text/plain; charset="iso-8859-1"
*

*>>
*

*>> If you converted to a netCDF file, then it would be easier
*

*>> to work with that. That is the information that would
*

*>> be useful. (If you have the CDO available that would be the
*

*>> best approach.)
*

*>>
*

*>> Since you only sent the ctl information, a possible approach
*

*>> is attached.
*

*>>
*

*>> The 'TDEF' is confusing ...
*

*>> TDEF 373658 LINEAR 1jun1998 1mo
*

*>>
*

*>> 373658 monthly time steps????
*

*>>
*

*>> ===
*

*>> http://www.ncl.ucar.edu/Applications/grads.shtml
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> On 9/20/13 2:14 AM, Ipsita Putatunda wrote:
*

*>> > Hi all,
*

*>> > My variable dimension is (m,n) where m=(lat*lon*time) and n=lev
*

*>> > I want to get EOF of this variable for levels. Following the given
*

*>> > eof_1.ncl in the NCL example how can I modify my script please suggest.
*

*>> >
*

*>> > Am attaching my ctl file which I have converted to .nc file as input
*

*>> data.
*

*>> >
*

*>> > Thanks in advance,
*

*>> > Ipsita
*

*>> >
*

*>> >
*

*>> >
*

*>> > _______________________________________________
*

*>> > ncl-talk mailing list
*

*>> > List instructions, subscriber options, unsubscribe:
*

*>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>> >
*

*>> -------------- next part --------------
*

*>> diri = "./"
*

*>> fili = "JJA_test.grd"
*

*>> pthi = diri + fili
*

*>>
*

*>> setfileoption(pthi,"ReadByteOrder","LittleEndian")
*

*>>
*

*>> ntim = 373658 ; TDEF 373658 LINEAR 1jun1998 1mo
*

*>> klev = 19 ; ZDEF 19 LEVELS
*

*>> nlat = 1 ; YDEF 1 LINEAR -10.0 0.50000
*

*>> mlon = 1 ; XDEF 1 LINEAR -180.0 0.50000
*

*>>
*

*>> lat = -10.0
*

*>> lat!0 = "lat"
*

*>> lat@units = "degrees_north"
*

*>>
*

*>> lon = -180.0
*

*>> lon!0 = "lon"
*

*>> lon@units = "degrees_east"
*

*>>
*

*>> lev = (/0,0.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17/)
*

*>> lev!0 = "lev"
*

*>> lev@units = "???"
*

*>>
*

*>> YYYYMM = yyyymm(1998,????,"integer") ; TDEF 373658 LINEAR 1jun1998 1mo
*

*>> time = YYYYMM({199801:??????}) ; extract starting at June 1998
*

*>> time!0 = time
*

*>>
*

*>> bdat = fbindirread(pthi, 0, (/ntim,klev,nlat,mlon/), "float") ; flat
*

*>> bdat@_FillValue = -9999.0 ; UNDEF
*

*>> print("bdat: min="+min(bdat)+" max="+max(bdat))
*

*>>
*

*>> bdat!0 = "time"
*

*>> bdat!1 = "lev"
*

*>> bdat!2 = "lat"
*

*>> bdat!3 = "lon"
*

*>>
*

*>>
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 13
*

*>> Date: Fri, 20 Sep 2013 10:42:15 -0600
*

*>> From: Dennis Shea <shea@ucar.edu>
*

*>> Subject: Re: Fw: Re: Re: confidence interval/level
*

*>> To: ??? <557xiaozhu@163.com>
*

*>> Cc: "ncl-talk@ucar.edu USERS" <ncl-talk@ucar.edu>
*

*>> Message-ID: <523C7AE7.8010508@ucar.edu>
*

*>> Content-Type: text/plain; charset=UTF-8; format=flowed
*

*>>
*

*>> (i) B = 1-p**(1/(df/2-1)) where B=coherence-squared
*

*>>
*

*>> (ii) Solving for p
*

*>>
*

*>> p = (1-B)^(df/2-1)
*

*>>
*

*>> Looking at Table 1 of the article
*

*>>
*

*>> n = 4
*

*>> df = 8.0 ; degrees of freedom
*

*>>
*

*>> (i) What coherence-squared (coherence)
*

*>> is needed for a significance level of p=0.05
*

*>>
*

*>> B = 1.0-p^(1.0/(df/2.0 -1.0)) ; ===> 0.6315969
*

*>>
*

*>> b = sqrt(B) ; coherence==>0.7947307
*

*>>
*

*>> ===
*

*>>
*

*>> (ii) At what probability level does a calculated coherence-squared
*

*>> (coherence^2) fall ... given an estimated 'df'
*

*>>
*

*>> B = 0.63
*

*>>
*

*>> p = (1-B)^(df/2-1) ; ==> 0.05
*

*>>
*

*>> Sometimes statistics are returned via
*

*>>
*

*>> P = 1-p ; P=0.95
*

*>>
*

*>> That is the way I sent you
*

*>>
*

*>> P = 1.-(1.-coh)^(df/2.-1.)
*

*>>
*

*>>
*

*>> Hope that helps
*

*>>
*

*>>
*

*>> On 9/19/13 12:10 PM, ??? wrote:
*

*>> >
*

*>> > Hi Dennis,
*

*>> > I am still confused on your example and do not know how to caculate
*

*>> spec@coher_probability exactly. Can you tell me what is the coh, why you
*

*>> set it as 0.5 in your example? Is it the confidence level(0.9, 0.95, 0.99)
*

*>> or spec@coher? What is the relationship between df and jave? Is df twice
*

*>> of jave?
*

*>> > Also, I found the formula
*

*>> > B=1-p**(1/(df/2-1)) (1)
*

*>> > from the reference, but your example is
*

*>> > p = 1.-(1.-coh)**(df/2.-1.) (2)
*

*>> >
*

*>> > why are they different? Is the p in (2) same as p or B in (1) ? Which
*

*>> one is the spec@coher_probability from the function specxy_anal in NCL?
*

*>> >
*

*>> > Thanks.
*

*>> >
*

*>> > 2013-09-19
*

*>> >
*

*>> >
*

*>> >
*

*>> > Xueming Zhu ???
*

*>> > Key Laboratory of Research on Marine Hazards Forecasting (LoMF), SOA
*

*>> > National Marine Environmental Forecasting Center (NMEFC)
*

*>> > No.8, Dahuisi Road, Haidian District, Beijing, 100081
*

*>> > People's Republic of China
*

*>> > Tel:+86-10-82481923
*

*>> >
*

*>> >
*

*>> >
*

*>> > ????Dennis Shea <shea@ucar.edu>
*

*>> > ?????2013-09-19 01:13
*

*>> > ???Re: [ncl-talk] confidence interval/level
*

*>> > ????"???"<557xiaozhu@163.com>
*

*>> > ???"ncl-talk@ucar.edu USERS"<ncl-talk@ucar.edu>
*

*>> >
*

*>> >
*

*>> > Comments on the Determination of Significance Levels
*

*>> > of the Coherence Statistic
*

*>> > Paul Julian
*

*>> > Journal of the Atmospheric Sciences, 1975
*

*>> > Volume 12, pp836-837
*

*>> >
*

*>> >
*

*>> >
*

*>> http://journals.ametsoc.org/doi/pdf/10.1175/1520-0469%281975%29032%3C0836%3ACOTDOS%3E2.0.CO%3B2
*

*>> >
*

*>> > eg:
*

*>> > coh = .5
*

*>> > df = 6
*

*>> > p = 1.-(1.-coh)**(df/2.-1.)
*

*>> > print("p="+p)
*

*>> >
*

*>> >
*

*>> >
*

*>> > On 9/18/13 8:54 AM, ??? wrote:
*

*>> >> Hi Dennis,
*

*>> >> can you show me how does NCL caculate the spec@coher_probability?
*

*>> >> Thanks.
*

*>> >>
*

*>> >> 2013-09-18
*

*>> >>
*

*>> >>
*

*>> >>
*

*>> >> ???
*

*>> >>
*

*>> >>
*

*>> >>
*

*>> >> ????Dennis Shea <shea@ucar.edu>
*

*>> >> ?????2013-09-18 07:29
*

*>> >> ???Re: [ncl-talk] confidence interval/level
*

*>> >> ????"???"<557xiaozhu@163.com>
*

*>> >> ???"ncl-talk@ucar.edu USERS"<ncl-talk@ucar.edu>
*

*>> >>
*

*>> >> spec = specxy_anal(x,y,d,sm,pct)
*

*>> >> PHASE = spec@phase
*

*>> >> PHASE@_FillValue = 1e20
*

*>> >> PHASE = where(spec@coher_probability(1).le.0.95,PHASE@
*

*>> _FillValue,PHASE)
*

*>> >>
*

*>> >> =========
*

*>> >> See: http://www.ncl.ucar.edu/Applications/xy.shtml#ex25
*

*>> >>
*

*>> >> The right (R) plot should
*

*>> >>
*

*>> >>
*

*>> >> resR = True ; plot mods desired
*

*>> >> resR@xyMarkLineModes = "Markers" ; choose which have markers
*

*>> >> resR@xyMarkers = 16 ; choose type of marker
*

*>> >> resR@xyMarkerColor = "red" ; Marker color
*

*>> >> resR@xyMarkerSizeF = 0.005 ; Marker size (default 0.01)
*

*>> >>
*

*>> >>
*

*>> >> plot = gsn_csm_xy2(wks,spec@frq,spec@coher,PHASE,resL,resR)
*

*>> >>
*

*>> >>
*

*>> >> On 9/17/13 4:04 PM, ??? wrote:
*

*>> >>> Hi all,
*

*>> >>> I have tried to use the function specxy_anal get the coherance
*

*>> and phase of two timeseries data based on the example script spec_2.ncl.
*

*>> But I just want to get the coherence and phase satisfy the 0.95 confidence
*

*>> level, the picture likes that in the attachment. How can I do that?
*

*>> >>> It looks like that the output of function specx_ci is not what
*

*>> I want.
*

*>> >>>
*

*>> >>> Any help would be appreciated. Thanks.
*

*>> >>>
*

*>> >>> 2013-09-18
*

*>> >>>
*

*>> >>>
*

*>> >>>
*

*>> >>> ???
*

*>> >>>
*

*>> >>>
*

*>> >>>
*

*>> >>> _______________________________________________
*

*>> >>> ncl-talk mailing list
*

*>> >>> List instructions, subscriber options, unsubscribe:
*

*>> >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>>
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> Message: 14
*

*>> Date: Fri, 20 Sep 2013 11:34:18 -0600
*

*>> From: Dennis Shea <shea@ucar.edu>
*

*>> Subject: Re: area weigthed anomalies
*

*>> To: ncl-talk@ucar.edu
*

*>> Message-ID: <523C871A.5070901@ucar.edu>
*

*>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
*

*>>
*

*>> Once you have the anomalies ...
*

*>>
*

*>> http://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_areaave.shtml
*

*>>
*

*>> See Example 4
*

*>>
*

*>> q(time,lat,lon)
*

*>>
*

*>> wgtAve = wgt_areaave(q(:,{40:90}, :), wgty({45:90}), 1.0, 0)
*

*>>
*

*>> where wgty is
*

*>> wgty = lat
*

*>> wgty = (/cos(lat*0.01745329)/)
*

*>> On 9/18/13 12:50 PM, Xi Chang wrote:
*

*>> > hallo,
*

*>> > just a quick question, what an appropiate approach that i can use to
*

*>> > calculate area weigthed anomalies, for instance if my region bounded
*

*>> from
*

*>> > 40-90N? thank you for any insight..
*

*>> >
*

*>> >
*

*>> >
*

*>> > _______________________________________________
*

*>> > ncl-talk mailing list
*

*>> > List instructions, subscriber options, unsubscribe:
*

*>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>> >
*

*>>
*

*>>
*

*>> ------------------------------
*

*>>
*

*>> _______________________________________________
*

*>> ncl-talk mailing list
*

*>> ncl-talk@ucar.edu
*

*>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>>
*

*>>
*

*>> End of ncl-talk Digest, Vol 118, Issue 29
*

*>> *****************************************
*

*>>
*

*>
*

*>
*

*> _______________________________________________
*

*> ncl-talk mailing list
*

*> List instructions, subscriber options, unsubscribe:
*

*> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
*

*>
*

*>
*

_______________________________________________

ncl-talk mailing list

List instructions, subscriber options, unsubscribe:

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Sep 20 22:59:38 2013

*
This archive was generated by hypermail 2.1.8
: Tue Oct 01 2013 - 14:41:43 MDT
*