Fortran Definition and 858 Threads
-
P
Fortran How to calculate vorticity using fortran
Hi asking for help how to calculate vorticity using fortran ∇×c ⃗ where both nabla and c are three dimension vector, and c is the wind speed with three component- philbert
- Thread
- Fortran Vorticity
- Replies: 1
- Forum: Programming and Computer Science
-
S
Fortran Can we compile fortran 90 on external hdd?
Hi, I need to compile a programming written in fortran90 and the output will be in 10 000 data files(maybe more) size 3.5Mb each. My notebook's memory is not enough to store all the data file, I am using Linux 3.11.6-4-desktop with openSUSE 13.1 (Bottle) (x86_64). I have 1TB external hdd and...- s_hy
- Thread
- Fortran Hdd
- Replies: 8
- Forum: Programming and Computer Science
-
M
Fortran [Fortran] Filling a disk with random points
Hi My FORTRAN is rusty and my brain is even more rusty. I want to populate an annulus with a randomly distributed set of points. Any hints or tips to get me thinking about this would be gratefully received. Thanks D- mrcotton
- Thread
- Disk Fortran Points Random
- Replies: 26
- Forum: Programming and Computer Science
-
T
Fortran Fortran programming help arrays and arithmetic
Hi folks, To begin with, I have no past programming experience and have just begun to teach myself programming in FORTRAN 95 and I've hit a wall. I'd be very grateful for any assistance here. I have around 150 text files with three columns of data (I have attached one as an example, and...- twomsta
- Thread
- Arithmetic Arrays Fortran Programming
- Replies: 13
- Forum: Programming and Computer Science
-
Fortran [Fortran] Naming conventions for integers
Long ago I learned Programming in FORTRAN. I got used to the convention that names starting with I,J,K,L,M,N were INTEGER while all other letters were REAL. I thought it was a convention of FORTRAN only. Since then, I came to realize that the same convention is widely used in science and math...- anorlunda
- Thread
- Fortran Integers
- Replies: 8
- Forum: Programming and Computer Science
-
H
Fortran Fortran: How to make a long character made with an array
Lets see if I explain myself. I want to FILL a string with the components of a character array. I have no idea, but seeing this example: character(len=*),parameter::fname=" Paul",lname="Scholes" character(len=20)::fullname fullname=fname//" "//lname I try this one...- hodei_cloud
- Thread
- Array Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
A
Fortran How are the initial X values chosen? Fortran
So, I had initially kept the values of X as 0.0D0 for all my 14 variables and it wouldn't populate any results. This was mainly done based on the guide that I was referring to. On contacting my tutor, he placed the following values instead? X(1) = 0.0D-01 X(2) = 0.0D-02...- adishpatel
- Thread
- Fortran Initial
- Replies: 1
- Forum: Programming and Computer Science
-
M
Fortran Fortran branching statement confusion
Folks: I have a FORTRAN program published in Multivariate Morphometrics (Blackith and Reyment - 1971). In this book they list a FORTRAN program that computes Canonical Correlates. I don't have a FORTRAN compiler and I'm trying to translate this program into PERL. The one FORTRAN book that is...- msmolen
- Thread
- Confusion Fortran
- Replies: 6
- Forum: Programming and Computer Science
-
A
Fortran Why is the output format different for two similar Fortran codes?
So, when I execute my code which is at http://sysden.com/dufing.f I get the results which are very well organized: PATH ========================================================================================== N INP JCASE JOB JBIF ILAM...- adishpatel
- Thread
- Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
Fortran Fortran 77 [F77] : Code in external file without subroutine?
I have some F77 code and I am wondering if it is possible to inject external code into a separate file and call it without it being a subroutine, and placed into the code. An example would be : a = 1 + 1 b = a + 1 c = b + a a = c + b d = 4 + a and I want to take lines 3 and 4 and...- Hepth
- Thread
- Code File Fortran Subroutine
- Replies: 3
- Forum: Programming and Computer Science
-
S
Fortran What Does a Positive Width Error in Fortran Format Specifier Mean?
Hi all, I got this error: rm -f *.o *.mod *.MOD *.exe *.stackdump main gfortran -g -I/usr/include -c main.f90 gfortran -g -I/usr/include -c subroutines.f90 subroutines.f90:21.16: 10 format(data,'i3.3','.dat') 1 Error: Positive width required in format...- s_hy
- Thread
- Error Fortran
- Replies: 3
- Forum: Programming and Computer Science
-
A
Fortran Array Reference is out of bounds error? Fortran
So, I have a bunch of errors which need resolving here but majority are based on the "out of bounds" error and hence the topic title :). Would be great if you are able to help me resolve the errors. Quite a newbie with fortran. So please bear with any silly questions that I may throw at you...- adishpatel
- Thread
- Array Bounds Error Fortran Reference
- Replies: 11
- Forum: Programming and Computer Science
-
S
Fortran Why am I getting a NaN Error when Running my Fortran Program?
Hi to everyone, I am quite new to forum and fortran. Basically, i am trying to calculate the bubble radius using RP model and this is my code: IMPLICIT DOUBLE PRECISION (A-H,O-Z) IMPLICIT INTEGER (I-N) C ! Declare local constant Pi REAL, PARAMETER :: Pi = 3.1415927D0 C...- shipman
- Thread
- Error Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
M
Fortran Fortran DO loop sequence confusion
I am trying to convert a FORTRAN version of a Canonical Correlates program listed in Multivariate Morphology - Blackith and Reyment. I've programed in FORTRAN decades ago and now I have to understand the language to rewrite the program into PERL. a) DO 260 I = 1 , M b) SX( I ) =...- msmolen
- Thread
- Confusion Fortran Loop Sequence
- Replies: 12
- Forum: Programming and Computer Science
-
K
Fortran Fortran issues - Not getting expected output
Hey everyone, I've been working on this project for awhile (some of you may recall having seen a very early version), and I am so close to being finished, but I have a problem somewhere, and I can't figure out why. So what is happening here is that this code is supposed to calculate the...- karenmarie3
- Thread
- Fortran Issues Output
- Replies: 4
- Forum: Programming and Computer Science
-
M
Fortran Fortran Help for Meteorologist Student: 4th-End, 60-100
Hi, i am a meteorologist student and I have some data I have to prepare using Fortan. I don't know how to make it read the file from the 4th row till the end and from the 60th line till the 100th. Can you please help me? I'm desperate!- MelinaM
- Thread
- Fortran
- Replies: 26
- Forum: Programming and Computer Science
-
H
Fortran Fortran 90 how to read how many characters are in a line?
Hello everyone, this is the thing: (Before anything I have to say that I trying to make the program in fortran 90) I have a text to read, and in that text i have to know how many characters are in every single line. I make it to count how many lines are in the text with this code: n=0 do...- hodei_cloud
- Thread
- Fortran Line
- Replies: 4
- Forum: Programming and Computer Science
-
H
Comp Sci Fortran Program - Calculate the Function
Homework Statement F(x) = exp(-a x^2) cos bx for -100 =< x >= 100 , a=13 and b=7. Homework Equations ... The Attempt at a Solution program main implicit double precision (A-H,O-Z) implicit integer (I-N) DO I = -100,100 X = I * 1D0 F = DEXP(-A * X**2) * DCOS(B * X)...- Haleemos
- Thread
- Fortran Function Program
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
B
Fortran Fortran 90 - gfortran error - help
Hi, I have written a fortran 90 program that finds the definite integral of a function using the trapezium method. Everything is fine, other than when I compile my program it produces the following error: assignment_2_final.f90:127.2: ITRAP = (z/2)((G(a) + G(b)) + z*area) 1...- Bussell93
- Thread
- Error Fortran Gfortran
- Replies: 2
- Forum: Programming and Computer Science
-
D
Fortran [Fortran] Is anyone familiar with the Elk-code software?
Dear all, Are you familiar with the Elk-code software? It is a software about FLAPW (full potential linear augumented plane wave).Recently,I am reading the source code,but I meet many difficulties. For example,I've a question related to charge density.In the Elk source code, the charge...- Douasing
- Thread
- Fortran Software
- Replies: 1
- Forum: Programming and Computer Science
-
T
Fortran Fortran Error Unexpected data declaration statement
Fortran Error "Unexpected data declaration statement" Hi all, I'm writing a program to perform a linear inversion on a set of magnetic data. I'm fairly new to Fortran, but I have coded Fourier and wavelet transformation programs in it. I'm having a problem when trying to declare my variable...- TamuKevin
- Thread
- Data Error Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran How to Write a Fortran Code to Read a Specific Data File?
The input file: --------------------------------------------------------------------------------- S 1 S 2 1H,,1H...- niloy112
- Thread
- Code Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
S
How Do You Calculate Surface Integrals in Fortran 90?
I am dumfounded on how one would perform surface integrals in Fortran 90 over a platelet, or a rectangular box. I can do single and double integrals but I have no idea on how to do surface integrals Thanks in advance!- Supermann11
- Thread
- Fortran Integrals Surface Surface integrals
- Replies: 9
- Forum: Advanced Physics Homework Help
-
M
Fortran How to Use FORTRAN Do Loops for Solving Equations - Step by Step Guide"
Hey guys, I'm new to fortran and I'm having a slight problem. I put my code below as reference. I first set up a my known values. Then I used an equation to solve for v. After I solve for v I then computed c which involves v. What I'm now trying to do is to loop the value I got for c back...- McAfee
- Thread
- Fortran Loop
- Replies: 3
- Forum: Programming and Computer Science
-
S
Fortran FORTRAN error array bound is not scalar integer
FORTRAN error "array bound is not scalar integer" I'd like to know if a loop can be created, inside which I can call a subroutine in which there are arrays to be defined whose size varies as a function of loop variable. I tried as following, but got error "array bound is not scalar integer"...- sathish
- Thread
- Array Bound Error Fortran Integer Scalar
- Replies: 4
- Forum: Programming and Computer Science
-
B
Fortran How can I fix my program to calculate the average of a set of numbers correctly?
Hi, I'm a first year physics undergrad studying the fortran language with NAG compiler for computer programming. Question 1: How do I write a program that finds the average of a set of n numbers? I've written a program already but my answers are continuing to be 0.0000, no matter what...- Bussell93
- Thread
- Beginner Fortran
- Replies: 7
- Forum: Programming and Computer Science
-
T
Fortran How to Resolve Compilation Errors with Fortran 90/95 MODULEs?
Hi! I require help in writing a code where I want to put FUNCTION definitions in one module and INTERFACEs to the functions (as I use assumed-shape arrays in the functions) in another. But I get multiple errors when trying to compile. Could anyone assist me in solving this problem? Please see...- ted_kingdom
- Thread
- Fortran Modules
- Replies: 3
- Forum: Programming and Computer Science
-
A
Fortran Retake: Reading an existing file into a fortran code
Thank you very much for the reply. I placed the file in the same directory as the program and opened the file before executing and everything was just perfect. But my other problem is that, in my data, there consists of negative numbers. Is there a way to read the positive inputs without the...- angelfaz
- Thread
- Code File Fortran Reading Retake
- Replies: 2
- Forum: Programming and Computer Science
-
A
Fortran Reading an existing file into a fortran code
I am programming in fortran 90/95 and i have a problem opening an existing file for input. I have written the code without any errors, but at compilation time, the file to be read cannot open. It is as if the program does not know the location for the file. I would like to know if there is a...- angelfaz
- Thread
- Code File Fortran Reading
- Replies: 1
- Forum: Programming and Computer Science
-
D
Fortran Numerical Minimization of many-variable function in Fortran
I would like to find a FORTRAN subroutine or a good way to minimize function numerically.So basically my function has 20 variables and I am able to provide analytic form of the first and the second derivative of the function. Basically what I want is: have the form of the function of 20...- dftfunctional
- Thread
- Fortran Function Minimization Numerical
- Replies: 1
- Forum: Programming and Computer Science
-
S
Fortran How can i create a random number distribution (FORTRAN)
Hello, I am working on the two point correlation function in dark matter haloes. Right now i need to create an array of rundom numbers to compute the estimators. My question is: How can i create a random distribution of points in the unit sphere (having in mind its curvature). I...- sketos
- Thread
- Distribution Fortran Random Random number
- Replies: 4
- Forum: Programming and Computer Science
-
R
Comp Sci Fortran programming to solve linear equation for ode
Fint the exact solution of the system dy/dt = -15y-25z dz/dt=-47y-85z with inital condition y(0)=2, z(0)=5 either by writing the equation in matrix form as dx/dt =AX where x=(y z) and diagonalising the matrix A, or otherwise. Using fortran programming with second order adam bashforth...- ra_forever8
- Thread
- Fortran Linear Linear equation Ode Programming
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
R
Comp Sci Fortran programming for nonlinear ode
Adapt the fortran programming using second order adams bashforth method to generate a numerical solution of the Lorenz system: dx/dt =-10x+10y dy/dy=28x-y-x*z dz/dt= x*y- (8/3)*z with initial condition x(0)=y(0)=0, z(0)=2 slightly perturbed. Plot x and z against t runs from 0 to 15, and also z...- ra_forever8
- Thread
- Fortran Nonlinear Ode Programming
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
R
Fortran programming to solve ODEs
Consider the first order differential equation \[\frac{dy}{dy} = f(t,y) = -16 t^3 y^2\] with initial condition $y(0)=1$ Using second order Adams-Bashforth method, write a Fortran programming to generate an approximate solution to the problem. Solution Program adams Implicit None Real...- ra_forever8
- Thread
- Fortran Odes Programming
- Replies: 1
- Forum: General Math
-
R
Comp Sci Fortran Programming for order differential equation
Consider the first order differential equation dy/dy = f(t,y) = -16 t^3 y^2 with initial condition y(0)=1 Using second order Adams-Bashforth method, write a Fortran programming to generate an approximate solution to the problem. please forgive me for not trying because I really...- ra_forever8
- Thread
- Differential Differential equation Fortran Programming
- Replies: 22
- Forum: Engineering and Comp Sci Homework Help
-
C/C++ Why do you need FORTRAN, C, C++ for physics
Okay I get that FORTRAN was made for science and C AND C++ are fast but why do you have to know one of them? (or so I heard). Thanks for any help.- Superposed_Cat
- Thread
- C++ Fortran Physics
- Replies: 10
- Forum: Programming and Computer Science
-
O
Comp Sci [Fortran] making a more efficient bilinear interpolation
Homework Statement I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, and therefore is one of my main bottlenecks. I'm not a Fortran expert and...- octopode
- Thread
- Fortran Interpolation
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
K
Fortran How to fix the Euler method error?
Hi everybody, I am programming a new code for a problem. The problem is numerically solving the Simple Harmonic Motion using the Euler method. This approach is just an approximate solution and not a exact solution, however when I run the code successfully and plot my data, it comes up as an...- koushan
- Thread
- Euler Euler method Fortran Method
- Replies: 5
- Forum: Programming and Computer Science
-
B
Fortran [Fortran] Problems with LAPACK routine
I am trying to use the LAPACK routine dsyev to solve for the eigenvalues of a matrix, and I designed a program to test this and make sure I am getting the right results. It isn't recognizing the subroutine however. The subroutine is dsyev, which I can post or can be found on the LAPACK site...- Bashkir
- Thread
- Fortran Lapack
- Replies: 4
- Forum: Programming and Computer Science
-
L
Fortran Solving a system of equations with numeric variables - Fortran
Hello, I've been trying to solve a system of equations but I'm getting a lot of troubles when I tried to insert inside a matrix a numeric variable. This is my code. I've tried both schemes, i.e., (1) introducing all elements of the matrix by hand (real numbers) and (2) introducing numeric...- leogt11
- Thread
- Fortran Numeric System System of equations Variables
- Replies: 6
- Forum: Programming and Computer Science
-
B
Fortran Why is the 'aroot' Symbol Causing an IMPLICIT Type Error in Fortran?
I'm writing a subroutine for solving Newton's method for the root of a function and I am coming across an interesting problem. This is the start of my code, where it is says the error is occurring SUBROUTINE Newton(f, x1, x2, dx, aroot, error) IMPLICIT NONE ! Declare Arguments REAL...- Bashkir
- Thread
- Fortran Type
- Replies: 10
- Forum: Programming and Computer Science
-
K
Fortran Fortran program for oscillator using Euler method
I am trying to run a program with fortran. The program is about solving the Oscillator using Euler Method. I am trying to run this code and applying array arguments (as I want to extend it to 3 dimensions afterwards). When I try to compile, it comes up with an error "Unclassifiable statement at...- koushan
- Thread
- Euler Euler method Fortran Method Oscillator Program
- Replies: 3
- Forum: Programming and Computer Science
-
M
Fortran Transmitting values to functions and subroutines problems - Fortran 90
Hi everyone, I hope everyone's doing good. I presently have a project at work and I'm having a hard time dealing with some programming techniques. To summarize my project, I have to modify some codes on Fortran so that it can be adapted to be used on a simulation software called PRO/II. All...- Martin_Caceres
- Thread
- Fortran Functions
- Replies: 2
- Forum: Programming and Computer Science
-
M
Fortran Fortran runtime error: End of file
Dear all, I want to read file "d1.dat": 1.025000+7 5.794453+0 1.050000+7 5.770080+0 1.075000+7 5.750135+0 1.100000+7 5.734860+0 1.125000+7 5.724448+0 1.150000+7 5.719060+0 1.175000+7 5.718829+0 1.200000+7 5.723865+0 1.219440+7 5.730802+0 1.225000+7 5.732945+0 1.250000+7 5.743325+0...- marlh
- Thread
- Error File Fortran Runtime
- Replies: 2
- Forum: Programming and Computer Science
-
M
Fortran [Fortran] Problem reading formatted text file
Hi all, I have a problem I'm trying to solve. I have a code that has written a simple ascii text file like this: write(ilun_out, '(E23.15,A,E23.15,A,E23.15,A,E23.15)' x, ' ', y, ' ', z, ' ', rho So this provides a nice looking ascii file with four columns, separated by a small space. Now...- Morridini
- Thread
- File Fortran Reading Text
- Replies: 1
- Forum: Programming and Computer Science
-
T
MATLAB Passing 3D Array from Fortran to Matlab
Hello! I'm working in a programm which has a 3D array with a DIMENSION(16,221,900). When I use the debugger option and I print out the value of the matrix I don't know how to read the info. I already know Fortran uses column-major order, storing the columns in sequence. My doubt is...- Triscas
- Thread
- 3d Array Fortran
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Z
Fortran Fortran (gfortran) compiling error
Hello, I need help for programming my first program in Fortran, because it doesn't run. I think it's a problem with the compiler. What do you think? This is my code program Steifigkeitsmatrix implicit none real :: E,I,l,p real...- zerne
- Thread
- Error Fortran Gfortran
- Replies: 1
- Forum: Programming and Computer Science
-
M
Fortran Read File in Fortran & Rewritecross.dat
I'm trying to read the next data text file :cross.dat 1.000000-5 0.000000+0 2.530000-2 0.000000+0 7.712958+1 0.000000+0 2.250000+3 0.000000+0 2.250000+3 1.838880+1 2.300000+3 1.936710+1 2.500000+3 1.986000+1 2.650000+3 1.843220+1 2.900000+3 1.832230+1 3.000000+3 1.816280+1...- marlh
- Thread
- File Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
N
Fortran Fortran: variables in the list of arguments for Subroutines
Hi all, Suppose I declare X in the main program. Then in the following subroutine: Call example(list of arguments) ------------------------------------ subroutine example(list of arguments) x=y+z end subroutine ------------------------------------- I have two options: (a)...- nguyenthanhlam
- Thread
- Fortran List Variables
- Replies: 14
- Forum: Programming and Computer Science
-
N
Fortran Solving Negative Infinity in Fortran Calculation
Dear all, I can not figure out why I got negative infinity in my output, so please help. Here is my calculation for FAMAX: FAMAG=SQRT(FX**2+FY**2+FZ**2) FAMAX=MAXVAL(FAMAG(1:NATOM)) and for FPBPMAX...- nguyenthanhlam
- Thread
- Fortran Infinity
- Replies: 5
- Forum: Programming and Computer Science