{"id":42377550,"url":"https://github.com/mcuntz/install_netcdf","last_synced_at":"2026-01-27T20:52:34.438Z","repository":{"id":46716013,"uuid":"186909189","full_name":"mcuntz/install_netcdf","owner":"mcuntz","description":"Install open source packages to work with netCDF and openMPI on Mac OS X and Linux.","archived":false,"fork":false,"pushed_at":"2025-01-10T23:39:01.000Z","size":218,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-11T00:29:06.832Z","etag":null,"topics":["cdo","command-line","install","linux","macos","mpi","netcdf"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcuntz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-15T22:07:17.000Z","updated_at":"2025-01-10T23:39:06.000Z","dependencies_parsed_at":"2024-01-12T04:43:52.301Z","dependency_job_id":"93603b99-f2a6-4a76-a6f5-a1e4e3199c14","html_url":"https://github.com/mcuntz/install_netcdf","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"c3de4bc27bd74e3ecd281abdfd4cc8d56c90f2a2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcuntz/install_netcdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuntz%2Finstall_netcdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuntz%2Finstall_netcdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuntz%2Finstall_netcdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuntz%2Finstall_netcdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcuntz","download_url":"https://codeload.github.com/mcuntz/install_netcdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuntz%2Finstall_netcdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28822233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:44:20.126Z","status":"ssl_error","status_checked_at":"2026-01-27T18:44:09.161Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdo","command-line","install","linux","macos","mpi","netcdf"],"created_at":"2026-01-27T20:52:32.086Z","updated_at":"2026-01-27T20:52:34.429Z","avatar_url":"https://github.com/mcuntz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# install_netcdf\nInstall open source packages to work with netCDF and openMPI on Mac OS X and Linux.\n\nThe script was initially written to install netCDF4 (hence its name) and all its\ndependencies to be used with different Fortran compilers, as well as\nsome netCDF tools such as cdo, nco and ncview.\n\nIt is also used to install missing packages locally on computing\nclusters. For example, a cluster might have the netCDF C-library\ninstalled but not the Fortran version.\n\nSet parameters in Setup section, as well as directories to packages that are already installed.\n\nPrerequisites: curl, c and c++ compilers, pkg-config for nco.  \nOptional prerequisites: fortran compiler (e.g. gfortran) for netcdf3 and netcdf4-fortran  \n                       java compiler for antlr2, i.e. ncap2 of nco\n\nThe script was tested on Mac OS X 10.9 through 10.11 (Mavericks, Yosemite, El Capitan).  \nIt was not tested on Ubuntu for quite a while.\n\n#### Dependencies are:\n\n| | |\n| --- | --- |\n| hdf5 | \u003c- zlib, szip |\n| netcdf4 | \u003c- hdf5 |\n| netcdf4\\_fortran | \u003c- netcdf4 |\n| grib\\_api | \u003c- netcdf4, jasper, libpng |\n|    or | |\n| eccodes | \u003c- netcdf4, jasper, libpng |\n| cdo | \u003c- netcdf4, proj4, grib_api or eccodes, udunits |\n| nco | \u003c- netcdf4, gsl, udunits, pkg-config, antlr v2 (not v3/4) for ncap2 |\n| ncview | \u003c- netcdf4, udunits |\n| tiff | \u003c- jpeg |\n| ffmpeg | \u003c- yasm |\n\n#### The websites to check for the latest versions are:\n\n| | |\n| --- | --- |\n| zlib | http://zlib.net |\n| openssl | https://www.openssl.org/source/ |\n| szip | http://www.hdfgroup.org/ftp/lib-external/szip/ |\n| hdf5 | http://www.hdfgroup.org/ftp/HDF5/releases/ |\n| netcdf4/\\_fortran | https://www.unidata.ucar.edu/downloads/netcdf |\n| netcdf3 | http://www.unidata.ucar.edu/downloads/netcdf/netcdf-3\\_6\\_3 |\n| udunits | ftp://ftp.unidata.ucar.edu/pub/udunits/ |\n| libpng | http://sourceforge.net/projects/libpng/files/ |\n| libjpeg | http://www.ijg.org/files/ |\n| tiff | https://download.osgeo.org/libtiff/ |\n| proj4 | https://download.osgeo.org/proj/ |\n| jasper | http://www.ece.uvic.ca/~frodo/jasper/ |\n| grib\\_api | https://software.ecmwf.int/wiki/display/GRIB/Releases |\n| eccodes | https://software.ecmwf.int/wiki/display/ECC/Releases |\n| cdo | https://code.zmaw.de/projects/cdo/files |\n| ncview | ftp://cirrus.ucsd.edu/pub/ncview/ |\n| gsl | ftp://ftp.gnu.org/gnu/gsl/ |\n| antlr | http://www.antlr2.org/download.html |\n| nco | http://nco.sourceforge.net/src/ |\n| openmpi | http://www.open-mpi.org |\n| mpich | http://www.mpich.org/downloads/ |\n| geos | https://download.osgeo.org/geos |\n| gdal | https://trac.osgeo.org/gdal/wiki/DownloadSource |\n| yasm | http://yasm.tortall.net/Download.html |\n| ffmpeg | http://ffmpeg.org/releases/ |\n| p7zip | http://sourceforge.net/projects/p7zip/ |\n| hdf4 | http://www.hdfgroup.org/release4/obtain.html |\n| enscript | http://ftp.gnu.org/gnu/enscript |\n| htop | http://hisham.hm/htop/ |\n\n#### Check for all latest versions by copying the following to open/xdg-open:\n\nhttp://zlib.net https://www.openssl.org/source/ http://www.hdfgroup.org/ftp/lib-external/szip/ http://www.hdfgroup.org/ftp/HDF5/releases/ https://www.unidata.ucar.edu/downloads/netcdf http://www.unidata.ucar.edu/downloads/netcdf/netcdf-3\\_6\\_3 ftp://ftp.unidata.ucar.edu/pub/udunits/ http://sourceforge.net/projects/libpng/files/ http://www.ijg.org/files/ https://download.osgeo.org/libtiff/ https://download.osgeo.org/proj/ http://www.ece.uvic.ca/~frodo/jasper/ https://software.ecmwf.int/wiki/display/GRIB/Releases https://software.ecmwf.int/wiki/display/ECC/Releases https://code.zmaw.de/projects/cdo/files ftp://cirrus.ucsd.edu/pub/ncview/ ftp://ftp.gnu.org/gnu/gsl/ http://www.antlr2.org/download.html http://nco.sourceforge.net/src/ http://www.open-mpi.org http://www.mpich.org/downloads/ https://download.osgeo.org/geos https://trac.osgeo.org/gdal/wiki/DownloadSource http://yasm.tortall.net/Download.html http://ffmpeg.org/releases/ http://sourceforge.net/projects/p7zip/ http://www.hdfgroup.org/release4/obtain.html http://ftp.gnu.org/gnu/enscript http://hisham.hm/htop/releases/\n\n#### Note\n\n- Do not untabify the script because the netcdf_fortran libtool patch will not work anymore.\n- If some libraries are already installed such as png, set dolibpng=0 below.\n- One can set EXTRA_CPPFLAGS and EXTRA_LDFLAGS if the compilers do not find it automatically, for example:  \nEXTRA_LDFLAGS='-L/opt/local'\n\n#### Note on Mac OS X using homebrew\n\ninstall homebrew with\n\n    /usr/bin/ruby -e \"$(curl -fsSL  https://raw.githubusercontent.com/Homebrew/install/master/install)\"  \n\ninstall the following packages via homebrew by typing: brew install \u003cPACKAGE\u003e\n\n    brew install gcc netcdf cmake udunits proj jasper gsl\n    brew cask install java\n    brew install antlr@2 geos gdal ffmpeg enscript htop\n    brew install nco\n    brew install ncview\n\n Set CMAKE below to cmake.  \n All libraries should link into /usr/local. If a package cannot link properly then try\n \n    brew link \u003cPACKAGE\u003e\n \n This normally shows a directory which cannot be written. Set owner to username, e.g.\n \n    sudo chown ${USER} /usr/local/share/man/man3\n \n Then, do not select the instaled packages below\n \n    dozlib=0\n    doszip=0\n    dohdf5=0\n    donetcdf4=0\n    doudunits=0\n    dolibpng=0\n    dolibjpeg=0\n    dotiff=0\n    doproj4=0\n    dojasper=0\n    dogsl=0\n    doantlr=0\n\tdonco=0\n\tdoncview=0\n\n Then use the script to install all libraries that provide Fortran interfaces with all your Fortran compilers,\n such as netcdf4-fortran, netcdf3, openmpi, mpich, giving the list of your Fortran compilers below, e.g.\n \n    fortran_compilers=\"gfortran nagfor pgfortran ifort\"\n \n Also install cdo with the script because of the dropped science support of homebrew.  \n Homebrew can also be used exclusivley for the additional packages:\n \n    geos\n    gdal\n    ffmpeg\n    enscript\n    htop\n\n#### Note on (Scientific) Linux\n\n zlib installed by default.  \n Install antlr-C++ bindings from paket manager.\n\n#### Note on Ubuntu\n\n install the following software from package management via the command line\n by typing sudo apt install \u003cPACKAGE\u003e\n \n    zlib [installed by default on Ubuntu]\n    or\n    libz-mingw-w64 [on Ubuntu on Windows]\n    libpng-dev\n    libtiff-dev [installs libjpeg-dev]\n    libantlr-dev\n    libexpat-dev\n    libcurl4-openssl-dev\n    xorg-dev\n    cmake\n    bison\n   \nTherefore do not select the packages below\n   \n    dozlib=0\n    dolibpng=0\n    dolibjpeg=0\n    dotiff=0\n    doantlr=0\n\nAuthors: Matthias Cuntz, Stephan Thober  \nCreated: Oct 2014\n\n**Copyright (c) 2014-2019 Matthias Cuntz - mc (at) macu (dot) de**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcuntz%2Finstall_netcdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcuntz%2Finstall_netcdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcuntz%2Finstall_netcdf/lists"}