Netcdf version 4.0.1 - How to Download and Install on Mac OS X
Monday the 23rd of November, 2009

    version 4.0.1

      View the most recent changes for the netcdf port at: netcdf.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for netcdf.
      The raw portfile for netcdf 4.0.1 is located here:
      http://netcdf.darwinports.com/dports/science/netcdf/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/netcdf


      # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
      The netcdf Portfile 59163 2009-10-10 20:17:37Z adfernandes macports.org $

      PortSystem 1.0

      Name: netcdf
      Version: 4.0.1
      Revision: 7
      Maintainers: takeshi openmaintainer
      Platform: darwin
      Category: science

      Description: NetCDF - Network Common Data Form
      Long Description: NetCDF is an interface for array-oriented data access and a library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data. The netCDF software was developed at the Unidata Program Center in Boulder, Colorado.

      Homepage: http://unidata.ucar.edu/packages/netcdf/

      Master Sites: ftp://ftp.unidata.ucar.edu/pub/netcdf/ http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/

      Checksums: md5 a251453c5477599f050fa4e593295186 sha1 96b361de72bcf68eaba42e7e5cf0f92c33d288e9 rmd160 ba74363bbc4c76fc1bbac578ba4c2af4739b4958

      configure.cppflags-append -DNDEBUG
      configure.cxxflags-append -fno-common
      configure.cflags-append -fno-common
      configure.args --enable-shared --disable-fortran-compiler-check --disable-f77 --disable-f90

      test.run yes
      test.target check

      destroot.destdir prefix=${destroot}${prefix} MANDIR=\\\${prefix}/share/man

      post-destroot {
      file delete -force ${destroot}${prefix}/share/man/whatis.db
      }

      Variant: gcc43 description conflicts g95 description {Enable Fortran support with gfortran} {
      depends_lib-append port:gcc43
      configure.args-delete --disable-fortran-compiler-check --disable-f77 --disable-f90
      configure.cppflags-append -DpgiFortran
      configure.fc ${prefix}/bin/gfortran-mp-4.3
      configure.f77 ${configure.fc}
      }

      Variant: g95 description conflicts gcc43 description {Enable Fortran support with g95} {
      depends_lib-append port:g95
      configure.args-delete --disable-fortran-compiler-check --disable-f77 --disable-f90
      #-lfg95 required or the tests fail
      configure.ldflags-append -lf95
      configure.fc ${prefix}/bin/g95
      configure.f77 ${configure.fc}
      }

      Variant: openmpi description {compile with openmpi} {
      depends_lib-append port:openmpi
      configure.fc openmpif77
      configure.cc openmpicc
      configure.cxx openmpicxx
      }

      Variant: dap description {enable dap} {
      depends_lib-append port:curl
      configure.args-append --enable-dap
      }

      Variant: netcdf4 description {compile with hdf5} {
      configure.env-append LDFLAGS=-L${prefix}/lib LIBS="-lhdf5 -lhdf5_hl"
      configure.args-append --enable-netcdf-4 --enable-ncgen4 --with-hdf5=${prefix} --with-szlib=${prefix}
      depends_lib-append port:szip port:hdf5-18
      }

      Variant: static description {build static libraries} {
      configure.args-delete --enable-shared
      }

      Variant: docs description {install documentation} {
      configure.args-append -enable-docs-install
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/netcdf
      % sudo port install netcdf
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching netcdf
      ---> Verifying checksum for netcdf
      ---> Extracting netcdf
      ---> Configuring netcdf
      ---> Building netcdf with target all
      ---> Staging netcdf into destroot
      ---> Installing netcdf
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using netcdf with these commands:
      %  man netcdf
      % apropos netcdf
      % which netcdf
      % locate netcdf

     Where to find more information:

    Darwin Ports



    Lightbox this page.