New Fortran projects

Update since Nov 5, full list here

Astronomy and Astrophysics

cufQUMC: CUDA Fortran version of QU-fitting with replica exchange MCMC method (parallel tempering), with a Python interface, by Shinsuke Ideguchi

DarkLim: statistical tools for calculating dark matter exclusion limits and sensitivity estimates, from SPICE/HeRALD

DYnamics, Age and Metallicity Indicators Tracing Evolution (DYNAMITE): Schwarzschild- and stellar-population modelling of stellar systems

GALAXEV-fortran: Galaxy Spectral Evolution Library, by G. Bruzual and S. Charlot

img2nc: converts planetary Digital Elevation Model (DEM) data into NetCDF, allowing one to draw a topographic map of the Moon, by ShinobuAmasaki.

Benchmarks

plb2: nqueen, matmul, sudoku, and bedcov benchmarks in Fortran, C, Lisp, Go, Java, JavaScript, Julia, Python, Rust, and other languages

Biology and Medicine

Illustrate: biomolecular illustration tool. Associated paper: Goodsell, D.S., Autin, L, Olson, A.J.,Goodsell, D. S., Autin, L., & Olson, A. J. (2019). Illustrate: Software for biomolecular illustration. Structure, 27(11), 1716-1720.e1.

Computational Chemistry

GWMlib: Generic Water isotope Modelling Library, by Didier M. Roche

Containers and Generic Programming

enhanced-allocatables: proposal to extend allocatable arrays to be dynamically reallocatable/resizable, with an implementation that calls C++, by PierUgit

fortran-dictionary: implementation of a hashmap aka dictionary, by Elias Toivanen

Computational Fluid Dynamics

FortranVortexIdentify: identifies discrete vortices from the velocity field data, using MPI, which are the result of a DaVis PIV process, by RickXie43

Navier_Stokes_Spectral_Method: Navier Stokes simulation using the spectral method, visualized with gtk-fortran, by Jules Minard

Synthetic Eddy Method (SEM): code associated with paper Extended synthetic eddy method to generate inflow data for turbulent thermal boundary layer, by Geunwoo Oh et al., International Journal of Heat and Mass Transfer, 2019. A related project is Synthetic-Eddies by Bojan Niceno.

Earth Science

AGNI: 1D radiative-convective model for the atmospheres of hot terrestrial planets, in Fortran and Julia, by Harrison Nicholls

Aquatic Optics Monte Carlo Model (AOMC): simulates the propagation of light in an optically shallow, vertically heterogeneous aquatic medium, by Manny Gimond

EXSIM: stochastic finite-fault program, as modified by Karen Assatourians and Gail Atkinson. Associated paper: Stochastic Finite-Fault Modeling Based on a Dynamic Corner Frequency (2005), Bulletin of the Seismological Society of America

hbi: multi-dimensional earthquake cycle simulation code based on Boundary Element Method with H-matrices, associated with the paper by So Ozawa, Akihiro Ida, Tetsuya Hoshino, Ryosuke Ando (2023), Large-scale earthquake sequence simulations of 3D geometrically complex faults using the boundary element method accelerated by lattice H-matrices, Geophysical Journal International,232 (3), 1471-1481

Heavy-review: calculates the change in gravity caused by the change in groundwater storage as predicted by a MODFLOW groundwater-flow model, by Jeff Kennedy. Gravity change is calculated relative to the initial time step at user-specified locations (e.g., measurement locations).

HypoTremorMCMC: associated preprint: Locating tectonic tremors with uncertainty estimates: Time- and amplitude-difference optimization, wave propagation-based quality control, and Bayesian inversion(2023) by Takeshi Akuhara et al.

IF-77 Air-to-Ground Propagation Model (Gierhart-Johnson): propagation model from the Federal Aviation Administration applicable to air/ground, air/air, ground/satellite, and air/satellite paths. It can also be used for ground/ground paths that are line-of-sight or smooth earth.

PICO_Fortran: implementation by Didier M. Roche of the Potsdam Ice-shelf Cavity mOdel from the paper Antarctic sub-shelf melt rates via PICO, by Ronja Reese et al., (2018).

Tropospheric ultraviolet-extended (TUV-x): photolysis rate calculator from NCAR. Associated paper: Madronich, Sasha, and Siri Flocke (1999), The role of solar radiation in atmospheric chemistry, in Handbook of Environmental Chemistry, edited by P. Boule, pp. 1-26, Springer-Verlag.

File I/O

cprnc: tool for analyzing a netCDF file or comparing two netCDF files, from Earth System Model Computational Infrastructure

fortran-sperr: interface bindings by Oscar Mojica to SPERR, a lossy scientific (floating-point) data compressor in C and C++ that produces one of the best rate-distortion curves

Finite Elements

sam-lib: collection of FORTRAN 77 subroutines, originally by Kolbein Bell, for handling different tasks in finite element method solvers, such as the assembly of element matrices into their global counterparts, solving global linear systems of equations, solving eigenvalue problems, and some other lower-level matrix utilities

Fortran Books and Tutorials

githubactions_intro: introduces Github Actions as a tool for lightweight automation of scientific data workflows, with examples in Python and Fortran using gnuplot, by Oscar Mojica

Games

wumpus: Hunt the Wumpus game in Fortran, LISP, Prolog, and Literate-Java, by Yeon Ju

General Purpose

Batteries Included Fortran Library (BiF-lib): modules for dates, dynamic arrays, error handling, I/O, parsing equations, statistics, prime numbers, random number generation, finding roots, sorting, strings, and data types such as list and dict that mimic Python, by Scott Boyce

M_sets: basic set functions reminiscent of those in Matlab: union, unique, intersect, setdiff, ismember, setxor, by urbanjost

timer: module to get the number of seconds between two timestamps, by zoziha

Graphics, Plotting, and User Interfaces

cairo-fortran: libcairo bindings for Fortran from the gtk-fortran project available as a separate fpm package, by Carlos Une

ForColormap: small colormap library independent of any graphical toolkit, by Vincent Magnin. It just converts a real value to RGB values, that can be used with any toolkit offering bitmap drawing


forimage: library for working with image files (PNM format) and managing colors effectively, by by Seyed Ali Ghasemi

fortran-simplify: module to reduce the over-sampled resolution of a polyline, implementing the nth_point, radial_distance, perpendicular distance, and Reumann-Witkam algorithms, by Joshua Aiken. This process can be useful when working with data that is noisy but usable with a significantly reduced resolution.

pltFor: Fortran-Python interface library to plot figures directly in Fortran, by Damien Minenna

Interoperability

Cython_ISO_Fortran_binding: code for using ISO_Fortran_binding.h from Cython, by Yuichiro Sakamoto. By using ISO_Fortran_binding.pxd, it is possible to call Fortran from Cython in the same way as one calls Fortran from C.

dynload-julia: dynamically load Julia from Fortran, by brocolis

fodbc: interface to Open Database Connectivity (ODBC), by RainBarrel

FortranInterop: documentation and example code on how to make Fortran interoperate with the .NET framework, covering callbacks, strings and mixed mode assemblies, by Christ Akkermans, with links to three blog posts.

hwinfo-fortran: provides access to hardware information using OS APIs for Unix-like operating systems, by Shinobu Amasaki

Mariadb_connector_fortran: wrapper library for Mariadb-connector/C, by Vu Hoang Giang. It can be used to connect to Mairadb, MySQL, and Oracle databases.

PythonFortran: simple example for Python calling Fortran codes in MPI, by Takao Kotani. The main program, which calls Fortran subroutines, is in Python invoking MPI by mpi4py.

sockets-in-Fortran: demonstration of a Fortran code communicating through a socket with a a C code that acts as a client in a socket based server/client communication, by Philippe Preux

Interpolation

stripy: Python interface from underworldcode to TRIPACK and STRIPACK Fortran code for (constrained) triangulation in Cartesian coordinates and on a sphere. Stripy is an object-oriented package and includes routines from SRFPACK and SSRFPACK for interpolation (nearest neighbor, linear and hermite cubic) and to evaluate derivatives.

Linear Algebra

eigensolvers based on unitary core transformations (eiscor): subroutines for accurately and efficiently solving matrix eigenvalue problems using essentially 2x2 unitary matrices. An associated paper is Jared L. Aurentz, Thomas Mach, Raf Vandebril, and David S. Watkins. Fast and stable unitary QR algorithm. Electronic Transactions on Numerical Analysis. Vol. 44, pp. 327-341. 2015.

fordot: overloads the dot_product function to enable efficient dot product with/without coarrays, by Seyed Ali Ghasemi

fortran-lapack: modern Fortran implementation of the Reference-LAPACK library, by Federico Perini. The reference Fortran 77 library is automatically downloaded from its master repository, and processed to create Modern Fortran modules with full explicit typing features.

keksipurkki-demos-qr: implicit QR method, by Elias Toivanen

Lin_Alg: pedagogical codes for Cholesky, QR, and Hessenberg decompositions, Gram-Schmidt orthonormalization, matrix inversion, RQ process diagonalization + shift method, Jacobi diagonalization, iterative power diagonalization + shift method, eigenvectors using iterative method, and A.x = b solution with residual improvement, by Quentin Marecat

LSMR: code for sparse equations and least squares, originally by David Fong and Michael Saunders, updated by Jacob Williams

Small Fortran Solvers (SFS): linear equation solvers, including preconditioned conjugagate gradient, by Bojan Niceno, adapted from Numerical Analysis: Mathematics of Scientific Computing, by David Kincaid & Ward Cheney, using OpenACC to access GPUs

Spectrum-Revealing CUR (SR-CUR): tool for the low rank CUR decomposition of sparse matrices, by Onyebuchi Ekenta. SR-CUR implements a novel CUR decomposition method that allows it to scale to larger matrices and produce more accurate factorizations than previous methods.

Mesh Generation

smesh: package for generating and handling unstructured triangular and polygonal meshes, by Simone Chiocchetti and Michael Schlottke-Lakemper

Numerical

chebpak: routines for Chebyshev polynomials, derivatve matrices, and interpolation, by Sarit Dutta

dfsaneacc: R package with underlying Fortran code implementing the algorithm in Secant Acceleration of Sequential Residual Methods for Solving Large-Scale Nonlinear Systems of Equations, by Ernesto G. Birgin and J. M. MartÃnez, SIAM Journal on Numerical Analysis, Vol. 60, Iss. 6 (2022)

HDMod: hyperdual number based calculations, from atmmod

NAFPack: numerical analysis package, offering a comprehensive set of algorithms for diverse numerical computations, by Jules Minard. These computations include Fast Fourier Transform, linear system solving, and eigenvalue/eigenvector calculations.

NCAR-Classic-Libraries-for-Geophysics: FFTPACK: A library of fast Fourier transforms; FISHPACK: subprograms for solving separable elliptic partial differential equations (PDEs); FISHPACK 90: FISHPACK subprograms with a Fortran 90 interface; MUDPACK: Multigrid subprograms for solving separable and non-separable elliptic PDEs; and SPHEREPACK: A library for modeling geophysical processes

specfun: modernization by Jacob Williams of specfun.f from SciPy from the book Computation of Special Functions, by Shanjie Zhang and Jianming Jin, Wiley (1996).

Optimization

ucminf: R package by Hervé Dakpo with Fortran code originally by Robert Schnabel et al. for general-purpose unconstrained non-linear optimization. The algorithm is of quasi-Newton type with BFGS updating of the inverse Hessian and soft line search with a trust region type monitoring of the input to the line search algorithm. A Fortran 90 version of uncmin by John Burkardt is here.

Parallel Programming

havaita: MPI Fortran type inference – shows how to write a modern Fortran interface to MPI which infers arguments that are already contained in the Fortran type itself, such as element type and count, and renders optional arguments when context is sufficient, by Jeff Hammond

Particle Physics

bmad-ecosystem: library for the simulation of charged particles and X-rays in accelerators and storage rings, by David Sagan et al.

Plasma Physics

Reactive Multifluid and Kinetic Transport in 1D (ReMKiT1D): framework for building 1D multi-fluid models of the tokamak Scrape-Off Layer with support for kinetic electron effects and collisional-radiative modelling, by Stefan Mijin and Alfie Adhemar

Physics

fundamental_constants: modules with the CODATA fundamental physical constants, generated by a Python script from the NIST website, by Vincent Magnin

LibForQ-v1: performs several numerical tasks one frequently needs when working in quantum information science, such as trace, partial trace, and partial transpose; entanglement, discord, and coherence quantifiers; Pauli group (PG), Generalized Gell Mann Matrices (GGMM), and Bloch vector and correlation matrix with GGMM, by Jonas Maziero

libTNSP: code for paper TNSPackage: A Fortran2003 library designed for tensor network state methods, by Shaojun Dong et al., Computer Physics Communications, Volume 228, July 2018, Pages 163-177

NDO: code by Shaojun Dong to make computing Neural Density Operators (NDO) for quantum tomography straightforward, simple and fast

PyHub: easy-to-use, hybrid Python/Fortran package to solve efficiently the Fermi-Hubbard Model, by Quentin Marecat

Temperature Dependent Effective Potentials (TDEP): tools to build accurate model Hamiltonians for finite temperature lattice dynamics from first principles, associated with a paper by Florian Knoop et al. in the Journal of Open Source Software

Random Number Generation

Knuth-FLRNG: Fibonacci Lagged integer and double precision RNGs from Section 3.6 of Volume 2 of TAOCP (Semi-numerical Algorithms); slightly reformatted and changed by Marco Antoniotti from the versions downloadable from the code section of TAOCP site

Statistics

islasso: R package with underlying Fortran code applying the induced smoothing (IS) idea to lasso regularization models to allow estimation and inference on the model coefficients (currently hypothesis testing only), by Gianluca Sottile. Linear, logistic, Poisson and gamma regressions with several link functions are implemented.

StatLib: codes from the journal Applied Statistics, mostly in Fortran 77 or earlier standards. Alan Miller’s translations of some of them to Fortran 90 are here.

Strings

forgex: regular expression engine using a deterministic finite automaton (DFA) approach, by Shinobu Amasaki. It provides .in. and .match. operators to detect if a pattern is contained in or exactly matches a string.

fortran-ascii: functions which operate on ASCII characters, by Ivan Pribec, aiming to reproduce the functionality found in <ctype.h> header of the C standard library or std.ascii namespace from the D runtime library.

fortran-shlex: port by Federico Perini of Python’s shlex shell-like lexer. The interface comes with two functions, split which parses a command-like string and returns an array of allocatable character strings; and shlex that performs the same, but returns a list of type(shlex_token) tokens.

fsys: library by Jason Christopherson containing system operations and supporting types: string, similar to the iso_varying_string, but with a few differences and a few additional operations, and string_builder, a type that allows concatenating strings while minimizing memory reallocation operations, that behaves similarily to the .NET StringBuilder class

utf8-f: UTF-8 manipulation, by St-Maxwell. The underlying data in a utf8_string object is a deferred-length string of character(len=:, kind=c_char) type.

Unit Testing

fordebug: library designed for debugging Fortran code, especially within pure procedures, by Seyed Ali Ghasemi

7 Likes

They also have a YouTube channel, where they describe how the solvers are built from scratch: https://www.youtube.com/@FluidNumerics/videos

Playlist: https://www.youtube.com/playlist?list=PLRO4xf5MdhAv9CNTETor75rANZtBqPVgQ

The videos are often many hours long, so there’s lot to learn for beginners.

1 Like

Update since Feb 4, full list here

Art and Music

Tonbandfetzen: collection of command-line tools to compose music based on audio fragments generated from plain text input, by Jan Berges

Astronomy and Astrophysics

High-performance Flux Transport (HipFT): computational core of the upcoming Open-source Flux Transport (OFT) software suite, from Predictive Science. OFT is a complete system for generating full-Sun magnetograms through acquiring & processing observational data, generating realistic convective flows, and running the flux transport model.

K2_Fortran_Modules: modules for space weather modelling by Shah Saad Alam, associated with paper Simulation of radiation belt wave-particle interactions in an MHD-particle framework, by Anthony A. Chan et al., Front. Astron. Space Sci. (2023)

Multi-channel Image Reconstruction, Image Analysis, and Display (MIRIAD): radio interferometry data-reduction package, designed for taking raw data through to the image analysis stage, by Bob Sault et al.

Naval Observatory Vector Astrometry Software (NOVAS): integrated package of routines for computing various commonly needed quantities in positional astronomy, refactored by Jacob Williams. The package can provide, in one or two subroutine or function calls, the instantaneous coordinates of any star or planet in a variety of coordinate systems.

radbelt: AE-8/AP-8 Van Allen belt model, describing the differential or integral, omnidirectional fluxes of electrons (AE-8) and protons (AP-8) in the inner and outer radiation belts, by Jacob Williams

Benchmarks

ForBenchmark: a Fortran library for benchmarking (with support for coarrays). There are dot_product benchmark results, by Seyed Ali Ghasemi

Biology and Medicine

NuPoP_Fortran: code to predict the nucleosome positioning based on DNA sequences underlying the NuPoP R package. Associated paper: Predicting nucleosome positioning using a duration Hidden Markov Model, by Liqun Xi et al., BMC Bioinformatics (2010).

PLOSCB2022: code associated with Orchestrated neuronal migration and cortical folding: A computational and experimental study, by Shuolun Wang et al., PLOS Computational Biology (2022)

sequoia_notR: stand-alone equivalent to the R package sequoia, associated with paper Pedigree reconstruction from SNP data: parentage assignment, sibship clustering and beyond, by Jisca Huisman, Molecular Ecology Resources (2017). A related project is sequoiaExtra, a collection of R functions and Fortran programs loosely associated with R package sequoia and/or for general population genetics purposes.

SPECIES: R package for species number estimation with underlying Fortran code, by Ji-Ping Wang

System for Processing Image Data from Electron microscopy and Related fields (SPIDER): image processing system for electron microscopy, especially useful for single-particle reconstruction, by Joachim Frank et al.

Climate and Weather

CAPE: calculates Convectively Available Potential Energy (CAPE), which describes the instabilily of the atmosphere and provides an approximation of updraft strength within a thunderstorm, by Klemens Barfus

High-resolution Intermediate Complexity Atmospheric Research model (HICAR): variant of the Intermediate Complexity Atmospheric Research (ICAR) model developed for sub-kilometer resolutions. Associated preprint: Reynolds, D. S., et al., The High-resolution Intermediate Complexity Atmospheric Research (HICAR v1.0) Model Enables Fast Dynamic Downscaling to the Hectometer Scale, Geosci. Model Dev. (2023) in review

TorchClim: framework that allows the introduction of ML/AI models that were trained using PyTorch into a climate model (aka GCM), by dudek313 and ktrapeznikov. It facilitates a fast turnover of the train-test-run workflow allowing for quick development of ML/AI-based parametrizations into parallel and distributed environments.

Compiler Tests

compiler-test-suite: test suite for C/C++/Fortran compilers developed by Fujitsu

llvm-test-suite: LLVM test-suite repository

reproducers: place to submit information necessary for reproducing bugs encountered at HPC centers, by Brad Richardson and Katherine Rasmussen. The intent is that in concert with submitting a bug report to a vendor or open source project the information is also submitted here so that other HPC centers can confirm the bug, and point users to the information.

