# Install netcdf-fortran with Homebrew, apk, apt, dnf, MacPorts, pacman

Fortran libraries and utilities for NetCDF. Version 4.6.3 via Homebrew; verified 2026-06-03.

## Install

```sh
sudo av install brew:netcdf-fortran
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install netcdf-fortran
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install netcdf-fortran
```

  Evidence: MacPorts ports tree: science/netcdf-fortran/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add netcdf-fortran
```

  Evidence: Alpine Linux edge package indexes: netcdf-fortran from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libnetcdff-dev
```

  Evidence: Debian stable package indexes: libnetcdff-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install netcdf-fortran
```

  Evidence: Fedora Rawhide package metadata: netcdf-fortran from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S netcdf-fortran
```

  Evidence: Arch Linux sync databases: netcdf-fortran from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:netcdf-fortran
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/netcdf-fortran>
- **Version:** 4.6.3
- **Source summary:** Fortran libraries and utilities for NetCDF
- **Homepage:** <https://www.unidata.ucar.edu/software/netcdf/>
- **Repository:** <https://github.com/Unidata/netcdf-fortran>
- **Upstream docs:** <https://docs.unidata.ucar.edu/netcdf-fortran/current>
- **License:** NetCDF
- **Source archive:** <https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.3.tar.gz>
- **Last updated:** 2026-06-03T19:46:32Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- nf-config (cli)
- nf-config (alias)

## Dependencies

- gcc
- netcdf

## Build dependencies

- cmake
- hdf5

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.6.3
- Package-manager updated: 2026-06-03
- Local data: ok
- Upstream repository: https://github.com/Unidata/netcdf-fortran
- Upstream latest detected: v4.6.3 (current)
## Project history and usage

netcdf-fortran is Unidata's Fortran interface package for netCDF data. It exists because Fortran users in climate, weather, ocean, atmospheric, and other scientific codes need native F77/F90 APIs while the file format and core implementation live in netCDF-C.

### Project history

Fortran has been part of the netCDF story from the beginning because Unidata's original interface work had to account for portable scientific programs across C and Fortran environments. The separate netcdf-fortran distribution now provides Fortran application interfaces, depends on netCDF-C, and contains both F77 and F90 APIs. The Fortran usage guide notes that since netCDF 4.1.3 the Fortran software and library have been distinct from the C library while depending on it.

### Adoption history

Its adoption is concentrated in HPC and scientific-modeling build stacks. On July 1, 2026, Homebrew showed 2,728 installs over 365 days and 213 installs over 30 days, with gcc and netcdf as runtime dependencies. The lower volume than netcdf itself is expected because many users only need command-line tools or C libraries, while Fortran consumers install this package to compile model code.

### How it is used

Practical use is compiler-facing: Fortran programs call routines such as nf90_create, nf90_def_dim, nf90_def_var, nf90_put_var, nf90_open, nf90_get_var, and nf90_close. The package installs nf-config so builds can obtain the correct include and linker flags with commands like nf-config --fflags --flibs, avoiding hand-written library paths that break across shared/static builds or Homebrew prefix changes.

### Why package nerds care

This package matters because many legacy and active scientific codes are Fortran-first. Packaging it separately keeps the core C library smaller while preserving the long-running netCDF contract for Fortran model code. Dependency mismatches with netCDF-C are the main thing maintainers watch; the 4.6.3 release notes require netCDF-C 4.9.2 or newer.

### Timeline

- 1988: Unidata prototyped netCDF in C while evaluating portable interfaces for scientific users, including Fortran constraints.
- 2011-era netCDF 4.1.3: the Fortran library became consistently distinct from the C library while depending on it, according to the Fortran guide.
- 2025-03-26: netCDF-Fortran 4.6.2 was released.
- 2026-05-20: netCDF-Fortran 4.6.3 was released.
- 2026-07-01: Homebrew listed stable version 4.6.3.

### Related projects

- netcdf
- netcdf-cxx
- HDF5
- PnetCDF

### Sources

