anchor.diff:  
           call check( nf90_def_var(ncid, "time", NF90_DOUBLE, t_id, time_id), trim(err)//"time" )
           call check( nf90_put_att(ncid,time_id,"standard_name","time"))
  -        call check( nf90_put_att(ncid,time_id,"units",options%start_time%units()))
  +        call check( nf90_put_att(ncid,time_id,"units",time%units()))
           call check( nf90_put_att(ncid,time_id,"UTCoffset","0"))
   
           call check( nf90_def_var(ncid, "lev", NF90_REAL, dimids(3), lev_id), trim(err)//"lev" )
  
positive.code:             call setup_varids(ncid,options)
          else
              ! otherwise, create a new file
              call create_file(filename,options)
              ! and write constant (in time) variables
              call check( nf90_put_var(ncid, lat_id,    domain%lat), trim(filename)//":Latitude" )
              call check( nf90_put_var(ncid, lon_id,    domain%lon), trim(filename)//":Longitude" )
  
negative.code:         call check( nf90_put_att(ncid,lev_id,"positive","up"))
          call check( nf90_put_att(ncid,lev_id,"units","m"))
  
          if (time%calendar==GREGORIAN) then
              call check( nf90_put_att(ncid,time_id,"calendar","gregorian"))
          elseif (time%calendar==NOLEAP) then
              call check( nf90_put_att(ncid,time_id,"calendar","noleap"))
          elseif (time%calendar==THREESIXTY) then
              call check( nf90_put_att(ncid,time_id,"calendar","360-day"))
          endif
  
  