Computational Chemistry

fenvelopes: calculate phases boundaries of multicomponent systems using Equations of State, currently supporting PT envelopes and PX envelopes with partial three-phase-behaviour, by Federico E. Benelli

Containers and Generic Programming

fortran-container: resizable array, hash table, and linked list, by Li Dong et al.

fortranDF: data frame that can have columns of different types, by Joshua Aiken

Multidimensional Array Containers (MAC): library to create and manipulate arrays of any rank, by Ãlvaro R. Puente-Uriona, meant to serve as a building block for codes that expand on “rank-agnostic” programming

Computational Fluid Dynamics

Advanced Finite Difference flow solver with Multiple Resolution and Phase-Field implementations (AFiD-MuRPhFi): highly parallel application for simulating canonical flows in a channel domain, by Chris Howland

astr: high-order finite-difference flow solver for compressible turbulence research, by Jian Fang et al.

jCODE: high-performance multiphase/multi-physics flow solver from the Jesse Capecelatro research group. The code is capable of solving the multi-component compressible Navier-Stokes equations on structured curvilinear meshes using a class of high-order energy-stable finite difference operators.

Multi Grid Large Eddy Turbulence (mglet-base): incompressible Navier-Stokes flow solver, a subset of the commercial product MGLET from KM Turbulenz GmbH

nuwtun: adjoint code for 1-D and 2-D Euler equations are developed using automatic differentiation tool Tapenade, by cpraveen. A piecemeal approach is used in which the subroutines in the flow solver are differentiated individually and used in an adjoint iterative solver.

preCICE fortran-module: interface to preCICE, an open-source coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations

uranos-gpu: code associated with paper URANOS: A GPU accelerated Navier-Stokes solver for compressible wall-bounded flows, by Francesco De Vanna et al., Computer Physics Communications (2023)

Databases

fortran-tcdb: Fortran 2008 interface bindings to Tokyo Cabinet, by interkosmos

fpq: modules with PostgreSQL (libpq) Fortran bindings, by Andre Smit

Mariadb_connector_fortran: wrapper library for MariaDB-connector/C, by Vu Hoang Giang. It can be used to connect to MariaDB, MySQL, and Oracle databases.

Earth Science

Advanced Lake Biogeochemistry Model (ALBM): one-dimensional process-based lake biogeochemistry model that was developed by Zeli Tan to predict the response of lake thermal and carbon dynamics and water quality to environmental changes (Tan et al., 2015, 2017, 2018)

Automatic Numerical Tsunami Initial conditions: on-the-Fly rupture Areas and earthquake Scenarios (ANTI-FASc): software enabling the fast computation of large ensembles of slip distributions on complex non-planar fault interfaces such as the subducting plates. An associated paper is Probabilistic tsunami forecasting for early warning, by J. Selva et al., Nature Communications (2021).

cgfd-lab: demonstrations for teaching computational geophysical fluid dynamics, by dongli. Has code for classic or practical advection schemes: FTCS, Upwind, Beam-Warming, Lax-Wendroff, Fromm, Leap-frog, Crank-Nicolson, TSPAS, MPDATA, WENO, FFSL, Semi-Lagrangian.

Community Atmosphere Biosphere Land Exchange model (CABLE): land surface model, used to calculate the fluxes of momentum, energy, water and carbon between the land surface and the atmosphere and to model the major biogeochemical cycles of the land ecosystem, by Claire Carouge et al.

ConductivitySolver: code associated with paper Validation suite for numerical solvers calculating effective thermal conductivity in porous media, by Mirko Siegert et al., Journal of Applied Geophysics (2021)

Earth_ABL_model: E-epsilon-tau turbulence closure model for the atmospheric boundary layer of Earth, by Einar Orn Olason et al.

geotiff-fortran: GeoTIFF reader module, from CNEA-AQ

gravmod3d: 3D forward modeling of bodies discretized by rectangular prisms with parabolic density contrast, an implementation by Oscar Mojica of the three-dimensional gravity modeling with parabolic density contrast presented in the paper 3-D forward gravity modeling of basement interfaces above which the density contrast varies continuously with depth by V. Chakravarthi et al., Computers & Geosciences (2002)

Grid-point Multiple-Conservation dynamical cORE (GMCORE): dynamical core for solving geophysical fluid equations on the sphere with conservative finite difference methods, by Li Dong and Jianghao Li

iron-magma: calculates the redox state of iron in magmas, by Roberto Moretti and Charles Le Losq. Also sulfur-magma, associated with the paper Moretti, R., & Ottonello, G. (2005). Solubility and speciation of sulfur in silicate melts: The Conjugated Toop-Samis-Flood-Grjotheim (CTSFG) model. Geochimica et Cosmochimica Acta and water-speciation-magma associated with paper Moretti, R., Le Losq, C., and Neuville, D.R. (2014) The amphoteric behavior of water in silicate melts from the point of view of their ionic-polymeric constitution. Chemical Geology

isostasy: stand-alone model of regional glacial isostatic adjustment, by Alex Robinson and Jan Swierczek-Jereczek

okada_wrapper: MATLAB and Python wrappers by Ben Thompson for the Okada DC3D0 point source and the DC3D rectangular dislocation surface Fortran subroutines

Regulated Ecosystem Model (REcoM): water column biogeochemistry and ecosystem model which incorporates cycles of carbon and nutrients (nitrogen, iron, and silicon) with varying intracellular stoichiometry in phytoplankton, zooplankton and detritus, from the Alfred Wegener Institute

Engineering

friction: routines for calculating the frictional response of contacting bodies, using the Coulomb, Lu-Gre, Maxwell, Generalized Maxwell Slip, Stribeck, and Modified Stribeck models, by Jason Christopherson

File I/O

Fortran IO Netcdf Assembly (FIONA): encapsulates netCDF library for easy use, by Li Dong et al.

HDF5 Fortran Wrapper: small wrapper implementing a simple interface to store and load high-dimensional arrays in Fortran, by Richard Foltyn. It is easier to use than the low-level API provided by the official HDF5 library.

sz3_simple_example: bindings by Oscar Mojica for the SZ3 lossy compression library, allowing seamless integration of SZ3 compression capabilities into Fortran projects

Finite Elements

CalculiX: 3D structural finite element program by Guido Dhondt and Klaus Wittig

hp3d: scalable MPI/OpenMP hp-adaptive finite element software library for complex multiphysics applications, by Stefan Henneking et al.

Fortran Books and Tutorials

fortran-examples: examples of cross-platform (Windows and Linux) compilation of Fortran codes using CMake, using LAPACK and compiling using Intel MKL via CMake, Fortran-C interoperability, and Fortran-CUDA interoperability, by maruthinh

object_fortran: examples of object-based and object-oriented techniques, by Reinhold Bader

General Purpose

ForClust: manage and control a Linux system, such as adjusting the settings of the CPU and other components, by Seyed Ali Ghasemi

Fortran-corelib: string type, argument parser, logging, linked list, timedelta type, filesystem handling, and other basic functionality, by Richard Foltyn

fortran-kdtree: implementation of KD-Tree searching by dongli. KD-Tree is a standard data structure for indexing data, especially in 3D space.

ForTime: provides a timer object for measuring elapsed time, by Seyed Ali Ghasemi. It includes procedures for starting and stopping the timer, as well as calculating and printing the elapsed time in seconds.

M_args: module that provides for command line parsing using namelist syntax, by urbanjost

Scientific Fortran Tools (SciFT): provides a wide range of mathematical routines such as random number generators, special functions, and high-level classes to manipulate strings, files parsing, matrices, grid-based numerical functions, data structures (lists, vectors, maps, graphs), and molecules, by Nestor F. Aguirre. It uses the Intel Math Kernel Library and has been tested with the Intel Fortran compiler.

SM3-Fortran: library with a Fortran interface SM3 by zoziha of GmSSL and its usage examples. The SM3 password hashing algorithm is a hash algorithm similar to SHA-256, which belongs to the Chinese national standard.

tictoc_fortran: TicToc (timer) class that calls cpu_time, by Wesley Cota

Graphics, Plotting, and User Interfaces

ForImage: library for working with image files (PNM format) and managing colors effectively, by Seyed Ali Ghasemi

PGPLOT: library for making simple scientific graphs. This version has patches by Peter Teuben et al.

Interoperability

fortran-tcl86: ISO_C_BINDING interface library for interoperability with Tcl/Tk 8.6, by interkosmos, allowing the user to embed Tcl into Fortran, create Tcl extensions in Fortran (with Tcl Stubs), access (a subset of) the Tcl/Tk C API from Fortran, use Tcl as an evaluatable configuration file format, and add graphical user interfaces to Fortran programs.

tcp-client-server: minimal TCP client and server in Fortran, used to teach interoperability with C. Companion code for Chapter 11 of Modern Fortran: Building Efficient Parallel Applications, by Milan Curcic.

Interpolation

ttcross: cross interpolation of high-dimensional arrays in tensor train format. An associated preprint is Parallel cross interpolation for high-precision calculation of high-dimensional integrals (2019), by Sergey Dolgov and Dmitry Savostyanov.

Linear Algebra

diaglib: library of matrix-free iterative algorithms to compute a few eigenvalues and eigenvectors of large matrices, by Ivan Gianni et al. The available algorithms are locally optimal block preconditioned conjugate gradient and Davidson-Liu.

ForDot: overloads the dot_product function to enable efficient dot product with/without coarrays, by Seyed Ali Ghasemi

ForInv calculates the inverse and pseudoinverse of a matrix, by Seyed Ali Ghasemi

ForMatMul: library that overloads the matmul function to enable efficient matrix multiplication with coarrays, by Seyed Ali Ghasemi

JKogb: software supplement for the paper Kogbetliantz-type algorithm for the hyperbolic SVD, by Vedran Novakovi & Sanja Singer, Numerical Algorithms (2022). Also KogAcc, a portable Kogbetliantz-type SVD for general matrices

Lanczos_Iterator: Lanczos program for large sparse Hermitian matrices, by F. D. M. Haldane – Fortran with a C99 interface. It obtains maximally-accurate low-lying eigenvalues and the corresponding orthonormal eigenvectors.

nnls: non-negative least squares (NNLS) solver calling BLAS and LAPACK, by cuamll

Visual-Fortran-Solvers: linear equation solvers, including preconditioned conjugagate gradient, by Bojan Niceno, adapted from Numerical Analysis: Mathematics of Scientific Computing, by David Kincaid & Ward Cheney, using OpenACC to access GPUs

Molecular Dynamics

Strain_CGMD: nonlinear bending motion of single walled carbon nanotubes (SWCNT) calculated by molecular dynamics simulation has been depicted using coarse grained molecular dynamics (CGMD), which is modeled as a simple beads system, by Heeyuen Koh et al.

Neural Networks and Machine Learning

Adaptive Training for High Efficiency Neural Network Applications (ATHENA): library for developing and handling neural networks (with a focus on convolutional neural networks), by Ned Taylor

nerofort: implements a convolutional neural network (CNN), by Rares Polenciuc, inspired by the instructions provided in Python and Machine Learning

Numerical

ForDiff: numerical differentiation using the complex step method or finite differences, by Seyed Ali Ghasemi

ForSolver: solves linear and nonlinear equations, by Seyed Ali Ghasemi. For nonlinear equations the available methods are newton, newton-modified, newton-quasi-fd, newton-quasi-fd-modified, newton-quasi-cs, and newton-quasi-cs-modified, where “fd” and “cs” stand for the finite difference and complex step methods.

Numerical_utilities: Kahan algorithms for the sum, variance, and covariance, using MPI, by osada-yum

Numeric Modern Fortran (numfor): has submodules Utils with basic, non-specific, functionality used in many scientific programs, Array_utils with basic functionality to work with arrays, including generation of grids, search of elements and sorting, Interpolate with routines to perform interpolation, fitting of data, and some work on polynomials, and Integrate with routines to perform integration of real and complex functions, and of sampled data.

numfort: library implementing a subset of NumPy and SciPy, by Richard Foltyn. Has modules for creating grids, numerical integration, interpolation, optimization, finding roots, and regression.

Pade_approximants: perform analytical continuation using Pade approximants, in Python and Fortran, by Johan Schott. Also NNLS_NNT_MEM, which does analytical continuations using non-negative least squares, non-negative Tikhonov, or the maximum entropy method

Numerical Integration (Quadrature)

F90-Extrapolation-Integration: implements the Richardson extrapolation method on 1-, 2- and 3-dimensional scalar or vector integrals, by Ãlvaro R. Puente-Uriona. It specializes in providing an adaptive method, based on extrapolation over the trapezium method, to obtain increasingly accurate values for, depending only on the number of sample points in which the integrand is evaluated. A related project is Extrapolation_Integration.

Ordinary Differential Equations

Hairer-Wanner solvers for stiff ODE problems (hwode): code from the books Hairer, Norsett and Wanner (1993): Solving Ordinary Differential Equations. Nonstiff Problems. 2nd edition. Springer Series in Comput. Math. and Hairer and Wanner (1996): Solving Ordinary Differential Equations. Stiff and Differential-Algebraic Problems. 2nd edition. Springer Series in Comput. Math.

Optimization

Fortran spARse Simulated annEALing library (Farseal): library allowing for simulated annealing computation on enormous datasets by utilizing sparse matrix storage and computation, by RainBarrel, based heavily on the work of Nicholas Herring with OpenFSAM

MJDP_software: Fortran 77 optimization codes by M. J. D. Powell – bobyqa, cobyla, lincoa, newuoa, tolmin, and uobyqa. The modernized reference implementation is PRIMA.

Parallel Programming

FortranOpenACC: combine Fortran with OpenACC, by Bojan Niceno, implementing a sparse-matrix vector product, vector-vector dot product, and diagonally preconditioned conjugate gradient

Fortran UNified Device Acceleration Library (FUNDAL): seamlessly unifies OpenACC and OpenMP runtime routines calling in order to minimize end-user’s effort in developing device-offloaded applications, by Francesco Salvadore et al.

mpi_examples: MPI examples: Bcast, Point-to-point communication, Scattering and Gathering 2D and 3D arrays with variable chunk sizes, and MPI Derived data types: MPI_Type_contiguous, MPI_Type_create_subarray, MPI_Type_resized, by maruthinh

OpenACC Fortran Memory Library (OAFML): eases handling OpenACC memory offloading on devices (GPU), in Fortran 2003+ with OpenACC directives standard compliant, by Francesco Salvadore et al.

OpenACC Official Training Materials: training materials by Jeff Larkin et al., covering profiling, OpenACC directives, GPU programming, data management, and loop optimizations, with code examples in Fortran, C, and C++. The OpenACC Porting and Portability Guide contains a proposed workflow when refactoring an existing application to use OpenACC, with examples provided in C, C++ and Fortran.

Partial Differential Equations

Computational Hyperbolic PDE (chpde): codes based on Clawpack and the books Finite volume methods for hyperbolic problems (2002), by Randall J. LeVeque and Riemann Problems and Jupyter Solutions: Theory and Approximate Solvers for Hyperbolic PDEs (2020) by David I. Ketcheson, Randall J. LeVeque, and Mauricio J. del Razo

fortran-weno: implements (WENO) weighted essentially non-oscillatory algorithms, by Li Dong and Zhou Lilong

laplace-2D: solve Laplace (or Poisson) equation in 2D on a rectangular grid using OpenMP, by Taras Kuzyo

Plasma Physics

Arbitrary Linear Plasma Solver (ALPS): parallelised numerical code that solves the Vlasov-Maxwell dispersion relation in hot (even relativistic) magnetised plasma, associated with paper ALPS: the Arbitrary Linear Plasma Solver by Verscharen, D., Klein, K. G., Chandran, B. D. G., Stevens, M. L., Salem, C. S., and Bale, S. D.: , J. Plasma Phys. (2018)

KORC: Kinetic Orbit Runaway Code, from ORNL-Fusion. PARVMEC is a 3D Equilibrium solver with nested flux surfaces, LIBSTELL is the main stellarator resource library, DIV3D is a field line followning and intersection code, BOOZ_XFORM converts VMEC coordinates to Boozer coordinates, MAKEGRID precomputes vacuum fields, V3RFUN computes magnetic diagnostic response functions, SURFACE computes vector potential at wall structures, and DESCUR uses a steepest descent algorithm to find a least squares approximation to an arbitrary 3-d space curve. BMW is a code for extending fields belond the VMEC domain in a manner that ensures divergence free fields. BMW does a Biot-Savart volume integration of of the equilibrium current density to obtain a continous vector potential everywhere on the mgrid grid. PoinBabel generates Poincare sections using KORC methods and different field interpolation options. Stellgap calculates the shear Alfven gap structure for 3D configurations (stellarators, RFPs, 3D tokamaks). AE3D calculates shear Alfven eigenmodes for 3D configurations (stellarators, RFPs, 3D tokamaks). PENTA calculates the neoclassical parallel flows, radial particle and energy fluxes, and the radial electric field for a surface given the plasma profiles (n, T), surface geometry information (from VMEC) and the monoenergetic transport coefficients (from DKES). p2f computes a particle to distribution function.

1 Like

Previous post continued due to limitation on post length

Physics

Biased-versus-unbiased-codes: Python and Fortran codes used to generate plots in J. Aguilar, J.J. Ramasco, and R. Toral Biased versus unbiased numerical methods for stochastic simulations: application to contagion processes

ebmb: solve multiband Eliashberg equations of superconductivity, by Jan Berges

honeycombinations: simulates adsorbate structures on graphene via tight binding and Monte Carlo, by Jan Berges

MolForge: suite of codes using MPI for the simulation of quantum spin dynamics at the atomistic level, by Alessandro Lunghi. The codes are developed to readily interface with electronic structure codes and make it possible to predict spin decoherence and spin-phonon relaxation fully ab initio.

MP_tools: fast generation of elastic and inelastic neutron and X-ray diffuse scattering intensity maps by non-uniform FFT, by Jiri Kulda

qdyn: program for N-dimensional numerical quantum propagation on a grid, by Jiri Janos, Jiri Suchan, and Petr Slavicek

qmllib: Python/Fortran toolkit for representation of molecules and solids for machine learning of properties of molecules and solids, by Anders Steen Christensen and Jimmy C. Kromann.

Solid state Task Constructor (SsTC): high-perfomance computing oriented library to create integration and sampling tasks in the BZ of a crystal for k-dependent functions, by Ãlvaro R. Puente-Uriona. SsTC_driver is a backend for SsTC.

TALYS: code associated with paper TALYS: modeling of nuclear reactions, by Arjan Koning, Stephane Hilaire and Stephane Goriely, European Journal of Physics A59 (2023)

Quantum Chemistry and Electronic Structure

amdkiit: density functional theory program package based on plane-wave basis sets for performing ab initio molecular dynamics at higher rungs of density functionals, by Paramita Ghosh et al.

cis_nto: calculates overlap matrices between sets of wave functions calculated at different geometries, using different atomic basis sets or different electronic structure methods. An associated paper is Efficient update of determinants for many-electron wave function overlaps, by P. Alonso-Jordå et al., Comput. Phys. Commun. (2021).

