Need help in doing a program in fortran77

In summary, the conversation is about a request for help with a FORTRAN program that reads data from a file and outputs information to another file. The program should be able to calculate and display monthly minimum and maximum air temperatures, as well as the time of occurrence, and sorted monthly mean daily air temperatures. The program should use intrinsic functions such as MAXVAL, MINVAL, MAXLOC, and MINLOC to achieve this. The person asking for help is asked where they are stuck.
  • #1
qadi77
1
0
I need to do this program, I'll be greatful for anyone that can help me. the program is as this:

The following data are obtained from the file ‘JBWEA.DAT’. It contains the twenty-four hourly average air temperatures for the months of January through December, recorded at an airport.

Hour Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 23.0 22.7 23.7 23.9 24.1 24.9 23.9 23.7 23.9 23.9 24.2 23.7
2 22.9 22.4 23.4 23.8 23.9 24.7 23.7 23.5 23.7 23.7 24.1 23.5
3 22.8 22.2 23.3 23.6 23.7 24.5 23.4 23.3 23.5 23.6 23.9 23.5
4 22.6 22.0 23.0 23.5 23.5 24.3 23.2 23.1 23.3 23.4 23.7 23.4
5 22.5 21.8 22.9 23.3 23.4 24.2 23.0 23.0 23.2 23.3 23.6 23.3
6 22.5 21.6 22.7 23.2 23.3 24.0 23.0 22.9 23.1 23.1 23.5 23.3
7 22.6 21.9 23.2 23.8 24.1 24.6 23.5 23.3 23.6 23.9 24.3 23.9
8 24.1 24.3 25.4 26.0 26.3 26.8 25.5 25.2 25.5 26.3 26.1 25.3
9 25.7 27.0 28.1 28.5 28.6 28.8 27.8 27.7 27.9 28.8 28.1 27.2
10 26.6 28.9 29.7 30.0 29.9 30.2 29.2 29.0 29.5 30.1 29.2 28.2
11 27.5 30.1 30.7 31.1 30.5 31.1 29.6 29.3 30.1 30.7 30.0 29.0
12 27.9 31.0 31.4 31.3 30.4 31.3 30.0 29.7 30.3 30.6 30.5 29.7

Note: Hour 1 = 1 AM, 2 = 2 AM,………………, 24 = midnight.

Write a FORTRAN program that reads the above data from the file ‘JBWEA.DAT’ and write the following outputs to an output file ‘JBWEA.RES’

(a) Monthly minimum and maximum air temperatures, and their time of occurance.
(b) Monthly mean daily air temperatures, sorted in decreasing mean daily air temperatures.
 
Physics news on Phys.org
  • #2
Just read the data into an array. From there a) can be done by using intrinsic functions, MAXVAL,MINVAL,MAXLOC, and MINLOC.

For the second part, calculate the mean for each month, then loop through printing the maximum value left.

Where exactly are you stuck?
 
  • #3
(Merged two threads with same question)
 

What is Fortran77?

Fortran77 is a programming language commonly used in scientific and engineering applications. It was first introduced in 1957 and has since been updated and improved upon.

Why do I need help with a Fortran77 program?

Fortran77 can be a complex and challenging language, especially for those who are new to programming. It is common for individuals to seek help when creating a program in Fortran77.

What are the benefits of using Fortran77?

Fortran77 is well-suited for scientific and technical computing tasks. It can handle large amounts of data and perform complex calculations efficiently.

How can I improve my skills in Fortran77?

Practicing regularly and seeking help from experienced programmers can greatly improve your skills in Fortran77. There are also many online resources and tutorials available to help you learn the language.

Is Fortran77 still relevant in today's programming landscape?

Yes, Fortran77 is still widely used in scientific and engineering fields, and many legacy codes are written in this language. However, newer versions of Fortran, such as Fortran90 and Fortran95, are also widely used and offer additional features and improvements.

Similar threads

  • Science and Math Textbooks
Replies
19
Views
17K
Back
Top