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

netcdf input: correct wrong formatted time units

parent 15f6915a
2011-07-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netcdf input: correct wrong formatted time units [request: Harald Anlauf]
2011-07-14 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netcdf: added support for GRID_FOURIER (fourier coefficients)
......
......@@ -249,14 +249,13 @@ void printGridInfo(int vlistID)
}
else if ( gridtype == GRID_SPECTRAL )
{
fprintf(stdout, "size : dim = %d truncation = %d nsp = %d\n",
gridsize, trunc, gridsize/2);
fprintf(stdout, "size : dim = %d nsp = %d truncation = %d\n", gridsize, gridsize/2, trunc);
fprintf(stdout, "%*s", nbyte0, "");
fprintf(stdout, " complexPacking = %d\n", gridInqComplexPacking(gridID));
}
else if ( gridtype == GRID_FOURIER )
{
fprintf(stdout, "size : dim = %d nfc = %d\n", gridsize, gridsize/2);
fprintf(stdout, "size : dim = %d nfc = %d truncation = %d\n", gridsize, gridsize/2, trunc);
}
else if ( gridtype == GRID_GME )
{
......
......@@ -230,14 +230,20 @@ int splitBasetime(const char *timeunits, taxis_t *taxis)
}
else if ( timetype == TAXIS_RELATIVE )
{
year = atoi(ptu);
if ( year < 0 ) ptu++;
int v1, v2, v3;
v1 = atoi(ptu);
if ( v1 < 0 ) ptu++;
while ( isdigit((int) *ptu) ) ptu++;
month = atoi(++ptu);
v2 = atoi(++ptu);
while ( isdigit((int) *ptu) ) ptu++;
day = atoi(++ptu);
v3 = atoi(++ptu);
while ( isdigit((int) *ptu) ) ptu++;
if ( v3 > 999 && v1 < 32 )
{ year = v3; month = v2; day = v1; }
else
{ year = v1; month = v2; day = v3; }
while ( isspace((int) *ptu) ) ptu++;
if ( *ptu )
......
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