CONQUEST: density functional theory (DFT) code designed for large-scale calculations, with excellent parallelisation, by David Bowler et al. It gives a consistent, exact diagonalisation approach for systems from 1 to 10,000+ atoms, and brings the possibility of linear scaling calculations on over 1,000,000 atoms.

EDMFTF: code for DFT+Embedded Dynamical Mean Field Theory. An associated paper is Dynamical mean-field theory within the full-potential methods: Electronic structure of CeIrIn5, CeCoIn5, and CeRhIn5, by Kristjan Haule et al., Phys. Rev. B (2010).

hartree-fock: simple implementation of the Hartree-Fock algorithm, by Lukas Wittmann. STO-nG basis sets are used, which are generated from Slater exponents given in the input file. Some parts like the input reader and straightforward functions were taken from Marvin Friede’s hartree-fock implementation.

Hefei Order-N Packages for Ab initio Simulations (HONPAS): ab-initio electronic structure calculation software package for linear scaling first-principles density functional theory (DFT) calculations of large-scale systems with standard norm-conserving pseudopotentials and numerical atomic orbitals (NAOs) under the periodic boundary conditions, by xmqin

openLOWDIN: quantum chemistry code designed to perform calculations on multi-species systems using the MultiComponent Molecular Orbital method. Associated paper: R. Flores-Moreno et al., LOWDIN: The any particle molecular orbital code. Int. J. Quantum Chem. (2014).

Quantum chemistry Utility for Benchmark Evaluation (QUBE): extracts energies from the output files of quantum chemistry calculations for large benchmark sets, by Lukas Wittmann. It utilizes reference energies for statistical evaluation and comparison of the results obtained from the benchmark sets.

VASP4CLINT: Python and Fortran utility scripts and programs for VASP calculations of (liquid or solid) interface systems, by Julien Steffen

WannInt: library of utilities for Wannier interpolation, meant to serve as a building block for codes that compute the resolution of quantum mechanical operators in the Brillouin zone of a crystal, by Ãlvaro R. Puente-Uriona

Random Number Generation

rfng: module for Mersenne twister (MT) pseudo-random number generation, by Jeff Irwin

Statistics

gcvspline: Python wrapper by Charles Le Losq of Fortran code from the paper A Fortran package for generalized, cross-validatory spline smoothing and differentiation, by Herman J. Woltring, Advances in Engineering Software (1986). There is also Alan Miller’s update of the TOMS 642 code of M. F. Hutchinson to fit a cubic spline to noisy data using generalized cross-validation.

Time Series

Exponentes-de-Lyapunov: code by Cygnus000 for the algorithm of the paper Lyapunov Characteristic Exponents for smooth dynamical systems and for hamiltonian systems; a method for computing all of them., by Giancarlo Benettin et al., Meccanica (1980)

Unit Testing

ForUnitTest: simple, object-oriented unit testing framework, by Seyed Ali Ghasemi.

ForDebug: library designed for debugging Fortran code, especially within pure procedures, by Seyed Ali Ghasemi

Web Programming

ForOpenAI: library to access the OpenAI API, by Seyed Ali Ghasemi

3 Likes

Update since March 3, full list here

Astronomy and Astrophysics

code-ans-qnm-share: computes quasi-normal modes of anisotropic neutron stars, by Vincent Lau Shu Yan

dasilva-invariants: Python package with Fortran code to calculate the adiabiatic invariants K and L* from gridded models of Earth’s magnetic field, by Daniel da Silva and Scot Elkington

D-NEAs: Asteroid Thermal Inertia Analyzer (ASTERIA) software. An associated paper is The low surface thermal inertia of the rapidly rotating near-Earth asteroid, by M. Fenucci et al., Astronomy and Astrophysics (2023)

Fortran-Astro: module for calculating orbital elements, by Cengiz Yıldırım

fortranMR: library for reading output files generated by MESA (Modules for Experiments in Stellar Astrophysics), by Joshua Aiken. It extends fortranDF to read in files as a data frame.

Saturn-Mag-Model: Saturnian magnetospheric empirical magnetic field model derived from Cassini magnetometer data

spiralssched: schedules for the Southern Hemisphere Parallax Interferometric Radio Astrometry Legacy Project (SPiRALS) experiment series, including trigonometric parallax observations, test observations, compactness observations and 3D distance observations, by Lucas Hyland and Gabor Orosz

swiftest: models the long-term dynamical dynamics of n-body systems with a dominant central body, like the solar system, by David Minton et al. It is a re-write of the Swifter software package that incorporates modern programming techniques and performance improvements.

WinNet: single zone nuclear reaction network, capable of calculating many different nucleosynthesis processes (i.e., r-process, nup-process, explosive nucleosynthesis, and many more), associated with paper The Nuclear Reaction Network WinNet, by M. Reichert et al., Astrophysical Journal (2023)

Biology and Medicine

Chromatin_Code: simulates the genome organization at a resolution of ~100 kbp, along with phase separation of active and silent regions of the genome using first principles. Associated paper: Euchromatin Activity Enhances Segregation and Compaction of Heterochromatin in the Cell Nucleus, by Achal Mahajan et al., Phys. Rev. X (2022)

Open Continuum Mechanics, Imaging, Signal processing and System identification (OpenCMISS-Iron): computational back-end for a mathematical modelling environment that enables the application of finite element analysis techniques to a variety of complex bioengineering problems, by Chris Bradley et al.

Climate and Weather

bin-microphysics-model: bin-microphysics cloud model used in research and teaching, by Paul J. Connolly, who has other projects for cloud physics

Hurricane Analysis and Forecast System (HAFS): Unified Forecast System (UFS) hurricane application, an FV3 (Finite Volume Cubed-Sphere Dynamical Core) based multi-scale model and data assimilation system capable of providing tropical cyclone (TC, including hurricane and typhoon) analyses and forecasts of the inner core structure

LMDZE: simplified version of the LMDZ atmospheric general circulation model, by Lionel Guez. It has evolved aiming at clarity and robustness of the source code, taking advantage of modern features of the Fortran language.

VenusPT-tables: atmospheric absorption coefficient calculator: Utilizing HITRAN and custom spectroscopy for Venus and Mars radiative transfer studies, by Mikhail Razumovskiy. Also PrecisionSpec-Analyzer, a high-precision tool for atmospheric absorption calculations over narrow spectral ranges, focusing on detailed spectroscopic analysis using HITRAN and HITEMP data with standard and custom line shapes for terrestrial atmospheric studies.

Code Tools

forwarddiff: allows for the computation for derivatives, gradients and Jacobians of Fortran subroutines or functions using forward mode automatic differentiation (AD), by Nicholas Wogan, inspired by DNAD and ForwardDiff.jl

Computational Chemistry

ciaaw: library providing the standard and abridged atomic weights, the isotopic abundance and the isotopes’ standard atomic weights, by Milan Skocic. It also provides a API for the C language.

DSAS: uses the modified phase-retrieval algorithm to determine the anomalous scattering substructure, by Fu Xingke et al. There is an automated parameters setting method that can automatically solve the optimal algorithm parameters for different SAD data sets

ecx: library providing formulas for electrochemistry with a C API, by Milan Skocic

forsus: provides a simple API to read json files containing pure component information, which can be used in other projects, by José Antonio Scilipoti

PGLWrapper: code for Chapters 6-9 of The Properties of Gases and Liquids, 6th ed., by J. Richard Elliott et al., focusing on equations of state (EOSs) to correlate and predict thermodynamic properties of pure compounds and mixtures

RocketCEA: Python wrapper for the the NASA Fortran Chemical Equilibrium with Applications (CEA) code, which calculates chemical equilibrium compositions and properties of complex mixtures. Applications include assigned thermodynamic states, theoretical rocket performance, Chapman-Jouguet detonations, and shock-tube parameters for incident and reflected shocks.

rate: code for fitting and predicting chemical kinetic data, by Andrew L. Cooksy

Containers and Generic Programming

fortran_vector: derived type for vector of integers, with procedures init, append, size, pop, remove, delete, unique, sort, cut, and clear, by Euler-37

Computational Fluid Dynamics

Multi-component Flow Code (MFC): parallel simulation software for multi-component, multi-phase, and bubbly flows, by Spencer Bryngelson et al. MicroFC is a mini-app for Baer-Nunziato-like models, interface capturing schemes, finite-volume WENO reconstruction, HLLC Riemann solvers, and large-scale OpenACC offloading of (multi-component) compressible fluid dynamics

Multi-order Approach to Calculating High-speed Linear aerodynamics (MachLine): modern, unstructured, subsonic/supersonic flow solver currently being developed by the AeroLab. It is a linear panel method based on the Prandtl-Glauert equation. Also MachUp, a Numerical Lifting-Line Algorithm

PixelFlow: deals with incompressible fluids and implements the collocated grid Marker-and-Cell (MAC) method using a regular orthogonal grid. Associated paper: A novel approach for wall-boundary immersed flow simulation (proposal of modified Navier-Stokes equation), by Nobuyuki Oshima, Journal of Fluid Science and Technology (2023).

Simple-Fortran-DG: uses the Discontinuous Galerkin method to solve the 2D Euler Equation with the Isentropic Vortex initial value, by L1ssandra. The author has Freljord-CFD-arsenal and other CFD projects with Fortran code.

unified-bubble-theory: code associated with paper A unified theory for bubble dynamics, by A-Man Zhang et al., Physics of Fluids (2023)

Cryptography

Fortran77-Enigma: Enigma machine emulator in FORTRAN 77, by Barrett Otte

Lucifer: Arthur Sorkin’s variant of the Lucifer block cipher, a direct predecessor of DES, ported from FORTRAN IV to FORTRAN 77

Databases

fortran-lmdb: collection of interface bindings by interkosmos by the OpenLDAP Lightning Memory-Mapped Database (LMDB), a B-tree-based database management library modeled loosely on the BerkeleyDB API

Earth Science

cms2d: coastal modeling system that couples a wave, circulation, and morphology model together to get better predictions in the near-shore, by Mitchell Brown et al.

DC: code associated with paper Downward continuation of marine seismic reflection data: an undervalued tool to improve velocity models, by Clara Estela Jimenez-Tejero et al., Geophysical Journal International (2022)

DSMsynTI-mpi: software for computing synthetic seismograms in spherically symmetric, transversely isotropic (TI) media using the Direct Solution Method (DSM), from the Global Seismology Group of the University of Tokyo. An associated paper is Complete synthetic seismograms up to 2 Hz for transversely isotropic spherically symmetric media, by Kenji Kawai et al., Geophysical Journal International (2006).

ForRF: time iterative deconvolution of receiver functions, by Mijian Xu, obtaining results close to Seispy

HypoDD: program package associated with paper A Double-Difference Earthquake Location Algorithm: Method and Application to the Northern Hayward Fault, California, by Felix Waldhauser and William L. Ellsworth, Bulletin of the Seismological Society of America (2000)

iRainSnowHydrov1.0: distributed integrated rainfall-runoff and snowmelt-runoff simulation model for alpine watersheds, by Yuning Luo et al.

loam-chart: takes in clay and sand percentage and determines soil type based on the soil texture triangle, by ysogg and abusch26. It is an application of the crossing number raycast algorithm.

SCEPTER: reaction-transport code for simulating carbon dioxide removal through enhanced rock weathering, from Carbon Dioxide Removal Lab

SCSM2.5d: 2.5D seismic wave modeling program that uses a subdomain Chebyshev spectral finite difference method, by mswonscsm. It can handle various modeling scenarios including viscoacoustic, isotropic viscoelastic, anisotropic viscoelastic (VTI, ORT, and TTI), solid and water free surfaces, and water-solid interfaces.

MEP-SidersPond: maximum entropy production (MEP) model to describe microbial biogeochemistry in Siders Pond, MA, associated with paper Using maximum entropy production to describe microbial biogeochemistry over time and space in a meromictic pond, by Vallino, J.J., and Huber, J.A., Frontiers in Environmental Science (2018). Also Maximum Entropy Production - Advancing Theory in Biology (MEP-ATB).

Surface wave Adjoint Travel-time Tomography (SurfATT-iso): package for surface wave travel-time tomography, which is designed to invert surface wave travel-time data for 2D/3D isotropic or azimuthal anisotropic velocity structures. An associated paper is Topography-Incorporated Adjoint-State Surface Wave Traveltime Tomography: Method and a Case Study in Hawaii, by Shijie Hao et al., Journal of Geophysical Research: Solid Earth (2024).

ShellSet: parallel dynamic neotectonic modelling, by Jon B. May, Peter Bird, and Michele M. C. Carafa

SWAP-SAMUCA: process-based crop model for simulations of sugarcane growth and water dynamics. Associated paper: Modelling the trash blanket effect on sugarcane growth and water use, by Murilo dos Santos Vianna et al., Computers and Electronics in Agriculture (2020).

Engineering

BsaLib: library for the Bispectral Stochastic Analysis of structures under non-Gaussian stationary random actions. An associated paper is Non-Gaussian buffeting analysis of large structures by means of a Proper Orthogonal Decomposition, by M. Esposito Marzino and V. Denoël, Journal of Wind Engineering and Industrial Aerodynamics (2023).

minimal-dx: library for simulating the performance of single air-cooled cooling and heating direct expansion (DX) coils – i.e. a model for a very simple air-to-air air conditioner (AC) and heat pump (HP). MinimalDX is based on EnergyPlus’s Single-Speed Electric DX Air Cooling Coil and Single-Speed DX Heating Coil Standard Ratings models.

N-Area Reliability Program (NARP): assesses bulk power system reliability. Associated preprint: A Free Industry-grade Education Tool for Bulk Power System Reliability Assessment, by Yongli Zhu and Chanan Singh.

Reference OpenSource Controller (ROSCO) for wind turbine applications: modular and fully adaptable baseline wind turbine controller to the scientific community, from NREL. Because of the open character and modular set-up, scientists are able to collaborate and contribute in making continuous improvements to the code.

File I/O

fmmap: provides some of the features of the C posix or Windows memory mapped files under a simple and unique Fortran interface, by PierUgit. Two uses are allocating arrays that are potentially bigger the RAM+swap size, and which are backed in a temporary file (anonymous mapping), and opening existing files or creating new files, and mapping them to an array.

fortdb: Fortran Database (binary) file definition that allows easy reading and writing of datasets, with Fortran and Python interfaces, by jpf-x

fortran_huffman: Huffman code compression, by Euler-37

fortran-zstd: Fortran 2018 interface bindings to selected Zstandard functions, by interkosmos. Zstandard is a fast compression algorithm, providing high compression ratios.

HDF5_utils: high level interface to HDF5, by Justin Erwin. The library aims to abstract most of the HDF5 types, read/write datasets of multiple types and ranks, read/write full assumed-shape arrays, remove the need to pass dimensions, read/write attributes to file/group/datasets, provide the ability to create groups, access datasets by either absolute or relative path, check if a dataset/object exists, and get rank and size of a dataset, either to check dimensions or to allocate array before reading.

mkcdf: makes netCDF file from fortran binary file, by Hiroyuki Tomita

ncdfutil: routines for netCDF I/O, by Bob Yantosca and Melissa Sulprizio

Finite Elements

FEM: finite element modelling in Fortran for structural problems, solid mechanics, geotechnic and artificially structured soil, by Victor Robin

PhiPsi_XFEM_Fortran_Codes_Early_Version: computational solid mechanics program, which involves the extended finite element method (XFEM), as well as the finite element method (FEM), by Shi Fang. Supported analysis types are 2D and 3D static analysis, 2D and 3D hydraulic fracturing analysis, 2D and 3D dynamic analysis, and 2D field problems analysis.

Fortran Books and Tutorials

coarray-tutorial: short tutorial using gfortran, ifort, or NAG Fortran, by Thomas Koenig

Fortran4Researchers: code and slides for a 1-day course Fortran for Researchers, by Heather Ratcliffe and Chris Brady

fortran-cpp-equivalents: collection of Modern Fortran and Modern C++ code snippets showing similar structures and processes between them, by Jeff Hole

Intermediate Modern Fortran: intermediate course focusing on some of the more recent features which are central to Modern Fortran, by Kevin Stratford. Two main topics are the facilities in Fortran for abstraction and polymorphism provided by classes and interfaces, and the facilities for formal interoperability with ANSI C.

Games and Puzzles

fortran-fun: collection of text-based computer games and other small programs, by interkosmos

ForSudoku: sudoku generator and solver, by Vincent Magnin

General Purpose

oolong: object-oriented logging system by Ed Hone that aims to provide a simple, flexible logging interface that will enable a wide range of logging functionality for a wide range of model paradigms

fortran_arithmetic: read keywords from an input file, identifies parameter definitions, and performs arithmetic operations to generate a new input file, by Fang Shi. The program was extracted from the finite element code PhiPsi.

Graphics, Plotting, and User Interfaces

ForCAD: library for geometric modeling, supporting B-Spline, NURBS, Bezier, and Rational Bezier curves, surfaces, and volumes, by Seyed Ali Ghasemi

ForColormap: small colormap library independent of any graphical toolkit, by Vincent Magnin et al. It just converts a real value to RGB values, that can be used with any toolkit offering bitmap drawing


Fortran Intuitive Graphics (fig): provide intuitive graphics capabilities, by AnonMiraj. It offers basic 2D primitives such as lines, circles, ellipsis, and rectangles for creating graphical representations.

KVS.fortran: interface by Naohisa Sakamoto and Go Tamura to the Kyoto Visualization System (KVS) for scientific simulation data sets

topdrawer: program for scientific data plotting – a keyword-driven interface to the SLAC Unified Graphics system, designed specifically to generate physics graphs with minimal specifications

Interoperability

fortran-in-go: shows how to compile Fortran code into a shared object with relative memory positioning (-fPIC) and allow Go to dynamically link it at compilation time, by Ryan Wans

fortran-modbus: interface bindings to libmodbus, for Modbus RTU and Modbus TCP access, by interkosmos

Interpolation

Piecewise Polynomial Reconstruction (PPR): high-order accurate piecewise polynomial reconstruction library, by Darren Engwirda

4 Likes

Continuation of previous post due to length limit.

Linear Algebra

FortranMatrix: code for matrix multiplication, trace, hermitianization, special matices, Pauli matrices, sorting, as well as more complicated calculations like computing eigenvalues, eigenvectors, determinants, Pfaffians, inverse of a matrix, and tensor products, calling Lapack and BLAS, by Konstantinos Anagnostopoulos

HSSPACK: fast algorithms for the symmetric tridiagonal eigenvalue problems, the bidiagonal SVD and the banded DC problems, which are based on the hierarchically semiseparable (HSS) matrix techniques. Associated paper: An improved divide-and-conquer algorithm for the banded matrices with narrow bandwidths, by Xiangke Liao et al., Computers & Mathematics with Applications (2016)

LRAP: subroutines for the constrained low-rank approximation of matrices and tensors: low-rank nonnegative matrix and tensor approximation, low-rank nonnegative matrix completion, and low-rank matrix and tensor approximation in the maximum norm, associated with paper On the distance to low-rank matrices in the maximum norm., by Stanislav Budzinskiy, Linear Algebra Appl (2024)

MARIA-Fortran: library for working with low-rank matrices and tensors: truncated SVD, truncated SVD with sketching, adaptive cross approximation with rook pivoting, cross approximation based on the maximum-volume principle, cross approximation based on the maximum-projective-volume principle, elements of Riemannian geometry of fixed-rank matrices, and tensor-train SVD, by Stanislav Budzinskiy

