<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/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/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/nclscripts/csm/contributed.ncl"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">load
"$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_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/nclscripts/csm/shea_util.ncl"</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%">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">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">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&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_mod1")</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;line-height:107%">gsn_define_colormap(wks1,"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,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" width="316" height="215"></span></p>
<p class="MsoNormal" style="text-align:center" align="center"><span style="font-size:12pt;line-height:107%;color:red"> </span></p>
</div>