<div dir="ltr">Stuart,<div><br></div><div>That is a strange Netcdf file.  It is a time series of 45 x 29 grids, but all grid points are missing values, except for one corner point at (*,0,0).  You can extract the corner point as a 1-D time series, and make a line plot and other 1-D analysis.</div><div><br></div><div>    x = f->runoff(:,0,0)        ; x will be read as a 1-D array</div><div><br></div><div>However, you requested how to calculate spatial averages.  That does not make sense if you do not have valid data over multiple grid points.  So either you can just do 1-D plots and analysis, or you need to go back to your data source and get a file with valid data over your desired spatial area.</div><div><br></div><div>If you get another data file, also please ask the provider to make the _FillValue match the array data type, which is "double" in this case.</div><div><br></div><div>--Dave</div><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 13, 2018 at 2:20 PM, Smith, Stuart <span dir="ltr"><<a href="mailto:smit1770@purdue.edu" target="_blank">smit1770@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_-2497627876462014960WordSection1"><p class="MsoNormal">Good afternoon,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I received a netCDF file that has a format I am unfamiliar with and wanted guidance on calculating spatial averages over time. Attached is a copy of the .nc file. The variables are:<u></u><u></u></p><p class="m_-2497627876462014960MsoListParagraph"><u></u><span>0)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Runoff <u></u><u></u></p><p class="m_-2497627876462014960MsoListParagraph"><u></u><span>1)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>T=Time<u></u><u></u></p><p class="m_-2497627876462014960MsoListParagraph"><u></u><span>2)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>X= Longitude<u></u><u></u></p><p class="m_-2497627876462014960MsoListParagraph"><u></u><span>3)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Y = Latitude<u></u><u></u></p><p class="MsoNormal">When defining variables for runoff (ex. Var = fi->runoff ), the output format is the following:<u></u><u></u></p><p class="MsoNormal">(0,0,0)    0<u></u><u></u></p><p class="MsoNormal">(0,0,1) -9999<u></u><u></u></p><p class="MsoNormal">(0,0,2) -9999<u></u><u></u></p><p class="MsoNormal">(0,0,3) -9999<u></u><u></u></p><p class="MsoNormal">(0,0,4) -9999<u></u><u></u></p><p class="MsoNormal">……..<u></u><u></u></p><p class="MsoNormal">(1,0,0)    0<u></u><u></u></p><p class="MsoNormal">(1,0,1) -9999<u></u><u></u></p><p class="MsoNormal">(1,0,2) -9999<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The next value will not appear until (1,0,0). I wanted to ask how I would plot such data, and calculate averages over the area with the given format?  Thank you for your time.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards,<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">-Stuart</p></font></span></div></div></blockquote></div></div></div>