Created
April 19, 2013 22:17
-
-
Save linktohack/5423597 to your computer and use it in GitHub Desktop.
Load Text Data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine load_txt_data_1d_d(d, f) | |
implicit none | |
real*8, intent(out) :: d(:) ! array of text data | |
character(*), intent(in) :: f ! chanel file name | |
open(51, file=trim(f), status='old', action='read') | |
read(51, *) d | |
close(51) | |
endsubroutine | |
subroutine load_txt_data_2d_d(d, f) | |
implicit none | |
real*8, intent(out) :: d(:,:) ! array of text data | |
character(*), intent(in) :: f ! chanel file name | |
real*8 :: dt(size(d,2),size(d,1)) | |
open(51, file=trim(f), status='old', action='read') | |
read(51, *) dt | |
close(51) | |
d = transpose(dt) | |
endsubroutine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment