function still missing after installing and loading the package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

function still missing after installing and loading the package

smateria

Hi all,
trying to create a netcdf file but apparently the netcdf function is missing.
However, the corresponding package is installed and correctly loaded.

>> file = netcdf.create("t2m_cru_multimodel_winterEU_10pc.nc",clobber);
warning: the 'netcdf' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.
error: 'netcdf' undefined near line 1 column 8

>> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
   financial    *|   0.5.0 | ~/octave/financial-0.5.0
     general   *|   2.0.0 | ~/octave/general-2.0.0
    geometry *|   2.1.1 | ~/octave/geometry-2.1.1
          io      *|   2.4.7 | ~/octave/io-2.4.7
     mapping *|   1.2.1 | ~/octave/mapping-1.2.1
         nan.   *|   3.1.2 | ~/octave/nan-3.1.2
      netcdf    *|  1.0.11 | ~/octave/netcdf-1.0.11
  statistics    *|   1.3.0 | ~/octave/statistics-1.3.0
     windows *|   1.2.4 | ~/octave/windows-1.2.4

Any help would be very much appreciated.

Thanks,
Stefano
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: function still missing after installing and loading the package

tmacchant
> Hi all,

> trying to create a netcdf file but apparently the netcdf function is
> missing.
> However, the corresponding package is installed and correctly loaded.
>
>>>  file =
> netcdf.create("t2m_cru_multimodel_winterEU_10pc.nc",clobber);
> warning: the 'netcdf' function is not yet implemented in Octave
>
> Please read `http://www.octave.org/missing.html' to learn how you can
> contribute missing functionality.
> error: 'netcdf' undefined near line 1 column 8
>
>>>  pkg list
> Package Name  | Version | Installation directory
> --------------+---------+-----------------------
>    financial    *|   0.5.0 | ~/octave/financial-0.5.0
>      general   *|   2.0.0 | ~/octave/general-2.0.0
>     geometry *|   2.1.1 | ~/octave/geometry-2.1.1
>           io      *|   2.4.7 | ~/octave/io-2.4.7
>      mapping *|   1.2.1 | ~/octave/mapping-1.2.1
>          nan.   *|   3.1.2 | ~/octave/nan-3.1.2
>       netcdf    *|  1.0.11 | ~/octave/netcdf-1.0.11
>   statistics    *|   1.3.0 | ~/octave/statistics-1.3.0
>      windows *|   1.2.4 | ~/octave/windows-1.2.4
>
> Any help would be very much appreciated.
>


Unlike MATLAB, netcdf.create does not work but netcdf_create does work!
See https://octave.sourceforge.io/netcdf/overview.html


Tested on octave-4.2.1 on windows

>> ncid = netcdf.create('foo.nc','NOCLOBBER')

warning: the 'netcdf' function is not yet implemented in Octave


>> ncid = netcdf_create('foo.nc','NOCLOBBER')

ncid =  65536


Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: function still missing after installing and loading the package

NJank

Unlike MATLAB, netcdf.create does not work but netcdf_create does work!
See https://octave.sourceforge.io/netcdf/overview.html


Tested on octave-4.2.1 on windows

>> ncid = netcdf.create('foo.nc','NOCLOBBER')

warning: the 'netcdf' function is not yet implemented in Octave


>> ncid = netcdf_create('foo.nc','NOCLOBBER')

ncid =  65536


Hmmm.  That seems odd. The netcdf package description says, "A MATLAB compatible NetCDF interface for Octave"

Seems a bit incompatible if we can't use the same function names/syntax.  Is it a problem colliding with object.method syntax?


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: function still missing after installing and loading the package

smateria
In fact, Tatsuro's syntax works.
The link points out the correct syntax.

Thanks everyone for your kind help.

Stefano
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: function still missing after installing and loading the package

smateria
In reply to this post by tmacchant

Sorry for being pushy,
as I previously said, it was possible to create the netcdf file, but when I try to look into it, this is the response:

[login1][~/mme]> ncdump -h t2m_cru_multimodel_winterEU_10pc.nc
ncdump: t2m_cru_multimodel_winterEU_10pc.nc: NetCDF: Unknown file format


Someone had the same problem in the past:
http://octave.1599824.n4.nabble.com/octave-amp-netcdf-tt4673704.html#a4673708

I am using netcdf4 as stated in my nc-config:

This netCDF 4.3.0 has been built with the following features:

  --cc        -> icc
  --cflags    ->  -I/users/home/opt/netcdf/netcdf-4.3/include -I/users/home/opt/szip/szip-2.1/include -I/users/home/opt/hdf5/hdf5-1.8.11/include -I/usr/include
  --libs      -> -L/users/home/opt/netcdf/netcdf-4.3/lib -lnetcdf

  --has-c++   -> no
  --cxx       ->
  --has-c++4  -> no
  --cxx4      ->

  --fc        -> ifort
  --fflags    -> -xHost -no-prec-div -O3 -I/users/home/opt/netcdf/netcdf-4.3/include
  --flibs     -> -L/users/home/opt/netcdf/netcdf-4.3/lib -lnetcdff -L/users/home/opt/hdf5/hdf5-1.8.11/lib -L/users/home/opt/netcdf/netcdf-4.3/lib -L/usr/lib64/ -lz -lgpfs -lnetcdf -lcurl -lnetcdf
  --has-f90   -> yes

  --has-dap   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --has-hdf5  -> yes
  --has-hdf4  -> no
  --has-pnetcdf-> no

  --prefix    -> /users/home/opt/netcdf/netcdf-4.3
  --includedir-> /users/home/opt/netcdf/netcdf-4.3/include
  --version   -> netCDF 4.3.0

Any hint?

Thanks very much
Stefano
Loading...