/// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="gridCell">GridCell to copy.</param>
 public GridCell(GridCell gridCell)
 {
     this.Latitude = gridCell.Latitude;
     this.Longitude = gridCell.Longitude;
     this.Cohorts = gridCell.Cohorts.Select(cs => cs.ToArray()).ToArray();
     this.Stocks = gridCell.Stocks.Select(ss => ss.ToArray()).ToArray();
     this.Environment = new SortedList<string, double[]>(gridCell.Environment.ToDictionary(kv => kv.Key, kv => kv.Value.ToArray()));
 }
 /// <summary>
 /// GridCellDispersal constructor.
 /// </summary>
 /// <param name="inboundCohorts">Inbound cohort counts, by direction.</param>
 /// <param name="outboundCohorts">Outbound cohort counts, by direction.</param>
 /// <param name="outboundCohortWeights">Outbound cohort weights, by functional group.</param>
 /// <param name="gridCell">Grid cell.</param>
 public GridCellDispersal(
     IDictionary<CohortsEnterDirection, int> inboundCohorts,
     IDictionary<CohortsExitDirection, int> outboundCohorts,
     IEnumerable<double> outboundCohortWeights,
     GridCell gridCell)
 {
     this.InboundCohorts = new Dictionary<CohortsEnterDirection, int>(inboundCohorts);
     this.OutboundCohorts = new Dictionary<CohortsExitDirection, int>(outboundCohorts);
     this.OutboundCohortWeights = outboundCohortWeights.ToArray();
     this.GridCell = gridCell;
 }