Matran: wrapper that implements matrix operations and computes matrix decompositions using Lapack and the Blas, by G. W. Stewart. Although Matran is not based on a formally defined matrix language, it provides the flavor and convenience of coding in matrix oriented systems like Matlab or Octave.

pcgcoarray: Coarray Fortran library and programs for running some iterative solvers in parallel, by Jeremie Vandenplas. The iterative solvers currently implemented are Chebyshev, Conjugate Gradient (CG), Preconditioned CG (PCG), and Flexible PCG.

PSMMA_Git: Parallel Structured Matrix Multiplication Algorithms for low-rank displacement matrices, including Toeplitz, Hankel, Cauchy and Vandermonde matrices, by Shengguo Li.

SOLVERS_BCGSTAB_GMRES: BiConjugate Gradient STABilization (BiCGSTAB) and Generalized Minimum RESidual (GMRES) methods for solving sparse linear systems, with an application to calculating of three-dimensional fields, by J. Sochor

sparse_fortran: derived types for sparse matrices in COO and CSR format with functions for matrix multiplication, by Euler-37

Zolo-SVD: implements QDWH-PD, QDWH-SVD, and Zolo-SVD algorithms. It uses the ELPA package to compute the eigendecompositions when computing SVD. A structured QR factorization algorithm is also included, which are modified from Scalapack routines and are usually faster. Associated paper: A high performance implementation of Zolo-SVD algorithm on distributed memory systems, by Shengguo Li et al., Parallel Computing (2019).

Materials Science

Abaqus-Fortran-Subroutine: documentation and examples of Fortran subroutines calling Abaqus, by Nguyen Xuan Binh

ABAQUS_subroutines: codes covering some aspects of material mechanics, by David Morin. Each example has a Fortran subroutine, an ABAQUS input file for both Standard and Explicit, a Python post-processing script to extract results from ABAQUS/viewer, a Python script to plot the results, and a PDF presentation of the subroutine, the input file structure and the results.

NH-TOPOPT-FORTRAN: generates mechanical metamaterials based on a process of topological optimisation and numerical homogenisation, by Jeffrey Guevara-Corzo. An associated paper is How to determine composite material properties using numerical homogenization, by Erik Andreassen and Casper Schousboe Andreasen, Computational Materials Science (2014).

Numerical

amosf90: module for AMOS, a package for Bessel functions of a complex argument and nonnegative order, by Euler-37

appell: R package with Fortran code to compute Appell’s F1 hypergeometric function

BesselEval: rapidly evaluates of Bessel functions J_nu and Y_nu of the first and seconds kinds of nonnegative real orders and positive real arguments, based on precomputed expansions, with the algorithm described in a preprint, An algorithm for the numerical evaluation of Bessel function real orders and arguments, by James Bremer

gamma_f77: implements the real-valued Gamma function in quadruple-precision, by Christopher Kormanyos

JFNK-Hookstep: Jacobian-Free Newton-Krylov solver with Hookstep-trust-region approach, by Ashley P. Willis. It solves F(x) = 0, where F and x are n-vectors.

Numerical_differentiation: numerical differentiation performed using the finite difference method, complex step method, or hyper-Dual numbers, by Seongyong Yoon

Numerical Integration (Quadrature)

integrate_fortran: Gauss-Legendre quadrature for 1D and multidimensional integrals, by Euler-37

Optimization

Fortran-Grid-Search: simple serial grid search algorithm, by simple serial grid search algorithm

Method of Moving Asymptotes (MMA-in-Fortran): subroutines by Jeffrey Guevara-Corzo that are adaptations/translations of Matlab code associated with the paper A class of globally convergent optimization methods based on conservative convex separable approximations, by Krister Svanberg, SIAM Journal of Optimization (2002)

Parallel Programming

FortranHPC: code examples and how-to’s on how to write code on HPCs using MPI, Cuda and OpenAcc, by MomoInSpace

FUN_parallel_examples: examples of parallel programming using coarrays, do concurrent, MPI, and OpenMP, by Brad Richardson

INshm: library for accessing chunks of shared memory across process running on a Unix host in Fortran, by Ioannis Nompelis

IntroMPI: codes from the Introduction to MPI course, by by Heather Ratcliffe and Chris Brady. A follow-up is IntermediateMPI-new, which has the C and Fortran codes discussed in the talks, suggestions for exploring MPI types and Domain Decomposition problems, and scripts for using MPI on cluster systems.

mpifort-io-example: example of how to parallel read/write 3D arrays (plus a header) with MPI-IO, by David Liptai

OpenMPExamples: list of programming assignments from a course Parallelism with Open MP and their solutions in C and Fortran, by Heather Ratcliffe and Chris Brady

OpenMP for Computational Scientists: 6-part course introducing the OpenMP programming model to Fortran programmers, with example codes and slides, by Tom Deakin et al.

PararealF90: implementation of Parareal by Daniel Ruprecht solving 3D Burger’s equation using a forward Euler and a RK3SSP method as coarse and fine integrators. It contains three different implementations of Parareal, one based on MPI, one using OpenMP without pipelining and one using OpenMP with pipelining. All three versions compute the same result, the purpose of the code is to compare different implement strategies with respect to speedup, memory footprint and energy consumption.

SPEL_OpenACC: code associated with the paper SPEL: Software tool for Porting E3SM Land Model with OpenACC in a Function Unit Test Framework, by Peter Schwartz et al., 2022 Workshop on Accelerator Programming Using Directives (WACCPD). It provides a robust method to port the E3SM Land Model (ELM) onto GPUs.

Partial Differential Equations

heatcompact3d: 3D heat equation solver based on 6th order compact finite differences schemes, by Thibault Lestang

Octree-mg: implements parallel geometric multigrid methods on quadtree/octree grids, which can be used to solve elliptic PDEs such as Poissons’s equation. Associated paper: A geometric multigrid library for quadtree/octree AMR grids coupled to MPI-AMRVAC, by J. Teunissen and R. Keppens, Computer Physics Communications (2019).

Physics

Equilipy: Python package by Sunyong Kwon and Sam Reeve with Fortran backend that offers multicomponent multiphase equilibrium calculations based on the CALPHAD (CALculation of PHAse Diagram) approach. With a set of Gibbs energy description (Thermochemical database) and input conditions (Composition, temperature, pressure), equilibrium phase configureation, amount, composition, and thermochemical properties can be obtained.

Linear Response Transport Centre (LinReTraCe): package for the simulation of transport properties driven by carriers with finite lifetimes, associated with the paper Prototypical many-body signatures in transport properties of semiconductors, by Matthias Pickem et al., Phys. Rev. B (2022)

molpop-cep: code for the exact solution of radiative transfer problems in multi-level atomic systems, by Andrés Asensio Ramos. The novel contribution of the code is that the radiative transfer equations is analytically integrated so that the final problem is reduced to the solution of a non- linear algebraic system of equations in the level populations.

quasielasticbayes: Python wrappers by Rob Applin et al. for Fortran routines that perform Bayesian analysis on quasi-elastic neutron-scattering data, originally by Devinder Sivia

THOx: Continuum Discretized Coupled-Channels code for two-body projectiles, with the possibility of including core and target excitations, from the Nuclear Theory Group of the University of Seville

Unstructured Mesh Transport (UMT): LLNL ASC proxy application (mini-app) that solves a thermal radiative transport equation using discrete ordinates (Sn). It utilizes an upstream corner balance method to compute the solution to the Boltzmann transport equation on unstructured spatial grids.

wignerSymbols: C++ library to compute the Wigner 3j- and 6j- symbols with Fortran backend, by Joey Dumont et al. A related paper is Recursive evaluation of 3j and 6j coefficients, by K. Schulten and R.G. Gordon, Computer Physics Communications (1976).

X-ray-induced Thermal And Nonthermal Transitions (XTANT-3): An associated paper is Electron-phonon coupling in metals at high electronic temperatures, by N. Medvedev and I. Milov, Phys. Rev. B. (2020)

Quantum Chemistry and Electronic Structure

APOST3D: chemical concepts from wave function analysis. An associated paper is Overlap populations, bond orders and valences for ‘fuzzy’ atoms, by I. Mayer and P. Salvador, Chemical Physics Letters (2004).

NanoGW: implements a Lanczos-based method to accelerate full-frequency GW calculations. Associated paper: Optical excitations in organic molecules, clusters, and defects studied by first-principles Green’s function methods, by Murilo L. Tiago and James R. Chelikowsky, Phys. Rev. B (2006).

OpenMMPol: library to interface quantum chemical software with atomistic polarizable embedding, by Mattia Bondanza et al. With OpenMMPol any quantum mechanical method that is able to provide the electrostatic potential, field, and field gradient for a given electronic density could be coupled to polarizable embedding with AMOEBA (and other force fields).

Pseudopotential Algorithm of Real-Space Electronic Structure Calculation (PARSEC): solves the Kohn-Sham equations by expressing electron wave-functions directly in real space, without the use of explicit basis sets, by Anil Damle and Zhao Tang. An associated paper is Numerical methods for electronic structure calculations of materials, by Y. Saad et al., SIAM Review (2010).

VASPsol: solvation model for the plane wave density functional theory (DFT) code VASP. An associated paper is Implicit solvation model for density-functional study of nanocrystal surfaces and reaction pathways by K. Mathew et al., J. Chem. Phys. (2014). A currently developed version, also in Fortran, is VASPsol++.

Random Number Generation

rndgen-fortran: module for the KISS random number generator that allows the use of multiple independent random number generators at the same time, by Wesley Cota, based on a code by Thomas Vojta. Module rndgenPL_mod, adapted from code by Silvio C. Ferreira, extends the generator to an integer power-law distribution.

Statistics

Bayesian Correlation Testing (BCT): code associated with the paper Bayes factor testing of equality and order constraints on measures of association in social research, by Joris Mulder and John P. T. M. Gelissen, Journal of Applied Statistics (2023)

BFpack R package with Fortran code for for flexible Bayes factor testing of hypotheses on key parameters in commonly used statistical models in applied research, by Joris Mulder.

odrpack95: collection of subprograms modernized by HugoMVale for fitting a model to data with bound constraints on the model parameters, designed primarily for instances when the explanatory as well as the response variables have significant errors. An associated paper is Algorithm 869: ODRPACK95: A weighted orthogonal distance regression code with bound constraints, by Jason W. Zwolak et al., ACM Transactions on Mathematical Software (2007).

SmoothHazard: R package with Fortran code for smooth hazard models for interval-censored data with applications to survival and illness-death models, by Thomas Alexander Gerds et al.

Time Series

timeseries: fast, optimized tools for working with times series data, using OpenMP for parallelisation, by Rasmus Handberg. Calculates weighted frequency power spectra of un-evenly sampled data, filter and extracts frequencies.

7 Likes

Update since May 12, full list here

Astronomy and Astrophysics

1-D-Supernova-shock-radius-evolution: 1-D version of the ZEUS 2-D CODE which solves hydrodynamic equations is applied to a SuperNova Remnant (SNR), by Lorenzo Cavazzini

MHD: outputs both binary and vdc data to generate Magnetic Flux ropes in quadrupolar photosphere topologies for Coronal Mass Ejections, by Jaiman Parekh and Satoshi Inoue

MGITM: 3-D GCM of Mars atmosphere from the surface to 300 km aimed at solving for the dynamics of the upper atmosphere, by dpawlows

Biology and Medicine

snakedali: program for protein structural alignment and structure database search, based on the Dali (distance matrix alignment) method, from Doudna-lab

Climate and Weather

multio: package developed by ECMWF that provides an application programming interface (API) for I/O-server functionality for distributed earth-system models and post-processing pipelines of a user-programmable list of actions

Code Tools

exception_handling: tools for exception handling and tracing, by Sebastian Tillack

Computational Chemistry

Equilibrate: chemical equilibrium solver by Nick Wogan which is based on EasyChem, which itself is a clone of the NASA CEA tool (described in Gordon and McBride 1994)

local_dielectric_saturation: Metropolis Monte-Carlo program to study local dielectric saturation in Restricted Primitive Model electrolytes, by David Ribar and janneforsman. Also modified_widom to study the structure and thermodynamics of ionic fluids

nemo_eos: Fortran versions of equation of state of seawater as used by NEMO, wrapped in Python, by George Nurser

Computational Fluid Dynamics

Broadcast: discretises the compressible Navier-Stokes equations and then extracts the linearised N-derivative operators through Algorithmic Differentiation (AD), providing a toolbox for laminar flow dynamics. Associated paper: BROADCAST: A high-order compressible CFD toolbox for stability and sensitivity using Algorithmic Differentiation, by Arthur Poulain et al., Computer Physics Communications, Volume 283, 2023, 108557.

cruna-toolkit: (aero)acoustic solver that can find, reconstruct, or optimize sound sources with impedance boundary conditions, by Lewis Stein and Mathias Lemke. The solver utilizes adjoint-based optimization techniques and includes the full non-linear Euler and Navier-Stokes equations in a finite-difference time-domain approach.

Flexible Aerodynamic Solver Technology (FAST): set of Python modules implementing HPC solvers for computational fluid dynamics, calling Fortran code, from ONERA, the French Aerospace Lab

GATT_DNS: Direct Numerical Simulation code for the compressible Navier-Stokes equations, associated with the thesis of Marlon Sproesser Mathias, Computational study of the hydrodynamic stability of gaps and cavities in a subsonic compressible boundary layer (2021)

Earth Science

DiallelX: approximates Network Cross-Correlation coefficients (NCCs) among multiple continuous records and template waveforms observed at multiple seismic stations, by Shiro Hirano. The results, relatively less accurate but sufficient to find new seismic events, are obtained several-fold faster than a conventional scheme.

HOS-ocean: High-Order Spectral method for oceanic simulations, by gducrozet and Gjacquenot. Also HOS-NWT, a Numerical Wave Tank based on the High-Order Spectral (HOS) method, dedicated to the generation and propagation of highly non-linear wave fields in wave basins with arbitrary constant depth.

Meso-NH: non-hydrostatic mesoscale atmospheric model of the French research community

WIN2PhaseNet: tool to make data for prediction and training of PhaseNet: A deep-neural-network-based seismic arrival-time picking method (Zhu and Beroza, 2019) from WIN/WIN32 format waveform file and pick list

Economics

msearch-1asset: search-theoretic model of money with one asset and persistent heterogeneity, associated with paper The long-run redistributive effects of monetary policy, by Christian Bustamante, Journal of Monetary Economics (2023)

National Energy Modeling System (NEMS): long-term energy-economy modeling system of U.S. energy markets, from the Energy Information Administration. The model is used to project production, imports, exports, conversion, consumption, and prices of energy, subject to user-defined assumptions.

Fortran Books and Tutorials

ex-f90ish: small programs illustrating some of features of modern Fortran from the perspective of a FORTRAN 77 programmer, by Mitch Richling. His tutorial has links to these codes.

Graphics, Plotting, and User Interfaces

tikz-fortran: module that generates figures using PGF/Tikz, a pair of languages for producing vector graphics, by Hui-Jun Chen

Interoperability

Fortran-C-interoperability: examples of Fortran interoperation with C, by HugoMVale

Linear Algebra

DLA-Future-Fortran: interface for DLA-Future, a C++ task-based linear algebra library providing GPU-enabled distributed eigensolvers, by Rocco Meli et al.

Materials Science

General Tool for Electron Emission Calculations (GETELEC): computational tool for calculating electron emission current and Nottingham effect heat for metallic emitters, associated with the paper A general computational method for electron emission and thermal effects in field emitting nanotips, by A. Kyritsakis and F. Djurabekova, Computational Materials Science (2017)

Numerical

findiff: finite differencing code for derivative approximation, by PunchesMalone

Parallel Programming

f2dace-artifact: data, visualization plots, and reproduction scripts for the paper “DaFy: Data-Centric Fortran Portability”, which presents a workflow that translates Fortran applications into a data-centric representation called SDFG, applies data-flow optimizations in DaCe, and compiles the applications to CPU and GPU, by Marcin Copik and alexnick83

openmp-series-2024: slides and assignment for an OpenMP training series at NERSC

Parallel Halo Exchange Using Fortran Coarrays: code and test cases for investigating Fortran coarray implementations of a parallel halo exchange operation associated with domain decomposition methods for PDE, by Neil Carlson

Particle Physics

proVBFH: QCD corrections to Vector Boson Fusion (VBF) single and double Higgs production, by Alexander Karlberg and Frédéric Dreyer

Physics

FuzzifiED_Fortran: Fortran code in the Julia package FuzzifiED intended for exact diagonalisation (ED) calculations on fuzzy sphere, by Zheng Zhou et al.

OllinSphere-BiB: solves the Einstein evolution equations in spherical symmetry using a curvilinear version of the BSSN formulation for the 3+1 evolution equations, with different types of matter and different gauge conditions, by Miguel Alcubierre

paspro: library implementing the polynomials which compute the thermodynamic properties of steam on various boundary lines between regions according to the revised release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam (IAPWS-IF97), by Panos Asproulis

SSMF: code for the Slave-Spin Mean-Field (SSMF) approach, a methodology based on solving the Hubbard-Kanamori model based on tight-bindings to obtain the orbital quasiparticle weights and occupations, by Jose M. Pizarro

taurus_mix: code to perform the configuration mixing of symmetry-projected reference states by solving the Hill-Wheeler-Griffin generalized eigenvalue equation, from project-taurus

TransOpt: enables VASP users to calculate electrical transport properties (Seebeck coefficients, electrical conductivities, and electronic thermal conductivities) by using the momentum matrix method or the derivative method as adopted in BoltzTrap, by yangjio4849. Also TTEP, a code for efficient calculation of the thermal transport from the constant electron-phonon coupling approximation

vdist-solver-fortran: velocity distribution function solver for Python, calling Fortran, using Liouville’s theorem, by Nkzono99

wannchi: calculates susceptibility using Wannier functions, by Chao Cao et al. RPA and self-energy correction is currently under internal tests.

Quantum Chemistry and Electronic Structure

HF-INTEGRALS: integration of Gaussian Type Orbitals (GTO) for Hartree-Fock Calculation, using co-arrays, from CloudChemScientific. The integral package was originally obtained from NWChem

Regular Expressions

fortran-regex: Fortran 2003 implementation of regular expressions, by Edward Higgins

Statistics

BFpack R package with Fortran code for for flexible Bayes factor testing of hypotheses on key parameters in commonly used statistical models in applied research, by Joris Mulder.

FAS: R package with Fortran code implementing inference methods for high-dimensional inference on sparse regression coefficients. Associated preprint: Tuning-free testing of factor regression against factor-augmented sparse alternatives (2023), by Jad Beyhum and Jonas Striaukas. Also bootml implements the tuning-free bootstrap for testing factor regression against factor-augmented sparse alternatives.

fastspline: fast smoothing spline routine in Fortran 90 usable in Python, by James Orr. Associated paper: A fast compact algorithm for cubic spline smoothing, by Howard L. Weinert, Computational Statistics & Data Analysis (2009).

