[ncl-talk] very long variable name with space and special characters

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Sep 24 11:58:57 MDT 2019


Use NCL string referencing.  You can use this for variable and attribute
names inside Netcdf files, but you can not use this for names of variables
in NCL memory.  Memory variables have name restrictions, so you must rename
when you read such variables into memory.

varname = "Population Density, v4.11 (2000, 2005, 2010, 2015, 2020): 15
arc-minutes"
pop = f->$varname$

See the NCL reference manual:
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#FileStringRef


On Tue, Sep 24, 2019 at 10:15 AM Zheng Lu via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hi, dear NCL group,
>
> I am working on a nc file with a variable name: "Population Density, v4.11
> (2000, 2005, 2010, 2015, 2020): 15 arc-minutes"...
> How do I assign this variable to an array? Many thanks in advance!
>
> Cheers,
>
> Zheng
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190924/572e16b7/attachment.html>


More information about the ncl-talk mailing list