<p dir="ltr"><a href="https://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml">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">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">shea_util.ncl</a>"</p>
<p dir="ltr">ncl 2> begin<br>
ncl 3> in = addfile("/home/kunal/<a href="http://14-01.nc/">14-01.</a><a href="http://14-01.nc/">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"><b>addfile</b></a>("$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://landsea.nc">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"><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">On 29 Aug 2014 15:26, "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>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>_______________________________________________<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>