<div dir="ltr">Change<br><br><p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">precip1 =
mask(precip,lsm.eq.0,False)</span></p>
<p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">printVarSummary(precip1) ; <=== no meta data<br></span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><br><span style="font-size:12pt;line-height:107%"></span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">To</span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><br></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">precip =
mask(precip,lsm.eq.0,False)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">printVarSummary(precip)</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><br><span style="font-size:12pt;line-height:107%"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">or</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><br><span style="font-size:12pt;line-height:107%"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><br></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">precip1 =
mask(precip,lsm.eq.0,False)</span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">copy_VarMeta(precip, precip1)<br></span></p>
<p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">printVarSummary(precip1)</span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><br><span style="font-size:12pt;line-height:107%"></span></p><p style="margin-bottom:0.0001pt" class="MsoNormal"><span style="font-size:12pt;line-height:107%">=====<br></span></p><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 7, 2017 at 7:34 AM, Priyanka Silva <span dir="ltr"><<a href="mailto:priyankakeraminiya6@gmail.com" target="_blank">priyankakeraminiya6@gmail.com</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">
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">Hi,</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">I want to plot precipitation over
land area. So I <span> </span>tried to create an ocean
mask for global precipitation but my plot does not show precipitation over land
areas. When I plot I could see the following warning.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>check_for_y_lat_coord: Warning: Data
either does not contain a valid latitude coordinate array or doesn't contain
one at all.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>A valid latitude coordinate array should
have a 'units' attribute equal to one of the following values: </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>'degrees_north' 'degrees-north'
'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN'
'degreesN' 'deg north'</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>check_for_lon_coord: Warning: Data either
does not contain a valid longitude coordinate array or doesn't contain one at
all.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>A valid longitude coordinate array should
have a 'units' attribute equal to one of the following values: </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">(0)<span> </span>'degrees_east' 'degrees-east'
'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE'
'degreesE' 'deg east'</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">My script and plot are as follows.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">Greatly appreciate your help.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">Thank you.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/diagnostics_<wbr>cam.ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">;-----------------------------<wbr>------------------------------<wbr>-----------------</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">begin</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">f<span>
</span>=<span>
</span>addfile("<a href="http://mon.precip.nc" target="_blank">mon.precip.nc</a>","r")</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">precip = f->precip(0,:,:)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">a =
addfile("<a href="http://landsea.nc" target="_blank">landsea.nc</a>","r")</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">lsdata = a->LSMASK</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">lsm =
landsea_mask(lsdata,precip&<wbr>lat,precip&lon)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">precip1 =
mask(precip,lsm.eq.0,False)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">printVarSummary(precip1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">wks1
=gsn_open_wks("X11","precip_<wbr>mod1")</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">gsn_define_colormap(wks1,"<wbr>BrownBlue12")</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">res1 = True</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">res1@cnLinesOn = False</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">res1@cnFillOn = True ; turn color
on</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">res1@gsnSpreadColors = True</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">res1@tiMainString = "
precipitation"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">plot =
gsn_csm_contour_map_ce(wks1,<wbr>precip1,res1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">end</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%"> <img src="cid:ii_15b489ebca9a4839" alt="Inline image 1" height="215" width="316"></span></p>
<p class="MsoNormal" style="text-align:center" align="center"><span style="font-size:12pt;line-height:107%;color:red"> </span></p>
</div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>