<div dir="ltr"><div><div><div><div><div><div>Andrew <br><br>I looked at the script and the file. <br>The script is a bit 'busy.'  There is a lot of not needed code. This makes the task tedious.</div><div><br>I  ran the script a with two minor changes: <br>(a) file path<br>(b) manually set the date<br><br>==<br></div><div>ANSWER: reorder the dimension of the variable to be regridded<br><br>REPLACE<br>  <b>t_regrid = ESMF_regrid(<span style="color:rgb(255,0,0)">t(0,:)</span>,Opt)<br><br></b>WITH<br> <b> t_regrid = ESMF_regrid(<span style="color:rgb(255,0,0)">t(HAMSR_levels|:, time|:)</span>,Opt  </b>       ; reorder the variable<b><br></b>===<br></div><div>printVarSummary(<b>t_regrid</b>)<br><br>Variable:<b> t_regrid</b><br>Type: float<br>Total Size: 62400 bytes<br>            15600 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    <b>[HAMSR_levels | 25] x [lat | 12] x [lon | 52]   <span style="color:rgb(0,0,255)"><== gridded data</span></b><br><b>Coordinates: <br>            lat:  [28.3080005645752..29.<wbr>79000091552734]<br>            lon: [269.6179809570312..275.<wbr>9960021972656]</b><br></div><div><br>;+++++++++++++++++++++++++++++<wbr>++++++++++++++++++++++++++++++<wbr>++<br></div><div>;                OTHER comments<br></div><div>;+++++++++++++++++++++++++++++<wbr>++++++++++++++++++++++++++++++<wbr>++<br></div><div><br></div>[1] A comment on the file. <br><br>%> ncdump -v time HAMSR_L2DB_realtime_20161005T2<wbr>100_20161005T2200.nc | less<br><br>netcdf HAMSR_L2DB_realtime_20161005T2<wbr>100_20161005T2200 {<br>dimensions:<br>        HAMSR_levels = 25 ;<br>        time = 1197 ;<br>variables:<br>        double <b>time</b>(<b>time</b>) ;  <br>                time:units = "seconds" ;<br>                time:comment = "seconds since 2000-01-01 00:00:00.0" ;<br>                time:scale_factor = 1. ;<br>                time:long_name = "Measurement time" ;<br><br></div><div>Almost universally, when a netCDF file contains a variable with  a structure such as: time(time)   <br>[ latitude(latitude), etc]., it is assumed to be a <b>coordinate variable</b>. What is a <b>coordinate variable?</b></div><div><br></div>Specifically, by netCDF convention, a <b>coordinate variable is </b>a one-dimensional variable in which<br>the variable name and variable dimension are the same <br><span style="color:rgb(255,0,0)"><b>*AND*</b></span> <br>the values are monotonically {in/de}creasing<b>.</b><br><br>   See: <a href="https://www.unidata.ucar.edu/software/netcdf/workshops/2011/datamodels/NcCVars.html" target="_blank">https://www.unidata.ucar.edu/s<wbr>oftware/netcdf/workshops/2011/<wbr>datamodels/NcCVars.html</a><br><br></div>Obviously, the time values on the file are *not* monotonic.  Technically,  there is nothing wrong with <b>time(time)</b>. <br>However, in practice, I strongly suggest that this not be done.<br><br></div>The file creator should simply <br><br>CHANGE<br></div><div>     time(time)<br></div><div>TO<br></div><div>     TIME(time)<br><br>=======<br></div><div>CODING: There are lots of things I do not understand ... why<br>========<br>time@units = "seconds since 2000-01-01 00:00:00.0"    ; why ?<br><br>lev := lev(0:24)                     <wbr>                    ; why ?<br>t@units = "K"                           <wbr>                 ; why ?<br><br>t@_FillValue = -999                          <wbr>        ; why ?<br>q@_FillValue = -999                          <wbr>       ; why<br>time@_FillValue = -999                          <wbr>   ; No! Should not be done.<br><br>; first filter out dates which are -nan (undefined) in the original dataset<br>good_data=ind(<span style="color:rgb(0,0,255)"><b><a href="http://time.ne" target="_blank">time.ne</a>."-nan"</b></span>) <wbr>                           ; No! Will not work<br></div><div>                              <wbr>                              <wbr>                   ; use:<b> isnan_ieee</b><br></div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/isnan_ieee.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>isnan_ieee.shtml</a><br></div> <br></div><div>I'll stop there.<br></div>Good Luck</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 29, 2018 at 11:56 AM, Anil Kumar - NOAA Affiliate <span dir="ltr"><<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It should work actually. Are you reading a variable in correct order of dimensions? You mention (lev, time) and your data looks (time, lev). please check.<div>Maybe some reading issue of file data...</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Anil</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 29, 2018 at 1:38 PM, Andrew Kren - NOAA Affiliate <span dir="ltr"><<a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Anil. I tried a few additions from your code but still ran into issues. It is still giving me the same error.</div><div class="m_-2698582552924143679HOEnZb"><div class="m_-2698582552924143679h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 29, 2018 at 1:14 PM, Anil Kumar - NOAA Affiliate <span dir="ltr"><<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Andrew,<div>I did similar thing to regrid unstructed data on to wrf grid (<a href="http://geo_em_d01.nc" target="_blank">geo_em_d01.nc</a>)  here is the code and worked successfully with ncl 6.4 version. </div><div>Hope this help. </div><div><br></div><div>




<span></span>





<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">src_file = "<a href="http://maxele.63.nc" target="_blank">maxele.63.nc</a>"</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>sfile = addfile(src_file,"r")</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">;printVarSummary(sfile)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>lat1D = sfile->y</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>lon1D = sfile->x</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>var = sfile->zeta_max(0,:)   ; zeta is function of time and variable. </span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>dst_file = "<a href="http://geo_em.d01.nc" target="_blank">geo_em.d01.nc</a>"</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space"> </span>dfile<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>= addfile(dst_file,"r")</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">;---Set up regridding options</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">                </span>= True</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">;---"bilinear" is the default. "patch" and "conserve" are other options.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@InterpMethod <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>= "neareststod"<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">        </span>;;---Change (maybe)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@WgtFileName<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= "<a href="http://unstruct_to_rect.nc" target="_blank">unstruct_to_rect.nc</a>"</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@SrcGridLat <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= lat1D</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@SrcGridLon <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= lon1D</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@SrcRegional<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= False<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">            </span>;;--Change (maybe)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@SrcInputFileName = src_file<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">          </span>; optional, but good idea</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@SrcMask2D<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">        </span>= where(.not.ismissing(var),1,0) ; Necessary if has</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">                                                          </span>; missing values.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>dst_lat<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">              </span>= dfile->XLAT_M(0,:,:)<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>; Be sure to use appropriate names</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>dst_lon<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">              </span>= dfile->XLONG_M(0,:,:) <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">  </span>; here.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@DstGridLon <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= dst_lon</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@DstGridLat <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= dst_lat</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@DstRegional<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">      </span>= True<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">            </span>;;--Change (maybe)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@DstMask2D = where(.not.ismissing(dst_lat).<wbr>and.\</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures">;<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">                          </span>.not.ismissing(dst_lon),1,0) ; Necessary if lat/lon</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">                                                      </span>; has missing values.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">                                                      </span>; has missing values.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@ForceOverwrite <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">  </span>= True</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@Debug<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">            </span>= True</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>Opt@PrintTimings <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>= True</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>var_regrid = ESMF_regrid(var,Opt) <span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>; Do the regridding</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-Apple-converted-space">    </span>printVarSummary(var_regrid)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>


<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-2698582552924143679m_-4177365754719978128h5">On Fri, Jun 29, 2018 at 11:56 AM, Andrew Kren - NOAA Affiliate <span dir="ltr"><<a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a>></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="m_-2698582552924143679m_-4177365754719978128h5"><div dir="ltr">Dear ncl-talk,<div><br></div><div>I'm trying to regrid from an unstructured grid of temperature and moisture retrievals from an aircraft. The data are a function of (lev,time), with each time corresponding to a different lat/lon location. I wrote some code to regrid to a triangular mesh using ESMF, but ran into some issues. I got this error:</div><div><br></div><div>




<span></span>





<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>get_src_grid_info: source lat dims = (14398)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>get_src_grid_info: source lon dims = (14398)</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>get_src_grid_info: SrcGridType and/or SrcGridLat/SrcGridLon were not set.</span></p>
<p class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-Apple-tab-span" style="white-space:pre-wrap">        </span><span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail-Apple-converted-space">          </span>Cannot determine the source grid type.</span></p>


<div><br></div>I have attached my code and a sample file it reads. I am confused b/c I am setting the SrcGridLat and Lon explicitly. </div><div><br></div><div>Thanks,<span class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473m_-7136850941613557202gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Andrew Kren<br>Assistant Scientist<br>CIMAS - NOAA/AOML<br><span><font color="#888888">314-322-0867</font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></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><span class="m_-2698582552924143679m_-4177365754719978128HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-2698582552924143679m_-4177365754719978128m_1178540729522149473gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Dr. Anil Kumar<div><span style="font-size:12.8px">NWS/NCEP/EMC, </span>Office# 2875</div><div><span style="font-size:12.8px">NOAA Center for Weather and Climate Prediction (NCWCP)</span></div><div><a href="https://maps.google.com/?q=5830+UNIVERSITY+RESEARCH+CT+College+Park,+MD+20740&entry=gmail&source=g" target="_blank">5830 UNIVERSITY RESEARCH CT</a></div><div><a href="https://maps.google.com/?q=5830+UNIVERSITY+RESEARCH+CT+College+Park,+MD+20740&entry=gmail&source=g" target="_blank">College Park, MD 20740</a>-3818</div><div>301-683-0494</div><div><a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a></div><div><br></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-2698582552924143679m_-4177365754719978128gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Andrew Kren<br>Assistant Scientist<br>CIMAS - NOAA/AOML<br><span><font color="#888888">314-322-0867</font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-2698582552924143679gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Dr. Anil Kumar<div><span style="font-size:12.8px">NWS/NCEP/EMC, </span>Office# 2875</div><div><span style="font-size:12.8px">NOAA Center for Weather and Climate Prediction (NCWCP)</span></div><div>5830 UNIVERSITY RESEARCH CT</div><div>College Park, MD 20740-3818</div><div>301-683-0494</div><div><a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a></div><div><br></div></div></div></div></div></div></div>
</div>
</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>