Skip to content
Snippets Groups Projects
Commit e072c9f3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge of branch cdo-pio into trunk cdi

parent 593ff7d8
No related branches found
No related tags found
No related merge requests found
......@@ -61,10 +61,10 @@ void cdfDebug(int debug)
Message("debug level %d", debug);
}
#if defined (HAVE_LIBNETCDF)
static
void cdfComment(int ncid)
{
#if defined (HAVE_LIBNETCDF)
static char comment[256] = "Climate Data Interface version ";
static int init = 0;
char *blank;
......@@ -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, "Conventions", 6, "CF-1.4");
#endif
}
#endif
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;
case 'w':
#if defined (NC_64BIT_OFFSET)
if ( *filetype == FILETYPE_NC2 ) writemode = NC_CLOBBER | NC_64BIT_OFFSET;
if ( *filetype == FILETYPE_NC2 ) writemode |= NC_64BIT_OFFSET;
#endif
#if defined (HAVE_NETCDF4)
if ( *filetype == FILETYPE_NC4 ) writemode = NC_CLOBBER | NC_NETCDF4;
else if ( *filetype == FILETYPE_NC4C ) writemode = NC_CLOBBER | NC_NETCDF4 | NC_CLASSIC_MODEL;
if ( *filetype == FILETYPE_NC4 ) writemode |= NC_NETCDF4;
else if ( *filetype == FILETYPE_NC4C ) writemode |= NC_NETCDF4 | NC_CLASSIC_MODEL;
#endif
cdf_create(filename, writemode, &ncid);
cdfComment(ncid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment