<div dir="ltr"><div class="gmail_default" style="font-size:small">You didn't actually state what the problem was, so I guess you meant to say that the plot is incorrect?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You didn't provide any information about your data. As we tell users frequently, use "printVarSummary" to help us see what what your variables look like:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">printVarSummary(B)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You shouldn't need to allocate space for B and then fill it. Try replacing this code:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace"> B = new((/2487,88,88/),float)</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> do i = 0,2486</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> B(i,:,:)=sce(i,:,:)#sce_area(:,:)</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> end do</font></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif">with:</font></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><div class="gmail_default"><font face="monospace, monospace">sce_area_3d = conform_dims(dimsizes(sce),sce_area,(/1,2/))</font></div><div class="gmail_default"><font face="monospace, monospace">B = sce # sce_area_3d</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">One idea for the plot: maybe you need to turn off the addition of a cyclic point:</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">res@gsnAddCyclic = False</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">If none of this helps, then please include output from "printVarSummary" of all your variables.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Thanks,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">--Mary</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 29, 2016 at 12:12 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 want to plot snow cover extent after multiplying it with snow cover area. Here is the code for it. I am also attaching the figure with this email.</div><div><br></div><div><div>;*******************************************</div><div>;Reading in the weekly snow cover extent </div><div>;*******************************************</div><div><br></div><div>a=addfile("~/Documents/NCL_files/Sea_ice/<a href="http://nhsce_v01r01_19661004_20140602.nc" target="_blank">nhsce_v01r01_19661004_20140602.nc</a>","r")</div><div>sce=a->snow_cover_extent ; The values are either 0 or 1</div><div><br></div><div>lat=a->latitude</div><div>lon=a->longitude</div><div><br></div><div>sce!1="lat"</div><div>sce!2="lon"</div><div><br></div><div>sce@lat2d=lat</div><div>sce@lon2d=lon</div><div><br></div><div>;********************************************</div><div>:Reading in the snow cover are</div><div>;********************************************</div><div><br></div><div>sce_area=a->area</div><div><br></div><div>sce_area!0="lat"</div><div>sce_area!1="lon"</div><div><br></div><div>copy_VarAtts(sce,sce_area)</div><div>copy_VarCoords_1(sce,sce_area)</div><div><br></div><div>;*******************************************</div><div>;Muliplying Snow cover extent and Area</div><div>;*******************************************</div><div><br></div><div>B = new((/2487,88,88/),float)</div><div><br></div><div> do i = 0,2486</div><div> B(i,:,:)=sce(i,:,:)#sce_area(:,:)</div><div> end do</div><div><br></div><div>B!0="time" </div><div>B!1="lat"</div><div>B!2="lon" </div><div> </div><div>B@lat2d=lat</div><div>B@lon2d=lon</div><div><br></div><div>copy_VarAtts(sce,B)</div><div>copy_VarCoords_1(sce,B)</div><div><br></div><div>printVarSummary(B)</div><div><br></div><div>B@_FillValue = -9</div><div><br></div><div> </div><div>;************************************************</div><div>; create plot</div><div>;************************************************</div><div> wks = gsn_open_wks("pdf" ,"Snow_cover_area") </div><div> res = True ; plot mods desired</div><div> res@gsnPolar = "NH" ; specify the hemisphere</div><div> plot = gsn_csm_contour_map_polar(wks,B(0,:,:),res) ; create the plot</div><div><br></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>