<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Adv</b> <span dir="ltr">&lt;<a href="mailto:advita6@gmail.com">advita6@gmail.com</a>&gt;</span><br>Date: Tue, Dec 8, 2015 at 2:10 PM<br>Subject: sub: css grid and objective analysis...<br>To: &quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br><br><br><div dir="ltr"><div><div>Hi,<br></div>I have been trying to compute objective analysis of station data sets. <br><br>begin<br> strll  = asciiread(&quot;stationmac.txt&quot;, -1, &quot;string&quot;) ;<br>  print(strll)   ; STATION&quot;,&quot;STATION_NAME&quot;, &quot;LAT&quot;, &quot;LON&quot;<br>  print(&quot;=====&quot;)<br><br>sloc = str_get_field(strll , 2, &quot;,&quot;)<br>  lat  = tofloat( str_get_field(strll , 3, &quot;,&quot;)  )<br>  lon  = tofloat( str_get_field(strll , 4, &quot;,&quot;)  )<br>  print(sloc +&quot; : &quot;+lat+&quot; &quot;+lon)<br><br> NOBS  = 65<br>diri=&quot;/home/dailysimms/prec-obs/01/&quot;<br>z1 = asciiread(diri+&quot;PrecJan1965-2014&quot;,-1,&quot;float&quot;)<br>print(z1)<br>printVarSummary(z1)<br>;a = (/1,2,3,4,5,6,7,8/)<br>;391 rows by 50 columns<br>a0 = onedtond(z1,(/391,50/))<br>;print(a0)<br>x=dim_avg(a0)<br><br>;------------------------------------------------------------------<br>; Read data<br>;------------------------------------------------------------------<br><br>  diri = &quot;./&quot;<br>  fili = &quot;Ecearth320x160x1961-2005.nc&quot;<br>  f    = addfile(diri+fili, &quot;r&quot;)<br>  Z    = f-&gt;t2(0,{40:49},{242:264})<br>  Z1    = f-&gt;t2(0,{40:49},{242:264})*86400<br>printVarSummary(Z)<br><br>;------------------------------------------------------------------<br>; Generate N random values from the above<br>;------------------------------------------------------------------<br> dimz  = dimsizes( Z )<br>nlat  = dimz(0)<br>  mlon  = dimz(1)<br>  nx = 8<br>  ny = 19<br>  plat =  90.*fspan(-1.,1.,nx)<br>  plon = 180.*fspan(-1.,1.,ny)<br>  N     = nlat*mlon<br>  iZ    = generate_unique_indices( N )<br> trip  = cssgrid(lat, lon, x,nlat,mlon)<br>dlon=0.1<br>  reps  = random_uniform (-dlon, dlon, N)  ; minor location perturbations<br><br>  IOBS  = iZ(0:NOBS)   ; convenience<br>                       ; clarity only ... create explicit variables<br> rlon  = trip(0,IOBS) + reps(IOBS)<br> rlat  = trip(1,IOBS) + reps(IOBS(::-1))<br> rZ    = trip(2,IOBS)<br>;******************************************************************<br>; call Wrap version of obj_anal_ic<br>;******************************************************************<br><br>  opt    = True<br>  opt@timing = True<br><br> dcrit  = (/45,35,25, 15,10 /)<br>  grid   = obj_anal_ic_Wrap(lon, lat, x, rlon, rlat, dcrit, opt)<br>printVarSummary(grid)<br>print(grid)<br>return<br><br>ERROR:<br><br>CSSGRID - error  -319, coordinates   319 and M coincide for some M  &gt;   319 &gt;= 1 (coordinate numbering starting at 1).<br>Error number -319 returned from c_cssgridd<br>fatal:cssgrid: Error number -319.<br>fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 45 in file oban.ncl<br><br></div><div>Could someone help me to fix this bug? <br></div><div>Thank you<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Adv<br></div></font></span></div>
</div><br></div>