• Partha Sarathi Majee added an answer:
    Can anyone help me with a Fortran code to solve interface tracking problem by level set method?

    Those who are solving fluid problem by level set method

    Partha Sarathi Majee

    Thank you very much Sir for the information.

  • Cynthia Evangeline Sellinger added an answer:
    What is the best programming language for solar radiation data processing?

    I just programmed macros in Excel, but I realize that sometimes (when the databases are very large and I would like to calculate many specific variables ) consumes many resources and computing time. I hear of people using Python, Fortran, C++, etc., but what is the best?

    Cynthia Evangeline Sellinger

    Interactive Data Language (IDL) works great for programming large data sets.  Not only can you use the built-in statistical packages, but this language handles a large, matrix of information with ease.

  • Simon Schröder added an answer:
    Are programming language performance benchmarks relevant in multi-platform applications?

    Let's take Javascript as an example. It's not the best language for heavy computing in comparison to say C++ or Fortran, but it can work across nearly all platforms (Which is an advantage I find very useful). However, I find it hard to take benchmarks into consideration owing to different engines across platforms (Like Chrome's V8 and iOS's Webkit). Also, different CPU architectures are a major factor.

    So the question is: Do benchmarks hold relevance when considering multiplatform applications?

    Simon Schröder

    Most of the time benchmarks will give you skewed results. Two different computers will produce different results. How will you make sure that neither the OS, nor the CPU architecture, nor the amount and speed of RAM influences the results? If you don't use identical hardware it is impossible to tell what you are benchmarking. What you can actually benchmark is how your solution will scale with problem size (but this is only for one platform). If you have different kinds of hardware you need to set a baseline for every platform independently. As a baseline you can, for example, provide another script written in the same language. This will set a baseline on all platforms. You might have a chance to compare your script to this baseline on each platform separately.

    I am not sure if this approach will make sense as I have not thought this concept through. But, for now I am really skeptical when I see comparison between different platforms.

  • Amirhosein Bashiri added an answer:
    Can anyone help me to modell a 3d curved pipe with fortran 90?

    i want to write a CFD code solving N-S eqautions with finite difference method  with fortran . my problem is how to use fortran to create a staggered mesh  for 3D curved pipe .

    can any one help me ? 


    Amirhosein Bashiri


    did you know how to implement it using Fortran?

    did you know any good practical refrences about grid generation in Fortran?

    thank you for your Answer

  • Fayas Ahamed added an answer:
    I want to model the Dc microgrid system on this paper. Please help me?

    This paper presents a Dc microgrid test system. simulations were done on PSCAD/EMTDC. They have modeled various DR and batteries. I'm troubling to code those characteristics equations on FORTRAN platform. Can I do them by taking their Laplace transformations?  

    Please provide me relevant tutorials or someone do it on PSCAD and send the file 

    Fayas Ahamed

    Thank you sir, It seems useful to me.

  • Ivonne Leonor Lino added an answer:
    Has anyone worked with the cusparse libray in CUDA Fortran?

    With or without binding. Thank you in advance.

    Ivonne Leonor Lino

    Thanks Eshan,

    Just a quick one, do you use binding?



  • Rudolf Marthaller added an answer:
    How can i link the abaqus(64-bit) and fortran ?

    I've tried all the solutions proposed but i did not succeed.
    I've used all versions of Abaqus.

    Is there a special case that I do not do?

    abaqus versions is : 6.12-3 , 6.13-1 , 6.13-4 , 6.14-1

    Fortran : intel fortran composer XE 2013

    Microsoft Visual studio 2012

    Rudolf Marthaller

    I have a similar question like George Wilton. I am using Abaqus 6.144, Intel Composer XE 2015 and Microsoft Visual Studio 2015
    (but likely more 2014 - because of the installation folder).

    I can’t get a pass.
    I changed the abq.6144.bat file to,

    call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
    call "C:\Program Files (x86)\Intel\Composer XE 2015\bin\ipsxe-comp-vars.bat" intel64 vs2015
    @echo off
    "C:\SIMULIA\Abaqus\6.14-4\code\bin\abq6144.exe" %*

    like from Qingqing Zhao recommended .

    Where is my mistake?
    One other question is, where do I find the recommendation for the Visual Studio and Composer XE Version for Abaqus?

  • Guillermo Luque y Guzman Saenz added an answer:
    How do I write FORTRAN subroutine to simulate the kinetic of the oil shale retorting reaction?

    As oil shale retorting process is complicated thermochemical conversion process.For modeling of the oil shale retorting process. a FORTRAN subroutine is necessary in the model to simulated the kinetic of the retorting reaction.

    Guillermo Luque y Guzman Saenz

    Take into account that you have to follow the guidelines that your current version of Aspen gives to you which include specific Fortran compiler to being used, file and in general string names, subroutine structure as well as location of Fortran module files.

    That is because your user models are going to be used by Aspen so it can only do if they have an appropiate interface. I don't know which version do you have but you can look at page 9 and beyond of this document http://support.aspentech.com/Public/Documents/Engineering/Aspen%20Plus/V7.3/AspenPlusUserModelsV7_3-Ref.pdf.

    Best Regards

  • M. G. Schaefer added an answer:
    How can I get the code in FORTRAN for a simple spatial diagnostic wind model?

    I'm working on the spatial estimation of evapotranspiration using Penman-Monteith method.

    M. G. Schaefer

    I have conducted L-Moment regional frequency analyses using L-RAP software  for maximum wind speed for wind-wave generation.  That analysis was seasonally based and included partitioning the wind-speed data into specific sectors of the compass rose . Circular statistics could also have been used for analysis of wind-speed and direction for the compass rose.  That is the only hands-on experience I have with wind data. 

  • Lijuan Yan added an answer:
    Does anyone know where to download or purchase the fortran program DISTLM for PERMANOVA (Anderson 2005)?

    Does anyone know where to download or purchase the fortran program DISTLM for PERMANOVA (Anderson 2005)? I am currently analyzing Miseq data and need it for testing the significance of the treatment on microbial community composition. Our group is going to purchase the PRIMER program, but it takes time to proceed as it is summer holiday season here.

    Lijuan Yan

    Thanks Martin. I was thinking to use R if I don't get PRIMER or DISTLM in the following week. Since I used the other Fortran program CAP that was produced by the same person M. J. Anderson, I would prefer DISTLM to R. Any way, thanks a lot for the reply.

  • Abdel Rahim Ruby Abdel hamid Hassanain added an answer:
    How development Global Gravity Field Models like EGM96?

    I have some questions about Global Gravity Field Models (ICGFM).
    Where How to Calculate Coefficients of this model? I.e. I need the program to compute spherical harmonic analysis of EGM model.

    Abdel Rahim Ruby Abdel hamid Hassanain

    Dear Eng, Ahmed

    Thanks for adding your answer

    this paper Failure during download

    It can be sent to email (abd_roby87@yahoo.com)

    Abdel Rahim

  • Bill Long added an answer:
    Difficulty in writing output using FORTRAN?

    Hi All, I have difficulty in writing a mix of string and string arrays  by FORTRAN, for example (the following two lines):

    write (cout,1052) (cd(ii),ii=1+1,9),(cy(ib),ib=10,(inmt*2))
    1052 format ('c=[c1',8(';c',a1),79(';c',a2),'];')

    this piece of code is working, where cd(ii) and cy(ib) are string arrays. 

    I need to write variable number of the string arrays cells (cy(ib)) followed by a bracket, so I need to replace "79" in the format line with "(inmt*2)-9", because each case has a different number of cells to be written, when I do that, it is not anymore working.

    Any ideas please?


    Bill Long

    The < > notation mentioned by Pawel Jerzy Matuszyk might work with the Intel compiler, but it is not part of Fortran - and is certainly not portable.   Formats are can be pretty complicated for people not expert in Fortran.  While there are more advanced schemes that would work here, I think the advice from Simon above is on the mark.

  • Frank Richter added an answer:
    Does anybody have some experience in the FRIC subroutine in Abaqus?


    I am using the "simple" model you can see on the images below. 

    I would like to use the FRIC subroutine to define a friction model. I would like to start with the Coulomb model and then define another one more complicated.

    But I don't know the Fortran syntax. So it would be very helpful to get some help about how to write a FRIC subroutine and then how to use it in Abaqus.

    Thanks a lot.

    + 2 more attachments

    Frank Richter

    I recommend you become a member of the ABAQUS mailing list

  • Giovanni De Gasperis added an answer:
    Why are physicists stuck with Fortran and not willing to move to Python with NumPy and Scipy?

    Nowadays all of the major Fortran related numerical calculus have exactly mapped equivalent libraries in more modern language framework like Numerical Python (NumPy) and Scientific Python (SciPy). 

    What keeps physicists stuck with Fortran?



    Scientific evidence?

    + 1 more attachment

    Giovanni De Gasperis

    Btw, I like the approach of Software Carpentry web site on one of their Python online course for scientists:

    the time to arrive to a solution is given by:  Ts = Td + Te


        Ts : time to the solution

        Td: time to focus on the problem, think of an algorithm, write a program, debug it

        Te: time of execution

    Nowdays Td>>Te, that is why i am definitively stuck with Python/Numpy/Scipy.


  • Xuan Wang added an answer:
    What is a suitable open source code/software using C++ or fortrant programming for topology optimization?

    Is there any open source code using C++ or fortrant programming for structural topology optimization? Could you help?

    Xuan Wang

    Dear J. Liu  , thanks for your help.  The article and python code are easy to understand and very helpful for me .  Best wishes.

  • Marek Wojciech Gutowski added an answer:
    How do I obtain a plot of my Fortran results?
    I have a Fortran program which it executes correctly without any error in Microsoft developer studio but I do not obtain a graph. Does it require any other software or something so that it directly make a plot as the program executes?
    Marek Wojciech Gutowski


    if you are a Fortran programmer then you know that no standard graphical output is available directly from Fortran programs.  Instead, the Fortran programs may prepare data files to be visualized by other tools, like gnuplot.  I like this package since it is easy to learn and to use, and able to produce many kinds of graphs, including 2D and 3D plots, polar coordinates, linear/logarithmic scales,  and so on.  Supported are very different graphical output formats as well.  To see the plot of f(x) prepare the data to be plotted in the form:

    x1   f(x1)

    x2  f(x2)


    Such data should be prepared by your Fortran program and located in some disk file, say in "data_file".

    Lines starting with "#" will be quietly ignored, empty lines are useful for separation of data groups.  It is enough to issue a command:

    gnuplot>  plot "data_file"

    to see the newly created graph.  Of course, many modifications of this command are possible, resulting in various shapes/sizes of points used, colors/width of lines, "x" and "y" ranges to be used, and so on.  Windows version of gnuplot is freely available, see Louis' Goffin message.

    Great thanks to Roberto Bellasio and to Louis Goffin for pointing us all to DISLIN package.  According to its documentation it may be used for making GUI for Fortran programs (it's primary usage is to produce plots during execution of a Fortran program (other languages are supported as well!), but in my opinion it is best to leave this task to other software, like gnuplot or Excell.

  • rosendo romero andrade added an answer:
    Is anyone familiar with GPS interpolation in fortran?


    I am currently trying to reconstruct the range from GPS satellites using the position given by ephemerides. Papers claim that I can have a centimeter or even less, precision on the position of the satellites from interpolation with either Lagrange or trigonometric interpolation. Unfortunately, the softwares I used for this failed to provide me with a satisfactory precision (I need at most 1-m precision, and they provide me with 100)m). As a result, I turn to the community to know if anyone has experience in GPS ephemerides interpolation, and can recommand me a fortran software that can attain satisfactory precision.

    Thank you in advance for any answer.

    rosendo romero andrade

    i recommend you a MIT GAMIT/GLOBK software; and using: efemérides sp3 finals, earthquake file, etc. for another hand, do you use CGPS?; and why do you not use Ansi C?

  • Abdelkader Filali added an answer:
    How can I create a Graphical User Interface for FORTRAN code?

    Hi all,

    I have developed a code using Fortan included in the Microsoft Visual Studio 2010. I would like to create a graphical user interface GUI for this code but I don`t know how to do that in easier manner.

    Could anyone please share his experience on such coding development ? is the Microsoft Visual Studio 2010 can do that or should I use other programming languages such Visual Basic, or Delphi or ... to do that ? I`m really confusing on how to start doing this and I would appreciate any suggestion and help.



    Abdelkader Filali

    Thank you friends for sharing your experience. I really appreciate it.

  • Stefano Fedele added an answer:
    Which is the best alternative to Matlab?
    Matlab is an excellent software, but it is commercial and its price is very high. Other alternatives are available (Octave, Scilab, Freemat, ...) but each one has pros and cons. Is there a real competitor of Matlab?
    Stefano Fedele

    Python packages like Matplotlib, Numpy and Pandas are really powerful and I think they do almost everything you can do with Matlab. Even the speed in Python can be better than Matlab, but the first one is a general purpose programming language and the speed strongly depends on the tools you use (for example you can have different speed if you use a Numpy array or a Python List or a Python tuple).

  • Mohammad N. Elnesr added an answer:
    Can you help me construct an interface program?
    Can anyone help by suggesting the process or guidelines for constructing a program than can take required data from a database, prepare automatically the input of the second program, run that second program and extract results from second program? I know this will be very simple for the computer science people
    Mohammad N. Elnesr

    If the DB is in Access or Excel, so it is very easy to program what you want in VBA.

    If you want, I can help you doing so.

  • Valeria Demontis added an answer:
    Fortran compiler suitable for TRNSYS 17 - can anyone help?
    Looking for Fortran compiler suitable for TRNSYS 17. Any suggestions and recommendations are welcome.
    Hope that there is alternative for Intel Visual Fortran software, which could be used for Type creation and compilation.
    Valeria Demontis

    Hi Karolis, I'm in the same situation you were 2 year ago...I'm trying to create trnsys components and looking for a suitable fortran compiler for windows7. Did you solved the problem? Any suggestion will be really useful! Thanks!! Valeria

  • Jhedy Amores added an answer:
    Why do I get an array error in TopoIndex (TRIGRS), and how do I solve it?

    I am currently trying to create a landslide susceptibility map of an area using TRIGRS (a Fortran program for slope stability analysis), and running the elevation grid file along with a flow direction grid in TopoIndex (a sister program) is the first step to it. However, when TopoIndex starts to read the flow direction grid file that I provided, it shows an error message before exiting the program without producing any result. The error message goes like this:

    ? FORTRAN Runtime Error:

    ? Subscript is out of range for dimension 1 for array

    ? adr with bounds 1:255

    File ./mpfldr.f; Line 20

    This error does not show in the log file either, and I was only able to see this error message by trying to catch a screenshot of the window right before it closes. Attached is the image of the window showing the error message.

    Is there anything wrong with the flow direction grid that I made, and if so, what corrections can I do to solve the error?

    Jhedy Amores

    I rechecked my data, and I did find some errors in the data input. Thank you for the advice! :)

  • Ehsan Taghizadeh added an answer:
    Why does a code have error in Fortran Power Station 4.0 but doesn't have error in some other compilers?


    I have a code that have error in "Fortran Power Station 4.0" but it works correctly in some other compilers! However I want somebody expert in fortran to help me.


    Ehsan Taghizadeh

    Dear Dr. Simon

    I really appreciate for your time. You are right.

    1- So as Xiaolei said MSDEV power station 4.0 gives a runtime error when NaN is used as input for a function but pgi visual fortran run without giving error!?

    If yes I couldn't trust pgi results.(yes/no)

    2- What is your suggestion for gaussidel. I meant do you think initializing for phinewg is better or uninitializing for it?

  • Zied Kammoun added an answer:
    How can I install GFortran from synaptic package of linux?
    Can I download it freely?
    Zied Kammoun

    you can also install gfortran directly from synaptic:  it is a synaptic package

  • Sarkar Noor-E-Khuda added an answer:
    How do I link Forces 2.0 Fortran complier (or Visual Studio 2013) to ABAQUS?

    I need to link Forces 2.0 Fortran complier (or Visual Studio 2013) to ABAQUS. I have only access to download these two compliers for free. Can anyone tell me how to link them to ABAQUS,


    Sarkar Noor-E-Khuda

    Hi Ba,

    I always used command though, I hope you can link your subroutine in CAE as well. Follow the steps, in CAE Create Job->Continue->General->User Subroutine File.

    Give it a go.


    Sarkar Noor-E-Khuda 

  • Abdel Rahim Ruby Abdel hamid Hassanain added an answer:
    How can I run the program “ harmonic_synth_v02”?

    During compilation it generates a number of warning messages that causes compilation to fail at the position indicated below.

    error messages from compilation

    abd@abd-HP-Compaq-dc7900-Convertible-Minitower:~$ cd /home/abd/synth
    abd@abd-HP-Compaq-dc7900-Convertible-Minitower:~/synth$ gfortran harmonic_synth_v02.f

    call dhcsin(0,iuhi,kmin,kmax,0,cz,1.d0,1.d0,0,cnm,snm,egm_tf,
    Warning: Type mismatch in argument 'dc20' at (1); passed INTEGER(4) to REAL(8)

    call dhcsin(0,iuci,jmin,jmax,0,cz,1.d0,1.d0,0,cnm,snm,egm_tf,
    Warning: Type mismatch in argument 'dc20' at (1); passed INTEGER(4) to REAL(8)

    call dhcsin(0,iuhi,kmin,kmax,0,cz,1.d0,1.d0,0,cnm,snm,egm_tf,
    Warning: Type mismatch in argument 'dc20' at (1); passed INTEGER(4) to REAL(8)

    call dhcsin(0,iuci,jmin,jmax,0,cz,1.d0,1.d0,0,cnm,snm,egm_tf,
    Warning: Type mismatch in argument 'dc20' at (1); passed INTEGER(4) to REAL(8)

    Abdel Rahim Ruby Abdel hamid Hassanain

    I sent a Message to Dr Josef Sebera about This problem
    And he sent me a modified version of harmonic_synth_v02 that export results to ASCII. The modification is between lines 677 and 992

  • Marek Wojciech Gutowski added an answer:
    Why LT (less than) operator in the Fortran code does not work properly?

     I have a problem in my CFD code, it doesn't work correctly.

    As can be seen in Fig, Yi (m) is equal to Yv (j+1), but when I apply:

    If (Yi (m).LT. Yv (j+1)) then


    end if

    The program gives wrong output !!!

    Marek Wojciech Gutowski

    Computers are cruel and malicious.  They strictly distinguish .LT. from .LE. relations.

    Your result means nothing else but "it is not true that  (Yi (m).LT. Yv (j+1)) ".  On the other hand, when you see two numbers equal (as in your screen shot) it doesn't mean they indeed are equal, only their roundings to 6 decimal digits are equal.

  • Ramiro Checa-Garcia added an answer:
    Which part of my FORTRAN program is wrong?


    I have wrote a program in FORTRAN 95 but it has an error.I do not  Which part of my program is wrong.

    Could you help me? Thanks.

    + 1 more attachment

    Ramiro Checa-Garcia

    You did not ALLOCATE an array that is defined as ALLOCATABLE. You have to introduce a line


    before assign any value to the array. Now the program is running.

  • Shams Joha added an answer:
    How might one fix an error with Abaqus subroutine?

    Hi everybody,

    I am working on composite material damage and its criteria so that I have to compare some of them which are not included in Ababaqus. I have chosen a simple bar damage example from a book and have tried to run it, but have faced to an error, which has been attached. I also have attached the window which demonstrates that Abaqus and Fortran are linked.

    It would be appreciated if you let me know how to fix the error.



    + 1 more attachment

    Shams Joha

    Hi Hadi,

               How did you solve your problem? I'm kinda having similar problem. When I'm checking if Abaqus is linked with fortan compiler in the  Abaqus command window, it shows "pass" ( please see the screenshot). However, when I'm trying to run a subroutine it is showing the following error : "Problem during linking". 

    Any help will be appreciated. 



    + 1 more attachment

  • Negar Kamali added an answer:
    System error code 1073740940 when using UEL ?

    I'm trying to run an analysis with a simple UEL subroutine that I wrote and after compiling, linking, analyzing the input file and the subroutine suddenly it crashes with this error:

    Abaqus Error: The executable standard.exe
    aborted with system error code 1073740940.
    Please check the .dat, .msg, and .sta files for error messages if the files

    has anyone encountered this before? I can not find a bug in my code (I write out all the matrices and they're all correct) I also checked everything else that comes to my mind.

    P.S: I can run other subroutines to the completed stage

    Negar Kamali

    Thank you very much for your help. Actually when I print out my matrices and vectors, all of them are correct. I also tested it with a program in Fortran. Works fine. It seems that Abaqus can not go to the next increment, I mean the subroutine cannot return the values.  

    So for my linear static analysis, I define AMATRX,RHS and SVARS. at the end of zeroth step, these values seem fine.  I don't request any output. Yes as you stated, this error is very vague. 

    could you explain a little more about your last paragraph? I appreciate it.

About Fortran

Sharing FORTRAN knowledge

Topic followers (333) See all