<div dir="ltr">Sorry about the confusion and wrong use of words. I will be more carefully about framing my words. Thank you so much for your guidance.<div><br></div><div>Best Regards</div><div>Ipshita</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 12:47 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>TYour comments do not make any sense to me. Actually, they are rather frustrating. <br><br></div>[1] The CDO and NCL are not returning the correct results. They are two independent software tools. Something does not seem right here.<br><br></div>[2] I am sure that neither were designed to work with 'weekly data'. 'Weekly data' can span across neighboring months.<br>NCL's function requires that 'time' be recognized by 'cd_calendar'. Are the units of your variable 'weeks since ...'? Certainly NCL and, likely, the CDO are not going to partition a week that spans two months. <br><br></div>[3] You make statements like "<font size="2"><span style="font-weight:normal">detrend not working right and calculate_monthly_va</span></font><font size="2"><span style="font-weight:normal">lues". You give no particulars.<br></span></font></div><font size="2"><span style="font-weight:normal">Why do you say these are not working correctly?<br><br><br></span></font></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Feb 16, 2016 at 1:14 PM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear NCL,<div><br></div><div>I have been working on making a plot with correlation between detrended data (snow cover extent) and I had first</div><div>used CDO to convert weekly data to monthly data. In the process the lat and lon cordinates became y and x.</div><div>It works fine if till I reorder it. But it is not calculating dtrend correctly, all the values are fill values. </div><div><br></div><div>I worked on using calculate_monthly_values to see if I could use it convert weekly to monthly in NCL and I could not use it. I would be grateful for any input</div><div><br></div><div>Here is the code I am using</div><div><br></div><div><div>;============================================</div><div>; set up parameters</div><div>;============================================</div><div><br></div><div>;This is extracting latitude of Western Europe<br></div><div>;Reading in the data</div><div>a=addfile("~/Documents/NCL_files/Snow_cover_IMS/NCL_codes/<a href="http://sce_mon_mean.nc" target="_blank">sce_mon_mean.nc</a>","r") ; open output netCDF file</div><div>b=addfile("~/Documents/NCL_files/Snow_cover_IMS/<a href="http://nhsce_v01r01_19661004_20140602.nc" target="_blank">nhsce_v01r01_19661004_20140602.nc</a>","r")</div><div><br></div><div>;Extracting snow cover extent (sce) from respective data files</div><div><br></div><div>sce=byte2flt(a->sce)</div><div><br></div><div>sce@_FillValue = 9.9621e+36</div><div><br></div><div>lat=b->latitude</div><div>lon=b->longitude</div><div><br></div><div>sce@lat2d=lat</div><div>sce@lon2d=lon</div><div><br></div><div>;==============================================</div><div>;Reading in JJAS rainfall </div><div><br></div><div>JJAS_1871_2012 =asciiread("~/Documents/NCL_files/SST/Monthly/jjas_1871_2012.txt",(/142,1/),"float")</div><div><br></div><div>;Extracting JJAS for 1967 to 2012</div><div><br></div><div>JJAS_1967_2012=JJAS_1871_2012(96:141,0)</div><div><br></div><div>;============================================</div><div>;Extracting monthly data for sce</div><div><br></div><div>Jan_sce = new((/46,88,88/),float)</div><div><br></div><div>Jan_sce@_FillValue = 9.9621e+36</div><div><br></div><div>Jan_sce@lat2d=lat</div><div>Jan_sce@lon2d=lon</div><div><br></div><div>;==========================================</div><div><br></div><div>do nyr=0,551,12</div><div><br></div><div>Jan_sce(nyr/12,:,:) =sce(nyr,:,:)</div><div><br></div><div>end do</div><div><br></div><div>Jan_reorder=Jan_sce(y|:,x|:,time|:)</div><div><br></div><div>Jan_dt=dtrend(Jan_reorder,False)</div><div><br></div><div><br></div><div>Jan_reorder@_FillValue = 9.9621e+36</div><div><br></div><div>corr_jan=escorc(Jan_dt,JJAS_1967_2012)</div></div><div><div><br></div><div><div dir="ltr"><br></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><div><div>Ipshita Majhi<br></div>PhD Candidate<br></div>University of Alaska , Fairbanks<br></div>Atmospheric Science Department<br></div>(907)978-4220 <a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a><br></div></div>
</div>