<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_goes4(<wbr>::-skip,::skip),False,merge_<wbr>lon,merge_lat,0)<br></div>printVarSummary(regrid_f1)</div><div class="gmail_extra"><br><div class="gmail_quote">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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/<wbr>nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</div><div><br></div><div>; Read forecast file</div><div>f1 = addfile(&quot;/mnt/lfs2/projects/<wbr>dtc-hurr/Ligia.Bernardet/Sat_<wbr>verif/Ligia_sat_prep/<a href="http://gonzalo08l.2014101412.hwrfsat.global.0p25.f024.nc" target="_blank">gonzalo08<wbr>l.2014101412.hwrfsat.global.<wbr>0p25.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_<wbr>goes4) .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+<wbr>260,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(::<wbr>skip),lat2d(::-skip),f1_goes4(<wbr>::-skip,::skip),False,merge_<wbr>lon,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_<wbr>regridded&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,<wbr>regrid_f1,res)</div><div><br></div></div><div><br></div><div><br></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>