<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>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.</div><div dir="ltr"><br></div><div dir="ltr">varname = "Population Density, v4.11 (2000, 2005, 2010, 2015, 2020): 15 arc-minutes"<br><div class="gmail_quote"><div class="gmail_attr">pop = f->$varname$</div><div class="gmail_attr"><br></div><div class="gmail_attr">See the NCL reference manual:</div><div class="gmail_attr"><a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#FileStringRef">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#FileStringRef</a><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Tue, Sep 24, 2019 at 10:15 AM Zheng Lu via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, dear NCL group,<div><br></div><div>I am working on a nc file with a variable name: "Population Density, v4.11 (2000, 2005, 2010, 2015, 2020): 15 arc-minutes"...</div><div>How do I assign this variable to an array? Many thanks in advance!</div><div><br></div><div>Cheers,</div><div><br></div><div>Zheng</div></div></blockquote></div></div></div></div></div>