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

changed predefined gaussian grid names from t<RES>grid to n<N>

parent 5bd0acd3
2010-08-03 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* changed predefined gaussian grid names from t<RES>grid to n<N>
2010-08-02 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de> 2010-08-02 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added grid mask support * added grid mask support
......
...@@ -3,6 +3,9 @@ CDO NEWS ...@@ -3,6 +3,9 @@ CDO NEWS
Version 1.4.6 (?? September 2010): Version 1.4.6 (?? September 2010):
New features:
* Changed predefined gaussian grid names from t<RES>grid to n<N>
Use n80 instead of t106grid
New operators: New operators:
* bandpass: Bandpass filtering * bandpass: Bandpass filtering
* lowpass: Lowpass filtering * lowpass: Lowpass filtering
......
...@@ -189,7 +189,7 @@ void usage(void) ...@@ -189,7 +189,7 @@ void usage(void)
fprintf(stderr, " Add L or B to set the byteorder to Little or Big endian\n"); fprintf(stderr, " Add L or B to set the byteorder to Little or Big endian\n");
fprintf(stderr, " -f <format> Format of the output file. (grb, grb2, nc, nc2, nc4, srv, ext or ieg)\n"); fprintf(stderr, " -f <format> Format of the output file. (grb, grb2, nc, nc2, nc4, srv, ext or ieg)\n");
fprintf(stderr, " -g <grid> Set default grid name or file. Available grids: \n"); fprintf(stderr, " -g <grid> Set default grid name or file. Available grids: \n");
fprintf(stderr, " t<RES>grid, t<RES>spec, r<NX>x<NY>, g<NX>x<NY>, gme<NI>, lon=<LON>_lat=<LAT>\n"); fprintf(stderr, " n<N>, t<RES>, tl<RES>, r<NX>x<NY>, g<NX>x<NY>, gme<NI>, lon=<LON>_lat=<LAT>\n");
fprintf(stderr, " -h Help information for the operators\n"); fprintf(stderr, " -h Help information for the operators\n");
/* /*
fprintf(stderr, " -i <inst> Institution name/file\n"); fprintf(stderr, " -i <inst> Institution name/file\n");
......
...@@ -1569,6 +1569,27 @@ int gridFromName(const char *gridname) ...@@ -1569,6 +1569,27 @@ int gridFromName(const char *gridname)
grid.size = (grid.ni+1)*(grid.ni+1)*10; grid.size = (grid.ni+1)*(grid.ni+1)*10;
} }
} }
else if ( gridname[0] == 'n' ) /* n<RES> */
{
pline = &gridname[1];
if ( isdigit((int) *pline) )
{
int n;
n = atoi(pline);
while ( isdigit((int) *pline) ) pline++;
grid.type = GRID_GAUSSIAN;
grid.ysize = n*2;
if ( cmpstr(pline, "zon", len) == 0 )
grid.xsize = 1;
else
grid.xsize = compNlon(grid.ysize);
grid.def_xfirst = TRUE;
grid.def_yfirst = TRUE;
}
}
else if ( gridname[0] == 'g' && isdigit(gridname[1])) /* g<LON>x<LAT> or g<SIZE> */ else if ( gridname[0] == 'g' && isdigit(gridname[1])) /* g<LON>x<LAT> or g<SIZE> */
{ {
pline = &gridname[1]; pline = &gridname[1];
......
...@@ -228,6 +228,7 @@ static void printGridInfo(int vlistID) ...@@ -228,6 +228,7 @@ static void printGridInfo(int vlistID)
fprintf(stdout, "available :"); fprintf(stdout, "available :");
if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds"); if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds"); if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds");
if ( gridInqMask(gridID, NULL) ) fprintf(stdout, " mask");
fprintf(stdout, "\n"); fprintf(stdout, "\n");
} }
...@@ -352,6 +353,7 @@ static void printGridInfo(int vlistID) ...@@ -352,6 +353,7 @@ static void printGridInfo(int vlistID)
if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds"); if ( gridInqXbounds(gridID, NULL) ) fprintf(stdout, " xbounds");
if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds"); if ( gridInqYbounds(gridID, NULL) ) fprintf(stdout, " ybounds");
if ( gridHasArea(gridID) ) fprintf(stdout, " area"); if ( gridHasArea(gridID) ) fprintf(stdout, " area");
if ( gridInqMask(gridID, NULL) ) fprintf(stdout, " mask");
fprintf(stdout, "\n"); fprintf(stdout, "\n");
} }
} }
......
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