Hi Nands and Ron,

Ron is right. octcdf can work with the netcdf or libnc-dap libraries.
First it checks nc-config, then ncdap-config and then it just tries if
-lnetcdf and netcdf.h are present and usable.

So if you do not need opendap and you have 'plain' netcdf already
installed, you can use this library. If this library does not include
nc-config (which is added since version 4.0) and if netcdf is not
installed in you systems default locations, then you need to tell
octcdf where to find it. In this case you need to define CPPFLAGS and
LDFLAGS. For example:

export CPPFLAGS=-I/home/user/netcdf/include
export LDFLAGS='-L/home/user/netcdf/lib -lnetcdf'

(see http://modb.oce.ulg.ac.be/mediawiki/index.php/NetCDF_toolbox_for_Octave)

However, there is problem with octave 3.2.x and octcdf.
octcdf requires the octave 3.0 or the development version (3.3.50+)
because of the problem described here:

http://old.nabble.com/octave-3.2.0-parser-td23928800.html#a23928800
http://old.nabble.com/writing-ncdf-file-with-octcdf-td26238983.html

Regards
Alex

from configure.base:

dnl first checking for nc-config, then nc-dap

AC_MSG_CHECKING([for nc-config])

if nc-config --version > /dev/null 2>&1; then
      AC_MSG_RESULT([yes])
      OCTCDF_LIBS="$OCTCDF_LIBS `nc-config --libs`"
      OCTCDF_CFLAGS="$OCTCDF_CFLAGS `nc-config --cflags`"
      HAVE_NETCDF=yes
else
      AC_MSG_RESULT([no])
      AC_MSG_CHECKING([for nc-dap])

      if ncdap-config --version > /dev/null 2>&1; then
            AC_MSG_RESULT([yes])
            OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`"
            OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`"

            HAVE_NETCDF=yes
      else
            AC_MSG_RESULT([no])

            dnl if no opendap, checking if the NetCDF library exists.

            AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,)

            if test $HAVE_NETCDF = yes ; then
              OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf"

              dnl we have the libraries, no we have also the headers?
              AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no)
            fi
      fi
fi

