Commit e072c9f3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge of branch cdo-pio into trunk cdi

parent 593ff7d8
...@@ -61,10 +61,10 @@ void cdfDebug(int debug) ...@@ -61,10 +61,10 @@ void cdfDebug(int debug)
Message("debug level %d", debug); Message("debug level %d", debug);
} }
#if defined (HAVE_LIBNETCDF)
static static
void cdfComment(int ncid) void cdfComment(int ncid)
{ {
#if defined (HAVE_LIBNETCDF)
static char comment[256] = "Climate Data Interface version "; static char comment[256] = "Climate Data Interface version ";
static int init = 0; static int init = 0;
char *blank; char *blank;
...@@ -85,9 +85,8 @@ void cdfComment(int ncid) ...@@ -85,9 +85,8 @@ void cdfComment(int ncid)
cdf_put_att_text(ncid, NC_GLOBAL, "CDI", strlen(comment), comment); cdf_put_att_text(ncid, NC_GLOBAL, "CDI", strlen(comment), comment);
cdf_put_att_text(ncid, NC_GLOBAL, "Conventions", 6, "CF-1.4"); cdf_put_att_text(ncid, NC_GLOBAL, "Conventions", 6, "CF-1.4");
#endif
} }
#endif
int cdfOpenFile(const char *filename, const char *mode, int *filetype) int cdfOpenFile(const char *filename, const char *mode, int *filetype)
{ {
...@@ -121,11 +120,11 @@ int cdfOpenFile(const char *filename, const char *mode, int *filetype) ...@@ -121,11 +120,11 @@ int cdfOpenFile(const char *filename, const char *mode, int *filetype)
break; break;
case 'w': case 'w':
#if defined (NC_64BIT_OFFSET) #if defined (NC_64BIT_OFFSET)
if ( *filetype == FILETYPE_NC2 ) writemode = NC_CLOBBER | NC_64BIT_OFFSET; if ( *filetype == FILETYPE_NC2 ) writemode |= NC_64BIT_OFFSET;
#endif #endif
#if defined (HAVE_NETCDF4) #if defined (HAVE_NETCDF4)
if ( *filetype == FILETYPE_NC4 ) writemode = NC_CLOBBER | NC_NETCDF4; if ( *filetype == FILETYPE_NC4 ) writemode |= NC_NETCDF4;
else if ( *filetype == FILETYPE_NC4C ) writemode = NC_CLOBBER | NC_NETCDF4 | NC_CLASSIC_MODEL; else if ( *filetype == FILETYPE_NC4C ) writemode |= NC_NETCDF4 | NC_CLASSIC_MODEL;
#endif #endif
cdf_create(filename, writemode, &ncid); cdf_create(filename, writemode, &ncid);
cdfComment(ncid); cdfComment(ncid);
......
Supports Markdown
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