<div dir="ltr"><div><div><div><div>Hi Toni,<br><br></div>Thank you for your reply.<br><br></div>Sorry for not being more specific. Actually, I have more than 30 GRIB 1/2 files and I would like to define a single variable (with new function) to hold data from all files. Part of these files are in GRIB 1 format and other part is in GRIB 2. Also, variable name changes from GRIB 1 to GRIB 2 format, even the files coming from same source (GFS ANL). So, I want, after working with these differences, to put all data into the same array.<br><br></div>Thanks,<br><br></div>mateus<br><br></div><br><div class="gmail_quote"><div dir="ltr">Em seg, 10 de set de 2018 às 17:47, Toni Klemm <<a href="mailto:toni-klemm@tamu.edu">toni-klemm@tamu.edu</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Mateus,<div><br></div><div>I imagine there are more elegant ways, but if you don’t have too many files (or if they have the same variable type (int, float, …), you can run the command </div><div><font face="Courier"><br></font></div><div><font face="Courier">ncdump -h file/path/and/<a href="http://filename.nc" target="_blank">filename.nc</a></font></div><div><br></div><div>which will give you the metadata to each variable, and copy-paste the _FillValue value of your variable directly into your NCL script. Another way is to view the file in a viewer like Panoply and get the _FillValue that way.</div><div><br></div><div>Hope that helps,</div><div>Toni</div><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;line-break:after-white-space"><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br class="m_8309689789431859241Apple-interchange-newline"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><b>Toni Klemm, Ph.D.<br></b>Postdoctoral Research Associate</font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Ecosystem Science and Management</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">College of Agriculture and Life Sciences</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Texas A&M University, College Station, TX</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri">Contributor to the <a href="http://www.eccforum.org" target="_blank">Early Career Climate Forum</a><br><a href="http://www.toni-klemm.de" target="_blank">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" target="_blank">@toniklemm</a></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div></div></div><br class="m_8309689789431859241Apple-interchange-newline"></div><br class="m_8309689789431859241Apple-interchange-newline"></div><br class="m_8309689789431859241Apple-interchange-newline"></div><br class="m_8309689789431859241Apple-interchange-newline"><br class="m_8309689789431859241Apple-interchange-newline">
</div>
<div><br><blockquote type="cite"><div>On Sep 10, 2018, at 3:34 PM, Mateus da Silva Teixeira <<a href="mailto:mateusstex@gmail.com" target="_blank">mateusstex@gmail.com</a>> wrote:</div><br class="m_8309689789431859241Apple-interchange-newline"><div><div dir="ltr"><div><div><div><div>Hi,<br><br></div>Is there a way to get _FillValue attribute from a file variable without loading that variable?<br><br></div>I found <i>getFillValue</i> function, but I think it won't work like I expect. Also, function <i>getfilevaratts</i> only gives a list of the attributes. I would like to directly access the content of this attribute.<br><br></div>Thanks,<br><br></div>Mateus<br><br></div>
_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></blockquote></div>