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

📄 netcdf.3

📁 一个用来实现偏微分方程中网格的计算库
💻 3
📖 第 1 页 / 共 4 页
字号:
.HP\fBint nc_put_vars_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], const double \fIout\fP[])\fR.sp(Corresponds to \fBncvarputg(\|)\fR in version 2).spThese functions are used for \fIstrided output\fP, which is like thearray section output described above, except thatthe sampling stride (the interval between accessed values) isspecified for each dimension.For an explanation of the sampling stridevector, see COMMON ARGUMENTS DESCRIPTIONS below..HP\fBint nc_get_vars_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], char \fIin\fP[])\fR.HP\fBint nc_get_vars_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], unsigned char \fIin\fP[])\fR.HP\fBint nc_get_vars_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], signed char \fIin\fP[])\fR.HP\fBint nc_get_vars_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], short \fIin\fP[])\fR.HP\fBint nc_get_vars_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], int \fIin\fP[])\fR.HP\fBint nc_get_vars_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], long \fIin\fP[])\fR.HP\fBint nc_get_vars_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], float \fIin\fP[])\fR.HP\fBint nc_get_vars_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], double \fIin\fP[])\fR.sp(Corresponds to \fBncvargetg(\|)\fR in version 2).spThese functions are used for \fIstrided input\fP, which is like thearray section input described above, except that the sampling stride (the interval between accessed values) isspecified for each dimension.For an explanation of the sampling stridevector, see COMMON ARGUMENTS DESCRIPTIONS below..HP\fBint nc_put_varm_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const char \fIout\fP[])\fR.HP\fBint nc_put_varm_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const unsigned char \fIout\fP[])\fR.HP\fBint nc_put_varm_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const signed char \fIout\fP[])\fR.HP\fBint nc_put_varm_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const short \fIout\fP[])\fR.HP\fBint nc_put_varm_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const int \fIout\fP[])\fR.HP\fBint nc_put_varm_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const long \fIout\fP[])\fR.HP\fBint nc_put_varm_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const float \fIout\fP[])\fR.HP\fBint nc_put_varm_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, const double \fIout\fP[])\fR.sp(Corresponds to \fBncvarputg(\|)\fR in version 2).spThese functions are used for \fImapped output\fP, which is likestrided output described above, except that an additional index mappingvector is provided to specify the in-memory arrangement of the datavalues.For an explanation of the indexmapping vector, see COMMON ARGUMENTS DESCRIPTIONS below..HP\fBint nc_get_varm_text(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, char \fIin\fP[])\fR.HP\fBint nc_get_varm_uchar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, unsigned char \fIin\fP[])\fR.HP\fBint nc_get_varm_schar(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, signed char \fIin\fP[])\fR.HP\fBint nc_get_varm_short(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, short \fIin\fP[])\fR.HP\fBint nc_get_varm_int(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, int \fIin\fP[])\fR.HP\fBint nc_get_varm_long(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, long \fIin\fP[])\fR.HP\fBint nc_get_varm_float(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, float \fIin\fP[])\fR.HP\fBint nc_get_varm_double(int \fIncid\fP, int \fIvarid\fP, const size_t \fIstart\fP[], const size_t \fIcount\fP[], const size_t \fIstride\fP[], \fIimap\fP, double \fIin\fP[])\fR.sp(Corresponds to \fBncvargetg(\|)\fR in version 2).spThese functions are used for \fImapped input\fP, which is likestrided input described above, except that an additional index mappingvector is provided to specify the in-memory arrangement of the datavalues.For an explanation of the indexmapping vector, see COMMON ARGUMENTS DESCRIPTIONS below..HP\fBint nc_put_att_text(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const char \fIout\fP[])\fR.HP\fBint nc_put_att_uchar(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const unsigned char \fIout\fP[])\fR.HP\fBint nc_put_att_schar(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const signed char \fIout\fP[])\fR.HP\fBint nc_put_att_short(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const short \fIout\fP[])\fR.HP\fBint nc_put_att_int(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const int \fIout\fP[])\fR.HP\fBint nc_put_att_long(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const long \fIout\fP[])\fR.HP\fBint nc_put_att_float(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const float \fIout\fP[])\fR.HP\fBint nc_put_att_double(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type \fIxtype\fP, size_t \fIlen\fP, const double \fIout\fP[])\fR.sp(Replace \fBncattput(\|)\fR in version 2).spUnlike variables, attributes do not have separate functions for defining and writing values.This family of functions defines a new attribute with a value or changesthe value of an existing attribute.If the attribute is new, or if the space required tostore the attribute value is greater than before,the netCDF dataset must be in define mode.The parameter \fIlen\fP is the number of values from \fIout\fP to transfer.It is often one, except that for\fBnc_put_att_text(\|)\fR it will usually be\fBstrlen(\fIout\fP)\fR..spFor these functions, the type component of the function name refers tothe in-memory type of the value, whereas the \fIxtype\fP argument refers to theexternal type for storing the value.  An \fBNC_ERANGE\fRerror results ifa conversion between these types is not possible.  In this case the valueis represented with the appropriate fill-value for the associated external type..HP\fBint nc_inq_attname(int \fIncid\fP, int \fIvarid\fP, int \fIattnum\fP, char \fIname\fP[])\fR.sp(Corresponds to \fBncattname(\|)\fR in version 2).spGets thename of an attribute, given its variable ID and attribute number.This function is useful in generic applications thatneed to get the names of all the attributes associated with a variable,since attributes are accessed by name rather than number in all otherattribute functions.  The number of an attribute is more volatile thanthe name, since it can change when other attributes of the same variableare deleted.  The attributes for each variable are numberedfrom 0 (the first attribute) to\fInvatts\fP-1,where \fInvatts\fP isthe number of attributes for the variable, as returned from a call to\fBnc_inq_varnatts(\|)\fR.If the \fIname\fP parameter is a \fBNULL\fR pointer, no name will bereturned and no space need be allocated..HP\fBint nc_inq_att(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type* \fIxtype\fP, size_t* \fIlen\fP)\fR.HP\fBint nc_inq_attid(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], int* \fIattnum\fP)\fR.HP\fBint nc_inq_atttype(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], nc_type* \fIxtype\fP)\fR.HP\fBint nc_inq_attlen(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], size_t* \fIlen\fP)\fR.sp(Corresponds to \fBncattinq(\|)\fR in version 2).spThese functions return information about a netCDF attribute,given its variable ID and name.  The information returned is theexternal type in \fIxtype\fPand the number of elements in the attribute as \fIlen\fP.If any of the return arguments is a \fBNULL\fR pointer,the specified information will not be returned..HP\fBint nc_copy_att(int \fIncid\fP, int \fIvarid_in\fP, const char \fIname\fP[], int \fIncid_out\fP, int \fIvarid_out\fP)\fR.sp(Corresponds to \fBncattcopy(\|)\fR in version 2).spCopies anattribute from one netCDF dataset to another.  It can also be used tocopy an attribute from one variable to another within the same netCDF.\fIncid_in\fP is the netCDF ID of an input netCDF dataset from which theattribute will be copied.\fIvarid_in\fPis the ID of the variable in the input netCDF dataset from which theattribute will be copied, or \fBNC_GLOBAL\fRfor a global attribute.\fIname\fPis the name of the attribute in the input netCDF dataset to be copied.\fIncid_out\fPis the netCDF ID of the output netCDF dataset to which the attribute will be copied.It is permissible for the input and output netCDF ID's to be the same.  Theoutput netCDF dataset should be in define mode if the attribute to becopied does not already exist for the target variable, or if it wouldcause an existing target attribute to grow.\fIvarid_out\fPis the ID of the variable in the output netCDF dataset to which the attribute willbe copied, or \fBNC_GLOBAL\fR to copy to a global attribute..HP\fBint nc_rename_att(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], const char \fInewname\fP[])\fR.sp(Corresponds to \fBncattrename(\|)\fR.spChanges thename of an attribute.  If the new name is longer than the original name,the netCDF must be in define mode.  You cannot rename an attribute tohave the same name as another attribute of the same variable.\fIname\fP is the original attribute name.\fInewname\fPis the new name to be assigned to the specified attribute.  If the new nameis longer than the old name, the netCDF dataset must be in define mode..HP\fBint nc_del_att(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[])\fR.sp(Corresponds to \fBncattdel(\|)\fR in version 2).spDeletes an attribute from a netCDF dataset.  The dataset must be indefine mode..HP\fBint nc_get_att_text(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], char \fIin\fP[])\fR.HP\fBint nc_get_att_uchar(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], unsigned char \fIin\fP[])\fR.HP\fBint nc_get_att_schar(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], signed char \fIin\fP[])\fR.HP\fBint nc_get_att_short(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], short \fIin\fP[])\fR.HP\fBint nc_get_att_int(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], int \fIin\fP[])\fR.HP\fBint nc_get_att_long(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], long \fIin\fP[])\fR.HP\fBint nc_get_att_float(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], float \fIin\fP[])\fR.HP\fBint nc_get_att_double(int \fIncid\fP, int \fIvarid\fP, const char \fIname\fP[], double \fIin\fP[])\fR.sp(Replace \fBncattget(\|)\fR in version 2).spGets the value(s) of a netCDF attribute, given itsvariable ID and name.  Converts from the external type to the typespecified inthe function name, if possible, otherwise returns an \fBNC_ERANGE\fRerror.All elements of the vector of attributevalues are returned, so you must allocate enough space to holdthem.  If you don't know how much space to reserve, call\fBnc_inq_attlen(\|)\fRfirst to find out the length of the attribute..SH "COMMON ARGUMENT DESCRIPTIONS".LPIn this section we define some common arguments which are used in the "FUNCTION DESCRIPTIONS" section..TPint \fIncid\fPis the netCDF ID returned from a previous, successful call to\fBnc_open(\|)\fR or \fBnc_create(\|)\fR.TPchar \fIname\fP[]is the name of a dimension, variable, or attribute. The names of dimensions, variables and attributes consist of arbitrarysequences of alphanumeric characters (as well as underscore '_',period '.' and hyphen '-'), beginning with a letter orunderscore. (However names commencing with underscore are reserved forsystem use.) Case is significant in netCDF names. A zero-length nameis not allowed.As an input argument, it shall be a pointer to a 0-terminated string; as an output argument, it shall be the address of a buffer in which to hold such a string.The maximum allowable number of characters (excluding the terminating 0) is \fBNC_MAX_NAME\fR..TPnc_type \fIxtype\fPspecifies the external data type of a netCDF variable or attribute andis one of the following:\fBNC_BYTE\fR, \fBNC_CHAR\fR, \fBNC_SHORT\fR, \fBNC_INT\fR, \fBNC_FLOAT\fR, or \fBNC_DOUBLE\fR.These are used to specify 8-bit integers,characters, 16-bit integers, 32-bit integers, 32-bit IEEE floating pointnumbers, and 64-bit IEEE floating-point numbers, respectively.

⌨️ 快捷键说明

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