⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netcdf.3

📁 一个用来实现偏微分方程中网格的计算库
💻 3
📖 第 1 页 / 共 4 页
字号:
.spUse these functions to find out what is in a netCDF dataset.Upon successful return,\fIndims\fP will contain  thenumber of dimensions defined for this netCDF dataset,\fInvars\fP will contain the number of variables,\fInatts\fP will contain the number of attributes, and\fIunlimdimid\fP will contain thedimension ID of the unlimited dimension if one exists, or-1 otherwise.\fIformatn\fP will contain the version number of the dataset <>, one of\fBNC_FORMAT_CLASSIC\fR, \fBNC_FORMAT_64BIT\fR, \fBNC_FORMAT_NETCDF4\fR, or\fBNC_FORMAT_NETCDF4_CLASSIC\fR.If any of thereturn parameters is a \fBNULL\fR pointer, then the corresponding informationwill not be returned; hence, no space need be allocated for it..HP\fBint nc_def_dim(int \fIncid\fP, const char \fIname\fP[], size_t \fIlen\fP, int* \fIdimid\fP)\fR.sp(Corresponds to \fBncdimdef(\|)\fR in version 2).spAdds a new dimension to an open netCDF dataset, which must be in define mode.\fIname\fP is the dimension name.If \fIdimid\fP is not a \fBNULL\fR pointer then upon successful completion \fIdimid\fP will contain the dimension ID of the newly created dimension..HP\fBint nc_inq_dimid(int \fIncid\fP, const char \fIname\fP[], int* \fIdimid\fP)\fR.sp(Corresponds to \fBncdimid(\|)\fR in version 2).spGiven a dimension name, returns the ID of a netCDF dimension in \fIdimid\fP..HP\fBint nc_inq_dim(int \fIncid\fP, int \fIdimid\fP, char \fIname\fP[], size_t* \fIlen\fP)\fR.HP\fBint nc_inq_dimname(int \fIncid\fP, int \fIdimid\fP, char \fIname\fP[])\fR.HP\fBint nc_inq_dimlen(int \fIncid\fP, int \fIdimid\fP, size_t* \fIlen\fP)\fR.sp(Replace \fBncdiminq(\|)\fR in version 2).spUse these functions to find out about a dimension.If either the \fIname\fPargument or \fIlen\fP argument is a \fBNULL\fR pointer, thenthe associated information will not be returned.  Otherwise,\fIname\fP should be  big enough (\fBNC_MAX_NAME\fR)to hold the dimension name as the name will be copied into your storage.The length return parameter, \fIlen\fPwill contain the size of the dimension.For the unlimited dimension, the returned length is the currentmaximum value used for writing into any of the variables which usethe dimension..HP\fBint nc_rename_dim(int \fIncid\fP, int \fIdimid\fP, const char \fIname\fP[])\fR.sp(Corresponds to \fBncdimrename(\|)\fR in version 2).spRenames an existing dimension in an open netCDF dataset.If the new name is longer than the old name, the netCDF dataset must be in define mode.You cannot rename a dimension to have the same name as another dimension..HP\fBint nc_def_var(int \fIncid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, int \fIndims\fP, const int \fIdimids\fP[], int* \fIvarid\fP)\fR.sp(Corresponds to \fBncvardef(\|)\fR in version 2).spAdds a new variable to a netCDF dataset. The netCDF must be in define mode.If not \fBNULL\fR, then \fIvarid\fP will be set to the netCDF variable ID..HP\fBint nc_inq_varid(int \fIncid\fP, const char \fIname\fP[], int* \fIvarid\fP)\fR.sp(Corresponds to \fBncvarid(\|)\fR in version 2).spReturns the ID of a netCDF variable in \fIvarid\fP given its name..HP\fBint nc_inq_var(int \fIncid\fP, int \fIvarid\fP, char \fIname\fP[], nc_type* \fIxtype\fP, int* \fIndims\fP, int \fIdimids\fP[],int* \fInatts\fP)\fR.HP\fBint nc_inq_varname(int \fIncid\fP, int \fIvarid\fP, char \fIname\fP[])\fR.HP\fBint nc_inq_vartype(int \fIncid\fP, int \fIvarid\fP, nc_type* \fIxtype\fP)\fR.HP\fBint nc_inq_varndims(int \fIncid\fP, int \fIvarid\fP, int* \fIndims\fP)\fR.HP\fBint nc_inq_vardimid(int \fIncid\fP, int \fIvarid\fP, int \fIdimids\fP[])\fR.HP\fBint nc_inq_varnatts(int \fIncid\fP, int \fIvarid\fP, int* \fInatts\fP)\fR.sp(Replace \fBncvarinq(\|)\fR in version 2).spReturns information about a netCDF variable, given its ID.If any of thereturn parameters (\fIname\fP, \fIxtype\fP, \fIndims\fP, \fIdimids\fP, or\fInatts\fP) is a \fBNULL\fR pointer, then the corresponding informationwill not be returned; hence, no space need be allocated for it..HP\fBint nc_rename_var(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[])\fR.sp(Corresponds to \fBncvarrename(\|)\fR in version 2).spChanges the name of a netCDF variable.If the new name is longer than the old name, the netCDF must be in define mode.You cannot rename a variable to have the name of any existing variable..HP\fBint nc_put_var_text(int \fIncid\fP, int \fIvarid\fP, const char \fIout\fP[])\fR.HP\fBint nc_put_var_uchar(int \fIncid\fP, int \fIvarid\fP, const unsigned char \fIout\fP[])\fR.HP\fBint nc_put_var_schar(int \fIncid\fP, int \fIvarid\fP, const signed char \fIout\fP[])\fR.HP\fBint nc_put_var_short(int \fIncid\fP, int \fIvarid\fP, const short \fIout\fP[])\fR.HP\fBint nc_put_var_int(int \fIncid\fP, int \fIvarid\fP, const int \fIout\fP[])\fR.HP\fBint nc_put_var_long(int \fIncid\fP, int \fIvarid\fP, const long \fIout\fP[])\fR.HP\fBint nc_put_var_float(int \fIncid\fP, int \fIvarid\fP, const float \fIout\fP[])\fR.HP\fBint nc_put_var_double(int \fIncid\fP, int \fIvarid\fP, const double \fIout\fP[])\fR.sp(Replace \fBncvarput(\|)\fR in version 2).spWrites an entire netCDF variable (i.e. all the values).  The netCDFdataset must be open and in data mode.  The type of the data isspecified in the function name, and it is converted to the externaltype of the specified variable, if possible, otherwise an\fBNC_ERANGE\fR error is returned. Note that rounding is not performedduring the conversion. Floating point numbers are truncated whenconverted to integers..HP\fBint nc_get_var_text(int \fIncid\fP, int \fIvarid\fP, char \fIin\fP[])\fR.HP\fBint nc_get_var_uchar(int \fIncid\fP, int \fIvarid\fP, unsigned char \fIin\fP[])\fR.HP\fBint nc_get_var_schar(int \fIncid\fP, int \fIvarid\fP, signed char \fIin\fP[])\fR.HP\fBint nc_get_var_short(int \fIncid\fP, int \fIvarid\fP, short \fIin\fP[])\fR.HP\fBint nc_get_var_int(int \fIncid\fP, int \fIvarid\fP, int \fIin\fP[])\fR.HP\fBint nc_get_var_long(int \fIncid\fP, int \fIvarid\fP, long \fIin\fP[])\fR.HP\fBint nc_get_var_float(int \fIncid\fP, int \fIvarid\fP, float \fIin\fP[])\fR.HP\fBint nc_get_var_double(int \fIncid\fP, int \fIvarid\fP, double \fIin\fP[])\fR.sp(Replace \fBncvarget(\|)\fR in version 2).spReads an entire netCDF variable (i.e. all the values).The netCDF dataset must be open and in data mode.  The data is converted from the external type of the specified variable,if necessary, to the type specified in the function name.  If conversion isnot possible, an \fBNC_ERANGE\fR error is returned..HP\fBint nc_put_var1_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], char \fI*out\fP)\fR.HP\fBint nc_put_var1_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], unsigned char \fI*out\fP)\fR.HP\fBint nc_put_var1_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], signed char \fI*out\fP)\fR.HP\fBint nc_put_var1_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], short \fI*out\fP)\fR.HP\fBint nc_put_var1_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], int \fI*out\fP)\fR.HP\fBint nc_put_var1_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], long \fI*out\fP)\fR.HP\fBint nc_put_var1_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], float \fI*out\fP)\fR.HP\fBint nc_put_var1_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], double \fI*out\fP)\fR.sp(Replace \fBncvarput1(\|)\fR in version 2).spPuts a single data value into a variable at the position \fIindex\fP of anopen netCDF dataset that is in data mode.  The type of the data isspecified in the function name, and it is converted to the external typeof the specified variable, if possible, otherwise an \fBNC_ERANGE\fRerror is returned..HP\fBint nc_get_var1_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], char* \fIin\fP)\fR.HP\fBint nc_get_var1_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], unsigned char* \fIin\fP)\fR.HP\fBint nc_get_var1_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], signed char* \fIin\fP)\fR.HP\fBint nc_get_var1_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], short* \fIin\fP)\fR.HP\fBint nc_get_var1_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], int* \fIin\fP)\fR.HP\fBint nc_get_var1_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], long* \fIin\fP)\fR.HP\fBint nc_get_var1_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], float* \fIin\fP)\fR.HP\fBint nc_get_var1_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIindex\fP[], double* \fIin\fP)\fR.sp(Replace \fBncvarget1(\|)\fR in version 2).spGets a single data value from a variable at the position \fIindex\fPof an open netCDF dataset that is in data mode.  The data is converted from the external type of the specified variable,if necessary, to the type specified in the function name.  If conversion isnot possible, an \fBNC_ERANGE\fR error is returned..HP\fBint nc_put_vara_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const char \fIout\fP[])\fR.HP\fBint nc_put_vara_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const unsigned char \fIout\fP[])\fR.HP\fBint nc_put_vara_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const signed char \fIout\fP[])\fR.HP\fBint nc_put_vara_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const short \fIout\fP[])\fR.HP\fBint nc_put_vara_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const int \fIout\fP[])\fR.HP\fBint nc_put_vara_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const long \fIout\fP[])\fR.HP\fBint nc_put_vara_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const float \fIout\fP[])\fR.HP\fBint nc_put_vara_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const double \fIout\fP[])\fR.sp(Replace \fBncvarput(\|)\fR in version 2).spWrites an array section of values into a netCDF variable of an opennetCDF dataset, which must be in data mode.  The array section is specifiedby the \fIstart\fP and \fIcount\fP vectors, which give the starting indexand count of values along each dimension of the specified variable.The type of the data isspecified in the function name and is converted to the external typeof the specified variable, if possible, otherwise an \fBNC_ERANGE\fRerror is returned..HP\fBint nc_get_vara_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], char \fIin\fP[])\fR.HP\fBint nc_get_vara_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], unsigned char \fIin\fP[])\fR.HP\fBint nc_get_vara_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], signed char \fIin\fP[])\fR.HP\fBint nc_get_vara_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], short \fIin\fP[])\fR.HP\fBint nc_get_vara_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], int \fIin\fP[])\fR.HP\fBint nc_get_vara_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], long \fIin\fP[])\fR.HP\fBint nc_get_vara_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], float \fIin\fP[])\fR.HP\fBint nc_get_vara_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], double \fIin\fP[])\fR.sp(Corresponds to \fBncvarget(\|)\fR in version 2).spReads an array section of values from a netCDF variable of an opennetCDF dataset, which must be in data mode.  The array section is specifiedby the \fIstart\fP and \fIcount\fP vectors, which give the starting indexand count of values along each dimension of the specified variable.The data is converted from the external type of the specified variable,if necessary, to the type specified in the function name.  If conversion isnot possible, an \fBNC_ERANGE\fR error is returned..HP\fBint nc_put_vars_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const char \fIout\fP[])\fR.HP\fBint nc_put_vars_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const unsigned char \fIout\fP[])\fR.HP\fBint nc_put_vars_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const signed char \fIout\fP[])\fR.HP\fBint nc_put_vars_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const short \fIout\fP[])\fR.HP\fBint nc_put_vars_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const int \fIout\fP[])\fR.HP\fBint nc_put_vars_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const long \fIout\fP[])\fR.HP\fBint nc_put_vars_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const float \fIout\fP[])\fR

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -