<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
DIV.FoxDiv20151018165921375453 {
        COLOR: #000000
}
P {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
BODY {
        FONT-SIZE: 10.5pt; FONT-FAMILY: Microsoft YaHei UI; COLOR: #000000; LINE-HEIGHT: 1.5
}
</STYLE>
<META name=GENERATOR content="MSHTML 10.00.9200.17492"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Hi Mary,</DIV>
<DIV> </DIV>
<DIV>I tried "<A
href="mailto:Opt@URCorner = (/ 89.97d, 179.97d/)">Opt@URCorner =
(/ 89.97d, 179.97d/)</A>", this resulted in "grid_dims = 3600,
1800".</DIV>
<DIV>However, the lat-lon intervals are not exactly 0.1 degree. </DIV>
<DIV style="COLOR: #ff0000">For example: "grid_center_lon = -179.95,
-179.849994442901, -179.749988885802, "</DIV>
<DIV style="COLOR: #ff0000">It should be "grid_center_lon = -179.95, -179.85,
-179.75, "</DIV>
<DIV> </DIV>
<DIV>I also tried "<A
href="mailto:Opt@URCorner = (/ 89.95001d, 179.95001d/)">Opt@URCorner =
(/ 89.95001d, 179.95001d/)</A>", the problem was similar.</DIV>
<DIV>"grid_center_lon = -179.95, -179.849999997221, -179.749999994443, "</DIV>
<DIV> </DIV>
<DIV>The results I want are the 0.1x0.1 grids with exactly equal latitude and
longtitude intervals (0.1 degree). How can I get it ?</DIV>
<DIV>For the 0.25x0.25 grids, the output results are right.<BR></DIV>
<DIV>Best Wishes,</DIV>
<DIV>Huansheng</DIV>
<DIV> </DIV>
<HR style="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> </DIV>
<DIV
style="BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; BORDER-BOTTOM: medium none; PADDING-BOTTOM: 0cm; PADDING-TOP: 3pt; PADDING-LEFT: 0cm; BORDER-LEFT: medium none; PADDING-RIGHT: 0cm">
<DIV
style="FONT-SIZE: 12px; FONT-FAMILY: tahoma; BACKGROUND: #efefef; COLOR: #000000; PADDING-BOTTOM: 8px; PADDING-TOP: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px">
<DIV><B>From:</B> <A href="mailto:haley@ucar.edu">Mary Haley</A></DIV>
<DIV><B>Date:</B> 2015-10-17 00:47</DIV>
<DIV><B>To:</B> <A
href="mailto:chenhuansheng@mail.iap.ac.cn">chenhuansheng@mail.iap.ac.cn</A></DIV>
<DIV><B>CC:</B> <A href="mailto:ncl-talk@ucar.edu">ncl-talk</A></DIV>
<DIV><B>Subject:</B> Re: [ncl-talk] question to the NCL latlon_to_SCRIP
function</DIV></DIV></DIV>
<DIV>
<DIV class=FoxDiv20151018165921375453 style="BACKGROUND-COLOR: white">
<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'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><<A href="mailto:chenhuansheng@mail.iap.ac.cn"
target=_blank>chenhuansheng@mail.iap.ac.cn</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><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 "ESMF_RegridWeightGen".</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,"0.25x0.25",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 = "degrees" ;</DIV>
<DIV> double
grid_center_lon(grid_size) ;</DIV>
<DIV>
grid_center_lon:units = "degrees" ;</DIV>
<DIV> int grid_imask(grid_size)
;</DIV>
<DIV>
grid_imask:units = "unitless" ;</DIV>
<DIV> double
grid_corner_lat(grid_size, grid_corners) ;</DIV>
<DIV>
grid_corner_lat:units = "degrees" ;</DIV>
<DIV> double
grid_corner_lon(grid_size, grid_corners) ;</DIV>
<DIV>
grid_corner_lon:units = "degrees" ;</DIV>
<DIV> </DIV>
<DIV>// global attributes:</DIV>
<DIV>
:date_created = "Thu Oct 15 19:49:54 CST 2015" ;</DIV>
<DIV>
:Createdby = "ESMF_regridding.ncl" ;</DIV>
<DIV>
:Conventions = "SCRIP" ;</DIV>
<DIV>
:title = "0.25x0.25 grid" ;</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,"0.1x0.1",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 = "degrees" ;</DIV>
<DIV> double
grid_center_lon(grid_size) ;</DIV>
<DIV>
grid_center_lon:units = "degrees" ;</DIV>
<DIV> int grid_imask(grid_size)
;</DIV>
<DIV>
grid_imask:units = "unitless" ;</DIV>
<DIV> double
grid_corner_lat(grid_size, grid_corners) ;</DIV>
<DIV>
grid_corner_lat:units = "degrees" ;</DIV>
<DIV> double
grid_corner_lon(grid_size, grid_corners) ;</DIV>
<DIV>
grid_corner_lon:units = "degrees" ;</DIV>
<DIV> </DIV>
<DIV>// global attributes:</DIV>
<DIV>
:date_created = "Thu Oct 15 20:27:42 CST 2015" ;</DIV>
<DIV>
:Createdby = "ESMF_regridding.ncl" ;</DIV>
<DIV>
:Conventions = "SCRIP" ;</DIV>
<DIV>
:title = "0.1deg grid" ;</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></DIV></DIV></BODY></HTML>