How do I compile NetCDF on a Mac?

Frequently Asked Questions about ROMS usage

Moderators: arango, kate, robertson

Post Reply
Message
Author
User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

How do I compile NetCDF on a Mac?

#1 Unread post by kate »

Inga Koszalka sent me an email asking this and the reply bounced. I figure I'll probably want to know this again someday, so here goes:

The new Netcdf alpha/beta versions (4.0 and 3.6.2) use a more standard gnu configure than older versions. It took some fiddling to figure out everything configure needs to get a working NetCDF library with xlf and -qextname. I wanted the -qextname for compatibilty with the NCAR graphics library I got in binary form from NCAR. Anyway, here is how I invoked configure for 3.6.2:

configure --prefix=/myhomedir F77=xlf_r FC=xlf90_r FCFLAGS='qsuffix=f=f90 -qextname' FFLAGS=-qextname CPPFLAGS='-DIBMR2Fortran -Dextname' LIBS=-lSystemStubs

Post Reply