Hi Gilles, Sorry to have taken so long to respond to your question ... > I am trying to build NetCDF library to run the WRF model. I use linux > OS Ubuntu 12.04. I know a little bit about scripting but I am kind of > rusty to say the least. I easily get lost... > > After creating a netcdf directory, I downloaded there the > netcdf-220.127.116.11.tar.gz file, I used gunzip to extract and realized the > building without hdf5 (hoping I don't need it for WRF) as described on > unidata web site. > > I then used the "make check install" to check if everything is fine. It > looks ok, but it mentionned after many ok lines in the terminal window > it said: > > "test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include" > /usr/bin/install -c -m 644 netcdf.h '/usr/local/include' > /usr/bin/install: cannot create regular file `/usr/local/include/netcdf.h': > Permission denied > make: *** [install-includeHEADERS] Error 1 > make: Leaving directory `/home/gilles/netcdf/netcdf-18.104.22.168/include' > make: *** [install-am] Error 2 > make: Leaving directory `/home/gilles/netcdf/netcdf-22.214.171.124/include' > make: *** [install-recursive] Error 1" > > So it seems something is wrong, perhaps the path, or the location of > the directory where I downloaded the tar.gz file and started building > the library in the first time. > > Any suggestion? Yes, I think you are trying to run "make install" as an ordinary user, who doesn't have the necessary permissions for installing in a system directory, such as /usr/local/lib or /usr/local/include. If you have "sudo" permissions, try running sudo make install which will ask for your password. If you aren't set up as a "sudo" user, you'll either have to login as "root" to run the make install command, or install netCDF in a directory where you have the necessary permissions, such as your home directory. To specify an alternate installation location, instead of the default "/usr/local", use the --prefix= option to the configure script after running "make clean" but before running "make check" and "make install". > Then in the same netcdf directory I downloaded the > netcdf-fortran-4.2.tar.gz and used gunzip command, then went in the > netcdf-fortran-4.2 directroty and did the ./configure, but it complained > the following: > > configure: error netcdf.h could not be found. Please set CPPFLAGS. > > Seems another path problem but I am not even sure that if I download the > first netcdf-126.96.36.199.tar.gz file and install it correctly I really need > the netcdf-fortran-4.2.tar.gz and realize the set up to run the WRF... > > So should I build that library too or just the first one is enough? You need to have built and installed the netCDF 188.8.131.52 C library before trying to build and install the netCDF-4.2 Fortran library, as described here: http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html > Also a friend just emailed me few minutes ago to told me not to use the > netcdf 4.*** version for running the WRF but 3.*** > > So should I uninstall netcdf 4.2.1 and install a 3.*** version? No, that's not necessary or advisable. You can use netCDF 184.108.40.206 with any program that worked with netCDF-3, as it's backward compatible. And you built without the HDF5 library (or maybe with the --disable-netcdf-4 configure option), so what you have is essentially netCDF-3 with some bug fixes included since the old netcdf-3.6.3 release. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: FCB-421026 Department: Support netCDF Priority: High Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.