<div dir="ltr"><div>The last two arguments of the function call should be 0, 1; not 1, 0.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 31, 2020 at 9:28 AM Cathy Smith via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
I was hoping someone could show me the error of my ways vis a vis NCL. I <br>
have this code below which ideally interpolates the original godas data <br>
to different vertical coordinates for one year, all lats/lons. I get the <br>
error below on the 'dim-th dimension'. I do print out the arrays <br>
metadata and they appear to me to be correct. I am using the same <br>
variable names as the NCL example. I assume I have a conceptual error.  <br>
Any ideas? Thanks!<br>
<br>
Cathy Smith<br>
<br>
Code:<br>
<br>
xo = (/5.,10., 20., 30., 50., 75., 100., 125., 150., 175, 200, 250., <br>
300., 400., 500., 750., 1000., 1500./)  ;<br>
<br>
;a = addfile("/Datasets/godas/<a href="http://pottmp.1980.nc" rel="noreferrer" target="_blank">pottmp.1980.nc</a>","r")<br>
a = <br>
addfile("<a href="http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/godas/pottmp.1980.nc" rel="noreferrer" target="_blank">http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/godas/pottmp.1980.nc</a>","r")<br>
<br>
xi = a->level<br>
<br>
fi=short2flt(a->pottmp)<br>
printVarSummary(xi)<br>
printVarSummary(xo)<br>
printVarSummary(xi)<br>
<br>
xo   = linint1_n (xi, fi, False, xo, 1, 0)<br>
<br>
**********************<br>
<br>
slightly editted output.<br>
<br>
Variable: xi<br>
Type: float<br>
Dimensions and sizes:    [level | 40]<br>
<br>
Variable: xo<br>
Type: float<br>
Number of Dimensions: 1<br>
Dimensions and sizes:    [18]<br>
<br>
Variable: fi<br>
Type: float<br>
Number of Dimensions: 4<br>
Dimensions and sizes:    [time | 12] x [level | 40] x [lat | 418] x [lon <br>
| 360]<br>
<br>
fatal:linint1_n: The dim-th dimension of fi must be the same length as xi<br>
fatal:["Execute.c":8635]:Execute: Error occurred at or near line 12<br></blockquote></div></div>