title: How do I index every Nth element of an array in Fortran?
body: <p>I am struggling to index every nth element of an array in Fortran.</p>
  
  <p>I have an array of 24 hours x 365 days x 91 steps of latitude, which I have declared as</p>
  
  <pre><code> integer, dimension(1:24, 1:365, 1:91) :: my_array
  </code></pre>
  
  <p>I now would like to pick only every nth (lets say 10th) degree of latitude do reduce the resolution and write them no a second array</p>
  
  <pre><code>integer, dimension(1:24, 1:365, 1:10) :: my_new_array
  </code></pre>
  
  <p>I have no problem writing any 10 consecutive degrees of latitude to the new array e.g. </p>
  
  <pre><code>my_new_array = my_array(:,:,50:60)
  </code></pre>
  
  <p>but cant figure out how to do it with every nth element. In R or Matlab I would simply write a sequence from 1 to 91 by steps of 10, however that doesn't work for Fortran.</p>