Here's a little taste of what I'm doing. Enjoy Martin!
PROGRAM AndyProject1
C
CC Declaration of all variables.
C
IMPLICIT NONE
C
CC Parameter statement.
C
INTEGER*4, PARAMETER :: single = 4
INTEGER*4, a, i, dimsize(7), status
C
CC Number of command lines.
C
INTEGER(KIND=SINGLE)
1 nargs, ! Number of command line arguments
2 IARGC, ! Intrinsic function that retrieves them
3 nvars,
4 nlats,
5 nlons,
6 nheights,
7 ntime,
8 nzeroone,
9 nzerotwo,
1 nzerothree
CHARACTER(LEN=256)
1 AsciiFilename, ! Input file name command line argument
2 varname
C
CC Creating allocatable array.
C
real(kind=single), allocatable, dimension( : ) :: stuff
C
CC Retrieving command line arguments.
C
nargs = IARGC()
C
CC Making sure there is only one command line argument.
C
if (nargs .ne. 1) then
WRITE(*,*) 'You must enter one command line argument:'
WRITE(*,*) ' Name of ASCII File to be dumped'
STOP
end if
C
CC Retrieve the name of the ASCII File passed in as a
CC command line argument.
C
CALL GETARG(1, AsciiFilename)
C
CC Writing the file name to the terminal.
C
WRITE(*,*) AsciiFilename
C
CC Opening another file to copy the Ascii data.
C
open(unit=a, file= AsciiFilename)
C
CC Reading and writing number of variables and dimension size.
C
read(a,*) nvars
read(a,*) varname, dimsize
write(*,*) nvars
write(*,*) dimsize
C
CC Allocating the array.
C
allocate(stuff(nvars), STAT=status)
C
CC Reading in data via the do loop.
do i = 1, nvars, 1
read(a,*) varname, dimsize(i)
end do
C
CC What we need to do is place the allocatable array in a do loop
CC for the variables.
C
C
CC Deallocate the array.
C
deallocate(stuff,STAT=status)
C
CC Ending program
C
END