Commit 89d1f9e1 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

samplegrid: docu update.

parent 9c8731f7
...@@ -9,6 +9,7 @@ Version 1.8.1 (24 March 2017): ...@@ -9,6 +9,7 @@ Version 1.8.1 (24 March 2017):
* selmulti - Select multiple fields (KMNI extension) * selmulti - Select multiple fields (KMNI extension)
* delmulti - Delete multiple fields (KMNI extension) * delmulti - Delete multiple fields (KMNI extension)
* changemulti - Change identication of multiple fields (KMNI extension) * changemulti - Change identication of multiple fields (KMNI extension)
* samplegrid - Resample grid (KMNI extension)
Version 1.8.0 (26 October 2016): Version 1.8.0 (26 October 2016):
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@BeginDescription @BeginDescription
This is a special operator for resampling the horizontal grid. This is a special operator for resampling the horizontal grid.
No interpolation takes place. Factor=2 mean every second grid point is removed. No interpolation takes place. Resample factor=2 means every second grid point is removed.
Only rectilinear and curvilinear source grids are supported by this operator. Only rectilinear and curvilinear source grids are supported by this operator.
@EndDescription @EndDescription
@EndModule @EndModule
...@@ -16,10 +16,10 @@ Only rectilinear and curvilinear source grids are supported by this operator. ...@@ -16,10 +16,10 @@ Only rectilinear and curvilinear source grids are supported by this operator.
@BeginOperator_samplegrid @BeginOperator_samplegrid
@Title = Resample grid @Title = Resample grid
@Parameter = resamplefactor @Parameter = factor
@EndOperator @EndOperator
@BeginParameter @BeginParameter
@Item = resamplefactor @Item = factor
FLOAT typically 2, which will half the resolution INTEGER Resample factor, typically 2, which will half the resolution
@EndParameter @EndParameter
...@@ -188,19 +188,19 @@ int cdo_define_sample_grid(int gridSrcID, int sampleFactor) ...@@ -188,19 +188,19 @@ int cdo_define_sample_grid(int gridSrcID, int sampleFactor)
int gridID_sampled = gridCreate(gridtype, xsize*ysize); int gridID_sampled = gridCreate(gridtype, xsize*ysize);
gridDefXsize(gridID_sampled, xsize);
gridDefYsize(gridID_sampled, ysize);
gridDefNP(gridID_sampled, gridInqNP(gridSrcID));
gridDefPrec(gridID_sampled, gridInqPrec(gridSrcID));
if ( gridInqUvRelativeToGrid(gridSrcID) ) gridDefUvRelativeToGrid(gridID_sampled, 1);
// TODO // TODO
/* /*
grid_sampled->scanningMode = grid_src->scanningMode; grid_sampled->scanningMode = grid_src->scanningMode;
grid_sampled->iScansNegatively = grid_src->iScansNegatively; grid_sampled->iScansNegatively = grid_src->iScansNegatively;
grid_sampled->jScansPositively = grid_src->jScansPositively; grid_sampled->jScansPositively = grid_src->jScansPositively;
grid_sampled->jPointsAreConsecutive = grid_src->jPointsAreConsecutive; grid_sampled->jPointsAreConsecutive = grid_src->jPointsAreConsecutive;
grid_sampled->uvRelativeToGrid = grid_src->uvRelativeToGrid;
*/ */
gridDefXsize(gridID_sampled, xsize);
gridDefYsize(gridID_sampled, ysize);
gridDefNP(gridID_sampled, gridInqNP(gridSrcID));
gridDefPrec(gridID_sampled, gridInqPrec(gridSrcID));
grid_copy_attributes(gridSrcID, gridID_sampled); grid_copy_attributes(gridSrcID, gridID_sampled);
...@@ -367,21 +367,20 @@ int cdo_define_subgrid_grid(int gridSrcID, int subI0, int subI1, int subJ0, int ...@@ -367,21 +367,20 @@ int cdo_define_subgrid_grid(int gridSrcID, int subI0, int subI1, int subJ0, int
int gridID_sampled = gridCreate(gridtype, xsize*ysize); int gridID_sampled = gridCreate(gridtype, xsize*ysize);
gridDefXsize(gridID_sampled, xsize);
gridDefYsize(gridID_sampled, ysize);
gridDefNP(gridID_sampled, gridInqNP(gridSrcID));
gridDefPrec(gridID_sampled, gridInqPrec(gridSrcID));
if ( gridInqUvRelativeToGrid(gridSrcID) ) gridDefUvRelativeToGrid(gridID_sampled, 1);
// TODO // TODO
/* /*
grid_sampled->scanningMode = grid_src->scanningMode; grid_sampled->scanningMode = grid_src->scanningMode;
grid_sampled->iScansNegatively = grid_src->iScansNegatively; grid_sampled->iScansNegatively = grid_src->iScansNegatively;
grid_sampled->jScansPositively = grid_src->jScansPositively; grid_sampled->jScansPositively = grid_src->jScansPositively;
grid_sampled->jPointsAreConsecutive = grid_src->jPointsAreConsecutive; grid_sampled->jPointsAreConsecutive = grid_src->jPointsAreConsecutive;
grid_sampled->uvRelativeToGrid = grid_src->uvRelativeToGrid;
*/ */
gridDefXsize(gridID_sampled, xsize);
gridDefYsize(gridID_sampled, ysize);
gridDefNP(gridID_sampled, gridInqNP(gridSrcID));
gridDefPrec(gridID_sampled, gridInqPrec(gridSrcID));
grid_copy_attributes(gridSrcID, gridID_sampled); grid_copy_attributes(gridSrcID, gridID_sampled);
if ( gridtype == GRID_PROJECTION ) grid_copy_mapping(gridSrcID, gridID_sampled); if ( gridtype == GRID_PROJECTION ) grid_copy_mapping(gridSrcID, gridID_sampled);
......
...@@ -744,15 +744,15 @@ static const char *SamplegridHelp[] = { ...@@ -744,15 +744,15 @@ static const char *SamplegridHelp[] = {
" samplegrid - Resample grid", " samplegrid - Resample grid",
"", "",
"SYNOPSIS", "SYNOPSIS",
" samplegrid,resamplefactor infile outfile", " samplegrid,factor infile outfile",
"", "",
"DESCRIPTION", "DESCRIPTION",
" This is a special operator for resampling the horizontal grid.", " This is a special operator for resampling the horizontal grid.",
" No interpolation takes place. Factor=2 mean every second grid point is removed.", " No interpolation takes place. Resample factor=2 means every second grid point is removed.",
" Only rectilinear and curvilinear source grids are supported by this operator.", " Only rectilinear and curvilinear source grids are supported by this operator.",
"", "",
"PARAMETER", "PARAMETER",
" resamplefactor FLOAT typically 2, which will half the resolution", " factor INTEGER Resample factor, typically 2, which will half the resolution",
NULL NULL
}; };
......
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