Redian新闻
>
how to assign values to NETCDF file?
avatar
how to assign values to NETCDF file?# Computation - 科学计算
r*e
1
I am just start to learn use netcdf file.
I am wondering if anyone know how to assign a data value to a variable in
netcdf file.
Here is my matlab program
self=netcdf('test.cdf','clobber'); % THIS IS TO OPEN A netcdf FILE
self.myGlobalAttribute =ncchar('test') % ASSIGN A GLOBAL ATTRIBUTE
self('myRecordDimension')=1 % DEDFINE RECORD DEMINSION
r = self('myRecordDimension')
self('myDimension') = 40 % DEFINE VARIABLE DIMENSION
d=self('myDimension')
self{'myVariable'} = nc
avatar
l*s
2

actually,I got acquainted with NETCDF using c/fortran77,
in http://www.unidat.ucar.edu
there are lot of information about netcdf,
current version of netcdf is 3.5.0 or 3.5.1 maybe,
of course,there are netcdf for fortran90 and java,or perl,python,ruby,a
nd matlab
in my opinion, you'd better to begin with c, it's most compact, very easy to
understand.
hope it would make any sense.

【在 r**********e 的大作中提到】
: I am just start to learn use netcdf file.
: I am wondering if anyone know how to assign a data value to a variable in
: netcdf file.
: Here is my matlab program
: self=netcdf('test.cdf','clobber'); % THIS IS TO OPEN A netcdf FILE
: self.myGlobalAttribute =ncchar('test') % ASSIGN A GLOBAL ATTRIBUTE
: self('myRecordDimension')=1 % DEDFINE RECORD DEMINSION
: r = self('myRecordDimension')
: self('myDimension') = 40 % DEFINE VARIABLE DIMENSION
: d=self('myDimension')

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。