<p dir="ltr">Assuming this is a contuintation of the questions from Aug 30th.your mask consists of these values. As found in the ncl website. </p>
<p dir="ltr"> <b>0=ocean, 1=land, 2=lake, 3=small island, 4=ice shelf</b>. </p>
<p dir="ltr">totc_ocean_only = mask(totc,lsm.ge.0,True)</p>
<p dir="ltr">You should be using logic that matches what you want. .ge.0 is masking everything. Try different options. Eg. .eq. 0 .gt.0 until you work out the logic that suits your needs. </p>
<p dir="ltr">Good luck,<br>
Alan </p>
<div class="gmail_quote">On 7 Oct 2014 08:23, "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><div><div>Dear NCL users<br><br></div>Here i am trying to display the data only over OCEAN regions. I don't want to include the land data.But i am not getting the exact results. The result is coming over both land and ocean regions. <br><br></div><div>I want only ocean data. <br><br></div>Here is my script<br>;----------------------------------------------------------------------<br><br>load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/shea_util.ncl"<br><br>begin<br>;---Read data<br> a = addfile("/home/kunal/Pictures/NCL_Scripts/<a href="http://04-01.nc" target="_blank">04-01.nc</a>","r")<br> totc = a->TotCH4_A<br> printVarSummary(totc)<br><br>;---Open workstation and change color map<br> <br> wks_type = "pdf" <br> wks_type@wkPaperSize = "A4"<br> wks = gsn_open_wks(wks_type,"sample2") <br><br><br>;---Set some resources<br> res = True<br><br> res@gsnMaximize = True ; maximize plot in frame<br><br> res@cnFillOn = True ; turn on contour fill<br> res@cnLinesOn = False ; turn off contour lines<br> res@cnLineLabelsOn = False ; turn off line labels<br><br> res@tiMainString = "MAP"<br><br> res@gsnAddCyclic = False<br><br> plot = gsn_csm_contour_map(wks,totc,res)<br><br>;---Mask totc using land/sea mask file<br> mfile = addfile("/usr/local/lib/ncl/lib/ncarg/data/cdf/<a href="http://landsea.nc" target="_blank">landsea.nc</a>","r")<br> lsmask = mfile->LSMASK<br> lsm = landsea_mask(lsmask,totc&Latitude,totc&Longitude)<br> totc_ocean_only = mask(totc,lsm.ge.0,True)<br> copy_VarMeta(totc,totc_ocean_only)<br><br> res@tiMainString = "mask"<br> plot = gsn_csm_contour_map(wks,totc_ocean_only,res)<br>end<br><br><br></div>Thank You<br><div><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:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div>
</div></div></div></div></div>
<br>_______________________________________________<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>