<div dir="ltr"><div>Okay got it. </div><div>Thanks</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 2:21 AM <<a href="mailto:ncl-talk-request@mailman.ucar.edu">ncl-talk-request@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send ncl-talk mailing list submissions to<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.ucar.edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:ncl-talk-owner@mailman.ucar.edu" target="_blank">ncl-talk-owner@mailman.ucar.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ncl-talk digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Effective Degree of Freedom (dickson mbigi)<br>
2. Re: NCARG_COLORMAPS in conda (Jian Zheng)<br>
3. Re: Effective Degree of Freedom (Dennis Shea)<br>
4. Plot csv file (Anahita Amiri Farahani)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 3 Dec 2020 08:25:59 +0800<br>
From: dickson mbigi <<a href="mailto:dickson.mbigi@gmail.com" target="_blank">dickson.mbigi@gmail.com</a>><br>
To: NCL-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: [ncl-talk] Effective Degree of Freedom<br>
Message-ID:<br>
<CALUZNzOzszoPZz5xRtZeLVbZYaNkXpVy=<a href="mailto:q%2BRRBY5sVm4uxUiqw@mail.gmail.com" target="_blank">q+RRBY5sVm4uxUiqw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi everyone,<br>
I have sst(time) and pre(lon,lat,time) low pass filtered data sets. I can<br>
calculate spatial correlation, but for the significance test using<br>
Student's t- test I need to use effective degrees of freedom because my<br>
data have been filtered. I went through NCL website and found ''equivalent<br>
sample size'' function which I think is quite different from the effective<br>
degrees of freedom. Is there a function or a way to use Effective Degree of<br>
freedom to perform significance tests in spatial correlation analysis?<br>
<br>
Ndof =N(1-r1r2)/(1+r1r2), where N is sample size, r1&r2 are the lag-1<br>
autocorrelations of the two time series.<br>
<br>
Thanks in advance.<br>
Dickson.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/cfbd359e/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/cfbd359e/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 3 Dec 2020 11:13:39 +0800<br>
From: Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>><br>
To: Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
Cc: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] NCARG_COLORMAPS in conda<br>
Message-ID:<br>
<<a href="mailto:CAFMEVXN2tHnLXEYVyhdMb4iR3OL0Swd%2B3FEZNp8PETiNL09SxA@mail.gmail.com" target="_blank">CAFMEVXN2tHnLXEYVyhdMb4iR3OL0Swd+3FEZNp8PETiNL09SxA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Rick,<br>
<br>
I find that defining NCARG_COLORMAPS after the conda-initializing part in<br>
the .bash_profile can solve the problem.<br>
<br>
Thanks a lot for all your help.<br>
Jian<br>
<br>
On Sat, Nov 21, 2020 at 12:22 AM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:<br>
<br>
> Hi Jian,<br>
><br>
> When you say it is not working, are you getting messages such as this when<br>
> you try to reference your custom colormap:<br>
><br>
> fatal:CvtStringToCmap:Unable to convert string "foo" to ColorMap<br>
> warning:Error retrieving resource wkColorMap from args - Ignoring Arg<br>
><br>
> I don't know where the OLD_NCARG_COLORMAPS setting would be coming from in<br>
> your environment. I would note that the second path in it --<br>
> /lib/ncarg/colormaps -- would be incorrect. I don't know that it would<br>
> break things if the first path is correct however.<br>
><br>
> I have a stock ncl installation from conda. I copied an arbitrary colormap<br>
> from $NCARG_ROOT/lib/colormaps into /tmp, renamed it "foo.rgb", and set<br>
> NCARG_COLORMAPS=/tmp. Then when I run this little script, everything works:<br>
><br>
> ncl 1> wks = gsn_open_wks("x11","test")<br>
> ncl 2> gsn_define_colormap(wks,"foo")<br>
> ncl 3> gsn_draw_colormap(wks)<br>
><br>
> if I unset NCARG_COLORMAPS, and re-run, then I get the fatal/warning<br>
> errors mentioned above.<br>
><br>
> So I would have to conclude something is not quite right in your<br>
> environment. Perhaps before trying to set envvars via .bash_profile,<br>
> perhaps try setting them on the command line. Are you certain your colormap<br>
> is in the directory you cite? Are you certain its format is valid for NCL?<br>
> Perhaps try what I did -- copying a known colormap into your custom<br>
> directory, rename it to something that does not collide with NCL's colormap<br>
> names, and see if you can get the little scriptlet above to work.<br>
><br>
> I hope that helps...<br>
> Rick<br>
><br>
><br>
> On Fri, Nov 20, 2020 at 8:54 AM Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>> wrote:<br>
><br>
>> Hi Rick,<br>
>><br>
>> When I ran "env | grep NCARG", I got<br>
>><br>
>><br>
>> OLD_NCARG_COLORMAPS=/Users/jzheng/Documents/nclcolormap:/lib/ncarg/colormaps<br>
>><br>
>> NCARG_ROOT=/Users/jzheng/opt/miniconda3<br>
>><br>
>><br>
>> Does it show you more information?<br>
>><br>
>><br>
>> On Fri, Nov 20, 2020 at 12:49 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
>> wrote:<br>
>><br>
>>> Hi Jian,<br>
>>><br>
>>> Offhand that all looks reasonable. Only you can verify the custom path.<br>
>>> Did you "source" your .bash_profile after you modified it? I'm not sure<br>
>>> what else to suggest.<br>
>>><br>
>>> Rick<br>
>>><br>
>>> On Thu, Nov 19, 2020 at 9:34 PM Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>> wrote:<br>
>>><br>
>>>> Hi Rick,<br>
>>>><br>
>>>> NCARG_COLORMAPS (export<br>
>>>> NCARG_COLORMAPS=/Users/jzheng/Documents/nclcolormap:$NCARG_ROOT/lib/ncarg/colormaps)<br>
>>>> contains the directory where I put my user-defined colormap files. When I<br>
>>>> run ncl, it doesn't see these colormaps.<br>
>>>><br>
>>>> Thanks,<br>
>>>> Jian<br>
>>>><br>
>>>> On Thu, Nov 19, 2020 at 9:33 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
>>>> wrote:<br>
>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> What do you mean "it does not work"? What happens? Normally one<br>
>>>>> should not need to set that environment variable unless there's something<br>
>>>>> unusual about the way the code is installed. It is common however to set<br>
>>>>> NCARG_ROOT, and that should point to the directory containing the NCL<br>
>>>>> installation; i.e., the directory with the bin/ lib/ include/ and man/<br>
>>>>> directories belonging to NCL. I don't recall offhand where a stock conda<br>
>>>>> install places those directories.<br>
>>>>><br>
>>>>> Rick<br>
>>>>><br>
>>>>><br>
>>>>> On Thu, Nov 19, 2020 at 1:47 AM Jian Zheng via ncl-talk <<br>
>>>>> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
>>>>><br>
>>>>>> Hi,<br>
>>>>>><br>
>>>>>> I installed ncl6.6.2 in conda root environment. When I set NCARG_COLORMAPS<br>
>>>>>> in my ~/.bash_profile file, it did not work. How should I set NCARG_COLORMAPS<br>
>>>>>> with conda correctly?<br>
>>>>>><br>
>>>>>> Thanks,<br>
>>>>>> Jian<br>
>>>>>> _______________________________________________<br>
>>>>>> ncl-talk mailing list<br>
>>>>>> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
>>>>>> List instructions, subscriber options, unsubscribe:<br>
>>>>>> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>>>>><br>
>>>>><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/e73faef6/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/e73faef6/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 3 Dec 2020 09:44:35 -0700<br>
From: Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br>
To: dickson mbigi <<a href="mailto:dickson.mbigi@gmail.com" target="_blank">dickson.mbigi@gmail.com</a>><br>
Cc: NCL-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] Effective Degree of Freedom<br>
Message-ID:<br>
<CAOF1d_6CO1djz=<a href="mailto:ZCQgjRGhqtuw1yEoxe4n62APfcgJHaXJ7sgw@mail.gmail.com" target="_blank">ZCQgjRGhqtuw1yEoxe4n62APfcgJHaXJ7sgw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I believe you have asked this question before.<br>
<br>
****ncl-talk is not a statistics forum. ****<br>
* ***Please talk to a statistician****<br>
<br>
====<br>
(1) Possibly:<br>
You could use *esacr*<br>
<<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr.shtml</a>> or<br>
*esacr_n*<br>
<<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr_n.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr_n.shtml</a>><br>
(esacr_n is available in NCL 6.5.0 and later) on the filtered series to get<br>
the lag_1 autocorrelation coefficients.<br>
<br>
r_sst = esacr(sst,1)<br>
r1_sst = r_sst(1) ; scalar; r1_sst(1)<br>
r1_sst@long_name = "Lag-1 autocorrelation: sst<br>
print(r1_sst)<br>
; pre(lat,lon,time) ... time is<br>
rightmost dimension<br>
r_pre = esacr(pre,1) ; r_pre(2,lat,lon,time)<br>
r1_pre = r_pre(1,:,:) ; r1_pre(nlat,mlom)<br>
r1_pre@long_name = "Lag-1 autocorrelation: pre"<br>
printVarSummary(r1_pre)<br>
printMinMax(r1_pre)<br>
<br>
<br>
r1_sst *:=* conform(r1_pre, r1_sst, -1) ; := overwrite<br>
printVarSummary(r1_sst) ; (nlat,mlon)<br>
<br>
r1_sst_pre = r1_sst*r1_pre ; array (grid point-by-grid<br>
point) multiply<br>
<br>
Ndof = N*(1-r1_sst_pre)/(1+r1_sst_pre), where N is the original sample<br>
size of time series<br>
<br>
printVarSummary(Ndof) ; (nlat,mlon)<br>
<br>
printMinMax(Ndof,0)<br>
<br>
<br>
====<br>
(2)<br>
Perhaps, a better approach:<br>
<br>
DOI: 10.1016/S0275-1062(04)90014-8<br>
(2004) Determination of the degree of freedom of digital filtered time<br>
series with an application to the correlation analysis between the length<br>
of day and the Southern oscillation index<br>
====<br>
<br>
Again, it is best to talk with a statistician.<br>
<br>
<br>
On Wed, Dec 2, 2020 at 5:26 PM dickson mbigi via ncl-talk <<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
<br>
> Hi everyone,<br>
> I have sst(time) and pre(lon,lat,time) low pass filtered data sets. I can<br>
> calculate spatial correlation, but for the significance test using<br>
> Student's t- test I need to use effective degrees of freedom because my<br>
> data have been filtered. I went through NCL website and found ''equivalent<br>
> sample size'' function which I think is quite different from the effective<br>
> degrees of freedom. Is there a function or a way to use Effective Degree of<br>
> freedom to perform significance tests in spatial correlation analysis?<br>
><br>
> Ndof =N(1-r1r2)/(1+r1r2), where N is sample size, r1&r2 are the lag-1<br>
> autocorrelations of the two time series.<br>
><br>
> Thanks in advance.<br>
> Dickson.<br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/7b26972c/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/7b26972c/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 3 Dec 2020 13:21:04 -0500<br>
From: Anahita Amiri Farahani <<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>><br>
To: "ncl-talk [ncl-talk]" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: [ncl-talk] Plot csv file<br>
Message-ID:<br>
<<a href="mailto:CAABdVry-zwn-y4omPNi2VNYVJPQOUP_W5ZqEUb7ZhsBTphScvA@mail.gmail.com" target="_blank">CAABdVry-zwn-y4omPNi2VNYVJPQOUP_W5ZqEUb7ZhsBTphScvA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello all,<br>
<br>
I tried to read and plot the csv data, but I faced some errors. I've<br>
attached both data and the code.<br>
<br>
Thank you,<br>
ana<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.html</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: Book4.csv<br>
Type: text/csv<br>
Size: 1320725 bytes<br>
Desc: not available<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.csv" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.csv</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: test.ncl<br>
Type: application/octet-stream<br>
Size: 2564 bytes<br>
Desc: not available<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.obj" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.obj</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
------------------------------<br>
<br>
End of ncl-talk Digest, Vol 205, Issue 3<br>
****************************************<br>
</blockquote></div></div>