Installing the FAN Library onto Ubuntu (or not as the case may be).

Setting up the FAN Library for Ubuntu takes some work. I started by trying to install the Python Scientific Library but this didn’t seem to give the packages I wanted.

So I then looked at doing it from source.

1) Get the Source files from UNiDAta

2) Uncompress them from their delivery package and cd into the src folder.

3) Now if you take a moment to read the README and INSTAL files you will realise that you need to install the udunits binaries and development libraries.

4) As well as install ingthe netcdf binaries and development libraries

5) Now you can try and configure the FAN package but before you do there will be things that need configuring such as:

CPP_NETCDF Compiler reference for netCDF header-file, e.g. “-I/usr/local/netcdf/include”. Ubuntu10(ish) /usr/include
CPP_UDUNITS Compiler reference for UDUNITS header-file, e.g. “-I/usr/local/udunits/include”. Ubuntu10(ish) /usr/lib
LD_NETCDF Linker reference for netCDF library, e.g. “-L/usr/local/netcdf/lib -lnetcdf”.
LD_UDUNITS Linker reference for UDUNITS library, e.g. “-L/usr/local/udunits/lib -ludunits”.

And then you can try this

6) Next try building the install packages

Now at this point I started getting some errors so how did I fix/not fix them. The first error was something to do with MAX_NC_OPEN but I was able to follow this link which appeared to fix the issue. Open the nc header file

and then add this code under the #include entry.

Rather than just use 32 you can use the script providing on the link above to find out what number your machine can cope with. When I compiled the script and ran it.

the output was:

which was perfect so I updated nc.h again. The next error I had was

which I think was related to my haphazard approach to the Configure section so I went back to step 5 to add some more detail.

About CDB 361 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

1 Comment

  1. Hi chris,

    I followed your instructions to install the package in my computer. I am running a linux mint maya 13, MATE-64 bits edition. Here is the complete profile of my distribution: Linux version 3.2.0-23-generic (buildd@crested) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012.
    Everything good until the last error message (nasParse.y:30:1: error: initializer element is not constant) after which I have tried everything with no success. Do you have a hint on how to solve the problem? I was also asked for the location of the xdr library during the configuration process. I would be very grateul if you could help me with this. Many thanks in advance.

    Best regards,

    Sandro Makowski Giannoni

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.