<div dir="ltr"><div>Hi Melanie,</div><div><br></div><div>I am not sure what was used to "tabulate the data".  The '<b>npp_edited.csv</b>" file is inconsistent in structure.</div><div><br></div><div>The following comments are extracted from the attached NCL script: <b>npp_read2nc.ncl</b><br></div><div>---</div><div>; The csv file is rather 'odd' from a USA point of view. <br>; It uses the European' approach to represent numbers.<br>; Specifically, a comma is used to separate the integral part of a number <br>; from the decimal part. <br>;<br>; There are three issues:<br>; [1] A comma [ , ] is used as BOTH a value/fiel  separator AND a decimal point.<br>; [2] There is a lack of consistency in the csv file.<br>;     Most values are enclosed with double-quotes [ " ]. <br>;     Unfortunately, some are not !!!<br>; [3] A string  ["#VALOR!"] is used to denote a missing (_FillValue). <br>;<br>; Sample CSV:<br>;  "Month","Latitude","Longitude","NPP"<br>;  "3","38,78","-72,27","321,3"           <=== 7 fields separated by a , and enclosed within "<br>;  "3","38,78","-72,27","335,4372"<br>;  "3","38,78","-72,27","698,908"<br>;  "6","21,2","-158","#VALOR!"            <=== ?missing value?<br>;  "5","-9",-25,"-15,3542161160713"       <=== 5 fields    integer -25 has no "<br>;  "10","41,17","-66,17",-318             <=== 6 fields    integer -318 has no "<br>;  "4","40","-71,96","-777,25"            <=== 6 fields    integer 40 has no "<br>;  "7","39,84","-72","92,5764"            <=== 6 fields    <br>;  "11",-11,-25,"23,7089369952225"        <=== 5 fields    integer -11 and -25 have no "</div><div>;<br></div><div>; The CSV file must be edited the address the above issues. ;<br></div><div>=========</div><div><br></div><div>A number of edits were performed and the file was recreated as a netCDF file.</div><div><br></div><div>%> ncl <b>npp_read2nc.ncl</b></div><div><br></div><div>This creates the <b>NPP_EDITED.nc </b>file</div><div>---</div><div>The following reads the <b>NPP_EDITED.nc </b>file and calculates the averages.</div><div><br></div><div>%> ncl <b>npp_stats.ncl</b><br></div><div><br></div><div>This creates the <b>NPP_AVG.nc </b>file</div><div><br></div><div>Good luck<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 12, 2020 at 12:01 PM Melanie O' hanoly via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Guys<div><br></div><div>I have this tabulated data (.csv) and I have a question how do I calculate the average in the same months, lat and lon for the variable (NPP)?<br></div><div><br></div><div>Many Thanks in advance</div><div>Melanie</div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>