<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Users,<div><br></div><div>I was trying to interpolate gridded data to some station locations using linint2_points function with the following script.</div><div><div>;----------------------------------------------------------------------</div><div>; lin2points.ncl</div><div>;----------------------------------------------------------------------</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div><br></div><div>begin</div><div>;************************************************</div><div>; read ascii input file</div><div>;************************************************</div><div>  values = asciiread("/Users/Jag/Desktop/cdz-regrid/var.txt",-1,"float")</div><div>  nvals = dimsizes(values)</div><div>  ncols = 8</div><div>  nrows = ncols/nvals</div><div>  lat  = values(0::ncols)</div><div>  lon  = values(1::ncols)   </div><div>  srad = values(2::ncols) </div><div>  tmax = values(3::ncols)</div><div>  tmin = values(4::ncols) </div><div>  rain = values(5::ncols)</div><div>  wind = values(6::ncols)  </div><div>  rhum = values(7::ncols)  </div><div>;************************************************</div><div><br></div><div>; Lat*lon array 11*11 = 121 rows read from the files</div><div>; lat = (/10.0, 10.2, 10.4, 10.6, 10.8, 11.0, 11.2, 11.4, 11.6, 11.8, 12.0/)</div><div>; lon = (/78.0, 78.2, 78.4, 78.6, 78.8, 79.0, 79.2, 79.4, 79.6, 79.8, 80.0/)</div><div><br></div><div>; points for which interpolation required totally 30</div><div>  nlat=(/10.38, 10.40/)</div><div>  nlon=(/79.85, 79.49/)</div><div><br></div><div>  ntmax = linint2_points(lat,lon,tmax,False,nlat,nlon,0)</div><div><br></div><div>; Print only tmax as a sample</div><div> print(ntmax)</div><div><br></div><div>; nsrad = linint2_points(lat,lon,srad,False,nlat,nlon,0)</div><div>; ntmin = linint2_points(lat,lon,tmin,False,nlat,nlon,0)</div><div>; nrain = linint2_points(lat,lon,rain,False,nlat,nlon,0)</div><div>; nwind = linint2_points(lat,lon,wind,False,nlat,nlon,0)</div><div>; nrhum = linint2_points(lat,lon,rhum,False,nlat,nlon,0)</div><div><br></div><div>;  alist   = [/nsrad,ntmax,ntmin,nrain,nwind,nrhum/]</div><div>;  write_table("tmp11.txt", "w", alist, "%6.1f%6.1f%6.1f%7.1f%6.1f%6.1f")</div><div><br></div><div>end</div><div>-----------------------------------------------</div><div>But I encountered the following error </div><div><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font size="4">fatal:linint2_points: The rightmost </font>dimensions of fi must be nyi x nxi, where nyi and nxi are the lengths of yi and xi respectively</span></p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">fatal:["Execute.c":8637]:Execute: Error occurred at or near line 32 in file lin2points.ncl</span></p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Will you please help me to solve the problem. Sample file attached</span></p></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>With regards<br><br>Dr.R.Jagannathan                <br>Professor & Former Dean<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.</div></div></div></div></div></div></div></div>