/****************************************************************************** ソーンスウエイト法による月蒸発散量の計算 A.KONDOH 1992 ******************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #define NUM 24 /* 月平均気温が26.5゚C以上の場合用のテーブルのデ-タセット数 */ #define PI 3.141592653 #define SE stderr #define FILE_ERR -1 #define CRLF puts("") #define CLS printf("\033[2J") #define PAUSE do{}while(!isspace(getch())) /* ポーズ */ /* ファイルディスクリプタ */ FILE *fi; FILE *fo; float lat; /* 緯度 */ float Et[13]; /* ソーンスウエイト法による蒸発散量 */ float Ta[13]; /* 月平均気温 */ float factor[13]; /* 補正係数 */ static int nmonth[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int nday[13][32]; static float Th[24]={26.5, 27.0, 27.5, 28.0, 28.5, 29.0 ,29.5, 30.0, 30.5, 31.0, 31.5, 32.0 ,32.5, 33.0, 33.5, 34.0, 34.5, 35.0 ,35.5, 36.0, 36.5, 37.0, 37.5, 38.0}; static float Eh[24]={13.50, 13.95, 14.37, 14.78, 15.17, 15.54 ,15.89, 16.21, 16.52, 16.80, 17.07, 17.31 ,17.53, 17.72, 17.90, 18.05, 18.18, 18.29 ,18.37, 18.43, 18.47, 18.49, 18.50, 18.50}; /* 関数プロトタイプ宣言 */ void Thornthwate(); void Over265(int); void get_input_parameters(); void correct_Et(); float Sun(int,int); float sekii(int,int); void cal_nday(int); void output_results(); /*----------------------------------------------------------------------------- ソーンスウエイト法メインプログラム -----------------------------------------------------------------------------*/ void main(void) { /* タイトル */ CLS; fprintf(SE,"====== Evapotranspiration by Thornthwate Method ======\n"); /* データ入力 */ get_input_parameters(); /* 月蒸発散量の計算 */ Thornthwate(); /* 計算結果出力 */ output_results(); }/* end of main */ /*----------------------------------------------------------------------------- ソーンスウエイト法 -----------------------------------------------------------------------------*/ void Thornthwate() { int mon; double power_a; double ti; ti=0.0; for(mon=1;mon<=12;mon++){ ti += pow( Ta[mon]/5.0 , 1.514); } power_a=(492390.0+17920.0*ti-77.1*ti*ti+0.675*ti*ti*ti)*1.0E-06; for(mon=1;mon<=12;mon++){ /* 月平均気温が氷点下の場合 */ if(Ta[mon]<0.0){ Et[mon]=0.0; continue; } /* 月平均気温が26.5゚C以上の場合 */ if(Ta[mon]>=26.5){ Over265(mon); continue; } /* 普通の月 */ Et[mon]=1.6*pow( (10.0*Ta[mon]/ti),power_a ); }/* next month */ /* 昼の長さの補正 */ correct_Et(); }/* end of Thornthwate */ /*----------------------------------------------------------------------------- 月平均気温が26.5℃を越える月の処理(線型補間) -----------------------------------------------------------------------------*/ void Over265(mon) int mon; { int i; float answer; if(Ta[mon]>=38.0){ Et[mon]=18.50; }else{ for(i=0;i=Th[i] && Ta[mon]