title: Creating and Storing Multi-Dimensional Array in a netCDF File
body: <p>This question has potentially two parts but maybe only one if the first part can be encapsulated by the second. I am using python with numpy and netCDF4</p>
  
  <p>First:</p>
  
  <p>I have four lists of different variable values (hereafter referred to elevation values) each of which has a length of 28. These four lists are one set of 5 different latitude values of which are one set of the 24 different time values. </p>
  
  <p>So 24 times...each time with 5 latitudes...each latitude with four lists...each list with 28 values.</p>
  
  <p>I want to create an array with the following dimensions (elevation, latitude, time, variable)</p>
  
  <p>In words, I want to be able to specify which of the four lists I access,which index in the list, and specify a specific time and latitude. So an index into this array would look like this:</p>
  
  <p>array(0,1,2,3) where 0 specifies the first index of the the 4th list specified by the 3. 1 specifies the 2nd latitude, and 2 specifies the 3rd time and the output is the value at that point.</p>
  
  <p>I won't include my code for this part since literally the only things of mention are the lists</p>
  
  <p>list1=[...]</p>
  
  <p>list2=[...]</p>
  
  <p>list3=[...]</p>
  
  <p>list4=[...]</p>
  
  <p>How can I do this, is there an easier structure of the array, or is there anything else I a missing?</p>
  
  <p>Second:</p>
  
  <p>I have created a netCDF file with variables with these four dimensions. I need to set those variables to the array structure made above. I have no idea how to do this and the netCDF4 documentation does a 1-d array in a fairly cryptic way. If the arrays can be made directly into the netCDF file bypassing the need to use numpy first, by all means show me how. </p>
  
  <p>Thanks!</p>