- <https://docs.unidata.ucar.edu/netcdf-fortran/current/>
- <https://docs.unidata.ucar.edu/netcdf-fortran/current/f90-use-of-the-netcdf-library.html>
- <https://docs.unidata.ucar.edu/netcdf-fortran/current/nf_release_notes.html>
- <https://docs.unidata.ucar.edu/nug/2.0-draft/netcdf_history.html>
- <https://formulae.brew.sh/formula/netcdf-fortran>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** netcdf-fortran
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libnetcdff-dev - 4.6.0+really4.5.4+ds-3+b4: normalized package name match | Debian stable package indexes: libnetcdff-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | creation, access, and sharing of scientific data in Fortran | https://www.unidata.ucar.edu/software/netcdf/
- Debian apt - libnetcdff-doc - 4.6.0+really4.5.4+ds-3: normalized package name match | Debian stable package indexes: libnetcdff-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NetCDF Fortran documentation | https://www.unidata.ucar.edu/software/netcdf/
- Debian apt - libnetcdff7 - 4.6.0+really4.5.4+ds-3+b4: normalized package name match | Debian stable package indexes: libnetcdff7 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Fortran interface for scientific data access to large binary data | https://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdff-dev - 4.6.0+really4.5.4+ds-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdff-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | creation, access, and sharing of scientific data in Fortran | https://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdff-doc - 4.6.0+really4.5.4+ds-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdff-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | NetCDF Fortran documentation | https://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdff7 - 4.6.0+really4.5.4+ds-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdff7 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Fortran interface for scientific data access to large binary data | https://www.unidata.ucar.edu/software/netcdf/
- apk - netcdf-fortran - 4.6.2-r0: normalized package name match | Alpine Linux edge package indexes: netcdf-fortran from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | NetCDF fortran bindings | https://www.unidata.ucar.edu/software/netcdf/
- apk - netcdf-fortran-dev - 4.6.2-r0: normalized package name match | Alpine Linux edge package indexes: netcdf-fortran-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | NetCDF fortran bindings (development files) | https://www.unidata.ucar.edu/software/netcdf/
- apk - netcdf-fortran-doc - 4.6.2-r0: normalized package name match | Alpine Linux edge package indexes: netcdf-fortran-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | NetCDF fortran bindings (documentation) | https://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Fortran libraries for NetCDF-4 | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-devel - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for Fortran NetCDF API | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-mpich - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-mpich from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | NetCDF Fortran mpich libraries | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-mpich-devel - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-mpich-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | NetCDF Fortran mpich development files | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-mpich-static - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-mpich-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | NetCDF Fortran mpich static libraries | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-openmpi - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-openmpi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | NetCDF Fortran openmpi libraries | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-fortran-openmpi-devel - 4.6.2-3.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-fortran-openmpi-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | NetCDF Fortran openmpi development files | http://www.unidata.ucar.edu/software/netcdf/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://www.automicvault.com/pkg/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [gcc](https://www.automicvault.com/pkg/brew/gcc/) - Runtime dependency declared by Homebrew.
- [netcdf](https://www.automicvault.com/pkg/brew/netcdf/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [hdf5](https://www.automicvault.com/pkg/brew/hdf5/) - Build dependency declared by Homebrew.
- [netcdf-cxx](https://www.automicvault.com/pkg/brew/netcdf-cxx/) - Shares the same upstream homepage.
- [cgns](https://www.automicvault.com/pkg/brew/cgns/) - Shares av.db curated category or tags: cli, data, data-format, scientific-data.
- [hdf5-mpi](https://www.automicvault.com/pkg/brew/hdf5-mpi/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [libgetdata](https://www.automicvault.com/pkg/brew/libgetdata/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [adios2](https://www.automicvault.com/pkg/brew/adios2/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [base91](https://www.automicvault.com/pkg/brew/base91/) - Shares av.db curated category or tags: cli, data, data-format.

## Combined YAML source

View the package source record on GitHub. [combined/netcdf-fortran.yml](https://github.com/automic-vault/db/blob/main/combined/netcdf-fortran.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
