00001
00002
00003
00004 module make_array
00005 use phys_constant, only : long
00006 implicit none
00007 contains
00008
00009
00010 subroutine make_array1(array,n1,stn1)
00011 implicit none
00012 integer,Intent(IN) :: n1
00013 integer,optional :: stn1
00014 integer :: status
00015 Real(long), pointer :: array(:)
00016 if (present(stn1)) then
00017 Allocate(array(stn1:n1),stat=status)
00018 else
00019 Allocate(array(0:n1),stat=status)
00020 end if
00021 end subroutine make_array1
00022
00023
00024 subroutine make_array2(array,n1,n2)
00025 implicit none
00026 integer,Intent(IN) :: n1, n2
00027 integer :: status
00028 Real(long), Pointer :: array(:,:)
00029 Allocate(array(0:n1,0:n2),stat=status)
00030 end subroutine make_array2
00031
00032
00033 subroutine make_array3(array,n1,n2,n3)
00034 implicit none
00035 integer,Intent(IN) :: n1, n2, n3
00036 integer :: status
00037 Real(long), Pointer :: array(:,:,:)
00038 Allocate(array(0:n1,0:n2,0:n3),stat=status)
00039 end subroutine make_array3
00040 end module make_array