title: Numpy Reshape to obtain monthly means from data
body: <p>I'm trying to obtain monthly means from an observed precipitation data set for the period 1901-2015. The current shape of my prec variable is <code>(1380(time), 360(lon), 720(lat))</code>, with 1380 being the number of months over a 115 year period. I have been informed that to calculate monthly means, the most effective way is to conduct an <code>np.reshape</code> command on the <code>prec</code> variable to split the array up into months and years. However I am not sure what the best way to do this is. I was also wondering if there was a way in Python to select specific months of the year, as I will be producing plots for each month of the year.</p>
  
  <p>I have been attempting to reshape the <code>prec</code> variable with the code below. However I am not sure how to do this correctly:</p>
  
  <pre><code>#Set Source Folder
  sys.path.append('../../..')
  SrcFld = ("/export/silurian/array-01/obs/CRU/")
  
  #Retrieve Data
  data_path = ''
  
  example = (str(SrcFld) + 'cru_ts4.00.1901.2015.pre.dat.nc') 
  Data = Dataset(example)
  
  #Create Prec Mean Array and reshape to get monthly means
  Prec_mean = np.zeros((360,720))
  
  #Retrieve Variables
  Prec = Data.variables['pre'][:]
  lats = Data.variables['lat'][:]
  lons = Data.variables['lon'][:]
  
  np.reshape(Prec, ())
  
  #Get Annual/Monthly Average
  Prec_mean =np.mean(Prec,axis=0)
  </code></pre>
  
  <p>Any guidance on this issue would be appreciated.</p>