亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? read_vegparam.c

?? 超強的大尺度水文模擬工具
?? C
字號:
#include <stdio.h>#include <stdlib.h>#include <vicNl.h>static char vcid[] = "$Id: read_vegparam.c,v 4.2.2.4 2004/05/06 19:57:34 tbohn Exp $";veg_con_struct *read_vegparam(FILE *vegparam,                              int   gridcel,                              int   Nveg_type)/**********************************************************************  read_vegparam.c    Keith Cherkauer and Dag Lohmann       1997  This routine reads in vegetation parameters for the current grid cell.  It also relates each vegetation class in the cell to the appropriate  parameters in the vegetation library.  Modifications:  09-24-98  Modified to read root zone distribution information so           that soil layer root fractions can be computed for new 	   soil layer depths - see calc_root_fractions.c           KAC  07-15-99 Modified to read LAI values from a new line in the vegetation           parameter file.  Added specifically to work with the new	   global LAI files.  03-27-03 Modified code to update Wdmax based on LAI values read in           for the current grid cell.  If LAI is not obtained from this           function, then the values cacluated in read_veglib.c are           left unchanged.                                   DP & KAC  09-02-2003 Moved COMPUTE_TREELINE flag from user_def.h to the              options structure.  Now when not set to FALSE, the              value indicates the default above treeline vegetation             if no usable vegetation types are in the grid cell              (i.e. everything has a canopy).  A negative value               will cause the model to use bare soil.  Make sure that              positive index value refer to a non-canopied vegetation             type in the vegetation library.                   KAC  08-Dec-03 Applied Alan Hamlet's fix for COMPUTE_TREELINE option,	    which fixed a segmentation fault when COMPUTE_TREELINE=TRUE.	    This consisted of removing the call to realloc and	    instead allocating an extra veg class to begin with,	    as well as assigning this extra veg class a very small	    fraction of the grid cell's area to avoid changing the	    results for areas below the treeline.		TJB**********************************************************************/{  extern veg_lib_struct *veg_lib;  extern option_struct   options;#if LINK_DEBUG  extern debug_struct    debug;#endif  veg_con_struct *temp;  int             vegcel, i, j, vegetat_type_num, skip, veg_class;  int             NoOverstory;  float           depth_sum;  float           sum;  char            str[500];  char            ErrStr[MAXSTRING];  if(options.GLOBAL_LAI) skip=2;  else skip=1;  NoOverstory = 0;#if !NO_REWIND  rewind(vegparam);#endif        while ((fscanf(vegparam, "%d %d", &vegcel, &vegetat_type_num)) == 2 &&          vegcel != gridcel) {    for (i = 0; i <= vegetat_type_num * skip; i++)      fgets(str, 500, vegparam);  }  if (vegcel != gridcel) {    fprintf(stderr, "Error in vegetation file.  Grid cell %d not found\n",            gridcel);    exit(99);  }  if(vegetat_type_num >= MAX_VEG) {    sprintf(ErrStr,"Vegetation parameter file wants more vegetation types in grid cell %i (%i) than are defined by MAX_VEG (%i) [NOTE: bare soil class is assumed].  Edit vicNl_def.h and recompile.",gridcel,vegetat_type_num+1,MAX_VEG);    nrerror(ErrStr);  }  /** Allocate memory for vegetation grid cell parameters **/  if(vegetat_type_num>0)    temp = (veg_con_struct*) calloc(vegetat_type_num+1,                                     sizeof(veg_con_struct));  else    temp = (veg_con_struct*) calloc(1, sizeof(veg_con_struct));  temp[0].Cv_sum = 0.0;  for (i = 0; i < vegetat_type_num; i++) {    temp[i].zone_depth = calloc(options.ROOT_ZONES,sizeof(float));    temp[i].zone_fract = calloc(options.ROOT_ZONES,sizeof(float));    temp[i].vegetat_type_num = vegetat_type_num;    fscanf(vegparam, "%d",  &temp[i].veg_class);    fscanf(vegparam, "%lf", &temp[i].Cv);        depth_sum = 0;    sum = 0.;    for(j=0;j<options.ROOT_ZONES;j++) {      fscanf(vegparam,"%f %f",&temp[i].zone_depth[j], &temp[i].zone_fract[j]);      depth_sum += temp[i].zone_depth[j];      sum += temp[i].zone_fract[j];    }    if(depth_sum <= 0) {      sprintf(str,"Root zone depths must sum to a value greater than 0.");      nrerror(str);    }    if(sum != 1.) {      fprintf(stderr,"WARNING: Root zone fractions sum to more than 1 ( = %f), normalizing fractions.  If the sum is large, check that your vegetation parameter file is in the form - <zone 1 depth> <zone 1 fract> <zone 2 depth> <zone 2 fract> ...\n", sum);      for(j=0;j<options.ROOT_ZONES;j++) {	temp[i].zone_fract[j] /= sum;      }    }    veg_class = MISSING;    for(j=0;j<Nveg_type;j++)      if(temp[i].veg_class == veg_lib[j].veg_class)	veg_class = j;    if(veg_class == MISSING) {      sprintf(ErrStr,"Vegetation class %i from cell %i is not defined in the vegetation library file.", temp[i].veg_class, gridcel);      nrerror(ErrStr);    }    else      temp[i].veg_class = veg_class;    temp[0].Cv_sum += temp[i].Cv;    if ( options.GLOBAL_LAI ) {      for ( j = 0; j < 12; j++ ) {	fscanf(vegparam,"%lf",&veg_lib[temp[i].veg_class].LAI[j]);	veg_lib[temp[i].veg_class].Wdmax[j] = 	  LAI_WATER_FACTOR * veg_lib[temp[i].veg_class].LAI[j];      }    }    if ( options.COMPUTE_TREELINE && !veg_lib[temp[i].veg_class].overstory )       // Determine if cell contains non-overstory vegetation      NoOverstory++;      }  if(temp[0].Cv_sum>1.0){    fprintf(stderr,"WARNING: Cv exceeds 1.0 at grid cell %d, fractions being adjusted to equal 1\n", gridcel);    for(j=0;j<vegetat_type_num;j++)      temp[j].Cv = temp[j].Cv / temp[0].Cv_sum;    temp[0].Cv_sum = 1.;  }  if(temp[0].Cv_sum>0.99 && temp[0].Cv_sum<1.0){    fprintf(stderr,"WARNING: Cv > 0.99 and Cv < 1.0 at grid cell %d, model assuming that bare soil is not to be run - fractions being adjusted to equal 1\n", gridcel);    for(j=0;j<vegetat_type_num;j++)      temp[j].Cv = temp[j].Cv / temp[0].Cv_sum;    temp[0].Cv_sum = 1.;  }  if ( options.SNOW_BAND > 1 && options.COMPUTE_TREELINE        && ( !NoOverstory && temp[0].Cv_sum == 1. ) ) {    // All vegetation in the current cell is defined with overstory.    // Add default non-overstory vegetation so that snow bands above treeline    // can be sucessfully simulated.    if ( options.AboveTreelineVeg < 0 ) {      // Above treeline snowband should be treated as bare soil      for ( j = 0; j < vegetat_type_num; j++ )	temp[j].Cv -= ( 0.001 / (float)vegetat_type_num );      temp[0].Cv_sum -= 0.001;    }    else {      // Above treeline snowband should use the defined vegetation      // add vegetation to typenum      // check that veg type exists in library and does not have overstory      if(vegetat_type_num > 0) {        for ( j = 0; j < vegetat_type_num; j++ ) {	  temp[j].Cv -= ( 0.001 / (float)vegetat_type_num );	  temp[j].vegetat_type_num++;        }        temp[vegetat_type_num].Cv         = 0.001;        temp[vegetat_type_num].veg_class  = options.AboveTreelineVeg;        temp[vegetat_type_num].Cv_sum     = temp[vegetat_type_num-1].Cv_sum;        temp[vegetat_type_num].zone_depth = calloc( options.ROOT_ZONES,						  sizeof(float));        temp[vegetat_type_num].zone_fract = calloc( options.ROOT_ZONES,						  sizeof(float));        temp[vegetat_type_num].vegetat_type_num = vegetat_type_num+1;        for ( j = 0; j < options.ROOT_ZONES; j++ ) {	  // Since root zones are not defined they are copied from the last	  // vegetation type.	  temp[vegetat_type_num].zone_depth[j] 	    = temp[vegetat_type_num-1].zone_depth[j];	  temp[vegetat_type_num].zone_fract[j] 	    = temp[vegetat_type_num-1].zone_fract[j];        }      }      veg_class = MISSING;      for ( j = 0; j < Nveg_type; j++ ) {	// Identify current vegetation class	if(temp[vegetat_type_num].veg_class == veg_lib[j].veg_class) {	  veg_class = j;	  break;	}      }      if ( veg_class == MISSING ) {	sprintf(ErrStr,"Vegetation class %i from cell %i is not defined in the vegetation library file.", temp[i].veg_class, gridcel);	nrerror(ErrStr);      }      else {	temp[vegetat_type_num].veg_class = veg_class;      }      if ( veg_lib[veg_class].overstory ) {	sprintf(ErrStr,"Vegetation class %i is defined to have overstory, so it cannot be used as the default vegetation type for above canopy snow bands.", veg_lib[veg_class].veg_class );	nrerror(ErrStr);      }    }  }  return temp;} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡免费追剧大全电视剧网站| 极品少妇xxxx精品少妇偷拍| 精品国精品国产尤物美女| 91久久免费观看| 成人国产精品免费网站| 国内偷窥港台综合视频在线播放| 婷婷亚洲久悠悠色悠在线播放| 亚洲精品国产成人久久av盗摄| 国产精品福利一区二区| 国产精品欧美极品| 亚洲国产精品二十页| 久久婷婷综合激情| 欧美xxxx在线观看| 欧美成人伊人久久综合网| 欧美一卡在线观看| 欧美一区二区三区小说| 欧美一级片免费看| 精品精品国产高清一毛片一天堂| 日韩视频国产视频| 精品99999| 2014亚洲片线观看视频免费| 亚洲精品在线电影| 久久久.com| 国产精品久久久久天堂| 亚洲欧洲日韩一区二区三区| 亚洲三级电影网站| 婷婷六月综合网| 久久精品国产精品亚洲红杏 | 欧美图片一区二区三区| 一本色道久久综合精品竹菊| 色猫猫国产区一区二在线视频| 欧美性感一区二区三区| 日韩一区二区影院| 国产精品久久久久久妇女6080 | 日韩av电影天堂| 激情久久五月天| av激情亚洲男人天堂| 91久久奴性调教| 精品成人a区在线观看| 综合电影一区二区三区| 日韩在线a电影| 国产在线一区二区综合免费视频| bt7086福利一区国产| 日本高清不卡视频| 久久综合九色综合97_久久久 | 波多野洁衣一区| 欧美日韩精品一区二区三区蜜桃| 精品久久国产97色综合| 亚洲男人天堂一区| 日韩中文字幕区一区有砖一区 | 亚洲免费观看高清完整版在线观看| 亚洲高清免费视频| 国产精品18久久久久久久久| 欧美丝袜丝nylons| 日本一区二区三区高清不卡| 亚洲一区二区视频在线观看| 狠狠色丁香婷婷综合久久片| 色婷婷综合在线| 久久精品人人爽人人爽| 午夜精品久久久久久| 成人毛片在线观看| 91精品国产免费| 亚洲精品伦理在线| 国产风韵犹存在线视精品| 91精品国产色综合久久| 亚洲欧美一区二区在线观看| 麻豆国产一区二区| 在线观看欧美黄色| 欧美国产一区二区| 老司机精品视频导航| 欧美日韩中字一区| 亚洲色图一区二区| 成人国产精品免费网站| 久久九九99视频| 久久精品国产一区二区三 | 精品免费日韩av| 天涯成人国产亚洲精品一区av| 成人aa视频在线观看| 久久综合九色综合97婷婷女人 | 91丨porny丨户外露出| 精品国产一二三区| 日本成人在线一区| 欧美日韩国产高清一区二区三区 | 国产亚洲欧美一级| 狠狠色综合播放一区二区| 欧美一区二区视频在线观看 | 亚洲男同性恋视频| 91视视频在线观看入口直接观看www| 欧美精品一区二区三区在线| 日韩成人午夜电影| 欧美一区二区三区人| 爽好多水快深点欧美视频| 欧美久久久一区| 日韩和欧美一区二区| 69精品人人人人| 蜜臀av性久久久久蜜臀av麻豆| 56国语精品自产拍在线观看| 亚洲不卡在线观看| 884aa四虎影成人精品一区| 蜜臀av一区二区三区| 久久久影视传媒| 国产高清在线观看免费不卡| 国产日韩欧美一区二区三区综合| 国产成人精品一区二区三区四区| 日本一区二区电影| 91精品办公室少妇高潮对白| 亚洲五码中文字幕| 欧美一级片在线| 国产精品一二三四| 综合久久久久综合| 欧美日产国产精品| 久久se这里有精品| 国产日韩精品一区二区三区| 成人一区二区视频| 亚洲一区二区三区四区中文字幕| 欧美日韩极品在线观看一区| 久久精品国产色蜜蜜麻豆| 欧美国产日本韩| 欧美亚洲丝袜传媒另类| 日本午夜一区二区| 国产日韩欧美精品综合| 在线视频中文字幕一区二区| 视频在线观看一区二区三区| 久久婷婷久久一区二区三区| 91麻豆国产福利在线观看| 午夜电影一区二区| 久久久久九九视频| 在线中文字幕一区二区| 久久99精品国产91久久来源| 国产精品成人午夜| 在线播放国产精品二区一二区四区| 六月丁香婷婷久久| 一区二区三区四区不卡视频| 精品久久久久一区二区国产| 91美女在线视频| 激情综合网天天干| 亚洲一区二三区| 国产喷白浆一区二区三区| 欧美日本韩国一区| 成人精品一区二区三区四区| 视频一区二区三区入口| 成人欧美一区二区三区黑人麻豆 | 亚洲精品日韩专区silk| 精品国产伦理网| 欧美亚日韩国产aⅴ精品中极品| 国模一区二区三区白浆| 亚州成人在线电影| 国产精品麻豆网站| 日韩精品一区二区三区四区| 色欧美88888久久久久久影院| 日本美女一区二区三区视频| ...中文天堂在线一区| 精品国产自在久精品国产| 欧美日韩一级大片网址| 99re在线精品| 成人涩涩免费视频| 国内精品写真在线观看| 日产欧产美韩系列久久99| 亚洲欧美日韩小说| 国产精品国产三级国产普通话三级 | aaa亚洲精品| 国产福利91精品一区| 极品少妇xxxx精品少妇偷拍| 奇米精品一区二区三区在线观看 | 日韩精品色哟哟| 亚洲午夜羞羞片| 亚洲精品国久久99热| 欧美国产精品v| 久久这里只有精品6| 欧美电影免费观看高清完整版在线 | 99久久婷婷国产综合精品电影| 国产一区二区三区综合| 日韩av一区二区在线影视| 亚洲激情综合网| 一区二区三区成人在线视频| 亚洲欧美日韩在线不卡| 一个色在线综合| 亚洲一区二区三区四区在线观看 | 色综合夜色一区| 91在线丨porny丨国产| av电影在线观看完整版一区二区| 成人丝袜18视频在线观看| 成人国产精品视频| 日本高清成人免费播放| 色老综合老女人久久久| 欧美综合欧美视频| 欧美日韩国产成人在线免费| 8v天堂国产在线一区二区| 91精品国产欧美一区二区成人| 9191成人精品久久| 久久一区二区三区四区| 国产欧美中文在线| 亚洲精品中文在线观看| 五月综合激情网| 麻豆精品一区二区av白丝在线| 精品在线播放午夜| 风间由美一区二区三区在线观看| 成人免费视频视频| 91老师国产黑色丝袜在线| 欧美日本高清视频在线观看|