<div dir="ltr">Hello Jeff,<div><br></div><div>I rechecked the lterp command with different files. It was running even if there was variation in the vertical levels of the input files. That is not the problem as far as I can see.</div>
<div><br></div><div>The command was not working for me when I added the time specification in the lterp command. Though arguably I was not getting the same error. Just first check if you lterp command is working like this.</div>
<div> </div><div><span style="font-family:arial,sans-serif;font-size:13px">ga-> define nam4u = lterp(ugrdprs.1,ugrdprs.2</span><span style="font-family:arial,sans-serif;font-size:13px">)</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">If yes, then for specefying the time dimension define your term uprdprs.2(time=</span><span style="font-family:arial,sans-serif;font-size:13px">15Z09APR2014) before itself. I usually use the following sequence of commands to use the lterp command. Little longer version, but works well.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><div><span style="font-family:arial,sans-serif;font-size:13px">ga-></span><span style="font-family:arial,sans-serif;font-size:13px"> </span><font face="arial, sans-serif">'open /home/data/Output/TEST.ctl'</font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">ga-></span><span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif">'define a1=u(t=5)'</span><br>
</div><div style="font-family:arial,sans-serif;font-size:13px">ga-> 'close 1'</div></div><div><div><span style="font-size:13px;font-family:arial,sans-serif">ga-></span><span style="font-size:13px;font-family:arial,sans-serif"> </span><font face="arial, sans-serif">'sdfopen /home1/data/MERRA/<a href="http://merra.nc">merra.nc</a>'</font><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px">ga-></span><span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif">'define b1=u(t=53)'</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px">ga-></span><span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif">'define s1=lterp(b1,a1)'</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px">ga-></span><span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif">'d s1'</span><br></div>
<div style="font-family:arial,sans-serif;font-size:13px">ga-> 'close 1'</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Hope this helps. If not I would be most willing to look into this further.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Regards,</div><div style="font-family:arial,sans-serif;font-size:13px">Amulya Chevuturi</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 12, 2014 at 1:13 AM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br>I'm trying to interpolate fine grid data onto a coarser grid. Here's what I get<br><br>
ga-> define nam4u = lterp(ugrdprs,ugrdprs.2(time=15Z09APR2014))<br>Notice: Automatic Grid Interpolation Taking Place<br>
Data Request Error: Invalid grid coordinates<br> World coordinates convert to non-integer grid coordinates<br> Variable = ugrdprs.2 Dimension = 2 <br>Operation Error: Error from lterp function<br> Error ocurred at column 1<br>
<br clear="all"><div><div>The control files are:<br></div><div>(for file 1)<br>dset /var/grib/tmp/nam.20140411/2014041112_nam_4km_grads.grib2<br>index /var/grib/tmp/nam.20140411/2014041112_nam_4km_grads.grib2.idx<br>undef 9.999E+20<br>
title /var/grib/tmp/nam.20140411/2014041112_nam_4km_grads.grib2<br>* produced by g2ctl v0.0.7<br>* command line options: /var/grib/tmp/nam.20140411/2014041112_nam_4km_grads.grib2<br>* griddef=1:0:(1473 x 1025):grid_template=30:winds(grid): Lambert Conformal: (1473 x 1025) input WE:SN output WE:SN res 8 Lat1 12.190000 Lon1 226.541000 LoV 265.000000 LatD 25.000000 Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP 0.000000 Nor<br>
dtype grib2<br>pdef 1473 1025 lccr 12.190000 -133.459 1 1 25.000000 25.000000 -95 5079.000000 5079.000000<br>xdef 2191 linear -152.852997 0.0472378093781546<br>ydef 1040 linear 12.190000 0.0472378093781546<br>tdef 61 linear 12Z11apr2014 1hr<br>
* PROFILE hPa<br>zdef 42 levels 100000 97500 95000 92500 90000 87500 85000 82500 80000 77500 75000 72500 70000 67500 65000 62500 60000 57500 55000 52500 50000 47500 45000 42500 40000 37500 35000 32500 30000 27500 25000 22500 20000 17500 15000 12500 10000 7500 5000 3000 2000 1000<br>
options pascals<br>vars 302<br>...<br>...<br>...<br>UGRDprs 42,100 0,2,2 ** (1000 975 950 925 900.. 75 50 30 20 10) U-Component of Wind [m/s]<br><br></div><div>(for file 2)<br>dset ^gfs.t12z.pgrb2f03<br>index ^gfs.t12z.pgrb2f03.idx<br>
undef 9.999E+20<br>title gfs.t12z.pgrb2f03<br>* produced by g2ctl v0.0.7<br>* command line options: gfs.t12z.pgrb2f03<br>* griddef=1.1:0:(720 x 361):grid_template=0:winds(N/S): lat-lon grid:(720 x 361) units 1e-06 input WE:NS output WE:SN res 48 lat 90.000000 to -90.000000 by 0.500000 lon 0.000000 to 359.500000 by 0.500000 #points=259920:winds(N/S)<br>
<br>dtype grib2<br>ydef 361 linear -90.000000 0.5<br>xdef 720 linear -180.0 0.5<br>tdef 1 linear 15Z09apr2014 1mo<br>* PROFILE hPa<br>zdef 26 levels 100000 97500 95000 92500 90000 85000 80000 75000 70000 65000 60000 55000 50000 45000 40000 35000 30000 25000 20000 15000 10000 7000 5000 3000 2000 1000<br>
options pascals<br>vars 164<br>...<br>...<br>...<br>UGRDprs 26,100 0,2,2 ** (1000 975 950 925 900.. 70 50 30 20 10) U-Component of Wind [m/s]<br><br></div><div>I would guess that the source of the error is with the discrepancy in the vertical levels available. But is it really?<span class="HOEnZb"><font color="#888888"><br>
<br>Jeff Duda<br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div></font></span></div></div>
<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></div>