Hello!
I have a problem allocating derived datatypes.
My setup reads as followed:
I have a module_gv in which my derived datatype is declared like this:
type, public :: w_field, sequence
double precision :: wx,wy,wz
end type w_field
type(w_field),allocatable,dimension,:, :: w
then in the program main main.F90
i declared:
use module_gv
allocate(w(32,32,32))
1
w is being used in another subroutine sub(w) which is called after allocation
compiling this leaves me with a syntax error which is caused by w as indicated by "1"
I dont know if the error is because i cant allocated derived datatypes or if i need to allocate its components as well (which i tried but left me with just the same errors for all the components of w and w as well).
Can anyone tell me what i did wrong or missed during declaration?
How do i get w allocated?
thanks for your help!
btw: I'm using the gfortran compiler.
I have a problem allocating derived datatypes.
My setup reads as followed:
I have a module_gv in which my derived datatype is declared like this:
type, public :: w_field, sequence
double precision :: wx,wy,wz
end type w_field
type(w_field),allocatable,dimension,:, :: w
then in the program main main.F90
i declared:
use module_gv
allocate(w(32,32,32))
1
w is being used in another subroutine sub(w) which is called after allocation
compiling this leaves me with a syntax error which is caused by w as indicated by "1"
I dont know if the error is because i cant allocated derived datatypes or if i need to allocate its components as well (which i tried but left me with just the same errors for all the components of w and w as well).
Can anyone tell me what i did wrong or missed during declaration?
How do i get w allocated?
thanks for your help!
btw: I'm using the gfortran compiler.