title: How do I add the time to the netcdf file?
body: <p>I want to create a time series in a netcdf file with 3 dimensions(lon, lat, time[unlimited]). The timeseries should be created from other netcdf-files. Each of them have only one timepoint [For Example 17856]. 
  I know how to create the new netcdf-file, how to extract the data from the netcdf-file as a 2D array and the time for the data.
  My problem is:
  How do I put the 2D array in the netcdf-file with its correct time? How does the start and count argument in the "ncvar_put" fucntion does work?</p>
  
  <p>I use the ncdf4 package and read the Tutorial on:</p>
  
  <p><a href="http://geog.uoregon.edu/bartlein/courses/geog490/week04-netCDF.html#create-and-write-a-netcdf-file" rel="nofollow noreferrer">http://geog.uoregon.edu/bartlein/courses/geog490/week04-netCDF.html#create-and-write-a-netcdf-file</a> and searched for an answer but I still don`t understand it. I´m still unexperienced with netcdf files.</p>
  
  <h1>Example</h1>
  
  <pre><code>e of my problem:
  
  # data from other netcdf file
  values = array(data = c(1:9)/10, dim = c(3,3))
  values_2 = array(data = c(9:25)/10, dim = c(3,3))
  time = 25
  time_2 = 23
  
  # set parameters
  lon = 1:3
  lat = 1:3
  
  
  # define dimensions
  # Longitude
  londim = ncdim_def(name = "longitude", units = "degrees", vals = as.double(lon),
                     longname = "longitude")
  # Latitude
  latdim = ncdim_def(name = "latitude", units = "degrees", vals = as.double(lat),
                     longname = "latitude")
  # Time
  timedim = ncdim_def(name = "time", units ="days since 1582-10-15 00:00", vals = as.double(1),
                      unlim = TRUE, calendar = "gregorian")
  
  # define variables
  B01 = ncvar_def(name = "B01",
                  units ="percent",
                  list(londim,latdim,timedim), 
                  missval = NA,
                  prec="double")
  
  # create netcdf
  nc_test = nc_create("test.nc", list(B01), force_v4 = TRUE)
  
  # Add values 
  ### Here is somethin missing --&gt; How do I add the timestamp?
  ncvar_put(nc_test, "B01", values, start=c(1,1,1), count=c(-1,-1,1))
  ncvar_put(nc_test, "B01", values2, start=c(1,1,2), count=c(-1,-1,1))
  </code></pre>
  
  <p>When I want to extract the data I get the 3-3-2 array, but the timesteps are not correct, because I didnt add them. How do I do this?
  I would like to have the  3-3-2 array and when I take the time and I want the right times in the correct order.</p>