c----------------------------1. explaination-------------------------------- c c --- 1.test windgen direction c test windgen--| c --- 2.test windgen speed c c----------------------------------------------------------------------------- c c 1.test windgen direction 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): wind direction in master database c sdir(i): wind direction in simulation database c sum_dir(i): the sum of all dir(i) c sum_sdir(i): the sum of all sdir(i) c err(i): sum_sdir(i) - sum_dir(i) real dir(12), sdir(12), sum_dir(17), sum_sdir(17), err(17) c for output header 100 format ('The summery error in 16 dir & Calm') 105 format ('--------------------------------------------------------- +----------------------------------') 110 format (' 1 2 3 4 5 6 7 8 9 10 +11 12 13 14 15 16 Calm') c for output error 200 format ('error ', 17(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 c------------------3. read and write file -------------------------------- c read record from 'test_allyear_direction' file open (1, file = 'test_allyear_direction') do 10 j = 1,17 sum_dir(j) = 0 sum_sdir(j) = 0 do 20 i = 1, 5 read (1,400) 20 continue read (1,300) (dir(i), i=1,12) read (1,300) (sdir(i), i=1,12) do 30 i = 1, 12 sum_dir(j) = sum_dir(j) + dir(i) sum_sdir(j) = sum_sdir(j) +sdir(i) 30 continue err(j) = (sum_sdir(j) - sum_dir(j)) 10 continue c write record to 'error_direction_direction' file open (8, file = 'error_direction_direction') write(8,100) write(8,105) write(8,110) write(8,200) (err(i), i=1,17) write(8,105) close(1) close(8) end