Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I'm allocating the dimension of some arrays once I have calculated steps, then I send the allocated arrays to a function but I have the error Type/rank mismatch in argument 'a'.

What am I doing wrong?

Cheers

integer i, steps, noutput, savestep

double integrationtime, outputstep, timestep, deltat, ain, ein

real, dimension(:), allocatable :: a, e, time

steps=int(integrationtime/timestep)

allocate(time(steps), a(steps), e(steps))

time(0)=0.0d0

a(0)=ain*1.49597870691d11

e(0)=ein

call calc (steps, a, e, time)

stop

contains

subroutine calc (steps, a, e, time)

integer i, steps

double precision time(steps), a(steps), e(steps)

do i=1, steps

time(i)=

a(i)=...

e(i)=...

end subroutine calc

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Type/rank mismatch in argument

**Physics Forums | Science Articles, Homework Help, Discussion**