<div dir="ltr"><div class="gmail_default" style="font-size:small">You reordered the data with:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div style="font-size:12.8px">Jan_reorder=Jan_sce(x|:,y|:,time|:)</div><div><br></div><div>If "x" corresponds to longitude, and "y" to latitude, then you will be unable to plot this over a map, because NCL expects the "latitude" dimension to be the leftmost dimension.</div><div><br></div><div>You may need to transpose the array before plotting.</div><div><br></div><div>You also have to make sure "lat" and "lon" are in the right order as well.</div><div><br></div><div>--Mary</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 12, 2016 at 1:44 PM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.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">Dear NCL,<div><br></div><div>I would like to plot correlation coefficient, the snow cover extent by itself plots well. When I try to plot correlation coefficient it is misaligned, I am not sure why that is happening. I am attaching the plot with this email</div><div>Any guidance will be helpful</div><div><br><div><br></div><div><div>;*********************************************************************************</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 time and snow cover extent (sce) from respective data files</div><div><br></div><div><br></div><div>time_sce=a->time</div><div><br></div><div><br></div><div>sce=byte2flt(a->sce)</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>sce@_FillValue = 9.9621e+36</div><div><br></div><div>;==============================================</div><div>;Now lets correlate with JJAS</div><div>JJAS_1871_2012 =asciiread("~/Documents/NCL_files/SST/Monthly/jjas_1871_2012.txt",(/142,1/),"float")</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>;==========================================<br></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><br></div><div>Jan_reorder=Jan_sce(x|:,y|:,time|:)</div><div><br></div><div><br></div><div>corr_jan=escorc(Jan_reorder,JJAS_1967_2012)<br></div><div><br></div><div><br></div><div>corr_jan@lat2d=lat</div><div>corr_jan@lon2d=lon</div><div><br></div><div>copy_VarCoords_1(sce,corr_jan)</div><div><br></div><div>;************************************************</div><div>; create plot</div><div>;************************************************</div><div> wks = gsn_open_wks("x11","Jan_sce_jjas_cor") ; </div><div><br></div><div>;***********************************************</div><div>; create array of named colors. Note that you have</div><div>; to include the forground (white), and background (black)</div><div>; as the first two colors</div><div>;***********************************************</div><div><br></div><div> res = True ; plot mods desired</div><div><br></div><div> res@tiMainString = "January SCE and JJAS cor" ; plot title</div><div> </div><div> res@cnFillOn = True ; turns on the color</div><div> res@mpFillOn = False ; turns off continent gray</div><div> res@cnLinesOn = False ; turn off contour lines</div><div><br></div><div> res@gsnPolar = "NH" ; specify the hemisphere</div><div> res@mpMinLatF = 20 ; specify min lat</div><div><br></div><div> plot = gsn_csm_contour_map_polar(wks,corr_jan,res)</div><div>;=============================================</div><div><br></div><div><div dir="ltr"><br></div></div>
</div></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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>