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):
* selmulti - Select multiple fields (KMNI extension)
* delmulti - Delete multiple fields (KMNI extension)
* changemulti - Change identication of multiple fields (KMNI extension)
* samplegrid - Resample grid (KMNI extension)
Version 1.8.0 (26 October 2016):
......
......@@ -8,7 +8,7 @@
@BeginDescription
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.
@EndDescription
@EndModule
......@@ -16,10 +16,10 @@ Only rectilinear and curvilinear source grids are supported by this operator.
@BeginOperator_samplegrid
@Title = Resample grid
@Parameter = resamplefactor
@Parameter = factor
@EndOperator
@BeginParameter
@Item = resamplefactor
FLOAT typically 2, which will half the resolution
@Item = factor
INTEGER Resample factor, typically 2, which will half the resolution
@EndParameter
......@@ -188,19 +188,19 @@ int cdo_define_sample_grid(int gridSrcID, int sampleFactor)
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
/*
grid_sampled->scanningMode = grid_src->scanningMode;
grid_sampled->iScansNegatively = grid_src->iScansNegatively;
grid_sampled->jScansPositively = grid_src->jScansPositively;
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);
......@@ -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);
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
/*
grid_sampled->scanningMode = grid_src->scanningMode;
grid_sampled->iScansNegatively = grid_src->iScansNegatively;
grid_sampled->jScansPositively = grid_src->jScansPositively;
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);
if ( gridtype == GRID_PROJECTION ) grid_copy_mapping(gridSrcID, gridID_sampled);
......
......@@ -744,15 +744,15 @@ static const char *SamplegridHelp[] = {
" samplegrid - Resample grid",
"",
"SYNOPSIS",
" samplegrid,resamplefactor infile outfile",
" samplegrid,factor infile outfile",
"",
"DESCRIPTION",
" 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.",
"",
"PARAMETER",
" resamplefactor FLOAT typically 2, which will half the resolution",
" factor INTEGER Resample factor, typically 2, which will half the resolution",
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