<div dir="ltr"><div class="gmail_default" style="font-size:small">FYI, I have renamed the "nasa_ndvi" color map to NOC_ndvi:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Document/Graphics/ColorTables/NOC_ndvi.shtml">http://www.ncl.ucar.edu/Document/Graphics/ColorTables/NOC_ndvi.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">We have added 29 color maps for V6.5.0, see:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/future_release.shtml#NewColorTables6.5.0">http://www.ncl.ucar.edu/future_release.shtml#NewColorTables6.5.0</a><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 23, 2018 at 4:11 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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"><div><div><div><div>Forgot to mention. NCL has an 'NDVI' page:<br><br><a href="https://www.ncl.ucar.edu/Applications/" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/</a><br><br></div>Under '<b>Datasets</b>', Click <b>NDVI<br><br><a href="https://www.ncl.ucar.edu/Applications/ndvi.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/ndvi.shtml</a><br><br></b>===<br></div>Further, there will be some <b>NDVI related colormaps in the next NCL release: 6.5.0<br><br></b>See: <a href="https://www.ncl.ucar.edu" target="_blank">https://www.ncl.ucar.edu</a><b>/<wbr>future_release</b>.shtm<b>l<br><br></b></div>Click "<b>New Color Tables</b>"<b><br><br></b></div>For example:<br><div><p>
The <a href="https://www.ncl.ucar.edu/Document/Graphics/ColorTables/nasa_ndvi.shtml" target="_blank">nasa_ndvi color map</a>
comes from NASA's <a href="https://oceancolor.gsfc.nasa.gov/" target="_blank">Ocean Color</a> website.
</p><p>
The <a href="https://www.ncl.ucar.edu/Document/Graphics/ColorTables/vegetation_ClarkU.shtml" target="_blank">vegetation_ClarkU
color map</a> was contributed by <a href="https://clarklabs.org" target="_blank">Clark Labs</a> /
<a href="http://www.clarku.edu" target="_blank">Clark University</a>. <br></p><p><br></p><p><br></p></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 23, 2018 at 3:22 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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"><div><div><div><div><div><div><div><div><div>Hi Amy,<br><br>The Climate Data Operators (CDO) can be used to convert a binary file to netCDF. The command is described at:<br><br><a href="https://www.ncl.ucar.edu/Applications/grads.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/grads.shtml</a><br><br>%> cdo -f nc import_binary ndvip.ctl <a href="http://NDVI.polar_82-17.nc" target="_blank">NDVI.polar_82-17.nc</a><br><br>cdo import_binary: Processed 1 variable ( 1.27s )<br>------------------------------<wbr>------------------------------<wbr>----------<br></div><div>This has a 'minor' problem. <br><br>The file contains the following which looks good!<br><br> float ndvi(time, lat, lon) ;<br> ndvi:long_name = "normalized difference vegetation index" ;<br> ndvi:<b>_FillValue = -999.f </b>;<br> ndvi:<b>missing_value = -999.f </b>;<br><br>However, if we observe <b>the golden rule of data processing: <span style="color:rgb(0,0,255)">Look at your data</span></b><br><br>%> ncdump -v ndvi <a href="http://NDVI.polar_82-17.nc" target="_blank">NDVI.polar_82-17.nc</a> | less <br><br>You will see the the actual _FillValue and missing_value should be <b>-0.0999<br><br></b><b>ndvi </b>=<br> <b>-0.0999</b>, -0.0999, -0.0999, -0.0999, -0.0999, -0.0999, -0.0999, -0.0999,<br></div><div>[SNIP]<br><br></div><div>From and NCL perspective, this is readily addressed:<br><br></div><div> f = addfile("<a href="http://NDVI.polar_82-17.nc" target="_blank">NDVI.polar_82-17.nc</a>", "r")<br></div><div> ndvi = f->ndvi<br></div><div> ndvi@_FillValue = -0.0999 ; change to correct _FillValue<br></div><div> printVarSummary(ndvi)<br><br></div><div>You could also use the netCDF Operator's attribute editor: <br><h3 class="m_5663127457334884677m_1104232920348686062gmail-r"><a href="https://linux.die.net/man/1/ncatted" target="_blank">ncatted</a></h3> </div><div>to change the values on the file.<br></div><div>------------------------------<wbr>------------------------------<wbr>-----------<br></div>The files [~ 291 MB] created by the CDO [ <a href="http://NDVI.polar_82-17.nc" target="_blank">NDVI.polar_82-17.nc</a> ] and NCL [ <a href="http://polar_82-17_MaxNDVI3g.grd.NCL.nc" target="_blank">polar_82-17_MaxNDVI3g.grd.NCL.<wbr>nc</a> ] are at:<br><br></div>ftp <a href="http://ftp.cgd.ucar.edu" target="_blank">ftp.cgd.ucar.edu</a><br></div>anonymous<br></div>your_email<br></div>cd pub/shea<br></div>get <a href="http://NDVI.polar_82-17.nc" target="_blank">NDVI.polar_82-17.nc</a><br></div><div>get <a href="http://polar_82-17_MaxNDVI3g.grd.NCL.nc" target="_blank">polar_82-17_MaxNDVI3g.grd.NCL.<wbr>nc</a><br></div>quit<br>==============================<wbr>=============<br><br></div><div>They are functionally equivalent<br></div><div>&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&<wbr>&&&&&&&&<br>==============================<wbr>==============<br></div>The NCL script you sent had an error or two. The .ctl file had:<br><br><div>[1] the .ctl pointed to<br><br> DSET ^polar82-<b>16</b>_maxndvi_dat.grd<br><br></div><div>The file you sent was named: polar_82-17_MaxNDVI3g.grd<br></div><div>The .ctl should point to:<br><br></div><div> DSET ^polar_82-<b>17</b>_MaxNDVI3g.grd<br><br>====<br></div><div>The file you sent has size:<br><br>299220480 May 22 22:25 polar_82-17_MaxNDVI3g.grd<br><br></div><div>nlat(=481)*mlon(=4320)*ntim(=3<wbr>6)*nbyte(=4) = 299220480<br><br></div><div>This means the the file has no 'extra' embedded bytes.<br></div><div>Fortran's sequential binary files have record boundaries. They add to the size of the file.<br><br></div><div>This means that you should be using NCL's 'fbindirread' function.<br><br> <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fbindirread.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/fbindir<wbr>read.shtml</a><br><br></div><div>and not 'fbinrecread' function.<br><br></div><div>See attached.<br><br></div><div>Good Luck<br><br></div><div><br></div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_5663127457334884677h5">On Tue, May 22, 2018 at 7:05 PM, Amy Hendricks <span dir="ltr"><<a href="mailto:ashendricks@alaska.edu" target="_blank">ashendricks@alaska.edu</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_5663127457334884677h5"><div dir="ltr">Hell NCL heroes,<div><br></div><div>I am trying to read in ndvi data in .grd format and convert to netcdf. The problem occurs when I go to read in the ndvi data. This script is modified from grads_2.ncl (<a href="https://www.ncl.ucar.edu/Applications/Scripts/grads_2.ncl" target="_blank">https://www.ncl.ucar.edu/Appl<wbr>ications/Scripts/grads_2.ncl</a>). Please find attached the script, data, and ctl file. The ctl file is an example from my advisor, only the DSET and # of years are different. </div><div><br></div><div>Thanks!</div><div><br></div><div>Amy<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/a/alaska.edu/file/d/1gfTy4cedHoVucV-YEan0Ph7NES9FfsMM/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">ndvip.ctl</span></a><img style="opacity:0.55;float:right;display:none"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/a/alaska.edu/file/d/1DNzWno-3WmFqINZBY-ENH7nnMn0lsGvf/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">polar_82-17_MaxNDVI3g.grd</span></a><img style="opacity:0.55;float:right;display:none"></div><span class="m_5663127457334884677m_1104232920348686062HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_5663127457334884677m_1104232920348686062m_502355603394498512gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amy Hendricks</div>Graduate Research Assistant<div><div>Department of Atmospheric Sciences<br><div>University of Alaska Fairbanks</div><div>IARC 343-R</div><div>907-388-9893</div><div><a href="mailto:ashendricks@alaska.edu" target="_blank">ashendricks@alaska.edu</a></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><br></div>
</blockquote></div><br></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>