c----------------------------1. explaination-------------------------------- c c --- 1.test windgen direction c test windgen--| c --- 2.test windgen speed c c----------------------------------------------------------------------------- c c 1.test windgen directiot windgen direction c c source code output c c |--windgen_mid_direction.for -> windgen_mid_direction c test |--test_eachyear_direction.for -> test_eachyear_direction c windgen --|--test_allyear_direction.for -> test_allyear_direction c direction |--error_direction_direction.for -> error_direction_direction c |--error_month_direction.for -> error_month_direction c c c windgen_output ----| c | |->test_eachyear_direction c | | c | | |->error_direction_direction c v |->test_allyear_direction-| c windgen_mid_direction-| |->error_month_direction c c c c 1)."windgen_output": output file generated by bin>wind_gen, c should be in bin subdirectory. c ex: c bin>wind_gen -v -D -f ../../db/wind_gen.wdb c -s 25704 -y 100 c -o windgen_output c c 2)."windgen_mid_direction.for": from the "windgen_output", the program c generated a output file c "windgen_mid_direction" which is used c for internal process output. c 3)."test_eachyear_direction.for": from the "windgen_mid_direction" file, c the program generated a output file c "test_eachyear_direction" which is c used for detail by month/dir of c each year. c 4)."test_allyear_direction.for": from the "windgen_mid_direction" file, c the program generated a output file c "test_allyear_direction" which is c used for detail by month/dir of c all year (5, 10, 15, ...100...). c 5)."error_direction_direction.for": from the "test_allyear_direction" file, c the program generated a output file c "error_direction_direction" which c is used for the summary error in c each direction of years. c 6)."error_month_direction.for": from the "test_allyear_direction" file, c the program generated a output file c "error_month_direction" which is used c for the summary error in each month c of years. c---------------------------------------------------------------------------- c------------------2. variable & i/o format------------------------------ c for variable c dir(i,j): wind direction in master database c sdir(i,j): wind direction in simulation database c sum_dir(i,j): the sum of all dir(i,j) c sum_sdir(i,j): the sum of all sdir(i,j) c err(i): sums - sum c sum: the sum of all dir(i,j) c sums: the sum of all sdir(i,j) real dir(17,12), sdir(17,12), sum_dir(17,12), sum_sdir(17,12) real err(12), sum, sums c for output header 100 format ('The summery error in month') 105 format ('--------------------------------------------------------- +---------') 110 format (' 1 2 3 4 5 6 7 8 9 10 +11 12') c for output error 200 format ('error ', 12(f4.1,1x)) c for read format in 'test_allyear_direction' file 300 format (11x, 12(f4.1, 1x)) 400 format (1x) integer i, j, k c------------------3. read and write file -------------------------------- c read record from 'test_allyear_direction' file open (2, file = 'test_allyear_direction') do 10 i = 1,17 do 20 k = 1, 5 read (2,400) 20 continue read (2,300) (dir(i,j), j=1,12) read (2,300) (sdir(i,j), j=1,12) 10 continue do 30 j =1, 12 sum = 0.0 sums = 0.0 do 40 i = 1, 17 sum_dir(i,j) = sum + dir(i,j) sum_sdir(i,j) = sums + sdir(i,j) sum = sum_dir(i,j) sums = sum_sdir(i,j) 40 continue err(j) = (sums - sum) 30 continue c write record to 'error_month_direction' file open (8, file = 'error_month_direction') write(8,100) write(8,105) write(8,110) write(8,200) (err(j), j=1,12) write(8,105) close(2) close(8) end