leaps: R package performing an exhaustive search for the best subsets of a given set of potential regressors, using a branch-and-bound algorithm, and also performing searches using a number of less time-consuming techniques. It is based on FORTRAN 77 code by Alan Miller which is described in more detail in his book Subset Selection in Regression. Miller’s site has Fortran 90 code for subset selection.

quantregpy: code for quantile regression by Roger Koenker with a Python interface. The R package is here

Strings

utf8f: set of functions useful for handling utf-8 strings, such as len, codepoint, width, category, and easta_property, by yymmt742

Time Series

midasmlpy: Python package with Fortran code implementing estimation and prediction methods for high-dimensional mixed-frequency (MIDAS) time-series and panel data in regression models. An associated paper is Machine learning time series regressions with an application to nowcasting, by Babii, A., Ghysels, E., & Striaukas, J., Journal of Business & Economic Statistics (2022). There are also R and Matlab versions.

Unit Testing

julienne: compiler-portable, unit-testing framework for modern Fortran, including accelerated coarray Fortran software, by Katherine Rasmussen and Damian Rouson

3 Likes

Update since June 19, 2024, full list here

Astronomy and Astrophysics

JSPAM: software for simulating interacting galaxies using a restricted three-body approximation, in Fortran, Java, JavaScript, and Python, by aholinch and John Wallin

LAPS: UCLA-Pseudo-Spectral is a 3D MPI-parallelized Fourier-transform-based pseudo-spectral Hall-MHD code, with corotating-expanding-box-model implemented, by Chen Shi

Mars Subsurface Ice Model (MSIM): thermal and ice evolution models for Mars, by Norbert Schörghofer

MESSY: Hénon-style Monte-Carlo code to simulate spherical stellar clusters and galactic nuclei; i.e. Monte Carlo simulations for stellar dynamics, associated with the paper Stellar Remnants in Galactic Nuclei: Mass Segregation, by Marc Freitag et al., Astrophysical Journal (2006)

Molecular atmospheric Absorption with Rapid and Flexible Analysis (MARFA): tool designed to calculate volume absorption coefficients or monochromatic absorption cross-sections using initial spectroscopic data from spectral databases and atmospheric data from an external file, by Mikhail Razumovskiy

NuLib: provides a basic standard set of neutrino matter interaction routines that can be readily incorporated in radiation-hydrodynamics codes for physics benchmarking, by Evan O’Connor et al.

SpectralBreaks: models the shape of spectral breaks in gamma ray burst afterglows, by Damien Koon et al.

STARS: Aotearoa STARS code of the Jan Eldridge research group, forked from the original stellar evolution code of Peter Eggleton

SWMF: Space Weather Modeling Framework is a software framework that provides a common operating environment for the various modeling components included. Each of the components models particular aspects of space weather (sun, heliosphere, magnetosphere, etc) and the various commands allow you to control how those models run and interact with each other.

Triple stellar evolution (TSE): single stellar evolution and binary interactions are modelled in Python using the binary population synthesis Fortran code MOBSE. An associated paper is Evolution of massive stellar triples and implications for compact object binary formation, by Jakob Stegmann et al., Monthly Notices of the Royal Astronomical Society (2022).

TRIPTYCH: simulates the collision of two stars, including the orbital trajectories, merger, and evolution of the merger product, by Pau Amaro Seoane and James C. Lombardi Jr. The code therefore joins three branches of stellar astrophysics: dynamics, hydrodynamics and evolution.

vkompth: code associated with paper vKompth: a variable Comptonization model for low-frequency quasi-periodic oscillations in black hole X-ray binaries, by Candela Bellavita et al., Monthly Notices of the Royal Astronomical Society (2022)

xnirspec: program to visualise and manipulate FITS images, by NicolĂĄs Cardiel, originally written to reduce spectroscopic data obtained with near-infrared spectrograph NIRSPEC, installed in one of the Keck Telescopes (Hawaii)

Yet Another Particle Simulation (YAPS): high-performance astrophysics simulation modeling black hole migration resulting from the merger of a large host galaxy with a smaller galaxy, by Daniel Harrington et al. The simulation uses CUDA acceleration and Fourier transforms to compute gravitational interactions between 100 million particles, including two supermassive black holes (SMBHs).

Benchmarks and Benchmarking

Benchmark.f: KISS library for benchmarking functions and subroutines with precision, by David Pfister

Fortran-Stencil-Microbenchmarks: assesses the performance of different memory-bound finite difference kernels, by Vincent Meduski and Hugo Brunie. Compares the results using different hardware and software variables for use as machine-specific best practices.

mandelbrot-f: Mandelbrot benchmark in Fortran by Jesper Olsen, who also has versions in Rust, Erlang, and Mojo

NPB: fork of the NASA Advanced Supercomputing Division’s NAS Parallel Benchmarks, extended to include new benchmarks for unstructured adaptive meshes, parallel I/O, multi-zone applications, and computational grids

Biology and Medicine

AHA-R1: large scale simulation model that implements a general decision-making architecture in evolutionary agents, by Sergey Budaev. Each agent is programmed as a whole virtual organism including the genome, rudimentary physiology, the hormonal system, a cognitive architecture and behavioural repertoire.

GR-Eye: 3D Homogenized Constrained Mixture Model for Eye Growth and Remodeling - A Model of Staphyloma Formation, implemented as an Abaqus UMAT, by Fabian A. Braeu

TRIDENT: program for dental microwear analysis, by Arthur Francisco

Climate and Weather

PrecisionSpec-Analyzer, a high-precision tool for atmospheric absorption calculations over narrow spectral ranges, focusing on detailed spectroscopic analysis using HITRAN and HITEMP data with standard and custom line shapes for terrestrial atmospheric studies, by Mikhail Razumovskiy

Code Tools

fortran-logger: simple multi-threaded logger for Fortran, with ANSI coloring on terminal {Fatal, Error, Warn, Debug, Info} and email capability with “sendmail” argument, by Hisashi Takeda

fpm-search: finds information about registered fpm (Fortran Package Manager) packages, by urbanjost

Compiler Tests

compiler-bugs: bug reports for Fortran compilers made by Ben Trettel

fortran_oo: tests compiler support of object-oriented programming features, by Alex Pletzer and Wolfgang Hayek

lfortran: integration tests of the LFortran compiler, by Ondƙej Čertík et al., are here

Computational Chemistry

chempotpy: Python library for analytic representation of single-state and multi-state potential energy surfaces and couplings that generates Fortran subroutines. An associated paper is ChemPotPy: A Python Library for Analytic Representations of Potential Energy Surfaces and Diabatic Potential Energy Matrices, by Yinan Shu et al., Journal of Physical Chemistry A (2023).

fcc_tools: tools by Javier Cerezo to facilitate input generation and analysis of FCclasses, a code that computes vibronic spectra and nonradiative rates based on the harmonic approximation

local_dielectric_saturation: Metropolis Monte-Carlo program to study local dielectric saturation in Restricted Primitive Model electrolytes, by David Ribar and janneforsman. Also modified_widom to study the structure and thermodynamics of ionic fluids

mobbrmsd: molecular-oriented branch-and-bound for Root Mean Squared Deviation (RMSD), one of the most common metrics for comparing the similarity of three-dimensional chemical structures, by yymmt742

multiple-layered dynamics perturbation analysis (mdpa): calculates the regions where ligands tend to bind to a given protein structure, by Dengming Ming.

Non-Adiabatic Transfer Rates Calculations (NATRC): calculates non-adiabatic transition rates between two states in molecules, by Arthur I. Martynov and Alexander S. Belov. Calculations are carried out based on the classical and modified Bixon-Jortner-Plotnikov models.

pbepack: package to solve population balance equations for particulate processes, associated with the paper Solution of the Population Balance Equation for Two-Component Aggregation by an Extended Fixed Pivot Technique, by Hugo M. Vale and Timothy F. McKenna, Industrial & Engineering Chemistry Research (2005)

postg: calculates the dispersion energy and related quantities in gas-phase systems using the exchange-hole dipole moment (XDM) model. An associated paper is Non-covalent interactions and thermochemistry using XDM-corrected hybrid and range-separated hybrid density functionals, by A. Otero-de-la-Roza and Erin R. Johnson, Journal of Chemical Physics (2013).

Containers and Generic Programming

for_fifo_queue: dense linked fifo queue, by jordan4ibanez. It is dense because it allows unlimited polymorphism in the queue without using additional indirection.

Fortran Library based on Interfaces and Templates (FLIT): generic library providing a number of useful functionalities for computational geophysics and beyond, by Kai Gao. These functionalities include several single/multi-dimensional array manipulation functions/subroutines, flexible parameter reading from textual file or command line arguments, signal and image filtering and processing, integral transforms, interpolation, statistical functions, and so on.

fortran_vector: bindings to c-vector by jordan4ibanez. C-vector is a dynamic array implementation in C similar to the one found in standard C++.

hashmap_f90: bindings to hashmap.c, by jordan4ibanez

integer_set: simple unoptimized 32-bit and 64-bit integer sets, by jordan4ibanez

Yet Another Fortran Tree (yaftree): single-module lightweight implementation of a dictionary (key–value pairs) and set (only keys), by Dominik Gronkiewicz. Some features, such as interface for popular data types (INTEGER, CHARACTER etc) are intentionally omitted to keep the size down to the minimum.

Computational Fluid Dynamics

2DHydro: solve 2D Euler equations for simple systems and create videos of the simulations with Python, by Sudarshan Neopane. Wave_2D_MPI_HDF5 solves the wave equation with a source term in 2D, using the finite difference method in parallel, with output written in hdf5 format.

BGK2D_GPU: 2D CFD Lattice Boltzmann Method code developed to 1) give an efficient implementation of LBM 2) Exploit mulithreading 3) Assess performance using (different) GPUs, by Giorgio Amati. Also BGK3D_GPU.

CUBic Equation of state Navier-Stokes (CUBENS): massively-parallel GPU-accelerated high-order solver for direct numerical simulations of non-ideal wall-bounded flows, by Pietro Carlo Boldini

DesignTurb: offers a versatile method for constructing the vorticity of vortex tubes with customizable centerline topology, differential twist, and variable thickness. An associated paper is Role of internal structures within a vortex in helicity dynamics, by Weiyu Shen et al., Journal of Fluid Mechanics (2023).

HeatFlow: software package for modelling dynamical heat transport in systems using finite difference methods, by Harry Mclean et al. The software is primarily designed to utilise the Cattaneo method, but the Fourier method can be used instead.

Lubrication-Dynamics-Biviscous: code for suspensions in Newtonian and biviscous matrices with a lubrication dynamics model, associated with paper Numerical investigation of the rheological behavior of a dense particle suspension in a biviscous matrix using a lubrication dynamics method, by S.S. Prasanna Kumar et al., Journal of Non-Newtonian Fluid Mechanics (2020).

Mapped Legendre Spectral Method Code (MLegS): code package based on a modernized and parallelized spectral method for vortical (swirling) flow simulations in an unbounded domain. An associated paper is Linear stability analysis of wake vortices by a spectral method using mapped Legendre functions, by Sangjoon Lee and Philip S. Marcus, Journal of Fluid Mechanics (2023).

MUltiScale Simulation Tribology (MUSST): implements the finite element method on Reynolds’ equation, by NoĂ«l BrunetiĂšre and Arthur Francisco. It can solve a large variety of problems with standard geometries like sliders, bearings and pockets.

osinco3d: code designed to solve the 3D Navier-Stokes equations for incompressible flow using a high-order finite difference method, using Chorin’s projection method. by jojoledemago

PROFOIL: program for the inverse design of isolated airfoils, by Michael S. Selig

rbsolve: code for Rayleigh-Benard (natural convection) problem simulation with Boussinesq approximation. An associated paper is Generation of Large-Scale Winds in Horizontally Anisotropic Convection, by J. von Hardenberg et al., Phys. Rev. Lett. (2015).

simple-2d-ns: A “Hello World” for incompressible Navier-Stokes, featuring two-dimensional flow, second-order finite difference, staggered grid, fully-Explicit Euler time integration, fractional-step, pressure-Poisson equation solved via FFTs, uniform grid spacing, and OpenMP acceleration, by kevzhong

SPH_fractional: code for simulating fluids using the SPH integral viscoelastic method, associated with the paper Smoothed Particle Hydrodynamics simulations of integral multi-mode and fractional viscoelastic models, by Luca Santelli et al., Journal of Non-Newtonian Fluid Mechanics (2024)

Synthetic-Eddy-Method-KCX2013: serial implementation by Akshay Patil of the Synthetic Eddy Method described in the paper Divergence-free turbulence inflow conditions for large-eddy simulations with incompressible flow solvers, by Yusik Kim et al., Computers & Fluids (2013).

Cryptography

fldpc: LDPC (Low-Density Parity-Check) decoder (coset decoding with syndrome), by Marco Origlia

Databases

fortran-sqlcipher: interfaces by Hisashi Takeda for SQLCipher, a library that provides transparent, secure 256-bit AES encryption of SQLite database files

Dates and Times

fortran-datetime: functions for dates and times focused on speed, by Hisashi Takeda

Earth Science

3D Magnetic Gradient Tensor Modeling at High Susceptibility (3D-MGTM-HS): code associated with the paper A FORTRAN Program to Model Magnetic Gradient Tensor at High Susceptibility Using Contraction Integral Equation Method, by Longwei Chen and Fang Ouyang, Minerals (2011)

AHMS-IRRIG: Atmospheric and Hydrological Modelling System integrated IRRigation module, associated with the paper A regional hydrological model for arid and semi-arid river basins with consideration of irrigation, by Cong Jiang et al., Environmental Modelling & Software (2022)

AquaCrop: crop growth model developed by FAO’s Land Land and Water Division to address food security and assess the effect of the environment and management on crop production. AquaCrop simulates the yield response of herbaceous crops to water and is particularly well suited to conditions in which water is a key limiting factor in crop production.

climber-x: comprehensive fast Earth System Model, designed to simulate the evolution of the Earth system on time scales ranging from decades to glacial-interglacial cycles. An associated paper is Glacial inception through rapid ice area increase driven by albedo and vegetation feedbacks, by Matteo Willeit et al., Climate of the Past (2024).

CVMix-src: robust and flexible library for parameterizing ocean vertical mixing processes, by Michael Levy et al.

DALEC-Grass: development of the Data Assimilation Linked Ecosystem Carbon (DALEC) model that simulates carbon (C) dynamics in managed grassland ecosystems, from the Global Change Ecology Lab

Diagenetic_model_LHeureux_2018: code by Johannes Hidding et al. for the model of the paper Diagenetic Self-Organization and Stochastic Resonance in a Model of Limestone-Marl Sequences, by Ivan L’Heureux, Geofluids (2018)

domain-tools: code and tools to edit and manipulate ocean model grids and topographies, from COSIMA

elfe3D: 3D forward modelling code that can simulate electric and magnetic field responses from frequency-domain controlled-source electromagnetic setups, associated with the paper Efficient goal-oriented mesh refinement in 3-D finite-element modelling adapted for controlled source electromagnetic surveys, by Paula Rulff et al., Geophysical Journal International (2021)

Environmental Fluid Dynamics Code (EFDC+): multifunctional surface water modeling engine that includes hydrodynamic, sediment-contaminant, and eutrophication components designed to simulate aquatic systems in one, two, and three dimensions

EWSMod-2D: code for modeling 2D elastic-wave sensitivity propagation and computing the spatial distribution of elastic-wave sensitivity energies in a heterogeneous model, which can be used for optimal design of time-lapse seismic monitoring surveys. A related book chapter is Elastic-Wave Sensitivity Propagation for Optimal Time-Lapse Seismic Survey Design, by Kai Gao et al., from the book Geophysical Monitoring for Geologic Carbon Storage (2022).

FastIsostasy: model that regionally computes the glacial isostatic adjustment (GIA), as described in Swierczek-Jereczek et al. (2024). It approximates the gravitational response, accounts for the resulting heterogeneity of the sea-surface height and computes the evolution of masks (continent, ocean, floating ice, grounded ice), as well as the load anomalies applied upon the solid Earth.

FDFK2D: efficient two-dimensional teleseismic wavefield hybrid simulation method for receiver function analysis, by Youshan Liu. An associated paper is Underthrusting of Tarim Lower Crust Beneath the Tibetan Plateau Revealed by Receiver Function Imaging, by Chenglong Wu et al., Geophysical Research Letters (2024).

Foam-emissivity-model: estimates the emissivity of sea foam at the microwave frequencies using a two-stream approximation radiative transfer model, associated with the paper Physically Based Simulations of Foam-Covered Ocean Emission at Microwave Frequencies, by Yuchen Xie et al., IEEE Transactions on Geoscience and Remote Sensing (2024)

graded: Python and Fortran programs for evaluating the flow solution to a borehole in a gradent material, associated with the paper Generalized Solution for Double-Porosity Flow Through a Graded Excavation Damaged Zone, by Kristopher L. Kuhlman, Mathematical Geosciences (2024)

gravity-modelling-with-polynomial-density: 3D Large-scale Gravitational Modelling Based on Tesseroids with a Polynomial Density of Arbitrary Degree in depth, by Fang Ouyang and Longwei Chen

HarmonicanalysisTideLoad: codes for spherical harmonic analysis on tidal constants and modelling, by Chuanyin Zhang. The author has many other codes for geodesy.

Linking_SAR_and_ABL_structure: namelists and postprocessing scripts by Hugo Jacquet for the Meso-NH model, an atmospheric non hydrostatic research model that is applied to a broad range of resolutions, from synoptic to turbulent scales, and is designed for studies of physics and chemistry.

Los Alamos TravelTime package based on Eikonal equation (LATTE): package for traveltime computation, tomography and source location in 2D/3D isotropic acoustic/elastic media, by Kai Gao and Ting Chen

Luco-Apsel-Chen Generalized Reflection/Transmission coefficients Method (LAC-GRTM): synthetic seismogram calculation for a multi-layered half-space, by Tche Liu. An associated paper is Implementation of efficient low-storage techniques for 3-D seismic simulation using the curved grid finite-difference method, by Wenqiang Wang et al., Geophysical Journal International (2023).

LongWave Propagation Code (LWPC): code to generate geographical maps of signal availability for coverage analysis, from the Space and Naval Warfare Systems Command. SuperLWPC is a graphical user interface of the code for investigating ionospheric D-region parameters, by Ahmed Ammar.

MIM: modernized version by Kosei Ohara of MIM, (Mass-weighted Isentropic zonal Means) that exactly expresses the finite-amplitude effects and lower boundary conditions for wave-mean flow interactions

modpath-rw: Random Walk Particle Tracking code for solute transport in heterogeneous aquifers, extending MODPATH-v7, by rodrperezi and dfg1973

nshmp-haz-fortran: code for the National Seismic Hazard Mapping Project, by Peter Powers et al.

OceanWave3D-Fortran90: efficient coastal engineering research tool used worldwide for simulation of nonlinear and dispersive free surface waves in varying bathymetries from very deep to shallow water. An associated paper is Analysis of Efficient Preconditioned Defect Correction Methods for Nonlinear Water Waves, by Allan Peter Engsig-Karup, International Journal of Numerical Methods in Fluids (2013).

