<html><head><meta http-equiv="Content-Type" content="text/html charset=gb2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Mary,</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; Thank you for the reply! I’ve tried uncommenting the&nbsp;<span style="font-size: small;" class="">Opt@SrcGridMask before &nbsp;with the following 2 lines</span></div><div class=""><span style="font-size: small;" class=""><br class=""></span></div><div class=""><span style="font-size: small;" class="">&nbsp;&nbsp;</span>&nbsp; &nbsp;Opt@SrcGridMask &nbsp; &nbsp; &nbsp;= where(.not.ismissing(y(0,:,:)),1,0)</div><div class="">&nbsp; &nbsp; &nbsp;Opt@DstGridMask &nbsp; &nbsp; &nbsp;= where(.not.ismissing(hsic(0,:,:)),1,0)</div><div class=""><br class=""></div><div class="">&nbsp; and the output is as the attached plot file. &nbsp; You can see that the land grid have been masked, but the ocean grids after regridding</div><div class=""><br class=""></div><div class="">&nbsp;are still &nbsp;inconsistent with the original source grids ( the grids outside 90W-90E are different with the source grids) .&nbsp;</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp;Besides, I found same problem occurred when I use the “bilinear” and “patch” method. But the combination of using “neareststod”</div><div class=""><br class=""></div><div class="">method and uncommenting the above 2 lines seem produce the correct results ( see anther attached files). But I still feel puzzled.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Lin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="EF3D746F-BB4C-418A-A41F-F7655E1A3455" height="384" width="592" apple-width="yes" apple-height="yes" src="cid:1A4F7A64-449F-421B-94F9-F409EDAC944F" class=""></div><div class=""><img apple-inline="yes" id="F8DEE1DD-F35D-496B-87B2-225D5A8B216C" height="384" width="592" apple-width="yes" apple-height="yes" src="cid:D90F13F8-446E-4FB4-9491-BEDC05D558A6" class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">在 2017年1月24日,02:09,Mary Haley &lt;<a href="mailto:haley@ucar.edu" class="">haley@ucar.edu</a>&gt; 写道:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_default" style="font-size: small;">Lin,</div><div class="gmail_default" style="font-size: small;"><br class=""></div><div class="gmail_default" style="font-size: small;">I think you need to set your SrcGridMask option. I noticed you had it commented out:</div><div class="gmail_default" style="font-size: small;"><br class=""></div><div class="gmail_default" style="font-size: small;"><p class="gmail-p1"><span class="gmail-s1">&nbsp; &nbsp;&nbsp;</span><span class="gmail-s2">;Opt@SrcGridMask&nbsp; &nbsp; &nbsp; = where(.not.ismissing(y(0,:,:)),1,0)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p><p class="gmail-p1">If y contains missing values, then you need to set SrcGridMask. If y contains missing values in the same location for every leftmost element of y (assuming it's 3D), then what you have above should work, but you need to uncomment it.</p><p class="gmail-p1">--Mary</p><p class="gmail-p1"><br class=""></p></div></div><div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class="gmail_quote">On Mon, Jan 23, 2017 at 12:49 AM, 林祥<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:xianglin72@icloud.com" target="_blank" class="">xianglin72@icloud.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hi,all<div class=""><br class=""></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am regriding some NSIDC sic data (<a href="http://nsidc.org/data/g02202.html" target="_blank" class="">http://nsidc.org/data/g02202.<wbr class="">html</a>, downloaded from<span class="Apple-converted-space">&nbsp;</span><a href="ftp://sidads.colorado.edu/pub/DATASETS/NOAA/G02202_v2" target="_blank" class="">ftp://sidads.colorado.edu/pub/<wbr class="">DATASETS/NOAA/G02202_v2</a>).</div><div class=""><br class=""></div><div class="">The source data is curvilinear grids with 2-d longitude coordinate array ranging &nbsp;between -180E~180E, and the destination grids is HadISST 2.2 (<a href="http://www.metoffice.gov.uk/hadobs/hadisst2/" target="_blank" class="">http://www.metoffice.gov.uk/<wbr class="">hadobs/hadisst2/</a>)</div><div class=""><br class=""></div><div class="">which is rectilinear grids ranging from 0E to 360E. &nbsp;</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I try to use the original longitude of source grids with the following :</div><div class=""><div class=""><br class=""></div><div class="">&nbsp; &nbsp;fi &nbsp; &nbsp; = addfile(data_path + data_filename,"r")</div><div class="">&nbsp; &nbsp;lon &nbsp; &nbsp;= fi-&gt;longitude</div><div class="">&nbsp; &nbsp;lat &nbsp; &nbsp;= fi-&gt;latitude &nbsp;</div></div><div class="">&nbsp;</div><div class="">&nbsp; &nbsp;y@lat2d &nbsp;= lat</div><div class=""><div class="">&nbsp; &nbsp;y@lon2d &nbsp;= lon &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>or reset the longitudes &nbsp;to 0~360E using the following lines:</div><div class="">&nbsp;&nbsp;</div><div class=""><div class="">&nbsp;<span class="Apple-converted-space">&nbsp;</span>lon &nbsp; &nbsp; &nbsp;= where(lon.lt.0,lon+360,lon) &nbsp; &nbsp; ; -180 ~ 180 longitude order</div><div class="">&nbsp;<span class="Apple-converted-space">&nbsp;</span>lon@units= "degrees_east"</div></div><div class="">&nbsp;&nbsp;</div><div class="">But I got the same result and the regridded data contain missing values outside the range of -90W~90E.Please see the attached plot file</div><div class=""><br class=""></div><div class="">I don’t know where the problem come from.&nbsp; And I also found no instruction on the NCL webpages explaining the similar case when the curvilinear</div><div class=""><br class=""></div><div class="">grids share different longitude ranges with the destinate grids.&nbsp; So anyone can show me a hand?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The script file, source data file , contour plot files with original data and regridded data have been attached.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Lin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""></div></div><br class=""><div style="word-wrap: break-word;" class=""><div class=""></div><br class=""><div class=""></div></div><br class=""><div style="word-wrap: break-word;" class=""><div class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""></div></div><br class=""><div style="word-wrap: break-word;" class=""><div class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></div><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a></blockquote></div></div></div></blockquote></div><br class=""></body></html>