Hey guys, new here and was hoping for some help.
Basically I have to use Fortran 77 to complete some questions for an assignment
The first thing to do is, read a bunch of numbers in a list format and then use these numbers to be entered within an equation.
The values I have are listed in a 1...
Hi all,
I'm new to Fortran programming, so I might probably ask some really trivial questions - please forgive me.
I have two source codes of big programs. One is coded in Fortran77 and the other one in Fortran90.
Now, I need to build an interface so that the Fortran90 program can call some...
The following program is printing wrong value of RWTSED. How can I print correct value??
program inpdat
c
IMPLICIT NONE
REAL RHOMN,RWTSED,VOLSED
VOLSED = 17424.0
RHOMN = 2.42 !0000076293945
RWTSED= VOLSED*RHOMN*1.0E6
2000 FORMAT(/,3F40.5)...
Hello everyone, I'm trying to solve a BVP that seems to be very sensitive, for which I have to provide a starting guess and hope the program can fix it to find a solution. The program has been tested many times and it is very solid, the only problem should be that I can't find the right guess...
Hi to all,
I have a random number generator in FORTRAN, which gives a random numbers to my particles initial velocity in three dimension (vx,vy,vz). If, I want to make my particles to embark to move with a specific weight (eg. Maxwellian), what should I do?
absv = sqrt(vx*vx+vy*vy+vz*vz)
wt=...
Hi. I have written a code to solve the one dimensional one group (a fixed velocity is considered for the particles) time independent transport equation. The code uses the ##S_N## discrete ordinates method, a Gauss-Legendre quadrature in the angular directions, and a Diamond Difference formula...
SOLVED
Hi there. I have the elements of a matrix written in a txt file (in row major order). I need to read this matrix to use it in my fortran77 program. The text file contains the elements written in this way:
A(1,1)
A(1,2)
...
A(1,N)
...
A(N,N-1)
A(N,N).
I was thinking in doing a do loop...
Hi, this thread is an extension of this one: https://www.physicsforums.com/posts/5829265/
As I've realized that the problem is that I don't know how to properly use FFTW, from http://www.fftw.org.
I am trying to calculate a derivative using FFTW. I have ##u(x)=e^{\sin(x)}##, so...
So I am doing a chemical simulation of titans atmosphere and I have potentially 1000 data files to sort through to retrieve concentration values written in Double format. The issue is that each chemical has its own line with well over 80 columns (1993 currently, though it is subject to...
I'm currently doing a chemical model of Titan's atmosphere and the simulation outputs several files (up to 1000) and I need to get an array of data out of them from a specific section labeled with a chemical name (i.e HC5N) that has an arbitrary number of values (usually above 100). I've seen...
Programming with Fortran77,
I got some problems during coding...
How can I set to be the value?
For example, I want to the value 'a' set to be 0.0000045.
But, in command window, value of a is set to be 0.000004499876895.
How can I set to be the value 'a'?
In my case, I command the real value...
Hi all
Just to start with I should highlight my general ineptitude with programming, so I apologize if my question is totally basic.
I have a program written (by someone else) in fortran 77. Contained within it is a call to a function which acts on a number of variables. My curiosity is about...
I was told to do a Fourier transform of function by using a Filon's method. I have found the code but I don't know how to include any function to the subroutine. I would be grateful for any example of how to use this code.
SUBROUTINE FILONC ( DT, DOM, NMAX, C, CHAT )
C...
Homework Statement
I have two subroutine syntax program in fotran77 code, and I am stuck to understand it.
this is the first subroutine code
subroutine LZHES(N,A,NA,B,NB,X,NX,WANTX)
c
implicit real*8 (a-h,o-z)
c
complex*16 Y,W,Z,A(NA,N),B(NB,N),X(NX,N)
real*8 C,D
logical WANTX
c
NM1=N-1
DO 30...
Hi!
I would like to compile some *.for files (only standard Fortran77 statements) which only contains some subroutines and functions and link them with a *.res resource file and a *.lib library file (supplied by developers) into a windows executable.
Is there any FREE program to achieve...
Hey guys! Having issues with a code I'm writing. It doesn't fit the typical format and I may have already accidentally posted it in the wrong forum, so here's a copy of what was there with the newest version of the code. It'll (eventually) be a four-parameter least squares minimisation, but for...
Hey guys! Having issues with a code I'm writing. It'll (eventually) be a four-parameter least squares minimisation, but for the moment I'm just trying to get the single parameter version to work. I've got the first module done but, when I run it it gets caught up in a loop and doesn't actually...
I'm translating some code from Fortran77 to Matlab and I'm struggling due to the sentence GO TO is not valid in Matlab.
Usually using sentences while I can solve the problem but in a particular case I don't know how to face it.
To put in situation, i.e:
code
line 1
line 2
...
128...
Hi,
I am new to the forum, apologies if I break any rule posting a new thread. I could not find the answer in similar threads came up after searching the forum.
I want to read a formatted file of six column data. Reading works OK, but I want to put it into a do loop with the repeat as many as...
fortran77 statement -- character assignment
Hi, I am porting an application written in fortran 77 to linux. The following code compiles well with IBM xlf compiler on AIX. However, when I use g77, it fails with the following error:foo.f:6:
+ var /ZFF/...
I have problem don't use tab to separate cell for writing file to excel.
this algorithm write file to excel one cell only.i want write file separate cell on excel file.
please suggest me about algorithm write file in excel file.
I have a program written in Fortran IV and tryed to run it with fortran77(g77). Nevertheless
it could be not problem in fortran IV it make some errors in fortran77. I am not programmer but trying to learn some. Here is the errors that compiler fortran77 is wrote:
found.f: In program...
Homework Statement
fortran77 programe to find the inverse of a matrix
Homework Equations
how to initiate the logic
The Attempt at a Solution
I have attempted the 3by3 matrix,how to do for a other square matrix
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...
Hi there,
I have generated a huge data file (approx 500MB large) containing a few 100k lines of formatted data (format(1X, 200ES11.4)). As I believe handling such a large file might over and over again (will be opened by an explicit FE code) might slow down the process significantely, I was...
My assignment: Solve for pi using a Riemann Sum with n= 40,000,000. The function is the antiderivate of 4/(1+x^2) dx. The bounds are from 0 to 1. Solving this gives you pi.
Anyone know how to do this? Preferably with fortran77?
I'm trying to comprehend some old Fortran 77 code. I've run across an a line of code that resembles the following:
R(1)=2.*RL(1)*N(1)
What does the period in the above code mean?