<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=""> Thank you for the reply! I’ve tried uncommenting the <span style="font-size: small;" class="">Opt@SrcGridMask before 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=""> </span> Opt@SrcGridMask = where(.not.ismissing(y(0,:,:)),1,0)</div><div class=""> Opt@DstGridMask = where(.not.ismissing(hsic(0,:,:)),1,0)</div><div class=""><br class=""></div><div class=""> and the output is as the attached plot file. You can see that the land grid have been masked, but the ocean grids after regridding</div><div class=""><br class=""></div><div class=""> are still inconsistent with the original source grids ( the grids outside 90W-90E are different with the source grids) . </div><div class=""><br class=""></div><div class=""> 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 <<a href="mailto:haley@ucar.edu" class="">haley@ucar.edu</a>> 写道:</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"> </span><span class="gmail-s2">;Opt@SrcGridMask = where(.not.ismissing(y(0,:,:)),1,0) </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"> </span><span dir="ltr" class=""><<a href="mailto:xianglin72@icloud.com" target="_blank" class="">xianglin72@icloud.com</a>></span><span class="Apple-converted-space"> </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=""> 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"> </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 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. </div><div class=""><br class=""></div><div class=""> I try to use the original longitude of source grids with the following :</div><div class=""><div class=""><br class=""></div><div class=""> fi = addfile(data_path + data_filename,"r")</div><div class=""> lon = fi->longitude</div><div class=""> lat = fi->latitude </div></div><div class=""> </div><div class=""> y@lat2d = lat</div><div class=""><div class=""> y@lon2d = lon </div></div><div class=""><br class=""></div><div class=""> <span class="Apple-converted-space"> </span>or reset the longitudes to 0~360E using the following lines:</div><div class=""> </div><div class=""><div class=""> <span class="Apple-converted-space"> </span>lon = where(lon.lt.0,lon+360,lon) ; -180 ~ 180 longitude order</div><div class=""> <span class="Apple-converted-space"> </span>lon@units= "degrees_east"</div></div><div class=""> </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. 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. 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=""> </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>