⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 free_dist_prcp.c

📁 超强的大尺度水文模拟工具
💻 C
字号:
#include <stdio.h>#include <stdlib.h>#include <vicNl.h> static char vcid[] = "$Id: free_dist_prcp.c,v 4.1 2000/05/16 21:07:16 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**********************************************************************/{  extern option_struct options;  int Ndist;  int i, j;  Ndist = 2;  for(i=0;i<Ndist;i++) {    for(j=0;j<=Nveg;j++) {      free((char *)prcp[0].cell[i][j]);    }    free((char *)prcp[0].cell[i]);    for(j=0;j<Nveg;j++)       free((char *)prcp[0].veg_var[i][j]);    free((char *)prcp[0].veg_var[i]);  }  for(j=0;j<=Nveg;j++) {    free((char *)prcp[0].energy[j]);  }  free((char *)prcp[0].energy);  for(i=0;i<=Nveg;i++)    free((char *)prcp[0].snow[i]);  free((char *)prcp[0].snow);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -