[ncl-talk] _FillValue directly from a file variable
Mateus da Silva Teixeira
mateusstex at gmail.com
Mon Sep 10 14:57:08 MDT 2018
Hi Toni,
Thank you for your reply.
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.
Thanks,
mateus
Em seg, 10 de set de 2018 às 17:47, Toni Klemm <toni-klemm at tamu.edu>
escreveu:
> 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 | @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/d2a33bd5/attachment.html>
More information about the ncl-talk
mailing list