<div dir="ltr"><div><div>Hi all, <br></div>Thanks a lot for your help. But I have one more doubt. I ran the script attached by Dennis (Both without any regridding, and with bin_avg), but the maximum value of Longwave_Flux_TOA is coming more than 1200 both the cases, where as the data definition is saying the range of the value is (0 to 500). Why is it so? <br><br></div><div>Thanks,<br></div><div>Ipsita<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 11:12 PM, Dave Allured - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@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">Ipsita et al,<div><br></div><div>I think you can plot this swath data directly, without regridding.  This would require conforming arrays of 2-dimensional latitudes and longitudes.  But guess what?  That&#39;s what we figured out two days ago.   ;-)</div><div><br></div><div>If this works, I think the plot would look better and plot faster.  Sorry I did not think of this sooner.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>--Dave</div></font></span><div><div class="h5"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 7:46 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">Attached is a script that uses ESMF to regrid. Generating the weights is a bit slow. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 12:59 AM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</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><div><div><div><div>Hi Mary,<br></div> If I plot in &quot;RasterFill&quot; mode then only the plot is appearing, not even I set &quot;AreaFill&quot; or &quot;CellFill&quot;.<br></div>The plot is appearing something like fractured, not a smoothed one (even though I put smoothing), I don&#39;t know why it is like so.<br></div><br></div>Thanks in advance,<br></div>Ipsita<br></div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560HOEnZb"><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 11:34 AM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</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><div>Hi Mary,<br></div> I have uploaded my data file with my scripts through ftp.<span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197HOEnZb"><font color="#888888">Ipsita<br></font></span></div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197HOEnZb"><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 2:51 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>IMHO: The script is working correctly. However, there is a mismatch between the <br></div><div>the user&#39;s VERY high resolution (0.15 degrees) &#39;target grid&#39; and the resolution of the swath data points.<br><br>re:<br><br> nlat=1200<br> nlon=2400<br><br></div><div>defines a grid with spacing 0.15 degrees. VERY high resolution<br><br>====<br><br></div><div>I have no idea what the rationale for the &#39;400&#39; used for GBIN and GKNTwas based upon.<br><br> GBIN  = new ( (/400,nlon/), float ) <br> GKNT = new ( (/400,nlon/), integer )<br><br>=====<br><br></div><div>The binning algorithm looks at each swath lat/lon location. It finds the target grid box that &#39;surrounds&#39;  the current swath lat/lon location.<br><br></div><div>If there are target grid boxes which do not surround the swath grid poins, then they are returned as missing (_FillValue). Hence, the &#39;fractured&#39; look of the plot.<span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047HOEnZb"><font color="#888888"><div>D<br></div><div><br></div><div><br></div><div><br></div><br></font></span></div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047HOEnZb"><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 2:52 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@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 style="font-size:small">Hi Ipsita,</div><div style="font-size:small"><br></div><div style="font-size:small">I&#39;m not sure what you mean by &quot;<span style="font-size:12.8px"> </span><span style="font-size:12.8px">even though the plot is not coming with a clear contours.</span><span style="font-size:12.8px"> &quot;</span></div><div style="font-size:small"><br class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491gmail-Apple-interchange-newline"><span style="font-size:12.8px">The plot you included doesn&#39;t look particularly wrong, so can you explain what you were expecting?</span><span style="font-size:12.8px"><br></span></div><div style="font-size:small"><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">The script you attached does not include any plotting code, so I can&#39;t help you much there. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Can you be more specific about the problem?  Also, it would really help if you can provide the data and the plotting script in the usual way (ftp).</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">--Mary</span></div><div><span style="font-size:12.8px"><br></span></div><div style="font-size:small"><p class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491gmail-p1"><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491gmail-s1"></span></p><p class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491gmail-p1"><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491gmail-s1"><br></span></p></div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991h5">On Thu, Jul 13, 2017 at 7:04 AM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</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="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991h5"><div dir="ltr"><div><div>Thank you Dave for your suggestions. I tried to plot the data, but it is coming only if I plot setting resource &quot;RasterFill&quot;, and even though the plot is not coming with a clear contours. Don&#39;t know where I am making mistake. I tried to regrid the data using &quot;triple2grid&quot; but then all the values are coming undefined. I am attaching herewith my script and the figure I have got after plotting. Any help will be appreciated.<br></div>Thanks in advance.<span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491HOEnZb"><font color="#888888"><br>Ipsita<br><div><div> <br></div></div></font></span></div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491HOEnZb"><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 4:19 AM, Dave Allured - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@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">Ipsita,<div><br></div><div>This HDF5 file has coordinate arrays Colatitude and Longitude.  The units of each are degrees, not pixels.  However, please notice two anomalies:</div><div><br></div><div>1.  The coordinates are packed with an unusual scale/offset packing scheme.  The packing parameters are in attributes Scale_Factor and Add_Offset, which are not CF standard attributes.  However, the intent is fairly clear.  To unpack each coordinate value, just multiply by the Scale_Factor.</div><div><br></div><div>The Add_Offset&#39;s are zero in this case, and can therefore be ignored.  That is good, so that we do not have to worry about whether the offset would be applied before or after the scale factor.</div><div><br></div><div>This will produce colatitudes in the normal range 60 to 120 degrees, and longitudes in the normal range 0 to 360 degrees.</div><div><br></div><div>2.  I assume that the colatitudes conform to the current definition on Wikipedia.  You might confirm this with the data provider, if you wish.  This definition is the number of degrees southward from the north pole.  The colatitude values unpacked are in the range 60 to 120 degrees, which translate to 30 north to 30 south in normal latitude units.</div><span class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491m_-8847643633996458601HOEnZb"><font color="#888888"><div><br></div><div>--Dave</div></font></span><div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491m_-8847643633996458601h5"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 12:08 AM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</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>The Latitude (here Colatitude) and Longitude data are in pixels which is -30 to 30 degree and 0 to 360 degree. Please find the file I am attaching herewith.<br><br></div>Ipsita<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 11, 2017 at 10:30 PM, Dave Allured - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@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"><span><span style="font-size:14px">Ipsita,</span><div style="font-size:14px"><br></div><div style="font-size:14px">How is your input data georeferenced?  Does the input file include coordinate variables?  That is the most common way to get lats and lons for individual pixels.</div><div style="font-size:14px"><br></div><div style="font-size:14px">--Dave</div></span><div style="font-size:14px">(Please reply to the mailing list.)</div><div style="font-size:14px"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Jul 11, 2017 at 12:22 AM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</a>&gt;</span> wrote:<br></span><div><div class="m_-1386369403150134480m_6008490276185770763m_3207157367110282560m_-4341290614849875197m_1287055269728520047m_4543180856295051991m_5516225559601494491m_-8847643633996458601m_965789795611814915m_-8075799568858523074m_7855867607137495160h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear NCL users,<br></div>  I need help in converting pixels to Lat/Lon grid. Is there any function or way in ncl for doing this operation? Please suggest.<br><br></div>Thanks in advance,<br></div>Ipsita</div></blockquote></div></div></div></div></div></blockquote></div></div></blockquote></div></div></div></div></div>
</blockquote></div><br></div>
</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>
<br>______________________________<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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<br>______________________________<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></div></div></div>
</blockquote></div><br></div>