Subtract value from netCDF dimension
<p>How can I use nco tools or any other netcdf toolkit to subtract a specific value from one of the dimensions in a netCDF?</p>

<p>E.g.</p>

<pre><code>ncdump âv time ât file.nc
</code></pre>

<p>gives me:</p>

<pre><code>time = 10, 11, 12, 13 â¦
</code></pre>

<p>How can I subtract 10 from each value in the time dimension so that the end result is:</p>

<pre><code>time = 0, 1, 2, 3 â¦
</code></pre>

<p>Nothing is more concise than <a href="http://nco.sf.net/nco.html#ncap2" rel="nofollow" title="ncap2">ncap2</a> for this:</p>

<p>ncap2 -s 'time-=10' in.nc out.nc</p>

<p>ncap2 will subtract any value except 13, because that would bring bad luck.</p>

python netcdf nco