Operational Priority Substances model (OPS): program to simulate the distribution of pollutants in the air and calculate how much of these substances ends up on soil or crops per hectare (deposition), from the National Institute for Public Health and the Environment of the Netherlands

phenograss-example: working example of the PhenoGrass model as described in the paper Productivity of North American grasslands is increased under future climate scenarios despite rising aridity, by Koen Hufkens et al., Nature Climate Change (2016)

projcoonv: interface by Francesco Uboldi to PROJ generic coordinate transformation software in C that transforms geospatial coordinates from one coordinate reference system (CRS) to another

RoadSurf: library for predicting road conditions, by Virve Karsisto et al. The included features are road surface temperature and storage term (water, ice, snow, deposit) calculation.

seismicgradiometry: code for seismic gradiometry (wave gradiometry), by Masashi Ogiso

sfd_excmg: code for large-scale MT (magnetotelluric) forward modeling using extrapolation multigrid method, associated with the paper An efficient cascadic multigrid method combined with regularization technique for 3-D electromagnetic finite-element anisotropic modeling., by Kejia Pan et al., Geophysics (2024)

slstr-preprocessor: software for aggregating the SLSTR 500 m Vis/NIR channels (S1-6) onto the 1 km IR grid (“i-stripe” as used for S7-9), by Owen Embury and Niall McCarroll. An associated paper is Improving the combined use of reflectance and thermal channels for ocean and coastal cloud detection for the Sea and Land Surface Temperature Radiometer (SLSTR), by Claire E. Bulgin et al., Remote Sensing of Environment (2023).

sprayHFs: subroutines to add seastate-dependent sea spray heat flux physics to an existing bulk surface layer scheme in a coupled regional or global Earth system model. An associated paper is Sea-State-Dependent Sea Spray and Air–Sea Heat Fluxes in Tropical Cyclones: A New Parameterization for Fully Coupled Atmosphere–Wave–Ocean Models, by Benjamin W. Barr et al., Journal of the Atmospheric Sciences (2023).

Economics

firingcosts_petit2021: replication package for the working paper Aggregate effects of firing costs with endogenous firm productivity growth (2021) by Borja Petit. The codes use OpenMP for parallelization and GNUplot to generate the graphs.

FortranFinance: theoretical finance computations, including a retirement simulator, resampling Monte Carlo for inflation and stock market returns, and time-value-of-money loan problems, by Mitch Richling

FortranRiskEngine: Monte Carlo simulation tool designed for quantitative finance applications, by Paul Nikholas Lopez

Engineering

CONTACT: advanced simulation program for the study of three-dimensional frictional contact problems, such as occur between wheel and rail, in roller bearings and in offset printing devices, by Edwin Vollebregt

cryoH2vehicle: simulates the variations of the thermodynamics state of the hydrogen inside a vessel (pressure, temperature, density, para/ortho) as a function of the vessel design (volume, rated pressure, aspect ratio, heat transfer – including the influence of outside temperature) and the duty cycle the vehicle experiences, by Salvador Aceves and Julio Moreno-Blanco

ns3-if77-module: calculates propagation loss for ground/air, air/air, ground/satellite, and air/satellite systems for frequencies in the 0.1Mhz to 20Ghz range, originally by G. D. Gierhart and M. E. Johnson

Rooster-mf: framework for simulation of Gen-IV Liquid Metal Fast Breeding Reactor system behavior, from the Advanced Nuclear Systems Group of Paul Scherrer Institute. Also FRED, a Fast reactor fuel behaviour code that uses the SUNDIALS library for numerical modelling of base irradiation of a fast reactor fuel pin.

Fast Fourier Transform

fftlog: Python wrapper (using f2py) by Dieter WerthmĂŒller and JĂžrgen Kvalsvikfor the logarithmic FFT Fortran code FFTLog by Andrew Hamilton

3 Likes

Continuation of previous post.

File I/O

ciftbx: tool box of routines for manipulating Crystallographic Information File (CIF) data, by Sydney R. Hall and Herbert J. Bernstein

FortranDirectAccess: module to read or write binary files, with NaN is detected before output and after input, by Kosei Ohara. Functions are available for scalar, 1D, 2D, and 3D variables that are single or double precision.

Fyaml: simple YAML parser, by Barry Baker. It supports basic YAML features including nested structures, sequences, various data types (strings, integers, floats, booleans, nulls), comments, anchors, and aliases.

movingAverage: compute moving average field for various grid sizes for 1, 2, and 3 dimensional data read from a file, by Kosei Ohara

Max_diff_nc: compares two NetCDF files, by Lionel Guez. Only NetCDF variables with type NC_FLOAT or NC_DOUBLE are compared.

plot3dtool: library providing uniform interfaces helping process files in PLOT3D format, by Zhenling Jia. PLOT3D is a standard file format in computational fluid dynamics used for storing grid and results data.

smartpars: class to read / load from file / dump to file a bunch of parameters, by Zdenek Grof

Fortran Books and Tutorials

fortran_experiments: simple progressive lessons on using CMake to build Fortran projects, by Jorge Luis GĂĄlvez Vallejo

Fortran-Mixed: examples of the usage of Fortran with the OOP paradigm, by Nico Clinco. There are examples of calling Python and C and using MPI.

Modern-Fortran-By-Example: code from the YouTube videos by hexafoil

Games and Puzzles

fbingo: fast and simple statistical simulations of bingo games, by JMeyer1991

fortran-snake: classic “snake” game with several computer-controlled snakes, using raylib for graphics, by grofz

General Purpose

files_f90: directory reader by jordan4ibanez

HEDTOOLS: set of modelling utilities and tools (implemented as portable modules, not object-oriented) that have general applicability and are used for data conversion, input/output, random number generation and execution logging, by Sergey Budaev

task-dispatch: interpreter for numerical calculations, by Dominik Gronkiewicz

TOOLIB: modules for multidimensional B-Spline interpolation of data on a regular grid, Cholesky decomposition and resolution, calling FFTW3, file operations, calling gnuplot, interpolation and weighting functions, minimization, the Mersenne Twister RNG, PIKAIA a general purpose unconstrained optimization method based on a genetic algorithm, sorting, calling different sparse matrix solvers, handling the Digital Surf binary format (.sur), and fitting a least square polynomial to a surface, by Arthur Francisco

Graphics, Plotting, and User Interfaces

Contour_531: modern wrapper by Lionel Guez around subroutines of Jack Dongarra for determining sequences of points in the plane which may be used to draw contours through equal values of a surface, in module 531 of TOMS

ForColormap: small colormap library independent of any graphical toolkit, by Vincent Magnin et al. It just converts a real value to RGB values, that can be used with any toolkit offering bitmap drawing.

forIGES: utilities for reading and writing a subset of the IGES CAD file entities described in the IGES 5.3 specification, by rweed. The focus of forIGES is on geometric entities such as NURBS curves and surfaces.

fortran-CLI: simple command line Interface for Fortran, by Hisashi Takeda

fortran-graphics: graphics library written in OpenGL, by Edward Higgins

gedatsu: graphs with embedded data subdivision utilities, by takumi308 and Naoki Morita

libgnuplot-fortran: routines for plotting inside Fortran using Gnuplot, by JoseAntonioLattice

xframes-fortran: interface to XFrames, a library for building GPU-accelerated, native-like desktop applications using a variety of programming languages

Interoperability

excelapack: program that retrieves values entered into an Excel spreadsheet using VBA, executes a program written in BLAS or LAPACK, and reflects the results of that execution in an Excel spreadsheet, by Hisashi Takeda

FarrayInterop: header-only library that allows the use of Fortran arrays in C++, by AshLink

fortran-modbus: interface bindings to libmodbus, for Modbus RTU/TCP access, by interkosmos

fortran-xmpp: interface bindings to the XMPP (Extensible Messaging and Presence Protocol) client library libstrophe, by interkosmos.

fsys: wrapper module for system control, with procedures isatty, sleep, and winsize, by yymmt742

Interpolation

Delaunay Density Diagnostic (DDD): general purpose, computational approach to detecting the geometric scale of real-valued functions over a fixed domain using a deterministic interpolation technique from computational geometry. Associated paper: Algorithm 1049: The Delaunay Density Diagnostic, by Andrew Gillette et al., ACM Transactions on Mathematical Software (2024).

grid_interpolation: interpolates between regular and unstructured grid (e.g. triangle mesh), by Christian Steger. The former interpolation is performed with bilinear interpolation, the latter with inverse distance weighting (IDW) and the application of a k-d tree to efficiently find the nearest neighobours.

Linear Algebra

BLZPACK: set of subprograms to compute the eigenvalues and eigenvectors (x) of the “standard” eigenvalue problem or the “generalized” eigenvalue problem for sparse symmetric matrices, by Osni Marques

cosma_fortran_example: minimal example of how to call Communication-Optimal-Matrix-Multiplication (COSMA) pxgemm from Fortran, by Moritz Leucke

EigenExa: high-performance parallel eigenvalue solver, from the RIKEN Center for Computational Science, that works on many cutting-edge HPC platforms, including the K Computer

Fortran GeneraL Math modules (fglm): defines types and operations for a 4x4 matrix and 3-element vectors, for int32, real32, and real64 data, providing some functionality of the JOML ñ€“ Java OpenGL Math Library, by jordan4ibanez

MSOLV: API for the direct sparse solvers MUMPS, UMFPACK, SuperLU, and MA48, by Arthur Francisco

PFLARE: library to solve linear systems in parallel with PETSc, with interfaces in C, Fortran, and Python. An associated paper is AIR multigrid with GMRES polynomials (AIRG) and additive preconditioners for Boltzmann transport, by Steven Dargaville et al., Journal of Computational Physics (2024).

tri_indices: provides a mapping/inverse mapping from an index of an upper triangular matrix to an index of a one-dimensional array, by yymmt742

Materials Science

ABAQUS_subroutines: codes covering some aspects of material mechanics, by David Morin. Each example has a Fortran subroutine, an ABAQUS input file for both Standard and Explicit, a Python post-processing script to extract results from ABAQUS/viewer, a Python script to plot the results, and a PDF presentation of the subroutine, the input file structure and the results.

Ab Initio Restructuring Tool Enabling Modelling of Interface Structures (ARTEMIS): generates and predicts interfaces between two crystals, by Ned Thaddeus Taylor and Steven Paul Hepplestone

ANSYS-USERELEMENT-PHFLD: Phase field fracture realized by ANSYS custom USERELEMENT subroutine, by Andrey Tumanov. Also ANSYS_USERMAT_LEMAITRE, a Lemaitre damage accumulation model with combined isotropic (Voce) and kinematic (Chaboche) hardening, ANSYS-USERMAT-Ramberg-Osgood, a plasticity model of 3D solid elements or plane elements in plane strain or axisymmetric stress state, and ANSYS-USERMAT-CMSG, for mechanism-based strain gradient plasticity.

Boundary Element Software for 3D Linear Elasticity (BESLE_v1.0): software for carrying out 3D simulations of solids under quasi-static, inertial and high-rate boundary conditions for transient analysis, associated with a paper by Andres F. Galvis et al., Computer Physics Communications (2021)

Computational Resource for Eroded Surface Topology (CREST): generate numerical rough surfaces that respect size, statistical moments (skewness and kurtosis), principal correlation lengths, asperity orientation, and periodicity, by Arthur Francisco. Also TPGLIB, routines related to surface topographic analyses.

Los Alamos Polycrystal code (LApx): predicts the mechanical response of crystalline materials subjected to arbitrary quasi-static (i.e., low strain rates) scenarios. LApx uses fast Fourier transform based methods to solve for the stress and strain states at each point within a complex microstructure.

pseudoRandom Approach For Finding Local Energetic minima (RAFFLE): package for structural prediction applied to material interfaces, associated with the paper Predicting Phase Stability at Interfaces, by J. Pitfield et al., Physical Review Letters (2024)

simulated_tem: compute simulated transmission electron microscope images in dynamical two beam condition. An associated paper is Simulated TEM imaging of a heavily irradiated metal, by Daniel R. Mason et al., Acta Materialia (2024)

Thermal-Diffusivity: computes the electronic thermal diffusivity of a highly defected elemental metal. An associated paper is Estimate for thermal diffusivity in highly irradiated tungsten using molecular dynamics simulation, by Daniel R. Mason et al., Physical Review Materials (2021)

Mesh Generation

libsupermesh: library for serial and parallel mesh intersection, or supermeshing. An associated paper is Conservative interpolation between volume meshes by local Galerkin projection, by James R. Maddison and Patrick E. Farrell, Computer Methods in Applied Mechanics and Engineering (2011).

Molecular Dynamics

PIMDkk: Path Integral Molecular Dynamics program by kuwahatakazuaki. Also PIMDanalysis2 to analyze the results of PIMD simulations.

Neural Networks and Machine Learning

fortran_dnn_from_tf: provides a straightforward yet very accurate framework for using deep neural networks (DNNs) previously trained with TensorFlow to make predictions in a Fortran project, by ajfurlong. This approach allows Fortran programs to leverage the predictive power of TensorFlow-trained models without requiring complex integration or dependencies beyond HDF5 for data handling. Also fortran_bayesian_nn_from_tf for Bayesian neural networks.

Numerical

Computer Methods for Mathematical Computations: code from the book by Forsythe, Malcolm, and Moler, translated to Fortran 90 by Ralph Carmichael

dfsaneacc: R package with underlying Fortran code implementing the algorithm in Secant Acceleration of Sequential Residual Methods for Solving Large-Scale Nonlinear Systems of Equations, by Ernesto G. Birgin and J. M. MartÃnez, SIAM Journal on Numerical Analysis, Vol. 60, Iss. 6 (2022). An implementation by John L. Gardenghi is here.

finite_difference: package to calculate the finite difference weighting coefficients for arbitrary sets of points, by Jason Roberts. The method uses a self-contained arbitrary precision library and Taylor series acceleration via hyper-dual numbers.

Fortran Multiple Precision Library (FMPL): by Zander Lewis

Precision, Compression, and Stochasticity (PCS): library to enable experimentation with different floating point formats, compression, and introducing randomness/stochasticity in codes based on C++ and Fortran, by Martin Karp and Timofey Mukha. An associated paper is CPFloat: A C Library for Simulating Low-precision Arithmetic, by Massimiliano Fasi and Mantas Mikaitis, ACM Trans. Math. Softw. (2023).

Ordinary Differential Equations

daskr: differential-algebraic system solver with rootfinding, by P. N. Brown et al. It includes options for both direct and iterative (Krylov) methods for the solution of the linear systems arising at each (implicit) time step.

easydop853: modern implementation of Hairer’s DOP853 ODE solver by Jiachen An, simplifying that of Jacob Williams. A much-easier-to-use subroutine interface has been created by using the original easy-to-use class interface, however, for simplicity, users can only set the ODE and the initial condition, and cannot set other parameters, such as error tolerance parameters, which can be set by using the original implementation.

fortran-xtfc: Extreme Theory of Functional Connections (X-TFC) algorithm to solve ordinary differential equations (ODEs) as initial value problems, applied to Robertson’s problem in chemical kinetics, by neuralXray

Optimization

CUTEst: Constrained and Unconstrained Testing Environment with safe threads for optimization software

DFL: Derivative-Free Linesearch algorithm for mixed-integer black-box problems by Giampaolo Liuzzi et al. Also DDFSA, a derivative-free simulated annealing global optimizer for bound constrained global optimization problems, ACRS, A Controlled Random Search algorithm for bound constrained global optimization, DIRDFN, derivative-free optimizer for constrained global nonlinear programming, DIRMIN, A DIRECT-based approach exploiting local minimizations for the solution of large-scale global optimization problems, MODIR, derivative-free optimizer for inequality constrained multiobjective global optimization problems, SDMINMAX, Derivative-Free Algorithm for Linearly Constrained Finite Minimax Problems, TESTGO which has bound constrained problems for global optimization, and TESTMO which has multi-objective test problems

ForTimize: aims to standarize the way to call optimization functions to ease the process of selecting algorithms to optimize problems, by Federico E. Benelli. The gradient descent and Nelder-Mead algorithms are implemented.

lcmin: code by John L. Gardenghi associated with the paper On the solution of linearly constrained optimization problems by means of barrier algorithms, The Operations Research journal (2021). Also ar4 associated with the paper On the use of third-order models with fourth-order regularization for unconstrained optimization, Optimization Letters (2020), mgh, updated (from Moré et al.) Fortran routines for testing unconstrained optimization software with derivatives up to third-order, and bglcovering associated with the paper “Asymptotic bounds on the optimal radius when covering a set with minimum radius identical balls”, Mathematics of Operations Research (2024).

OptimusPrime: population-based optimisation schema, with modules for Evolutionary Strategy optimisation, genetic algorithm optimisation, and simulated annealing, by Rob Watson

QAP: R package with Fortran code implementing heuristics for the Quadratic Assignment Problem, by Michael Hahsler

2 Likes

Continuation of previous posts.

Parallel Programming

EZMPI: interface to the MPI library, at a higher level than the official interface, by Lionel Guez

forthread: threading library with a simple binding to POSIX pthread, by jordan4ibanez. It comes with a thread pool/dispatcher, a concurrent FILO linked queue, and a concurrent FILO array queue.

gpu-programming: meta-GPU lesson covering general aspects of GPU programming as well as specific frameworks, from ENCCS. Some languages used are Fortran, C++, C, Python, and Julia.

Fortran MPI exploration: explores a simple MPI cartesian grid with halo region updates, mpi_f08, havaita, some clever encapsulation, and general project structure and architecture, by MatthAlex

Partial Differential Equations

boxcode2d-legacy: Fortran and Matlab wrapper by Manas Rachh et al. for running the 8th order box code by Greengard and Ethridge, from the paper A new fast-multipole accelerated poisson solver in two dimensions SIAM Journal of Scientific Computing (2001)

N-Dimensional Solver Multrigrid (NDSM): computes the potential (current-free) magnetic field on a rectilinear mesh in a Cartesian box, given the normal component of the magnetic field on each boundary face. An associated paper is Relative Magnetic Helicity Based on a Periodic Potential Field, by Kai E. Yang et al., Astophysical Journal (2020).

PadeOps: hybrid OpenMP/MPI derivative operators using Compact Difference (6th and 10th Order) and Spectral (Fourier and Chebyshev) Methods to solve PDEs, from Howland-Lab

pyranda: finite difference solver with Python drivers for arbitrary hyperbolic PDE systems, by Britton Olson. The PDE solver defaults to a 10th order compact finite difference method for spatial derivatives, and a 5-stage, 4th order Runge-Kutta scheme for temporal integration.

ReCoDE-Turing-Patterns-and-Partial-Differential-Equations: non-linear partial differential equation (PDE) solver, designed to address both boundary value problems (BVP) and initial boundary value problems (IBVP) with temporal progression, by elliot-jamesb et al. It is a component of the Research Computing and Data Science Examples (ReCoDE) project.

Particle Physics

artemide-development: package for TMD-physics (transverse momentum dependent), by Alexey Vladimirov. Also Snowflake for the evolution of twist-three parton distribution functions.

IMPACT-T: fully three-dimensional program to track relativistic charged particles taking into account space charge forces, short-range longitudinal and transverse wakefields, coherent synchrotron radiation (CSR) wakefield in accelerators, by Ji Qiang et al.

