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

app/cdi.c: added datamode

parent 9be178d3
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ static int DefaultByteorder = CDI_UNDEFID;
static int comptype = COMPRESS_NONE; // Compression type
static int complevel = 0; // Compression level
enum datamode {SP_MODE, DP_MODE};
static int datamode = DP_MODE;
static
void version(void)
......@@ -749,7 +751,7 @@ int main(int argc, char *argv[])
if (Progname == 0) Progname = argv[0];
else Progname++;
while ( (c = getopt(argc, argv, "b:f:t:w:z:cdhlMmqRrsvVZ")) != EOF )
while ( (c = getopt(argc, argv, "b:f:t:w:z:cdhlMmqRrsvVxZ")) != EOF )
{
switch (c)
{
......@@ -798,6 +800,9 @@ int main(int argc, char *argv[])
case 'w':
wTable = optarg;
break;
case 'x':
datamode = SP_MODE;
break;
case 'z':
defineCompress(optarg);
break;
......@@ -925,8 +930,7 @@ int main(int argc, char *argv[])
nts = cdiInqTimeSize(streamID1);
*/
if (Debug)
printf("nts = %d\n"
"streamID1 = %d, streamID2 = %d\n",
printf("nts = %d streamID1 = %d, streamID2 = %d\n",
nts, streamID1, streamID2);
if ( Shortinfo )
......
......@@ -50,7 +50,7 @@ int main(void)
vlistDefTaxis(vlistID, taxisID);
// Create a dataset in netCDF format
streamID = streamOpenWrite("example_f.grb", FILETYPE_GRB);
streamID = streamOpenWrite("example_f.nc", FILETYPE_NC);
if ( streamID < 0 )
{
fprintf(stderr, "%s\n", cdiStringError(streamID));
......
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