On Tue, Oct 5, 2010 at 10:33 PM, jagan TNAU <span dir="ltr">&lt;<a href="mailto:jagan@tnau.ac.in">jagan@tnau.ac.in</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Dear users,</div><div><br></div><div>I want to regard a netcdf file of 36x32 grids 0.22x0.22 degree resolution to that of a file 16x15 grids with 0.5x0.5 degree resolution. What is the command I need to use invoking lats4d.sh in opengrads/Darwin/Versions/2.0.a7.oga.3/i386/grads. Please help me.</div>

<div><br></div><div><font color="#3333FF"><b><u>36x32 grids(0.22x0.22)</u></b></font></div><div><br></div><div>lon = 85.36, 85.58, 85.8, 86.02, 86.24, 86.46, 86.68, 86.9, 87.12, 87.34, </div><div>
    87.56, 87.78, 88, 88.22, 88.44, 88.66, 88.88, 89.1, 89.32, 89.54, 89.76, </div><div>    89.98, 90.2, 90.42, 90.64, 90.86, 91.08, 91.3, 91.52, 91.74, 91.96, </div><div>    92.18, 92.4, 92.62, 92.84, 93.06 ;</div><div>
<br>
</div><div> lat = 20.7, 20.92, 21.14, 21.36, 21.58, 21.8, 22.02, 22.24, 22.46, 22.68, </div><div>    22.9, 23.12, 23.34, 23.56, 23.78, 24, 24.22, 24.44, 24.66, 24.88, 25.1, </div><div>    25.32, 25.54, 25.76, 25.98, 26.2, 26.42, 26.64, 26.86, 27.08, 27.3, 27.52 ;</div>

<div><br></div><div><b><font color="#3366FF"><u>16x15 grids (0.5x0.5)</u></font></b></div><div><br></div><div>lon = 85.75, 86.25, 86.75, 87.25, 87.75, 88.25, 88.75, 89.25, 89.75, 90.25, </div><div>
    90.75, 91.25, 91.75, 92.25, 92.75, 93.25 ;</div><div><br></div><div>lat = 20.75, 21.25, 21.75, 22.25, 22.75, 23.25, 23.75, 24.25, 24.75, 25.25, </div><div>    25.75, 26.25, 26.75, 27.25, 27.75 ;</div><br></blockquote>
<div><br></div><div>Let me outline the steps. </div><div><br></div><div>1)  First you will need to come up with a ctl for the destination grid; if you already have one  , great, otherwise create something like:</div><div>
<br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div class="gmail_quote"><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">DSET nofile</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">title Template GrADS for regridding</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">options template</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">undef 1e+20</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">xdef 72 linear -180 5</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">ydef 46 linear -90  4</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">zdef   1 levels  1000 </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">tdef 1 linear 0Z1jan1900 1dy</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">vars 1</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">var       0 0        generic sfc variable</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">endvars</font></div></div><div><br></div></div></blockquote>  adjust the XDEF/YDEF to match your destination grid; call this file dest.ctl. This will define the dimension environment of the destination grid.<div>
<br></div><div>2) Issue the following lats4d command:</div><div><br></div><div>% lats4d.sh -i myinputfile -o outputfile -de dest.ctl \</div><div>               -func &#39;re(@,72,linear,-180,5,46,linear,-90,4,bl)&#39; -format netcdf -v</div>
<div><br></div><div>Again, adjust the re() arguments to reflect your destination grid (in this example the destination is a global 5x4 grid). Check the re() documentation for details:</div><div><br></div><div>         <a href="http://opengrads.org/doc/udxt/re/">http://opengrads.org/doc/udxt/re/</a><br>
<div class="gmail_quote"><div><br></div><div>Also, read the REGRIDDING section of the lats4d manual:</div><div><br></div><div>         <a href="http://opengrads.org/doc/scripts/lats4d/">http://opengrads.org/doc/scripts/lats4d/</a></div>
<div><br></div><div>  Good Luck,</div><div><br></div><div>     Arlindo</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">-- <br>With regards<br>

<br>Dr.R.Jagannathan                <br>Professor of Agronomy,<br>Department of Agronomy<br>Tamil Nadu Agricultural University, <br>Coimbatore - 641 003 India        <br><br>PHONE:  Mob: +91 94438 89891<br><br>DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.<br>


<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>
</div>