USP-JEWEL: Jet propagation (currently done using an unofficial modification of JEWEL) in realistic viscous hydrodynamics modeled using vUSPhydro, by Leonardo Barreto de Oliveira Campos

Plasma Physics

UEDGE: 2D time-dependent fluid simulation code of plasma and neutrals in magnetic fusion devices, from Lawrence Livermore National Laboratory

Physics

8bandkp-fdm: implements 8band zinc-blende k·p-method using finite difference method, working for bulk and quantum-wells, by Tiago de Campos

Anharmonic-lattice-dynamics (ALADYN): lattice dynamics code that calculates thermodynamic and thermal transport properties of solid crystalline materials from data on their force and potential energy as a function of positions, using density functional theory or classical molecular dynamics as input data, by KeivanS et al.

Clebsch-Gordan: simple program to calculate the Clebsch-Gordan coefficients, by Jorge Luis GĂĄlvez Vallejo

COLOSS: program designed to address the scattering problem using a bound-state technique known as complex scaling, by Jin Lei. In this method, the oscillatory boundary conditions of the wave function are transformed into exponentially decaying ones, accommodating the long-range Coulomb interaction. Also scatt2b to compute two body scattering problem in r-space, fold, a single folding potential for A-9Be, and inhomoR, a code with Pierre Descouvemont to solve the inhomogeneous equations.

fort-fput: explores the Fermi–Pasta–Ulam–Tsingou(FPUT) problem in chaos theory by simulating a 1D chain with non-linear dynamics with symplectic integrators, by Jimmy Chen

GNI: Huckel matrix-based algorithm employed by this program computes the energy of a triangulene or a graphene nanoisland (GNI) by performing diagonalization, by Amer Alrakik

ISOTOPIA: software package for the prediction of radio-isotope production that uses cross sections from the IAEA medical isotope data library and the TENDL nuclear data library and calculates the radioactive yield as a function of irradiation time and other irradiation characteristics. An associated paper is TENDL: Complete Nuclear Data Library for innovative Nuclear Science and Technology, Nuclear Data Sheets, by Arjan Koning et al., Nuclear Data Sheets (2019).

Numerov: program that creates a wave function from a one-dimensional potential using the Numerov method, by kuwahatakazuaki

Orbital-Dynamics: code for spin-orbital dynamics of spinning object on a curved spacetime, by Tom Kimpson

RESONANCETABLES: software package to unify databases for thermal cross sections, resonance integrals, MACS and other average resonance parameters, associated with the paper A statistical analysis of evaluated neutron resonances with TARES for JEFF-3.3, JENDL-4.0, ENDF/B-VIII.0 and TENDL-2019, by D. Rochman, A.J. Koning, and J.-Ch. Sublet, Nuclear Data Sheets (2020).

SHG__Second_Harmonic_Generation: addressing thermal effects in Second Harmonic Generation (SHG), by Mostafa Rezaee and Max Ghadri. Also contains a Fortran tutorial.

Thomson: solves the Thomson problem in Clifford tori for one, two and three dimension, by Amer Alrakik. The Thomson problem is a classic problem in physics and mathematics that deals with finding the minimum energy configuration of a collection of point charges (electrons) on the surface of a sphere.

Quantum Chemistry and Electronic Structure

beyond-rpa: correlated, nonperturbative electronic structure calculations based on diagrammatic techniques: the random-phase approximation and related higher-level theories. An associated paper is Random Phase Approximation Applied to Many-Body Noncovalent Systems, by Marcin Modrzejewski et al., Journal of Chemical Theory and Computation (2019).

CDMFT-MOTT-ZEROS: Lanczos based solver for the Cluster Dynamical Mean-Field Theory, as used for the numerical calculations in the paper Mott insulators with boundary zeros, by Niklas Wagner et al., Nature Communications (2023)

dirac_caspt2: performs the second order multi-configuration perturbation calculation using the IVO/CASCI/CASPT2 or IVO/RASCI/RASPT2 method with 1- and 2-electron integrals obtained from the DIRAC calculation, by Kohei Noda et al.

GAMMCOR: electron correlation and molecular interaction calculations, by K. Pernal et al.

gammcor-integrals: molecular integrals library by Marcin Modrzejewski and MichaƂ Hapka for the Gammcor code

Geometrical Counter-Poise Correction (gcp): an associated paper is A geometrical correction for the inter- and intra-molecular basis set superposition error in Hartree-Fock and density functional theory calculations for large systems, by Holger Kruse and Stefan Grimme, Journal of Chemical Physics (2012)

huckster: extended Huckel theory calculator, by Cyrille Lavigne

Open Quantum Platform (OpenQP): quantum chemical platform featuring cutting-edge capabilities like Mixed-Reference Spin-Flip (MRSF)-TDDFT, by Cheol Ho Choi et al.

Phonnier: adapts the Wannier Orbital formalism to the calculation of topological propperties of Phonon systems, with emphasis on polar materials, i.e., in the case of LO-TO splitting, by Francesc Ballester

polymer: Gaussian-basis-set ab initio molecular-orbital and density-functional methods for molecules and crystals of one-, two-, or three-dimensional periodicity, by So Hirata

pynfam: Python package by mld1812 with functions, classes, and methods for running large-scale beta decay calculations with the Fortran codes HFBTHO (Hartree-Fock-Bogoliubov using The Transformed Harmonic Oscillator Basis) and pnfam

Thomas Relativistic Electronic Structure Calculation (TRESC): computes the electronic structure of non-periodic system in adiabatic approximation, solving static 2-component DKH2 electronic Hamiltonian of a given molecular, by Liu Kunyu

thunder-master: code for the packages used in the FIREBALL suite of programs. An associated paper is A web-deployed interface for performing ab initio molecular dynamics, optimization, and electronic structure in Fireball, by J. Brandon Keith et al., Computer Physics Communications (2009).

utils4VASP: scripts and programs that can be used to set up, manage and evaluate VASP calcuations, by Julien Steffen and Andreas Mölkner. It was initially designed to support calculations of liquid surface catalysts, but the scripts and programs should be general enough to use them for arbitrary VASP calculations of surface or bulk systems.

Random Number Generation

Latin Hypercube Sampling (LHS): generates multivariate samples of statistical distributions, from Sandia National Laboratories. Its ability to use either Latin hypercube sampling or pure Monte Carlo sampling with both random and restricted pairing methods has made it an important part of uncertainty analyses in areas ranging from probabilistic risk assessment (PRA) to complex simulation modeling.

Reactor Physics

iMC: Monte Carlo neutron transport code, currently under development in RP&T lab in KAIST. Some features are continuous and multigroup transport, universe-based geometry building, steady-state MC, OTF Doppler broadening, MC-based depletion, Transient with PCQS and DMC, Finite Difference methods (pCMFD, pFMFD, and iDTMC), and Unstructured mesh-based thermomechanics analysis.

Sorting

heapsort: heap sort, by Stuart A. Gilchrist. The subroutine returns a sorted vector and a vector that maps positions in the sorted vector back to the original.

Statistics

fortran-metrics: simple forecasting metrics calculator (mean error, MAE, MAPE, RMSE) that auto skips N/A data and accepts both scalar or vector data, by Hisashi Takeda.

fortran-variable-transformation: functions to perform the Yeo-Johnson and Box-Cox variable transformations, with Golden Section Search used for maximum likelihood estimation of the paramters, by Hisashi Takeda

frailtypack: R package with Fortran code for shared, joint (generalized) frailty models and for surrogate endpoints, by Virginie Rondeau et al.

mclust: R package with Fortran code – Gaussian finite mixture models fitted via EM algorithm for model-based clustering, classification, and density estimation, including Bayesian regularization, dimension reduction for visualization, and resampling-based inference, by Chris Fraley et al.

mix: R package with Fortran code for estimation/multiple imputation for mixed categorical and continuous data, by Joseph L. Schafer and Brian Ripley

non-neg_matrix_factorization: Non-Negative Matrix Factorization Algorithm used for kmeans-clustering algorithm as a means of dimensionality reduction, by Peter Ma

pymc2: Python module with Fortran code that implements Bayesian statistical models and fitting algorithms, including Markov chain Monte Carlo, by Chris Fonnesbeck et al. Its flexibility and extensibility make it applicable to a large suite of problems.

RefbasedMI: R package with Fortran code for Reference-based multiple imputation for sensitivity analysis of longitudinal trials with protocol deviation, by KMcgrathUCL et al.

robust: R package with Fortran code for robust covariance estimation (scatter and location), linear regression, generalized linear models, and Gamma, Weibull, and lognormal parameter estimation, by Jeff Wang et al.

rrcov: R package with Fortran and C code providing scalable robust estimators with high breakdown point and covering a large number of robustified multivariate analysis methods, starting with robust estimators for the multivariate location and covariance matrix (MCD, MVE, S, MM, SD), the deterministic versions of MCD, S and MM estimates and regularized versions (MRCD) for high dimensions, by Valentin Todorov

Strings

CaseConverter: module to convert strings between lowercase and uppercase, by Kosei Ohara

fortran-string-utf-8: module to convert a native character string to an array of UTF-8 characters that behaves as a UTF-8 string, by Gunther Willems

Time Series

Butterworth-Filter: arbitrary-order Butterworth IIR Filter Zero-phase forward and reverse digital IIR filtering, by Youshan Liu

python-bls: Python bindings for the original Fortran implementation of the Box Least Squares (BLS) algorithm from the paper A box-fitting algorithm in the search for periodic transits, by G. Kovacs et al., Astronomy & Astrophysics (2002)

urca: R package with Fortran subroutines to estimate critical values and P values for unit root and cointegration tests, by James G. MacKinnon

Unclassified

betti-decomposition: Betti Decomposition of simplicial complexes, by AntĂłnio LeitĂŁo

graphstruc: library that provides an implementation of graph structures in the form of a derived type, by Ned Thaddeus Taylor

7 Likes

@Beliavsky thank you so much for maintaining and collecting this database. This is extremely useful to give visibility to these projects and to see the amount of new projects being done in Fortran.

We used to maintain it as some kind of JSON/TOML and then serve it as a website that you can search (by name, description, category, etc.). Would it make sense to do it again?

2 Likes

Thanks. Are you referring to Packages — Fortran Programming Language? Not all the projects in my list may meet the criteria. One could write a script to convert my list to JSON/TOML.

1 Like

Yes.

We can change the criteria if it makes sense, or somehow list packages that don’t meet the criteria separately. How would you describe your criteria for a project to appear above?

A large fraction of new GitHub projects with Fortran code are beginners experimenting with the language. I exclude those but add most other projects, especially those with modules that could be useful to others or projects associated with a published paper. Many such projects don’t meet the Fortran-lang criterion of having at least 5 stars.

1 Like

Maybe we can relax this criterion? Or have a category for less than 5 stars.

1 Like

Update since Jan 5, full list here

Astronomy and Astrophysics

ConFlow: Convective Flow Generator: computes a sequence of velocity maps for supergranule flows on the surface of the Sun, by R. M. Caplan and Raphael Attie. Such photospheric velocity fields are essential for developing and testing realistic flux transport models and the analysis techniques for observational data.

GAS gianT modeL for Interiors (GASTLI): coupled interior-atmosphere model to unveil gas giant composition, by Lorena Acuña. It allows the computation of mass-radius curves, thermal evolution curves, and interior composition retrievals to fit a interior structure model to mass, radius, age, and if available, atmospheric metallicity data.

HORMONE: 3D grid-based Godunov-type magnetohydrodynamics code that uses the HLLD approximate Riemann solver, by Ryosuke Hirai et al. The main feature is the “hyperbolic self-gravity” solver, which enhances the computational cost for Newtonian self-gravity simulations by a significant margin.

img2nc: converts planetary Digital Elevation Model (DEM) data into NetCDF, allowing one to draw a topographic map of the Moon, by ShinobuAmasaki.

IONeq: X-ray high-resolution photoabsorption model which compute the absorption coefficient assuming ionization equilibrium, associated with the paper Probing the structure of the gas in the Milky Way through X-ray high-resolution spectroscopy, by EfraĂ­n Gatuzz and Eugene Churazov, Monthly Notices of the Royal Astronomical Society (2018)

iso: transforms MESA history files into a uniform basis for interpolation and then constructs new stellar evolution tracks and isochrones from that basis. An associated paper is MESA Isochrones and Stellar Tracks (MIST) 0: Methods for the Construction of Stellar Isochrones, by Aaron Dotter, The Astrophysical Journal Supplement Series (2016).

MESA_custom_colours: extension for the Modules for Experiments in Stellar Astrophysics (MESA) toolkit, designed to enable synthetic photometry calculations and provide additional stellar evolution diagnostics, by Niall J. Miller and M. Joyce

semianalyticResonance: Python class by Nicolas Pan providing resonance information using semianalytic methods coded in Fortran and developed in the paper Semianalytical model for planetary resonances. Application to planets around single and binary stars by Tabaré Gallardo et al., Astronomy & Astrophysics (2021)

squishyplanet: package for modeling non-spherical exoplanets, by Ben Cassese et al, published in the Journal of Open Source Software (2024)

synow: embodiment of the Elementary Supernova Framework as developed by David Branch and David Jeffery, by Adam Fisher et al.

Turbospectrum_NLTE: synthetic stellar spectra calculator in local/non-local thermodynamic equilibirum (LTE/NLTE), by Bertrand Plez et al.

tycho: hydrodynamics/evolution code and suite of analysis programs. An associated paper is TYCHO: Stellar evolution code, by D. Arnett

Automatic Differentiation

Dual Numbers for Arbitrary Order Automatic Differentiation (DNAOAD): implementation of automatic differentiation capable of handling derivatives of arbitrary order using dual numbers, by F. Peñuñuri et al. This implementation employs a direct approach to represent dual numbers without relying on recursive or nested structures, with associated preprint here.

Biology and Medicine

Charge_inversion_and_nanoscales_of_human_cells: studies giant charge inversion and/or nanoscale phenomena for living cells and does molecular dynamics simulations. An associated paper is DNA in Nanopores: Counterion Condensation and Coion Depletion, by Yitzhak Rabin and Motohiko Tanaka, Physical Review Letters (2005).

Genetic load, eco-evolutionary feedback and extinction in metapopulations: simulations by Oluwafunmilola Olusanya et al.

Climate and Weather

firedanger: convert monthly meteorology into daily estimates of weather and fire danger, by Leo Lai

flash-drought: code for flash drought decomposition, by Jessica Bhardwaj and Mike Hobbins

gwgen_f90: globally applicable weather generator, associated with the paper A globally calibrated scheme for generating daily meteorology from monthly statistics: Global-WGEN (GWGEN) v1.0, by Philipp S. Sommer and Jed O. Kaplan, Geoscientific Model Development (2017)

Code Tools

m_err2: independent error-storing and reporting type, using the FILE and LINE macros of the C-preprocessor, by Miha Gunde

Computational Chemistry

Chemical Mechanism Integrator (Cminor): package for the computational simulation of skeletal and detailed chemical kinetic systems derived from atmospheric and combustion chemistry, by Levin Rug and Willi Schimmel

Hess: platform for computational chemistry, providing functionality for empirical molecular docking, by Rafael Temirgaliev and Dmitry Pavlov. It uses BFGS for local optimization and two different forms of Monte Carlo method for global optimization.

multimash: Multi-state Mapping Approach to Surface Hopping, by jruneson

Reference Interaction-Site Model integrated Calculator (RISMiCal): code associated with paper The Reference Interaction Site Model Integrated Calculator (RISMiCal) program package for nano- and biomaterials design, by N. Yoshida, IOP Conf. Series: Materials Science and Engineerging (2020)

Thermopack: thermodynamic model library for fluid properties and PVT (pressure-volume-temperature) calculations, from SINTEF Energy Resarch

Containers and Generic Programming

DataFrame: DataFrame is a Fortran derived type with indices, columns, and values of type integer, character, and real(kind=dp), and Table is similar but has indices of type character, by Beliavsky. With the DataFrame and Table and associated procedures, it is simple to read CSV files and compute and display associated statistics.

fortran-table: pure functions for table manipulation, such as select, filter, join, insert_or_replace, write_csv, read_csv, and conversion of columns to a specified type, by Hisashi Takeda. It provides SQL-like table manipulation, with all data are stored as character variables.

Computational Fluid Dynamics

4A2_CFD: codes for a course in computational fluid dynamics, by Freddie Ancliff

HIT36: pseudo-spectral code for Direct Numerical Simulation (DNS) of homogenous isotropic turbulence, by Alessio Roccon

Homogeneous Isotropic Turbulence in 3D (hit3d): pseudo-spectral DNS code for simulation of homogeneous isotropic incompressible turbulence in three dimensional space, associated with the paper Scaling properties of subgrid-scale energy dissipation, by Sergei G. Chumakov, Physics of Fluids (2007)

ParTraS - Particle Trajectory Simulator: Lagrangian particle simulation framework for tracking particles and droplets floating in unstructured flow fields, by hirotori. It provides high accuracy and flexible extensibility, and is intended for use in research and engineering. Also incomp3D, Incompressible Fluid FLow Solver For Equal-Spaced Rectilinear Mesh.

Xfoil-for-Mac: tweaks by nolankucd of the Xfoil aerodynamics engine to allow installation on MacOS 11 with gfortran

Xoptfoil2: optimizes an airfoil based on its aerodynamic characteristics, by Jochen Guenzel. It follows an approach to airfoil design that could be called ‘design by polars’ - in contrast to the classic design methods such as ‘inverse design’ or ‘direct design’.

Dates and Times

inctime: routines to calculate dates in the past or future relative to a date, calculate the Julian day, and calculate the number of years, months, days and hours between any two dates, by JoĂŁo Gerd Zell de Mattos

Earth Science

BIOME4: equilibrium global vegetation model associated with paper Climate change and Arctic ecosystems: 2. Modeling, paleodata-model comparisons, and future projections, by Jed O. Kaplan et al., Journal of Geophysical Research-Atmospheres (2003)

ForestVegetationSimulator (FVS): family of individual-tree, distance-independent, forest growth simulation models, from the USDA Forest Service. It can simulate a wide range of silvicultural treatments for most major forest tree species, forest types, and stand conditions.

LOFAR Lightning Imaging (LOFLI): LOw Frequency ARray (LOFAR) lightning imaging, by Olaf Scholten

LPJ-LMfire Dynamic Global Vegetation Model: code associated with paper Increased fire activity under high atmospheric oxygen concentrations is compatible with the presence of forests, by Rayanne Vitali et al., Nature Communications (2022).

MAIZSIM: mechanistic model of maize growth, development and yield, written in C++ (crop) and Fortran (soil). The model is interfaced with 2DSOIL, a two dimensional simulator of soil water and heat movement, and solute transport.

makesoil: usse SoilGrids data and pedotransfer functions to create soil properties maps, from ARVE Research. An associated paper is Modeling soil hydraulic properties for a wide range of soil conditions, by Vincent Balland et al., Ecological Modelling (2008).

polarstereo-latlon-convert-fortran: program that transforms I,J coordinates of an SSM/I grid cell to latitude and longitude coordinates and also provides the inverse functions, from the National Snow and Ice Data Center (NSIDC)

