Commit 4ba36f19 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added function cdf_put_att_float()

parent 2b37b2c4
...@@ -721,6 +721,20 @@ void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, ...@@ -721,6 +721,20 @@ void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype,
} }
void cdf_put_att_float(int ncid, int varid, const char *name, nc_type xtype,
size_t len, const float *dp)
{
int status;
status = nc_put_att_float(ncid, varid, name, xtype, len, dp);
if ( CDF_Debug || status != NC_NOERR )
Message("ncid = %d varid = %d att = %s val = %g", ncid, varid, name, *dp);
if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
}
void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype,
size_t len, const double *dp) size_t len, const double *dp)
{ {
......
...@@ -68,6 +68,7 @@ void cdf_put_vara_float(int ncid, int varid, const size_t start[], const size_t ...@@ -68,6 +68,7 @@ void cdf_put_vara_float(int ncid, int varid, const size_t start[], const size_t
void cdf_put_att_text(int ncid, int varid, const char *name, size_t len, const char *tp); void cdf_put_att_text(int ncid, int varid, const char *name, size_t len, const char *tp);
void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_t len, const int *ip); void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_t len, const int *ip);
void cdf_put_att_float(int ncid, int varid, const char *name, nc_type xtype, size_t len, const float *dp);
void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, size_t len, const double *dp); void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, size_t len, const double *dp);
void cdf_get_att_string(int ncid, int varid, const char *name, char **tp); void cdf_get_att_string(int ncid, int varid, const char *name, char **tp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment