SUBROUTINE CREATE_UNIFORM_GRID ( XL, X_BEGIN, X_LENGTH, N) c C WHAT This routine will create a uniform computation grid c of N zones beginning at location X_BEGIN and has a c total length X_LENGTH Thus the width of each zone c is X_LENGTH / N c c The grid is defined by the locations of the lefthand c zone interfaces XL. Thus zone I would have its left c edge at XL(I) and its right edge at XL(I+1). Therefore c a grid of N zones requires N+1 XL values. c c DIMENSIONS c output It will be assumed that the dimension of the array XL c is [1:N+1]. c C DATA C input Input scalers are: c X_BEGIN: the starting value of the left edge of the c grid. That is XL(1) = X_BEGIN c X_LENGTH: the total length of the grid. c That is XL(N+1) = X_BEGIN + X_LENGTH c N: the number of zone in the grid. C output Output arrays are: c XL: the locations of the lefthand zone interfaces c c c c c REAL XL(1:N), X_BEGIN, X_LENGTH, DX DX = X_LENGTH / FLOAT(N) XL(1) = X_BEGIN DO I = 2,N+1 XL(I) = XL(I-1) + DX ENDDO RETURN END ! SUBROUTINE CREATE_UNIFORM_GRID