Commit 34e4eab6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added trunction to GRID_FOURIER

parent fcd9ebc2
......@@ -2622,6 +2622,7 @@ int gridGenerate(grid_t grid)
}
case GRID_FOURIER:
{
gridDefTrunc(gridID, grid.trunc);
break;
}
case GRID_GME:
......@@ -3440,9 +3441,9 @@ void gridPrint(int gridID, int opt)
fprintf(fp, "xinc = %g\n", xincm);
fprintf(fp, "yinc = %g\n", yincm);
if ( (projflag & 128) == 0 )
fprintf(fp, "projection= northpole\n");
fprintf(fp, "projection = northpole\n");
else
fprintf(fp, "projection= southpole\n");
fprintf(fp, "projection = southpole\n");
break;
}
......@@ -3454,6 +3455,7 @@ void gridPrint(int gridID, int opt)
}
case GRID_FOURIER:
{
fprintf(fp, "truncation = %d\n", trunc);
break;
}
case GRID_GME:
......
......@@ -2959,7 +2959,7 @@ int cdfDefVar(int streamID, int varID)
cdf_put_att_text(fileID, ncvarid, "cell_measures", len, cellarea);
}
}
else if ( gridtype == GRID_SPECTRAL )
else if ( gridtype == GRID_SPECTRAL || gridtype == GRID_FOURIER )
{
int gridTruncation = gridInqTrunc(gridID);
......@@ -2968,12 +2968,6 @@ int cdfDefVar(int streamID, int varID)
cdf_put_att_text(fileID, ncvarid, "axis", iax, axis);
cdf_put_att_int(fileID, ncvarid, "truncation", NC_INT, 1L, &gridTruncation);
}
else if ( gridtype == GRID_FOURIER )
{
axis[iax++] = '-';
axis[iax++] = '-';
cdf_put_att_text(fileID, ncvarid, "axis", iax, axis);
}
/* if ( xtype == NC_BYTE || xtype == NC_SHORT || xtype == NC_INT ) */
{
......@@ -5087,7 +5081,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
grid.prec = DATATYPE_FLT64;
grid.trunc = ncvars[ncvarid].truncation;
if ( ncvars[ncvarid].gridtype == GRID_TRAJECTORY )
{
if ( ncvars[ncvarid].xvarid == UNDEFID )
......@@ -5113,7 +5107,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
}
if ( ncvars[xvarid].ndims > 2 || ncvars[yvarid].ndims > 2 )
{
{
if ( ncvars[xvarid].ndims == 3 && ncvars[xvarid].dimids[0] == timedimid &&
ncvars[yvarid].ndims == 3 && ncvars[yvarid].dimids[0] == timedimid )
{
......
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