!$Author: fredfox $ !$Date: 2005-02-01 22:58:50 $ !$Revision: 1.7 $ !$Source: /weru/cvs/weps/weps.src/erosion/erodinit.for,v $ !********************************************************************** subroutine erodinit ! ! +++ PURPOSE +++ ! ! Controls calls to subroutines that: ! create the Erosion submodel grid (sbgrid) ! initialize Erosion submodel output array to zero (sbigrd). ! calculate normalized effect of hills on friction velocity ! on grid for each wind direction (not activated) ! calculate normalized effect of barriers on friction velocity ! on grid for each wind direction (sbbr) ! + + + GLOBAL COMMON BLOCKS + + + ! include 'p1werm.inc' include 'm1flag.inc' include 'm1geo.inc' include 'erosion/m2geo.inc' include 'erosion/e2grid.inc' !needed for initialization of csr(*,*) ! ! +++ SUBROUTINES CALLED +++ ! ! sbgrid ! sbigrd ! sbhill (not activated) ! sbbr ! +++ FUNCTION DECLARATIONS +++ ! ! +++ LOCAL VARIABLES +++ integer i, j ! + + + LOCAL VARIABLE DEFINITIONS + + + ! nbr = number of barriers (from m1geo.inc) ! ! +++ END SPECIFICATIONS +++ ! ! Grid is created at least once. if (am0eif .eqv. .true.) then ! check to see if grid dimensions specified via cmdline args if ((xgdpt > 0) .and. (ygdpt > 0)) then imax = xgdpt + 1 jmax = ygdpt + 1 ix = (amxsim(1,2) - amxsim(1,1)) / xgdpt jy = (amxsim(2,2) - amxsim(2,1)) / ygdpt !code lifted from sbgrid because it is initialized there - LEW do j = 0, jmax do i = 0, imax csr(i,j) = 1 ! icsr = 1 end do end do else !use Hagen's grid dimensioning as the default call sbgrid endif ! ! set grid cell output arrays to zero call sbigrd ! ! check for hills - sbhill not implemented ! if (nhill .gt. 0) then ! call sbhill ! endif ! ! check for barriers if (nbr .gt. 0) then call sbbr endif ! ! Turn off grid creation flag am0eif = .false. endif return end !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++