Hi everyone,
There is a function in Matlab's netcdf toolbox, called "parent" which returns
the parent netcdf object. Is the any way I can get the functionality in Octcdf?
It's usage is as follows:
cdf=netcdf('example.nc');
Par=parent(cdf('longitude'))
close(cdf);
which returns:
NetCDF
Hi everyone.
locations = find(logical(good_var));
svar=var{i}(locations);
In the above code, 'logical' converts the elements of the array good_var into
logicals. 'find' returns indices that evaluate to TRUE. So now, locations
contain indices of non-zero elements of good_var.
In the next statem
Hi Alex.
The code given below gives the output (in matlab) as "longitude temp". That is,
"longitude" and "temp" are the variables which depend on the dimension
"longitude".
Could you please make necessary correction to the code below so that I can get
similar output in octave as well.
latitud
Hi Alex.
>From ncdump.m, I learnt how to get the attributes, but I don't know how to
>copy them to another variable.
Could you please show that with an example.
Thanks,
Nands
- Original Message -
From: Alexander Barth
To: n...@itimes.com
Cc: octave-dev
Sent: Sat, 1 May 2010 13:24:43
Hi Stefan.
"bin" is not a file but a dimension on which other variables depend. It is
having 20 elements, from which I want to cutoff 10 elements so that "bin" then
has only 10 elements.
Below is a sample code, showing what function gives what error. Uncomment the
function and you will get the
Hi.
In a netcdf file, I have "bin" as one of the dimensions with length 20
elements. I want to reduce it to 10 elements. With matlab, this can be done
with:
B = nc('bin');
B=resize(B,10);
Could you please tell me, how that can be done in octave/octcdf.
Thanks,
Nands
-
Hi everyone.
The following code creates a netcdf file and then isempty checks if it is
empty. But though it is not empty, it shows the file as empty.
latitude = -90:1:90;
longitude = -179:1:180;
[y,x] = meshgrid(pi/180 * latitude,pi/180 * longitude);
temp = cos(2*x) .* cos(y);
nc = netcdf('exam
Hi all.
Is there any way to copy attributes from one netcdf file to another netcdf file?
Thanks,
Nands
--
___
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://l
Hi all.
There is a function 'var' in matlab's netcdf such that var(self) returns the
list of variables that contribute to self, a composite "ncvar" object.
Is there any such function in Octcdf or is there any alternate way from which I
can get the same functionality as 'var'.
Thanks.
Nands
--
Hi.
I don't know any theory part behind it. The only reason for that suggestion is
that, it makes my code (given below) work.
cdf = netcdf('glo_att.nc','c');
cdf('lon') = 6;
cdf('lat') = 4;
cdf{'var'} = ncchar('lon','lat');
cdf{'var'}.units = 'm';
close(cdf);
Thanks.
Nands
--
Hi.
I think I have got the bug. :)
In octcdf package in ov-ncvar.h instead of
octave_idx_type numel(const octave_value_list&)
{
return dims().numel();
};
it should be
octave_idx_type numel(const octave_value_list&)
{
return 1;
};
Thanks.
Nands
---
Hi.
A small correction to my previous mail. In stead of "nc{'var'}.units = 'm';"
I should have been using "cdf{'var'}.units = 'm';" as in
cdf = netcdf('glo_att.nc','c');
cdf('lon') = 6;
cdf('lat') = 4;
cdf{'var'} = ncchar('lon','lat');
cdf{'var'}.units = 'm';
which gives me (one error instead of
Hi.
I installed octcdf from svn. Now, for "nv.units = 'm';" I get
error: invalid assignment to cs-list outside multiple assignment.
while for "nc{'var'}.units = 'm';" I get
error: a cs-list cannot be further indexed
error: invalid assignment to cs-list outside multiple assignment.
I guess, the er
Dear Sir.
In that case, what is the next step I should take to get rid of the error?
Thanks.
Nands
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively,
Hello Sir.
x = ncchar('lon', 'lat');
creates a netcdf variable of type ncchar, with netcdf dimensions 'lon' and
'lat'.
x.units = 'm';
defines a string attribute (units) of the variable, with value ('m').
Executing these two statements also give the same error:
error: invalid assignment to cs-li
Hi everyone.
Here is the complete code:
cdf = netcdf('glo_att.nc','c');
cdf('lon') = 6;
cdf('lat') = 4;
cdf{'var'} = ncchar('lon','lat');
cdf{'var'}.units = 'm';
ncclose(cdf);
Thanks.
Nands
--
Download Intel® Parallel
Hi everyone.
The statement
nc{'var'}.units = 'm';
was working fine in octave-3.2.3, but with octave-3.3.50+, it gives the
following error:
error: invalid assignment to cs-list outside multiple assignment.
Please help.
Thanks.
Nands
-
Hi all.
For "cdf=ncenddef(cdf)", I get the following error:
error: Error chaning mode: NetCDF: Not a valid data type or _FillValue type
mismatch
What am I supposed to do?
Thanks.
Nands
--
Download Intel® Parallel Stu
Thanks.
Installing libnc-dap-devel helped, but now I get this:
octave:1> pkg install octcdf-1.0.17.tar.gz
Can not uninstall octcdf installed by the redhat package manager
error: called from `on_uninstall' in file
/usr/share/octave/packages/octcdf-1.0.13/packinfo/on_uninstall.m near
line 2, colu
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
To: n...@itimes.com
Cc: octave-dev@lists.so
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'
Hi all.
Please refer the following octave code.
cdf = netcdf('glo_att.nc','c');
date='23-Feb-2010';
cdf.CREATION_DATE = date;
cdf.history = 'netcdf file created in octave';
cdf('lon') = 4;
cdf('lat') = 2;
cdf{'var'} = ncchar('lon','lat');
cdf{'var'}.Time = 'Today';
N=5;
cdf{'var'}.['NOTE_',int2s
Hi everyone.
In Matlab, if the dimension's size is not known the following is used :
mexcdf('DIMDEF',nc,'TIME','NC_UNLIMITED');
I wanted to know, what is the syntax to do the same in octcdf?
nc.('TIME') = ???
Thanks.
Nands
23 matches
Mail list logo