real, allocatable, dimension (:) :: rValue ! declare your variables like this
.
.
read (*,*) N ! user input
allocate (rValue(N), stat = irslt) ! allocate memory for your array
if (irslt .ne. 0) then
write (*,*) 'cannot allocate memory' ! errormessage
! continue as appropriate in your prog
endif
rValue = 0.0 ! initalize your new array some way or other
.
(use array)
.
deallocate (rValue) ! deallocate if no longer needed to free memory