<p dir="ltr">It seems you didn't copy over my last additional line. </p>
<p dir="ltr">You need to be aware of whether metadata is being transferred in the ncl routines and check your array before passing them to a plotting routine. </p>
<p dir="ltr">copyVarCoords(data, land_only) </p>
<div class="gmail_quote">On 30 Aug 2014 00:01, "Kunal Bali" <<a href="mailto:kunal.bali9@gmail.com">kunal.bali9@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Dear Alan<br><br></div>please find the attached file . Here you can see all scripts with out put result. The out put is not coming within the coordinates. How to fix it ??<br></div><div class="gmail_extra">
<br clear="all"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br>
<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
</font></p></div></div></div>
<br><br><div class="gmail_quote">On Sat, Aug 30, 2014 at 3:40 AM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr"><a href="https://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml</a></p>
<p dir="ltr"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml</a></p>
<p dir="ltr">This is based on a 1x1 land sea file, if you have higher res data then you might want a more accurate mask. <br><br></p>
<p dir="ltr">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/<a href="https://www.ncl.ucar.edu/Document/Functions/Shea_util/shea_util.shtml" target="_blank">shea_util.ncl</a>"</p>
<p dir="ltr">ncl 2> begin<br>
ncl 3> in = addfile("/home/kunal/<a href="http://14-01.nc/" target="_blank">14-01.</a><a href="http://14-01.nc/" target="_blank">nc</a>","r")<br>
ncl 4> data = in->TotCH4_A(:,:) <br>
ncl 5><br>
printVarSummary(data) ; check coords are named lat lon</p>
<p dir="ltr">a =<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank"><b>addfile</b></a>("$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://landsea.nc" target="_blank">landsea.nc</a>","r") lsdata = a->LSMASK<br>
lsm =<b>landsea_mask</b>(lsdata,data&lat,data&lon)<br>
land_only =<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml" target="_blank"><b>mask</b></a>(data,lsm.ge.1,True)<br>
copyVarCoords(data, land_only) ; in case mask doesn't do this</p>
<p dir="ltr">ncl 7><br>
ncl 8> wks = gsn_open_wks("x11","mask")<br>
ncl 9> gsn_define_colormap(wks,"BlAqGrYeOrRe")<br>
ncl 10> res = True<br>
ncl 11> res@cnFillOn = True<br>
ncl 12> res@cnLinesOn = False<br>
ncl 13> res@gsnSpreadColors = True<br>
ncl 14> res@gsnSpreadColorStart = 10<br>
ncl 15> res@gsnSpreadColorEnd = 96 <br>
ncl 16> res@cnLevelSpacingF = 3<br>
ncl 17> res@lbLabelString = 4<br>
ncl 18> res@tiMainString = "Land Only"<br>
ncl 19> plot = gsn_csm_contour_map_ce(wks,land_only,res)<br>
ncl 20> end</p>
<div class="gmail_quote"><div><div>On 29 Aug 2014 15:26, "Kunal Bali" <<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>> wrote:<br type="attribution"></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr"><div><div>Could anyone provdies me the scripts for attached file.<br><br></div>If i have variable TotCH4_A , Latitude, Longitude. So what could be the scripts that one. If you write here that would be better because i have tried the example from NCL tutorials but getting errors <br>
<br></div>SO please provides me here if you can. Or i can send one file if anyone interested ??<br><div><br clear="all"><div><div><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio & Atmospheric Science Division <br>
</div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px">
<font color="#1F497D"><br></font></p></div></div></div>
</div></div></div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div>
</blockquote></div><br></div>
</blockquote></div>