title: How to write a variable with unfixed length along one dimension into a netCDF file
body: <p>The structure of my data is as follows,</p>
  
  <pre><code>dimensions:
          int np = 25;
          int ns
          int nk = 10
  
  variables:
          double period(np);
          double data(nk,ns,np)
  </code></pre>
  
  <p>The problem is that the <code>ns</code> dimension is not fixed. For example, the <code>data</code> can be like this:</p>
  
  <pre><code>data(10,300,1)
  data(10,200,2)
  data(10,108,3)
  data(10,500,4)
  ...
  </code></pre>
  
  <p>How to write such dataset to a netCDF file?</p>