Используйте третий модуль:
ian@eris:~/work/stack$ cat 3_modules.f90
Module array_sizes
Implicit None
Integer, Parameter, Public :: x = 400
Integer, Parameter, Public :: z = 433
Private
End Module array_sizes
Module a
Use array_sizes, Only : x, z
Implicit None
Real, Dimension( 1:z ), Public :: rm
Real, Dimension( 1:x ), Public :: rp02
Private
End Module a
Module b
Use array_sizes, Only : x, z
Implicit None
Real, Dimension( 1:z ), Public :: rps02
Real, Dimension( 1:x ), Public :: rdps02
Private
End Module b
Program testit
Use a, Only : rm , rp02
Use b, Only : rps02, rdps02
Implicit None
Call Random_number( rm )
Call Random_number( rp02 )
Call Random_number( rps02 )
Call Random_number( rdps02 )
Write( *, * ) 'Size rm ', size( rm )
Write( *, * ) 'Size rp02 ', size( rp02 )
Write( *, * ) 'Size rps02 ', size( rps02 )
Write( *, * ) 'Size rdps02', size( rdps02 )
Write( *, * ) rm( 1:4 ) * rps02( 1:4 )
End Program testit
ian@eris:~/work/stack$ gfortran -std=f2008 -Wall -Wextra -fcheck=all 3_modules.f90
ian@eris:~/work/stack$ ./a.out
Size rm 433
Size rp02 400
Size rps02 433
Size rdps02 400
4.44743484E-02 0.322003543 3.06500960E-02 0.369239926
ian@eris:~/work/stack$