#include #include #include static char vcid[] = "$Id: free_dist_prcp.c,v 4.1.4.5 2009/08/03 22:23:03 vicadmin Exp $"; void free_dist_prcp(dist_prcp_struct *prcp, int Nveg) /********************************************************************** free_dist_prcp Keith Cherkauer March 1998 This routine frees all memory allocated down the distributed precipitation data structure. This include all grid cell specific variables (soil, vegetation, energy, snow). modifications: 06-24-98 modified to account for redesign of distributed precipitation data structures KAC 2007-Apr-21 Replaced loop over Nveg to loop over Nitems, so that lake- specific veg tiles could be freed. TJB 2009-Jul-31 Removed extra veg tile for lake/wetland. TJB **********************************************************************/ { extern option_struct options; int Ndist; int i, j, Nitems; Ndist = 2; Nitems = Nveg + 1; for(i=0;i