<div dir="ltr">Thanks, that works. <div>This helpdesk is very helpful!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 3, 2017 at 11:18 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Try the _Wrap version. Generally, I would recommend using the _Wrap version of any function<br><br>regrid_f1=linint2_Wrap(lon2d(:<wbr>:skip),lat2d(::-skip),f1_<wbr>goes4(::-skip,::skip),False,<wbr>merge_lon,merge_lat,0)<br></div>printVarSummary(regrid_f1)</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jan 3, 2017 at 10:49 AM, Ligia Bernardet - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:ligia.bernardet@noaa.gov" target="_blank">ligia.bernardet@noaa.gov</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hello,<div><br></div><div>I am trying to regrid a Hurricane WRF fost-processed forecast and then plot it, but I am getting the following error:<br><br></div><div>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</div><div><br></div><div>The original array is has 721 lat points (90 to -90, with 0.25 deg increments) and 1440 longitude points (0 to 275.75, with 0.25 increments).  I am able to plot and print it correctly.</div><div><br></div><div>After linint2, I am able to print the interpolated field and it looks OK. But I cannot plot it.</div><div><br></div><div>Seems like attributes are missing?</div><div><br></div><div>Thanks for your help,</div><div>Ligia</div><div>ps: NCL script is below</div><div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl&quot;</div><div><br></div><div>; Read forecast file</div><div>f1 = addfile(&quot;/mnt/lfs2/projects/dt<wbr>c-hurr/Ligia.Bernardet/Sat_ver<wbr>if/Ligia_sat_prep/<a href="http://gonzalo08l.2014101412.hwrfsat.global.0p25.f024.nc" target="_blank">gonzalo08l.<wbr>2014101412.hwrfsat.global.0p25<wbr>.f024.nc</a>&quot;,&quot;r&quot;)</div><div>vNames = getfilevarnames (f1)</div><div><br></div><div>; There is only one variable in the file, param7.5.0. GOES13 has 4 channels, then F17 SMIS had 7 channels, then SEVIRI has 7 channels, total 18 fields,</div><div>; NCL interprets as multiple times</div><div>; Read GOES_13 Channel 4, lat and lon</div><div>; Lat2d has 721 values, from 90 to -90, with 0.25 deg intervals</div><div>; Lon2d has 1440 values, from 0 to 359.75, with 0.25 deg intervals</div><div>vname = &quot;param7.5.0&quot; </div><div>f1_goes4  =  f1-&gt;$vname$(2,:,:)</div><div>lat2d = f1-&gt;lat</div><div>lon2d = f1-&gt;lon</div><div><br></div><div>; Navigate forecast data so it is associated with 2D lat-lon arrays</div><div>f1_goes4@lon2d=conform_dims((/<wbr>721,1440/),lon2d,1)</div><div>f1_goes4@lat2d=conform_dims((/<wbr>721,1440/),lat2d,0)</div><div><br></div><div>; Replace NaN with -999</div><div>f1_goes4=where(isnan_ieee(f1_g<wbr>oes4) .eq. True, -999., f1_goes4)</div><div><br></div><div>; ******************************<wbr>***********************8</div><div>; Find corners of forecast data - in this case it is a global dataset</div><div>f1_min_lat=min(lat2d)</div><div>f1_max_lat=max(lat2d)</div><div>f1_min_lon=min(lon2d)</div><div>f1_max_lon=max(lon2d)</div><div><br></div><div>; ******************************<wbr>******************************<wbr>**</div><div>; Create lat/lon arrays for output grid. Assign attributes</div><div>merge_lat=fspan(f1_min_lat+90,<wbr>f1_max_lat, 45)</div><div>merge_lon=fspan(f1_min_lon+260<wbr>,f1_min_lon+290,30)</div><div><br></div><div>merge_lat@units = &quot;degrees_north&quot;</div><div>merge_lat@standard_name = &quot;latitude&quot;</div><div>merge_lat@long_name = &quot;latitude&quot;</div><div>merge_lon@units = &quot;degrees_east&quot;</div><div>merge_lon@standard_name = &quot;longitude&quot;</div><div>merge_lon@long_name = &quot;longitude&quot;</div><div><br></div><div>;*****************************<wbr>******************************<wbr>****</div><div>; regrid forecast</div><div> print (&quot;Start regridding of forecast&quot;)</div><div><br></div><div>skip=1</div><div>regrid_f1=linint2(lon2d(::skip<wbr>),lat2d(::-skip),f1_goes4(::-<wbr>skip,::skip),False,merge_lon,<wbr>merge_lat,0)</div><div><br></div><div>regrid_f1@merge_lat=merge_lat</div><div>regrid_f1@merge_lon=merge_lon</div><div><br></div><div><br></div><div>; ******************************<wbr>***********************8</div><div>;---Plot forecast regridded data</div><div>  wks = gsn_open_wks(&quot;png&quot;,&quot;sat_hwrf_r<wbr>egridded&quot;)</div><div>  res              = True</div><div>  res@gsnMaximize  = True     ; maximize plot in frame</div><div>  res@cnFillOn     = True     ; turn on contour fill</div><div>  res@cnLinesOn    = False    ; turn off contour fill</div><div>  res@tiMainString = &quot;forecast&quot;</div><div><br></div><div>  plot = gsn_csm_contour_map(wks,regrid<wbr>_f1,res)</div><div><br></div></div><div><br></div><div><br></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>