On Fri, Mar 5, 2010 at 8:22 AM, ron goldman <wrong.old....@gmail.com> wrote:
> Hi Nands,
> I don't think It will conflict  because it installs the headers into a
> different directory and the lib files have different names.
> ncdap-config is used to let make know what headers and lib files to use.
>  I think It was preferred over basic netcdf because it supports basic netcdf
> features and also allows you to access remote OPeNDAP servers.
>
> regards,
> Ron
>
>
>
> On Fri, Mar 5, 2010 at 6:29 AM, <n...@itimes.com> wrote:
>>
>> Hi Ron.
>>
>> The description of libnc-dap says it is an alternative implementation of
>> Unidata's netCDF API.
>> I am already having libnetcdf installed.
>> Won't installing libnc-dap create conflict?
>>
>> Thanks.
>>
>> Nands
>>
>> ----- Original Message -----
>> From: Ron Goldman <wrong.old....@gmail.com>
>> To: n...@itimes.com
>> Cc: octave-dev@lists.sourceforge.net
>> Sent: Thu, 4 Mar 2010 13:41:32 +0530 (IST)
>> Subject: Re: [OctDev] Error installing octcdf-1.0.17 for octave 3.2.3
>>
>> I think you need the libnc-dap-devel rpm installed
>>
>> Ron
>>
>>
>> n...@itimes.com wrote:
>>
>> > Hi all.
>> >
>> > I am having Octave (3.2.3) with octcdf-1.0.13 on 64-bit x86_64 Redhat
>> > enterprise edition 5. When I try to install octcdf-1.0.17 with "pkg install
>> > octcdf-1.0.17.tar.gz", I get the following error:
>> >
>> > make: ncdap-config: Command not found
>> > make: Entering directory `/tmp/oct-j7vbF6/octcdf/src'
>> > In file included from ov-netcdf.cc:20:
>> > ov-netcdf.h:34:20: error: netcdf.h: No such file or directory
>> > ov-netcdf.h:90: error: 'nc_type' has not been declared
>> > ov-netcdf.h:92: error: 'nc_type' has not been declared
>> > ov-netcdf.h:93: error: 'nc_type' has not been declared
>> > ov-netcdf.h:94: error: 'nc_type' has not been declared
>> > ov-netcdf.h:99: error: 'nc_type' does not name a type
>> > ov-netcdf.h:100: error: 'nc_type' does not name a type
>> > ov-netcdf.h:101: error: 'nc_type' was not declared in this scope
>> > ov-ncvar.h:26: error: 'NC_MAX_VAR_DIMS' was not declared in this scope
>> > ov-ncvar.h:29: error: 'nc_type' does not name a type
>> > ov-ncvar.h:56: error: expected `)' before 'nctypep'
>> > ov-ncvar.h:124: error: 'nc_type' does not name a type
>> > ov-ncvar.h:134: error: expected ',' or '...' before 't'
>> > ov-ncvar.h:134: error: ISO C++ forbids declaration of 'nc_type' with no
>> > type
>> > ov-ncvar.h: In member function 'int octave_ncvar::get_dimid(int) const':
>> > ov-ncvar.h:130: error: 'struct ncvar_t' has no member named 'dimids'
>> > ov-ncvar.h: In member function 'void octave_ncvar::set_nctype(int)':
>> > ov-ncvar.h:134: error: 'struct ncvar_t' has no member named 'nctype'
>> > ov-ncvar.h:134: error: 't' was not declared in this scope
>> > ov-ncvar.h: In member function 'void octave_ncvar::set_dimid(int, int)
>> > const':
>> > ov-ncvar.h:146: error: 'struct ncvar_t' has no member named 'dimids'
>> > ov-ncatt.h: At global scope:
>> > ov-ncatt.h:25: error: 'nc_type' does not name a type
>> > ov-ncatt.h:110: error: 'nc_type' does not name a type
>> > ov-ncatt.h:118: error: expected ',' or '...' before '&' token
>> > ov-ncatt.h:118: error: ISO C++ forbids declaration of 'nc_type' with no
>> > type
>> > ov-ncatt.h: In member function 'void octave_ncatt::set_nctype(int)':
>> > ov-ncatt.h:118: error: 'struct ncatt_t' has no member named 'nctype'
>> > ov-ncatt.h:118: error: 't' was not declared in this scope
>> > ov-netcdf.cc: In function 'octave_value_list Fncdatatype(const
>> > octave_value_list&, int)':
>> > ov-netcdf.cc:441: error: 'nc_type' was not declared in this scope
>> > ov-netcdf.cc:441: error: expected `;' before 'type'
>> > ov-netcdf.cc:450: error: 'type' was not declared in this scope
>> > ov-netcdf.cc:450: error: 'class octave_ncvar' has no member named
>> > 'get_nctype'
>> > ov-netcdf.cc:454: error: 'type' was not declared in this scope
>> > ov-netcdf.cc:454: error: 'class octave_ncatt' has no member named
>> > 'get_nctype'
>> > ov-netcdf.cc:461: error: 'type' was not declared in this scope
>> > ov-netcdf.cc: In function 'octave_value ov_nc_get_att(int, int,
>> > std::string)':
>> > ov-netcdf.cc:570: error: 'nc_type' was not declared in this scope
>> > ov-netcdf.cc:570: error: expected `;' before 'xtypep'
>> > ov-netcdf.cc:573: error: 'xtypep' was not declared in this scope
>> > ov-netcdf.cc:573: error: 'nc_inq_att' was not declared in this scope
>> > ov-netcdf.cc:575: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:582: error: 'NC_CHAR' was not declared in this scope
>> > ov-netcdf.cc:587: error: 'nc_get_att_text' was not declared in this
>> > scope
>> > ov-netcdf.cc:588: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:590: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:624: error: 'NC_BYTE' was not declared in this scope
>> > ov-netcdf.cc:624: error: 'nc_get_att_schar' was not declared in this
>> > scope
>> > ov-netcdf.cc:624: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:624: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:625: error: 'NC_SHORT' was not declared in this scope
>> > ov-netcdf.cc:625: error: 'nc_get_att_short' was not declared in this
>> > scope
>> > ov-netcdf.cc:625: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:625: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:626: error: 'NC_INT' was not declared in this scope
>> > ov-netcdf.cc:626: error: 'nc_get_att_int' was not declared in this scope
>> > ov-netcdf.cc:626: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:626: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:627: error: 'NC_FLOAT' was not declared in this scope
>> > ov-netcdf.cc:627: error: 'nc_get_att_float' was not declared in this
>> > scope
>> > ov-netcdf.cc:627: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:627: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:628: error: 'NC_DOUBLE' was not declared in this scope
>> > ov-netcdf.cc:628: error: 'nc_get_att_double' was not declared in this
>> > scope
>> > ov-netcdf.cc:628: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:628: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc: At global scope:
>> > ov-netcdf.cc:650: error: 'nc_type' has not been declared
>> > ov-netcdf.cc: In function 'void ov_nc_put_att(int, int, std::string,
>> > int, octave_value)':
>> > ov-netcdf.cc:657: error: 'NC_CHAR' was not declared in this scope
>> > ov-netcdf.cc:662: error: 'nc_put_att_text' was not declared in this
>> > scope
>> > ov-netcdf.cc:674: error: 'NC_BYTE' was not declared in this scope
>> > ov-netcdf.cc:674: error: 'nc_put_att_schar' was not declared in this
>> > scope
>> > ov-netcdf.cc:675: error: 'NC_SHORT' was not declared in this scope
>> > ov-netcdf.cc:675: error: 'nc_put_att_short' was not declared in this
>> > scope
>> > ov-netcdf.cc:676: error: 'NC_INT' was not declared in this scope
>> > ov-netcdf.cc:676: error: 'nc_put_att_int' was not declared in this scope
>> > ov-netcdf.cc:677: error: 'NC_FLOAT' was not declared in this scope
>> > ov-netcdf.cc:677: error: 'nc_put_att_float' was not declared in this
>> > scope
>> > ov-netcdf.cc:678: error: 'NC_DOUBLE' was not declared in this scope
>> > ov-netcdf.cc:678: error: 'nc_put_att_double' was not declared in this
>> > scope
>> > ov-netcdf.cc:685: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc: At global scope:
>> > ov-netcdf.cc:694: error: 'nc_type' has not been declared
>> > ov-netcdf.cc: In function 'octave_value ov_nc_get_vars(int, int,
>> > std::list<Range, std::allocator<Range> >, int)':
>> > ov-netcdf.cc:772: error: 'NC_BYTE' was not declared in this scope
>> > ov-netcdf.cc:772: error: 'nc_get_vars_schar' was not declared in this
>> > scope
>> > ov-netcdf.cc:772: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:772: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:773: error: 'NC_SHORT' was not declared in this scope
>> > ov-netcdf.cc:773: error: 'nc_get_vars_short' was not declared in this
>> > scope
>> > ov-netcdf.cc:773: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:773: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:774: error: 'NC_INT' was not declared in this scope
>> > ov-netcdf.cc:774: error: 'nc_get_vars_int' was not declared in this
>> > scope
>> > ov-netcdf.cc:774: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:774: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:775: error: 'NC_FLOAT' was not declared in this scope
>> > ov-netcdf.cc:775: error: 'nc_get_vars_float' was not declared in this
>> > scope
>> > ov-netcdf.cc:775: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:775: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:776: error: 'NC_DOUBLE' was not declared in this scope
>> > ov-netcdf.cc:776: error: 'nc_get_vars_double' was not declared in this
>> > scope
>> > ov-netcdf.cc:776: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:776: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:778: error: 'NC_CHAR' was not declared in this scope
>> > ov-netcdf.cc:784: error: 'nc_get_vars_text' was not declared in this
>> > scope
>> > ov-netcdf.cc:786: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:787: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc: At global scope:
>> > ov-netcdf.cc:821: error: 'nc_type' has not been declared
>> > ov-netcdf.cc: In function 'void ov_nc_put_vars(int, int,
>> > std::list<Range, std::allocator<Range> >, int, octave_value)':
>> > ov-netcdf.cc:865: error: 'NC_CHAR' was not declared in this scope
>> > ov-netcdf.cc:889: error: 'nc_put_vars_text' was not declared in this
>> > scope
>> > ov-netcdf.cc:931: error: 'NC_BYTE' was not declared in this scope
>> > ov-netcdf.cc:931: error: 'nc_put_vars_schar' was not declared in this
>> > scope
>> > ov-netcdf.cc:932: error: 'NC_SHORT' was not declared in this scope
>> > ov-netcdf.cc:932: error: 'nc_put_vars_short' was not declared in this
>> > scope
>> > ov-netcdf.cc:933: error: 'NC_INT' was not declared in this scope
>> > ov-netcdf.cc:933: error: 'nc_put_vars_int' was not declared in this
>> > scope
>> > ov-netcdf.cc:934: error: 'NC_FLOAT' was not declared in this scope
>> > ov-netcdf.cc:934: error: 'nc_put_vars_float' was not declared in this
>> > scope
>> > ov-netcdf.cc:935: error: 'NC_DOUBLE' was not declared in this scope
>> > ov-netcdf.cc:935: error: 'nc_put_vars_double' was not declared in this
>> > scope
>> > ov-netcdf.cc:944: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:950: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:951: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc: At global scope:
>> > ov-netcdf.cc:962: error: 'nc_type' has not been declared
>> > ov-netcdf.cc: In function 'void ov_nc_def_var(int, std::string, int,
>> > std::list<std::basic_string<char, std::char_traits<char>,
>> > std::allocator<char> >, std::allocator<std::basic_string<char,
>> > std::char_traits<char>, std::allocator<char> > > >)':
>> > ov-netcdf.cc:967: error: 'NC_MAX_VAR_DIMS' was not declared in this
>> > scope
>> > ov-netcdf.cc:974: error: 'dimids' was not declared in this scope
>> > ov-netcdf.cc:974: error: 'nc_inq_dimid' was not declared in this scope
>> > ov-netcdf.cc:976: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:978: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc:987: error: 'dimids' was not declared in this scope
>> > ov-netcdf.cc:987: error: 'nc_def_var' was not declared in this scope
>> > ov-netcdf.cc:989: error: 'NC_ENAMEINUSE' was not declared in this scope
>> > ov-netcdf.cc:992: error: 'NC_NOERR' was not declared in this scope
>> > ov-netcdf.cc:994: error: 'nc_strerror' was not declared in this scope
>> > ov-netcdf.cc: At global scope:
>> > ov-netcdf.cc:1007: error: 'nc_type' does not name a type
>> > ov-netcdf.cc:1029: error: redefinition of 'std::string nctype2ncname'
>> > ov-netcdf.h:101: error: 'std::string nctype2ncname' previously declared
>> > here
>> > ov-netcdf.cc:1029: error: 'nc_type' was not declared in this scope
>> > make: *** [ov-netcdf.o] Error 1
>> > 'make' returned the following error: mkoctfile -c ov-netcdf.cc
>> > -DHAVE_OCTAVE_INT
>> > make: Leaving directory `/tmp/oct-j7vbF6/octcdf/src'
>> > error: called from `pkg>configure_make' in file
>> > /usr/share/octave/3.2.3/m/pkg/pkg.m near line 1253, column 2
>> > error: called from:
>> > error:   /usr/share/octave/3.2.3/m/pkg/pkg.m at line 714, column 5
>> > error:   /usr/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Download Intel&#174; Parallel Studio Eval
>> > Try the new software tools for yourself. Speed compiling, find bugs
>> > proactively, and fine-tune applications for parallel performance.
>> > See why Intel Parallel Studio got high marks during beta.
>> > http://p.sf.net/sfu/intel-sw-dev
>> > _______________________________________________
>> > Octave-dev mailing list
>> > Octave-dev@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/octave-dev
>> >
>> >
>>
>> ***********************************************************
>> This outgoing email was scanned for viruses and other malicious content by
>> the IT Department of Israel Oceanographic & Limnological Research.
>> AntiVirus system managed by Eli W. Tel. 972-4-8565267
>> IMPORTANT: Do not open attachments from unrecognized senders.
>> Never open attached files with extensions: *.pif, *.scr, *.vbs, *.exe.
>> ***********************************************************
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Octave-dev mailing list
> Octave-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/octave-dev
>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to