help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave & netcdf


From: Clinton Winant
Subject: Re: octave & netcdf
Date: Mon, 30 Nov 2015 19:53:07 -0800

Hi Dmitri, thanks so much for the prompt answer.  I hope I can return the favor some day

address@hidden:/HOME/cdw/Roms/octave/CDW/IC$ ls -la
total 4232
drwxrwxr-x 2 cdw cdw    4096 Nov 30 19:09 .
drwxrwxr-x 4 cdw cdw    4096 Nov 30 15:50 ..
-rw-rw-r-- 1 cdw cdw   20976 Nov 30 18:34 cdw_initial.m
-rw-rw-r-- 1 cdw cdw    1359 Nov 30 18:11 cdw_initial.m~
-rw-rw-r-- 1 cdw cdw   20824 Nov 30 15:57 c_initial.m
-rw-rw-r-- 1 cdw cdw    1378 Nov 30 19:07 example.m
-rw-rw-r-- 1 cdw cdw    9447 Nov 30 16:00 IC_init.m
-rw-rw-r-- 1 cdw cdw    9447 Nov 30 08:19 IC_init.m~
-rw-rw-r-- 1 cdw cdw    8049 Nov 30 17:53 set_depth.m
-rw-rw-r-- 1 cdw cdw 4231312 Nov 30 19:09 test.nc


On Mon, Nov 30, 2015 at 7:46 PM, Dmitri A. Sergatskov <address@hidden> wrote:
On Mon, Nov 30, 2015 at 9:15 PM, Clinton Winant <address@hidden> wrote:
After installing netcdf package in octave and making sure that test_netcdf gives all "OK" answers, I have tried to check out the example Alex gives in:
http://modb.oce.ulg.ac.be/mediawiki/index.php/Write_a_slice_at_a_time_in_a_NetCDF_file

The script does generate a test.nc file (attached), but :

address@hidden:/HOME/cdw/Roms/octave/CDW/IC$ ncdump -v time -t test.nc
ncdump: test.nc: NetCDF: Unknown file format

Any suggestions would be much appreciated.

​This test works for me:

​ ncdump -v time -t test.nc
netcdf test {
dimensions:
    lon = 10 ;
    lat = 10 ;
    time = UNLIMITED ; // (31 currently)
variables:
    double temperature(time, lat, lon) ;
    double time(time) ;
        time:units = "days since 2000-01-01 00:00:00" ;
data:

 time = "2014-01-01", "2014-01-02", "2014-01-03", "2014-01-04", "2014-01-05",
    "2014-01-06", "2014-01-07", "2014-01-08", "2014-01-09", "2014-01-10",
    "2014-01-11", "2014-01-12", "2014-01-13", "2014-01-14", "2014-01-15",
    "2014-01-16", "2014-01-17", "2014-01-18", "2014-01-19", "2014-01-20",
    "2014-01-21", "2014-01-22", "2014-01-23", "2014-01-24", "2014-01-25",
    "2014-01-26", "2014-01-27", "2014-01-28", "2014-01-29", "2014-01-30",
    "2014-01-31" ;
}

The size of the file is 4.1 MB, so I am reluctant sending it to the mailing list.
How big is your test.nc?

May be it was some kind of cut-n-paste error.
If you cat-n-paste the code from the web page directly to the octave prompt,
try to make a test script instead (and run it).

Sincerely,

Dmitri.
--








Attachment: example.m
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]