<div dir="ltr"><div class="gmail_default" style="font-size:small">It looks like a simple rounding error.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">By providing strict corner lat/lon boundary values and a small resolution, you end up with values like 89.950001 and 179.950001. These are out of range of the URCorner boundary values that you provided, so you then end up with the last two values removed.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can try using slightly a higher values for URCorner:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">Opt@URCorner       = (/  89.97d,  179.97d/)<br></div><div class="gmail_default"><br></div><div class="gmail_default">I&#39;ve created a ticket (NCL-2293) on this to see if this is something we can improve.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 1:13 AM, <a href="mailto:chenhuansheng@mail.iap.ac.cn">chenhuansheng@mail.iap.ac.cn</a> <span dir="ltr">&lt;<a href="mailto:chenhuansheng@mail.iap.ac.cn" target="_blank">chenhuansheng@mail.iap.ac.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div style="MARGIN:10px">
<div>
<div>Dear all,</div>
<div> </div>
<div>I used the latlon_to_SCRIP function to 
generate  lat-lon grid file with SCRIP format which will then be used 
as input files of the ESMF application &quot;ESMF_RegridWeightGen&quot;.</div>
<div>When I applied latlon_to_SCRIP to 1x1, 0.5x0.5 and 0.25x0.25 grids, 
the output results were right. However, when I applied latlon_to_SCRIP to 
0.1x0.1 grids, the output results </div>
<div>are wrong. Do the latlon_to_SCRIP function support to generate a 
0.1x0.1 grid file? Can you help me to solve this problem? </div>
<div>Thank you very much.</div>
<div> </div>
<div style="COLOR:#ff0000">The code used  to generate the 0.25x0.25 grids 
are as follows:</div>
<div>_______________</div>
<div>
<div>Opt                
= True</div>
<div><a href="mailto:Opt@LLCorner" target="_blank">Opt@LLCorner</a>       
= (/ -89.875d, -179.875d/)</div>
<div><a href="mailto:Opt@URCorner" target="_blank">Opt@URCorner</a>       
= (/  89.875d,  179.875d/)</div>
<div><a href="mailto:Opt@ForceOverwrite" target="_blank">Opt@ForceOverwrite</a> = True</div>
<div><a href="mailto:Opt@PrintTimings" target="_blank">Opt@PrintTimings</a>   = 
True</div>
<div>latlon_to_SCRIP(srcGridName,&quot;0.25x0.25&quot;,Opt)</div>
<div>delete(Opt)</div>
<div>________________</div>
<div> </div></div>
<div style="COLOR:#ff0000">The header of the output netcdf file is as follows: 
</div>
<div>________________</div>
<div>
<div>dimensions:</div>
<div>        grid_size = 1036800 ;</div>
<div>        grid_corners = 4 ;</div>
<div>        grid_rank = 2 ;</div>
<div>variables:</div>
<div>        int grid_dims(grid_rank) ;</div>
<div>        double 
grid_center_lat(grid_size) ;</div>
<div>                
grid_center_lat:units = &quot;degrees&quot; ;</div>
<div>        double 
grid_center_lon(grid_size) ;</div>
<div>                
grid_center_lon:units = &quot;degrees&quot; ;</div>
<div>        int grid_imask(grid_size) 
;</div>
<div>                
grid_imask:units = &quot;unitless&quot; ;</div>
<div>        double 
grid_corner_lat(grid_size, grid_corners) ;</div>
<div>                
grid_corner_lat:units = &quot;degrees&quot; ;</div>
<div>        double 
grid_corner_lon(grid_size, grid_corners) ;</div>
<div>                
grid_corner_lon:units = &quot;degrees&quot; ;</div>
<div> </div>
<div>// global attributes:</div>
<div>                
:date_created = &quot;Thu Oct 15 19:49:54 CST 2015&quot; ;</div>
<div>                
:Createdby = &quot;ESMF_regridding.ncl&quot; ;</div>
<div>                
:Conventions = &quot;SCRIP&quot; ;</div>
<div>                
:title = &quot;0.25x0.25 grid&quot; ;</div>
<div>data:</div>
<div> </div>
<div>grid_dims = 1440, 720 ;</div></div>
<div>________________</div>
<div> </div>
<div> </div>
<div>
<div style="COLOR:#ff0000">The code used  to generate the 0.1x0.1 grids 
are as follows:</div></div>
<div>
<div>_______________</div>
<div>
<div>Opt                
= True</div>
<div><a href="mailto:Opt@LLCorner" target="_blank">Opt@LLCorner</a>       
= (/ -89.95d, -179.95d/)</div>
<div><a href="mailto:Opt@URCorner" target="_blank">Opt@URCorner</a>       
= (/  89.95d,  179.95d/)</div>
<div><a href="mailto:Opt@ForceOverwrite" target="_blank">Opt@ForceOverwrite</a> = True</div>
<div><a href="mailto:Opt@PrintTimings" target="_blank">Opt@PrintTimings</a>   = 
True</div>
<div>latlon_to_SCRIP(srcGridName,&quot;0.1x0.1&quot;,Opt)</div>
<div>delete(Opt)</div>
<div>________________</div>
<div> </div>
<div style="COLOR:#ff0000">The header of the output netcdf file is as follows: 
</div></div></div>
<div>_____________</div>
<div>
<div>dimensions:</div>
<div>        grid_size = 6474601 ;</div>
<div>        grid_corners = 4 ;</div>
<div>        grid_rank = 2 ;</div>
<div>variables:</div>
<div>        int grid_dims(grid_rank) ;</div>
<div>        double 
grid_center_lat(grid_size) ;</div>
<div>                
grid_center_lat:units = &quot;degrees&quot; ;</div>
<div>        double 
grid_center_lon(grid_size) ;</div>
<div>                
grid_center_lon:units = &quot;degrees&quot; ;</div>
<div>        int grid_imask(grid_size) 
;</div>
<div>                
grid_imask:units = &quot;unitless&quot; ;</div>
<div>        double 
grid_corner_lat(grid_size, grid_corners) ;</div>
<div>                
grid_corner_lat:units = &quot;degrees&quot; ;</div>
<div>        double 
grid_corner_lon(grid_size, grid_corners) ;</div>
<div>                
grid_corner_lon:units = &quot;degrees&quot; ;</div>
<div> </div>
<div>// global attributes:</div>
<div>                
:date_created = &quot;Thu Oct 15 20:27:42 CST 2015&quot; ;</div>
<div>                
:Createdby = &quot;ESMF_regridding.ncl&quot; ;</div>
<div>                
:Conventions = &quot;SCRIP&quot; ;</div>
<div>                
:title = &quot;0.1deg grid&quot; ;</div>
<div>data:</div>
<div> </div>
<div>grid_dims = 3599, 1799 ;</div></div>
<div>_____________</div>
<div style="FONT-WEIGHT:bold;COLOR:#ff0000">Why the grid_dims are 
3599x1799?  I think it should be 3600x1800.</div>
<div> </div>
<div> </div>
<div>Yours Sincerely,</div>
<div>Huansheng Chen</div></div>
<div> </div>
<hr style="min-height:1px;WIDTH:210px" align="left" color="#b5c4df" size="1">

<div><span>
<div style="FONT-SIZE:10pt;FONT-FAMILY:verdana;MARGIN:10px">
<div>
<div style="FONT-SIZE:10pt;FONT-FAMILY:verdana;MARGIN:10px">
<div>陈焕盛(LAPC/IAP)</div>
<div>大气边界层物理和大气化学国家重点实验室</div>
<div>中国科学院大气物理研究所</div></div></div></div></span></div></div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>