This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Thanks Russ, I need the two different version, because 3.6.3 is functional > with CMAQ 4.7.1 and IOAPI, but I got some trouble with newer netcdf > versions. NEtcdf 4.1.1 is required by the brazilian CCATT-BRAMS air > quality model. I need to work with both fully funcional models on my > workstation. I just got an additional question, how could choose or switch > the netcdf version I want to use? OK, one way to switch between versions would be to create a symbolic link to the root directory of the version you want to use, such as ln -s /usr/netcdf3 /usr/netcdf or ln -s /usr/netcdf4 /usr/netcdf Now you could reference the include file and library to use on the compiler command using something like gcc myprog.c -o myprog -I/usr/netcdf/include -L/usr/netcdf/lib -lnetcdf ... and it would link to either the netCDF-3 or netCDF-4 library, depending on the value of the symbolic link /usr/netcdf at compile/link time. --Russ > address@hidden> wrote: > > > > Good day, could you help me how to install two different versions of > > netcdf > > > in the same computer on linux plataform? > > > > > > Version 3.6.3 and 4.1.1 > > > > you would have to install the different versions in different root > > directories, > > using different --prefix=... options when configuring the software as the > > first > > step in building it. > > > > For example, you might use > > > > ./configure --prefix=/usr/netcdf3 other-options ... > > > > for the 3.6.3 version and > > > > ./configure --prefix=/usr/netcdf4 other-options ... > > > > for the 4.1.1 version. > > > > But netCDF-4 is compatible with netCDF-3. It supports the netCDF-3 > > formats for > > both reading and writing, and includes all the netCDF-3 function calls in a > > backward-compatible way. So nay program that works with netCDF-3 should > > work in > > exactly the same way (except for some fixed bugs) using netCDF-4. So you > > should > > not have to install two different versions of the library. > > > > Is there a reason you need both the old version and the new version that > > compatibly > > extends the old version? > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: YBC-350032 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > > -- > *Alexander Rincón Pérez* > Asistente de Investigaciòn > Grupo de Investigación en Calidad del Aire > Departamento de Ingeniería Química y Ambiental > Universidad Nacional de Colombia > Calle 44 45-67 Bloque B5, Piso 4 > 111321 Bogotá, Colombia > Tel. +57 (1) 3165000 Exts. 10620, > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: YBC-350032 Department: Support netCDF Priority: Normal Status: Closed