<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">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">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>