<div dir="ltr">Thank you<div><br></div><div>Best Regards</div><div>Ipshita</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 23, 2016 at 2:22 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Interpolate so that both grids have the same dimensions.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Feb 23, 2016 at 3:27 PM, Ipshita Majhi <span dir="ltr">&lt;<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>&gt;</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"><br clear="all"><div>Dear NCL,</div><div><br></div><div>I used escorc to calculate correlation. The lat and lon dimension of the two variables are different so the correlation output had four dimension. How can i resolve it. Thank you, listed below is the code:-</div><div><br></div><div><div><br></div><div>;********************************************</div><div>;Reading in monthly mean and original weekly data</div><div>;for sce</div><div>;********************************************</div><div><br></div><div>a=addfile(&quot;~/Documents/NCL_files/Snow_cover_IMS/NCL_codes/<a href="http://sce_mon_mean.nc" target="_blank">sce_mon_mean.nc</a>&quot;,&quot;r&quot;) ; open output netCDF file</div><div>b=addfile(&quot;~/Documents/NCL_files/Sea_ice/<a href="http://nhsce_v01r01_19661004_20140602.nc" target="_blank">nhsce_v01r01_19661004_20140602.nc</a>&quot;,&quot;r&quot;)</div><div><br></div><div>;Extracting time and snow cover extent (sce) from respective data files</div><div><br></div><div>sce=byte2flt(a-&gt;sce)</div><div><br></div><div>sce@_FillValue = 0</div><div><br></div><div>sce!1=&quot;lat&quot;</div><div>sce!2=&quot;lon&quot;</div><div><br></div><div>lat=b-&gt;latitude</div><div>lon=b-&gt;longitude</div><div><br></div><div>sce@lat2d=lat</div><div>sce@lon2d=lon</div><div><br></div><div>;*********************************************</div><div><br></div><div>;*********************************************</div><div>;Reading in Sea ice data</div><div>;*********************************************</div><div><br></div><div>c=addfile(&quot;~/Documents/NCL_files/Sea_ice/HadISST_ice.nc&quot;,&quot;r&quot;)</div><div>lat_sic=c-&gt;latitude</div><div>lon_sic=c-&gt;longitude</div><div><br></div><div>sic=c-&gt;sic</div><div><br></div><div>;Extracting 1967-2012</div><div><br></div><div>sic_1967_2012=sic(1164:1715,:,:)</div><div><br></div><div>copy_VarAtts(sic,sic_1967_2012)</div><div>copy_VarCoords_1(sic,sic_1967_2012)</div><div><br></div><div>;*******************************************</div><div><br></div><div>;*******************************************</div><div>;Detrending and reording both the datasets</div><div>;*******************************************</div><div><br></div><div>jan_sce = new((/46,88,88/),float)</div><div>jan_sic=new((/46,180,360/),float)</div><div><br></div><div>jan_sce@_FillValue = -0.99</div><div>jan_sic@_FillValue= -1e+30</div><div><br></div><div>jan_sce@lat2d=lat</div><div>jan_sce@lon2d=lon</div><div>;*****************************************</div><div><br></div><div>;*****************************************</div><div>;Extracting monthly data for sce</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>jan_sic(nyr/12,:,:)=sic_1967_2012(nyr,:,:)</div><div><br></div><div>end do</div><div><br></div><div>;****************************************</div><div><br></div><div>;****************************************</div><div>;Reordering</div><div><br></div><div>jan_reorder_sce=jan_sce(lat|:,lon|:,time|:); Dimension is (88,88,:)</div><div>jan_reorder_sic=jan_sic(latitude|:,longitude|:,time|:); Dimension is (180,360,:)</div><div><br></div><div>;****************************************</div><div><br></div><div>;****************************************</div><div>;Detrending now</div><div>;****************************************</div><div>jan_sce_dt=dtrend(jan_reorder_sce,False)</div><div>jan_sic_dt=dtrend(jan_reorder_sic,False)</div><div>;****************************************</div><div><br></div><div>;****************************************</div><div>;Correlation coefficient</div><div><br></div><div>jan_ccr = escorc(jan_sce_dt,jan_sic_dt)</div><div>print(jan_ccr)</div></div><br></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>