title: How to split NetCDF file into multiple NetCDF files based on indices of dimension?
body: <p>I have a single NetCDF file with some identically sized variables in it. I am trying to save all data into different NetCDF files based on dimensions. For example, each variable in a NetCDF file has data in one dimension called &quot;row&quot; with a size of 1000 datapoints. How can I create three different NetCDF files, splitting the data into the first 300 points, then 400 and the last with the final 300 points?</p>
  <p>The data type, variables, variable full name, and units are as below respectively:</p>
  <pre><code>float latitude(row=1000), long_name = &quot;Latitude&quot;, units = &quot;degrees_north&quot;;
  float longitude(row=1000), long_name = &quot;Longitude&quot;, units = &quot;degrees_east&quot;;
  float ve(row=1000), long_name = &quot;Eastward velocity&quot;, units = &quot;m/s&quot;;
  float vn(row=1000), long_name = &quot;Northward velocity&quot;, :units = &quot;m/s&quot;;
  double time(row=1000), long_name = &quot;Time&quot;, units = &quot;seconds since 1970-01-01T00:00:00Z&quot;;
  char ID(row=1000, ID_strlen=8), long_name = &quot;Global Drifter Program Buoy ID&quot;;
  int WMO(row=1000), long_name = &quot;World Meteorological Organization buoy identification number&quot;;
  etc...
  </code></pre>
  <p>The row numbers are the same across all variables. Also note that there are different types of data such as &quot;double&quot;, &quot;char&quot;,&quot;float&quot;, and &quot;int&quot;.
  Row values like 300, 400, and 300 should appear in the output NetCDF files, and the column values should match those in the primary files for the corresponding variables. Other dimensions and parameters shouldn't change. Is it possible to do it using Python or CDO?</p>