运行程序/不显示在终端中

时间:2017-05-10 10:53:50

标签: fortran gfortran fortran90

所以我正在运行这个程序来检查以确保正确读取所有内容,并且我有一个输出文件来写出我正在阅读的完全相同的东西。我需要这样做对于多个文件和避风港有任何检查问题。但是我在我的上一篇文档中,当我在终端中运行它时,在执行./a.out之后没有任何内容显示出来。我的节目是否有可能太大而不能胜出?我真的很困惑enter image description here

以下是该计划的代码:

program final 

    implicit none
    integer :: i
    real, parameter :: &
    g=9.81    !Value of gravity acceleration

    ! Declaration of arrays specific to Dec. 6, 1973
    integer, dimension(60) :: direction73, speedconv73, speed73, rh73
    real, dimension (60) :: pressure73, height73, temp73, dewpt73, mixr73

    ! Declaration of arrays specific to Dec. 6, 1983
    integer, dimension(45) :: direction83, speedconv83, speed83, rh83
    real, dimension (45) :: pressure83, height83, temp83, dewpt83, mixr83

    ! Declaration of arrays specific to Dec. 6, 1990
    integer, dimension(70) :: direction90, speedconv90, speed90, rh90
    real, dimension (70) :: pressure90, height90, temp90, dewpt90, mixr90

    ! Declaration of arrays specific to Dec. 6, 1996
    integer, dimension(82) :: direction96, speedconv96, speed96, rh96
    real, dimension (82) :: pressure96, height96, temp96, dewpt96, mixr96

    ! Declaration of arrays specific to Dec. 6, 2003
    integer, dimension(79) :: direction03, speedconv03, speed03, rh03
    real, dimension (79) :: pressure03, height03, temp03, dewpt03, mixr03

    ! Declaration of arrays specific to Dec. 6, 2009
    integer, dimension(140) :: direction09, speedconv09, speed09, rh09
    real, dimension (140) :: pressure09, height09, temp09, dewpt09, mixr09

    ! Declaration of arrays specific to Dec. 6, 2016
    integer, dimension(121) :: direction16, speedconv16, speed16, rh16
    real, dimension (121) :: pressure16, height16, temp16, dewpt16, mixr16

    real :: average, knots, radians, ucomp, vcomp, PW, avgrh 
    real :: ucompsum, vcompsum, avgucomp, avgvcomp, layermag=0.0

open(1,file='1973Dec6.txt', status='old', action='read')

            10 format (F7.1, T9, F6.1, T17, F5.1, T24, F5.1, T34, I2, T39, F4.2, T47, I3, T54, I3)

            do i=1,60
                read(1,10) pressure73(i), height73(i), temp73(i), dewpt73(i), rh73(i), mixr73(i), direction73(i), speed73(i)
            end do

    close (1)

    open(2,file='1983Dec6.txt', status='old', action='read')

            do i=1,45
                read(2,10) pressure83(i), height83(i), temp83(i), dewpt83(i), rh83(i), mixr83(i), direction83(i), speed83(i)
            end do

    close (2)

    open(3,file='1990Dec6.txt', status='old', action='read')

            do i=1,70
                read(3,10) pressure90(i), height90(i), temp90(i), dewpt90(i), rh90(i), mixr90(i), direction90(i), speed90(i)
            end do

    close (3)

    open(4,file='1996Dec6.txt', status='old', action='read')

            do i=1,82
                read(4,10) pressure96(i), height96(i), temp96(i), dewpt96(i), rh96(i), mixr96(i), direction96(i), speed96(i)
            end do

    close (4)

    open(5,file='2003Dec6.txt', status='old', action='read')

            do i=1,79
                read(5,10) pressure03(i), height03(i), temp03(i), dewpt03(i), rh03(i), mixr03(i), direction03(i), speed03(i)
            end do

    close (5)

    open(6,file='2009Dec6.txt', status='old', action='read')

            do i=1,140
                read(6,10) pressure09(i), height09(i), temp09(i), dewpt09(i), rh09(i), mixr09(i), direction09(i), speed09(i)
            end do

    close (6)

    open(7,file='2016Dec6.txt', status='old', action='read')

            do i=1,121
                read(7,10) pressure16(i), height16(i), temp16(i), dewpt16(i), rh16(i), mixr16(i), direction16(i), speed16(i)
            end do

    close (7)

    !Output File

    open(9, file='finaloutput.txt', status='new', action='write') 

        do i=1,121
            write (*, 20) pressure16(i), height16(i), temp16(i), dewpt16(i), rh16(i), mixr16(i), direction16(i), speed16(i)
            20 format (F7.1, T9, F6.1, T17, F5.1, T24, F5.1, T34, I2, T39, F4.2, T47, I3, T54, I3)
        end do
    close (9)

end program final

0 个答案:

没有答案