Added a copy function to the model class which is used for resapling,
to allow the model class more control of how the data is stored.