!$Author: jhudd@weru.ksu.edu $ !$Date: 2008-08-27 09:26:46 -0500 (Wed, 27 Aug 2008) $ !$Revision: 2009-07-31 by Jin Gao !$HeadURL: https://svn.weru.ksu.edu/weru/weps1/trunk/weps.src/main/getcli.for $ subroutine getcli_win(mgrid,ngrid,n_day) ! ***************************************************************** wjr ! read the NETCD climatic data here ! ! Edit History ! 09-Mar-11 JG created ! include 'p1werm.inc' include 'w1wind.inc' include 'main/w1win.inc' include 'w1clig.inc' include 'airpact/spatialGIS.inc' ! + + + LOCAL COMMON BLOCKS + + + include 'main/w1cli.inc' ! ! + + + Arguments + + + integer mgrid,ngrid,n_day ! ! + + + LOCAL VARIABLES + + + character header*80 integer i,j ! assigning climatic variables awzdpt = awe_prec(mgrid,ngrid,n_day) aweirr = awe_rad(mgrid,ngrid,n_day) * 0.04186 ! awtdav = temp_ave(mgrid,ngrid,n_day) awdir = awe_dir(mgrid,ngrid,n_day) awtdmn = temp_min(mgrid,ngrid,n_day) awtdmx = temp_max(mgrid,ngrid,n_day) awadir = awe_dir(mgrid,ngrid,n_day) awtdpt = awe_dew(mgrid,ngrid,n_day) awudmn = wu_min(mgrid,ngrid,n_day) awudmx = wu_max(mgrid,ngrid,n_day) awhrmx = awudmx ! write(*,*)'GETWIN:',temp_max(46,64,1),temp_min(46,64,1),awzdpt !awe_prec(46,64,1) ! awtdmxprev ! assigning win_gen variables ! do i = 1,n_day do j=1,24 wawu(j,n_day) = wdsp_hr(mgrid,ngrid,n_day,j) end do ! end do if( n_day.gt.1 ) then awtdmxprev = temp_max(mgrid,ngrid,n_day-1) else awtdmxprev = awtdmx end if if( n_day.lt.nday ) then awtdmnnext = temp_min(mgrid,ngrid,n_day+1) else awtdmnnext = awtdmn endif ! awtdpt = wwtdpt(n_day) ! aweirr = wgrad(n_day) * 0.04186 ! dayidx = dayidx + 1 not necessary to increment ! calculate air density from temperature and pressure awtdav = (awtdmx + awtdmn) / 2. awdair = 348.56 * (1.013-0.1183*(amzele/1000.) & & + 0.0048 * (amzele/1000.)**2.) / (awtdav + 273.1) !computer the total wind energy for the day twe(n_day) = 0.0 do i=1,24 twe(n_day)=twe(n_day) + & & 0.5*(wawu(i,n_day)**3.00)*3600.0/1000.0 end do ! computer the averge wind speed to generate the total wind energy for the day wewudav(n_day) = (twe(n_day)/24.0*2.0*1000.0/3600.0)**(1.0/3.0) !populate the global subdaily(hrly for now) wind speed array do i=1,24 awu(i) =wdsp_hr(mgrid,ngrid,n_day,i) end do return ! ! error returns and stops ! 9000 write(0,*) 'Unexpected error in cligen header' call exit(1) 9001 write(0,*) 'Unexpected error reading cligen file day ' call exit(1) end