<div dir="ltr"><div><div>Hi,<br></div>I have been trying to do objective analysis only over the region of longitude from -116 to -90.35 and latitude of  40.01 to 49. While plotting the output, the values are spreaded over the global region. I don&#39;t understand where is wrong. It&#39;s been long I am kinda stuck with this objective analysis. I have attached here the output figure and code too. Could someone please help me to fix this? <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>mnlat=(min(lat))<br>mxlat=(max(lat))<br>mnlon=(min(lon))<br>mxlon=(max(lon))<br>;print(lon)<br>print(mnlon)<br>print(mxlon)<br>print(mnlat)<br>print(mxlat)<br>mlon = 390<br>dlon = -90.35 / mlon<br>lonn  = fspan (-116, (mlon - 1) * dlon, mlon)<br>print(lonn)<br>mlat = 390<br>dlat = 49.0 / mlat<br>latt  = fspan (40.01, (mlat - 1) * dlat, mlat)<br>print(latt)<br>;gcdist = gc_latlon(mnlat,mnlon, mxlat,mxlon, 300,2)<br>;print(gcdist)<br>;print (gcdist@gclat+&quot;  &quot;+gcdist@gclon )<br>;return<br>;latt=gcdist@gclat<br>;lonn=gcdist@gclon<br>;print(min(latt))<br>;print(max(latt))<br>;print(max(lonn))<br>;print(min(lonn))<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>;390 rows by 50 columns<br>a0 = onedtond(z1,(/390,50/))<br>;print(a0)<br>x=dim_avg(a0)<br>print(x)<br>set_default_fillvalue(&quot;string&quot;,  &quot;&quot;)<br>zi = natgrid(lon, lat, x, lonn, latt)<br>print(zi)<br>zi!0=&quot;lat&quot;<br>zi!1=&quot;lon&quot;<br>zi&amp;lat=latt<br>zi&amp;lon=lonn<br>printVarSummary(zi)<br>print(zi)<br>  opt    = True<br>opt@timing = True<br>  rscan  = (/20,15,10, 5,3 /)<br>grid   = obj_anal_ic_deprecated(lon, lat, x, lonn, latt, rscan, opt)<br>printVarSummary(grid)<br>print(grid)<br>print(min(grid))<br>print(max(grid))<br>grid!0=&quot;lt&quot;<br>grid!1=&quot;ln&quot;<br>grid&amp;lt=latt<br>grid&amp;ln=lonn<br>printVarSummary(grid)<br>;return<br>;------------------------------------------------------------------<br>; plot<br>;------------------------------------------------------------------<br>  wks      = gsn_open_wks(&quot;pdf&quot;,&quot;rdm2grid&quot;)<br>  gsn_define_colormap(wks,&quot;amwg&quot;)<br> plot     = new(2,graphic)<br><br>  res                     = True<br>  res@gsnDraw             = False           ; don&#39;t draw<br>  res@gsnFrame            = False           ; don&#39;t advance frame<br>  res@cnFillOn            = True            ; turn on color<br> ;res@cnLinesOn           = False           ; turn off contour lines<br>  res@cnLineLabelsOn      = False           ; turn off contour line labels<br>  res@gsnSpreadColors     = True            ; spread out color table<br>  res@lbLabelBarOn        = False           ; turn off individual cb&#39;s<br><br><br>res@gsnCenterString = &quot;Original grid&quot;<br>  plot(0) = gsn_csm_contour_map_ce(wks,zi,res)<br><br>  plot(1) = gsn_csm_contour_map_ce(wks,grid,res)<br>;************************************************<br>; create panel<br>;************************************************<br>  resP                     = True                ; modify the panel plot<br> ;resP@txString            = title<br>  resP@gsnMaximize         = True                ; make large<br>  resP@gsnPanelLabelBar    = True                ; add common colorbar<br>  resP@lbLabelAutoStride   = True                ; Let NCL decide spacing<br> ;resP@lbLabelStride       = 2                   ; force every other label<br> ;resP@lbLabelFontHeightF  = 0.0125              ; make labels smaller [0.2 default]<br><br>  gsn_panel(wks,plot,(/2,1/),resP)            ; now draw as one plot<br><br>end<br><br></div>Warning message:<br>(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn&#39;t contain one at all.<br>(0)    A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)        &#39;degrees_north&#39; &#39;degrees-north&#39; &#39;degree_north&#39; &#39;degrees north&#39; &#39;degrees_N&#39; &#39;Degrees_north&#39; &#39;degree_N&#39; &#39;degreeN&#39; &#39;degreesN&#39; &#39;deg north&#39;<br>(0)    check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn&#39;t contain one at all.<br>(0)    A valid longitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)        &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39; &#39;degrees east&#39; &#39;degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg east&#39;<br>(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn&#39;t contain one at all.<br>(0)    A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)        &#39;degrees_north&#39; &#39;degrees-north&#39; &#39;degree_north&#39; &#39;degrees north&#39; &#39;degrees_N&#39; &#39;Degrees_north&#39; &#39;degree_N&#39; &#39;degreeN&#39; &#39;degreesN&#39; &#39;deg north&#39;<br>(0)    check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn&#39;t contain one at all.<br>(0)    A valid longitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)        &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39; &#39;degrees east&#39; &#39;degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg east&#39;<br><br><div><br><br><br><br></div></div>