ocotillo: spectrally resolved post-processing radiative transfer code, by Wladimir Lyra and Harrison E. Cook

Oil Spill Evaluation and Response Integrated Tool (OSERIT-drift): Lagrangian tracking model to simulate drift at sea, from the Royal Belgian Institute of Natural Sciences. This version is able to simulate it with current, wind and waves.

P223_Public: extensive body of EM (electromagnetic) modelling and inversion programs used by the minerals, environmental and defence industries for planning and interpreting EM surveys, and for the development of new EM exploration instruments. An associated paper is Practical 3D EM inversion – the P223F software suite, by Art Raiche et al., Exploration Geophysics (2007).

partmc: particle-resolved Monte Carlo code for atmospheric aerosol simulation. An associated paper is Simulating the evolution of soot mixing state with a particle-resolved aerosol model, by Nicole Riemer et al., Journal of Geophysical Research (2009).

Simsphere: Soil-Vegetation-Atmosphere Transfer (SVAT) model, by Toby Carlson et al. It is a one-dimensional model that allows one to simulate the transfer of heat and moisture between plants, soil and atmosphere over a 24 hour day.

topotools: tools for calculating slope and other statistics and decimating very large global DEMs (Digital Elevation Models), by Leo Lai and Jed O. Kaplan

Engineering

2D-Fortran-code-of-dam-break-using-SPH: by jahid-buet

Baseline-Lidar-assisted-Controller: codes of baseline lidar-assisted controllers (LAC) for bottom fixed and floating turbines, with Matlab sample codes to perform OpenFAST simulation with LAC, associated with paper Evaluation of lidar-assisted wind turbine control under various turbulence characteristics, by Feng Guo et al., Wind Energy Science (2023)

GGI_TLM: time-domain electromagnetic field simulation using the Transmission Line Modelling (TLM) method, by Chris Smartt and ggiemr, featuring frequency dependent material models, frequency dependent thin layer models, and multi-conductor cable model including shielded cable model with frequency dependent parameters plus frequency dependent lumped impedance models.

leparagliding: paragliding design software, by lorenz

Numerical_Model: code associated with the paper A numerical model for charge transport and energy conversion of perovskite solar cells, by Yecheng Zhoua and Angus Gray-Weale, Physical Chemistry Chemical Physics (2016)

Fast Fourier Transform

2DECOMP&FFT: software framework to build large-scale parallel applications, designed for applications using three-dimensional structured mesh and spatially implicit numerical algorithms. It features highly scalable and efficient distributed Fast Fourier Transform module, supporting three dimensional FFTs (both complex-to-complex and real-to-complex/complex-to-real), halo-cell support allowing explicit message passing between neighbouring blocks, a parallel I/O module to support the handling of large data sets, and an interface with most popular external FFT libraries.

File I/O

FORtran-based Binary-io Interface Toolkit (forbit): Python class calling Fortran to read no-header binary files, by Kosei Ohara

Fyaml: simple YAML parser, by Barry Baker. It supports basic YAML features including nested structures, sequences, various data types (strings, integers, floats, booleans, nulls), comments, anchors, and aliases.

parallelIO: environment to write NetCDF files in parallel and serial mode using NetCDF4 and MPI, by Lars Buntemeyer. The code is used testing different MPI strategies and parallel IP for the regional climate model REMO.

Finite Elements

easifem-base: framework for developing finite element code in modern Fortran for solving PDEs, by vickysharma0812

Fortran Books and Tutorials

Computing-science-with-Fortran: set of Jupyter notebooks that teach Fortran through a 3D simulation of heat conduction in a box, using ParaView for visualization, by RUMONMD89

j3-papers: grep-friendly mirror of official INCITS/Fortran (J3) standards committee document repository. It has submitted papers and meeting notes. Also Fortran Proposals, proposals for the standards committee, generics, a project to refine concepts for potential features in Fortran 202Y that supports generic programming, and fpp-202y, work files for proposed Fortran 202y preprocessor standardization.

Games and Puzzles

Fortran_Meets_SDL: Space Invaders using SDL3, by Frederik Tobner

General Purpose

Fortran interfaces, classes and header extensions (fortiche): collection of various preprocessor macros designed to extend the current features of the Fortran standard, by davidpfister.

subprocess.f: library for forking a child process, by David Pfister

Interoperability

api_wrapper.c: shows how to use a Fortran client with a C wrapper to interact with the Python Flask API, by Ricardo S. Jacomini

FortranDriver: skeleton code for calling a Fortran DLL compiled with ifx from a C# driver program, by John Alexiou. There are procedures for linear algebra, random number generation, spline interpolation, and quaternions.

Fortran_Julia_HPC: demo of high performance computing by linking Fortran and Julia with multithreading, by Mohamad Badiezadegan

Interpolation

newspline: mean-preserving spline interpolation scheme for interpolating one-dimensional data series into smaller time step, with additional options to impose lower, upper and/or percentage limit to interpolated values, by Jed O. Kaplan and Leo Lai

Linear Algebra

blis-fortran: prototype bindings by Ivan Pribec for the BLIS (BLAS-like Library Instantiation Software) framework, that can be used to perform high-performance dense linear algebra operations via a BLAS-like API

spam: SPArse Matrix: set of R functions for sparse matrix algebra with underlying Fortran code. An associated paper is Block Sparse Cholesky Algorithms on Advanced Uniprocessor Computers, by Esmond G. Ng and Barry W. Peyton, SIAM Journal on Scientific Computing (1993).

Materials Science

BraWl: performs lattice-based atomistic simulations of alloys with an internal energy given by a Bragg-Williams Hamiltonian, implementing both Monte Carlo methods (simulated annealing, transition matrix Monte Carlo, Wang-Landau sampling) and nested sampling. An associated paper is Compositional phase stability in medium-entropy and high-entropy Cantor-Wu alloys from an ab initio all-electron Landau-type theory and atomistic modeling, by Christopher D. Woodgate and Julie B. Staunton, Physical Review B, (2022).

GLaMM_model: code associated with paper Microscopic theory of linear, entangled polymer chains under rapid deformation including chain stretch and convective constraint release, by Richard S. Graham et al., Journal of Rheology (2003)

OrganicSolarCellModel: code associated with the paper Towards predicting the power conversion efficiencies of organic solar cells from donor and acceptor molecule structures, by Yecheng Zhou et al., Journal of Materials Chemistry C (2018)

umat_finite_viscoelasticity: User Material Model Implementation (UMAT) based on Finite Viscoelasticity Theory for Hydrogels in Abaqus, by Alan Correa

Mesh Generation

Model for Ocean-laNd-Atmosphere predictioN (MONAN-Model): community model of the Unified Earth System that aims to be a numerical model that covers all scales, geographical and temporal, of the entire Earth system and its implications, by Denis Eiras et al.

Neural Networks and Machine Learning

NetsPredict: Matlab code by Diego Vidaurre and Steve Smith calling Fortran code for elastic net with squared-error loss. It makes cross-validation predictions with elastic net, taking into account the structure of the data to organise the cross-validation folds (necessary e.g. when the data points are subjects and the subjects are family-related).

Neural-nets-in-FORTRAN: neural network implementation by Jure Ravnik. The size, number of hidden layers and activation function type can be selected, and training is done via gradient descent or via genetic optimization.

Numerical

Numerical methods in Fortran: numerical analysis and statistics algorithms, by Murat Koptur

NVIDIA Performance Libraries Samples (NVPLSamples): collection of high performance mathematical libraries optimized for the NVIDIA Grace Armv9.0-A Neoverse-V2 architecture. These CPU-only libraries have no dependencies on CUDA or CTK, and are drop in replacements for standard C and Fortran mathematical APIs allowing HPC applications to achieve maximum performance on the Grace platform.

Ordinary Differential Equations

FORTRAN-ODE-Toolbox: codes for solving linear and non-linear ordinary differential equations using the RK4, RK4 adaptive, and Dormand-Prince RK5 adaptive step methods, by Bryan Durham

Optimization

Fortran Differential Evolution (FDE): differential evolution and other parallel samplers, by Jason Klebes, using the algorithm from the paper Differential Evolution Markov Chain with snooker updater and fewer chains, by Cajo J. F. ter Braak and Jasper A. Vrugt, Statistics and Computing (2008)

nonlinear-optimization-algorithms-multilang: unconstrained minimization algorithms (Hooke-Jeeves and Nelder Mead) in Fortran and other languages, by Radislav Golubtsov

pyoptgra: Python package wrapping OPTGRA, an optimization algorithm in Fortran by Johannes Schoenmaekers designed for near-linear constrained problems, which commonly occur in trajectory optimization

Parallel Programming

cfdparschool: codes for the School on Computational Fluid Dynamics & SuperComputing, covering OpenACC, OpenMP, Coarrays & CUDA Fortran, by A. Roccon and G. Soligo. Also cuExamples, snippets of code that use CUDA Libraries in Fortran using openACC, with a 3D FFT of an 3D array in one shot, using cuSolverDN to solve a dense linear system, and use of cuSolverSP to solve a sparse linear system.

fomp: Introduction to OMP target offload in Fortran, by Abraham R. Flores.

fortran-cuda-interfaces: interfaces to CUDA libraries for GCC/OpenACC, from Mentor/Siemens. Modules include cublas, cublas_v2, cublasxt, openacc_cublas, cufft.

gpu-programming: meta-GPU lesson covering general aspects of GPU programming as well as specific frameworks, from ENCCS. Some languages used are Fortran, C++, C, Python, and Julia. Also OpenMP for GPU offloading, materials for a workshop.

OpenACC_Training: slides and code examples for OpenACC training, by Xavier Lapillonne et al. The codes were adapted from the book Parallel Programming With OpenACC by Rob Farber, with code here.

ParallelProgrammingWithOpenACC: example codes in C, C++, and Fortran from the book Parallel Programming With OpenACC (2016), by Rob Farber

Partial Differential Equations

Andromeda: Boundary Element Method based code, which solves the Laplace and Stokes partial differential equations in 3D. An associated paper is Analytical expressions for singular integrals arising from the 3D Laplace and Stokes kernels when using constant or linear triangular and quadrilateral boundary elements, by Jure Ravnik, Engineering Analysis with Boundary Elements (2023).

Particle Physics

disorder: program for computing differential cross sections in massless deep inelastic scattering, by Alexander Karlberg

Plasma Physics

gacode: collection of serial and HPC turbulence and transport codes, developed by the Theory Group at General Atomics which researches magnetic fusion. An associated paper is A high-accuracy Eulerian gyrokinetic solver for collisional plasmas, by Jeff Candy et al., Journal of Computational Physics (2016).

4 Likes

Continuation of previous message.

Physics

fractal_optics_coreshell: code associated with the paper Mean-field approximation of Mie scattering by fractal aggregates of identical spheres, by Robert Botet et al., Applied Optics (1997), modernized by Eric T. Wolf

GENEUS: General Non-Equilibrium Usadel Solver: simulate general non-equilibrium superconductor/ferromagnet systems via the Usadel diffusion equation, by Jabir Ali Ouassou

gz_heterostructure: dynamics in strongly correlated heterostructure, used for generating data published in the paper Thermal dynamics and electronic temperature waves in layered correlated materials, by Giacomo Mazza et al., Nature Communications (2021)

Monte-Carlo-Mixtures-of-Ellipsoids-Spherocylinders-Cylinders: NVT/NPT-Monte Carlo algorithm designed to evaluate the thermodynamic behavior of mixtures of some hard convex bodies: ellipsoids of revolution, spherocylinders, and cylinders, by Nathan Barros de Souza and LuĂ­s Fernando Mercier Franco

py_FS: Python script for plotting Fermi surfaces in .bxsf format, calling the Fortran code Supercell K-space Extremal Area Finder (SKEAF), by Patrick Rourke

SIMulated PHONon topologY (simphony): adapts the Wannier orbital formalism to the calculation of topological propperties of phonon systems, with emphasis on polar materials, i.e., in the case of Longitudinal Optical-Transverse Optical (LO-TO) splitting, by Francesc Ballester

Quantum Chemistry and Electronic Structure

BDD: tools for the construction of vibronic coupling Hamiltonians using block diagonalisation diabatisation, by schuurman-group. Also General Reference Configuration Interaction package (GRACI), chebytools for spectrum simulation using Chebyshev order-domain autocorrelation functions, and csf2det, a program to convert configuration interaction (CI) wavefunctions in configuration state function (CSF) to determinant basis.

Random Number Generation

dSFMT_F03_interface: interface by James Spencer to dSFMT (double precision SIMD-oriented Fast Mersenne Twister) pseudo-random number generator by Mutsuo Saito and Makoto Matsumoto

Reactor Physics

Fast reactor fuel behaviour code (FRED): uses the SUNDIALS library for numerical modelling of base irradiation of a fast reactor fuel pin, accounting for fuel and clad heat transfer, fuel and clad stress-strain conditions, fuel and clad thermal expansion and creep, fuel swelling and fission gas release, evolution of inner gas pressure and composition as well as evolution of fuel-clad gap conductance, by kmikityuk

Root Finding

FORTRAN-Roots: subroutines to find the roots of a single-valued function within a bounded interval, using a combination of Brent’s method, the secand method, and interpolation, and to find the real and complex roots of an nth-degree polynomial, by Bryan Durham

Statistics

acepack: R package with Fortran code modified by Thomas Lumley and Shawn Garbett for two nonparametric methods for multiple regression transform selection – Alternative Conditional Expectations (ACE), from the paper Estimating Optimal Transformations for Multiple Regression and Correlation, by Leo Breiman & Jerome H. Friedman, and Additivity Variance Stabilization (AVAS), from the paper Estimating Transformations for Regression via Additivity and Variance Stabilization, by Robert Tibshirani

gausscov: R package by Laurie Davies calling Fortran for the Gaussian covariate method for variable selection

splpak: routines for fitting (least squares) a multidimensional cubic spline to arbitrarily located data. It also contains routines for evaluating this spline (or its partial derivatives) at any point. This is a modernization by Jacob Williams of the double precision SPLPAK files from NCL.

Time Series

x13binary: R package with Fortran code for the X-13ARIMA-SEATS Seasonal Adjustment Program of the U.S. Census Bureau. Fits models in which the mean function of the time series (or its logs) is described by a linear combination of regressors, and the covariance structure of the series is that of an ARIMA process, with built-in regressors for directly estimating various flow and stock trading day effects and holiday effects.

2 Likes

Lots of new goodies. Great!

Are you seeing an increase in the number of new projects per month?

3 Likes

I asked ChatGPT o3-mini-high to write a Python script to download the last version of a repo up to a specified date. Running it for end dates of 2025-01-01, 2024-01-01, 2023-01-01, and 2022-01-01 downloaded the following files:

02/10/2025  06:52 AM           225,198 Fortran-code-on-GitHub-e1733f8.zip
02/10/2025  06:53 AM           172,296 Fortran-code-on-GitHub-5b08595.zip
02/10/2025  06:53 AM           133,212 Fortran-code-on-GitHub-4e60feb.zip
02/10/2025  06:53 AM           109,600 Fortran-code-on-GitHub-fa9d135.zip

Looking at the file sizes, which correlate with the number of entries, it appears that the # of additions to the list has been growing. Below is the Python script, which is run with a command such as

python xdownload_github_repo_by_date.py https://github.com/Beliavsky/Fortran-code-on-GitHub 2025-01-01

#!/usr/bin/env python3
import argparse
import requests
from datetime import datetime

def parse_args():
    parser = argparse.ArgumentParser(
        description="Download the last version of a GitHub project (i.e. the most recent commit) "
                    "that was created on or before a specified cutoff date."
    )
    parser.add_argument(
        "repo_url",
        help="GitHub repository URL (e.g., https://github.com/Beliavsky/Fortran-code-on-GitHub)"
    )
    parser.add_argument(
        "cutoff_date",
        help="Cutoff date in YYYY-MM-DD format. Only commits on or before this date are considered."
    )
    return parser.parse_args()

def extract_owner_repo(url):
    """
    Extracts the owner and repository name from a GitHub URL.
    Assumes the URL is in the form https://github.com/owner/repo
    """
    url = url.rstrip("/")
    parts = url.split("/")
    if len(parts) < 5:
        raise ValueError("Invalid GitHub repository URL. It should be like 'https://github.com/owner/repo'")
    owner = parts[-2]
    repo = parts[-1]
    return owner, repo

def get_latest_commit_on_or_before(owner, repo, cutoff_date):
    """
    Uses GitHub’s commits API to get the most recent commit on or before the cutoff date.
    Here we set the cutoff time to 23:59:59 so that commits on the cutoff date are included.
    """
    # Parse the cutoff_date and set the time to the end of the day.
    cutoff_dt = datetime.strptime(cutoff_date, "%Y-%m-%d")
    cutoff_iso = cutoff_dt.replace(hour=23, minute=59, second=59).isoformat() + "Z"
    
    commits_url = f"https://api.github.com/repos/{owner}/{repo}/commits"
    params = {
        "until": cutoff_iso,
        "per_page": 1  # Retrieve only the latest commit on or before the cutoff date.
    }
    
    response = requests.get(commits_url, params=params)
    if response.status_code != 200:
        raise Exception(f"Error fetching commits: {response.status_code} - {response.text}")
    
    commits = response.json()
    if not commits:
        return None
    return commits[0]

def download_repo_zip(owner, repo, commit_sha, output_filename):
    """
    Downloads the zip archive of the repository at the specified commit.
    GitHub provides an archive endpoint via /zipball/{ref}, where {ref} can be a commit SHA.
    """
    zip_url = f"https://api.github.com/repos/{owner}/{repo}/zipball/{commit_sha}"
    response = requests.get(zip_url, stream=True)
    if response.status_code != 200:
        raise Exception(f"Error downloading zip archive: {response.status_code} - {response.text}")
    
    with open(output_filename, "wb") as f:
        for chunk in response.iter_content(chunk_size=8192):
            if chunk:
                f.write(chunk)

def main():
    args = parse_args()
    repo_url = args.repo_url
    cutoff_date_str = args.cutoff_date

    # Validate the date format.
    try:
        datetime.strptime(cutoff_date_str, "%Y-%m-%d")
    except ValueError:
        print("Invalid date format. Please use YYYY-MM-DD.")
        return

    try:
        owner, repo = extract_owner_repo(repo_url)
    except ValueError as e:
        print(f"Error: {e}")
        return

    print(f"Fetching latest commit in {owner}/{repo} on or before {cutoff_date_str}...")
    commit = get_latest_commit_on_or_before(owner, repo, cutoff_date_str)
    if commit is None:
        print(f"No commits found on or before {cutoff_date_str}.")
        return

    commit_sha = commit["sha"]
    commit_date = commit["commit"]["author"]["date"]
    print(f"Found commit {commit_sha} dated {commit_date}")

    # Create a filename based on the repository name and a short version of the commit SHA.
    output_filename = f"{repo}-{commit_sha[:7]}.zip"
    print(f"Downloading repository archive to {output_filename}...")
    
    try:
        download_repo_zip(owner, repo, commit_sha, output_filename)
    except Exception as e:
        print(f"An error occurred during download: {e}")
        return
    
    print("Download complete.")

if __name__ == "__main__":
    main()
6 Likes

Excellent!