[ncl-talk] _FillValue directly from a file variable

Toni Klemm toni-klemm at tamu.edu
Mon Sep 10 14:47:27 MDT 2018


Hi Mateus,

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 

ncdump -h file/path/and/filename.nc

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.

Hope that helps,
Toni


Toni Klemm, Ph.D.
Postdoctoral Research Associate
Department of Ecosystem Science and Management
College of Agriculture and Life Sciences
Texas A&M University, College Station, TX
Contributor to the Early Career Climate Forum <http://www.eccforum.org/>
www.toni-klemm.de <http://www.toni-klemm.de/> | @toniklemm <http://twitter.com/toniklemm>








> On Sep 10, 2018, at 3:34 PM, Mateus da Silva Teixeira <mateusstex at gmail.com> wrote:
> 
> Hi,
> 
> Is there a way to get _FillValue attribute from a file variable without loading that variable?
> 
> I found getFillValue function, but I think it won't work like I expect. Also, function getfilevaratts only gives a list of the attributes. I would like to directly access the content of this attribute.
> 
> Thanks,
> 
> Mateus
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180910/df6bfa94/attachment.html>


More information about the ncl-talk mailing list