<div dir="ltr">Hi everyone,<div><br></div><div>So I am having a trouble understanding a part of a script for reading CSV file. </div><div><br></div><div>I have been having a hard time getting this script to work, because I am not sure how to correctly write the highlighted part of the script. </div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">begin</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">filename = "example2.csv"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">lines = asciiread(filename,-1,"string")</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">delim = ","</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">name = str_get_field(lines,1,delim)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">group = tointeger(str_get_field(lines,5,delim)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">size = tofloat(str_get_field(lines,9,delim)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,217,102)">print("Name is'" + name + "', group is " + group + ", size is " + size)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,217,102)">end</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">I am not sure what </font></span><font color="#000000"><font face="Menlo" style="font-size:11px"><span style="background-color:rgb(255,217,102)">print("Name is'" + name + "', group is " + group + ", size is " + size)</span></font><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)"><span style="font-size:11px"> </span>indicates... What is the difference between "Name is"' + name. With an actual value put in, what should this script actually look like? </span></font></font></div><div><font color="#000000"><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></font></font></div><div><font color="#000000"><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)">Thanks so much for your help.</span></font></font></div><div><font color="#000000"><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></font></font></div><div><font color="#000000"><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)">Sincerely,</span></font></font></div><div><font color="#000000"><font face="arial, helvetica, sans-serif"><span style="background-color:rgb(255,255,255)">Grace</span></font></font></div></div>