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

setmisstodis: added docu

parent e09eb3fd
...@@ -164,6 +164,7 @@ Operator catalog: ...@@ -164,6 +164,7 @@ Operator catalog:
Setmiss setrtomiss Set range to missing value Setmiss setrtomiss Set range to missing value
Setmiss setvrange Set valid range Setmiss setvrange Set valid range
Setmiss setmisstonn Set missing value to nearest neighbor Setmiss setmisstonn Set missing value to nearest neighbor
Setmiss setmisstodis Set missing value to distance-weighted average
------------------------------------------------------------- -------------------------------------------------------------
Arithmetic Arithmetic
------------------------------------------------------------- -------------------------------------------------------------
......
No preview for this file type
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@Title = Set missing value @Title = Set missing value
@Section = Modification @Section = Modification
@Arguments = ifile ofile @Arguments = ifile ofile
@Operators = setmissval setctomiss setmisstoc setrtomiss setvrange setmisstonn @Operators = setmissval setctomiss setmisstoc setrtomiss setvrange setmisstonn setmisstodis
@BeginDescription @BeginDescription
This module sets part of a field to missing value or missing values This module sets part of a field to missing value or missing values
...@@ -153,22 +153,35 @@ o(t,x) = \left\{ ...@@ -153,22 +153,35 @@ o(t,x) = \left\{
@EndOperator @EndOperator
@BeginOperator_setmisstodis
@Title = Set missing value to distance-weighted average
@Parameter = [neighbors]
@BeginDescription
Set all missing values to the distance-weighted average of the nearest non missing values.
The default number of nearest neighbors is 4.
@EndifDoc
@EndDescription
@EndOperator
@BeginParameter rmax @BeginParameter rmax
@Item = neighbors
INTEGER Number of nearest neighbors
@Item = newmiss @Item = newmiss
FLOAT New missing value FLOAT New missing value
@Item = c @Item = c
FLOAT Constant FLOAT Constant
@Item = rmin @Item = rmin
FLOAT Lower bound FLOAT Lower bound
@Item = rmax @Item = rmax
FLOAT Upper bound FLOAT Upper bound
@EndParameter @EndParameter
@BeginExample @BeginExample
Assume an input dataset has one field with temperatures Assume an input dataset has one field with temperatures in the range from 246 to 304 Kelvin.
in the range from 246 to 304 Kelvin. To set all values To set all values below 273.15 Kelvin to missing value use:
below 273.15 Kelvin to missing value use:
@BeginVerbatim @BeginVerbatim
cdo setrtomiss,0,273.15 ifile ofile cdo setrtomiss,0,273.15 ifile ofile
@EndVerbatim @EndVerbatim
......
...@@ -1230,8 +1230,8 @@ static const char *EnlargeHelp[] = { ...@@ -1230,8 +1230,8 @@ static const char *EnlargeHelp[] = {
static const char *SetmissHelp[] = { static const char *SetmissHelp[] = {
"NAME", "NAME",
" setmissval, setctomiss, setmisstoc, setrtomiss, setvrange, setmisstonn - ", " setmissval, setctomiss, setmisstoc, setrtomiss, setvrange, setmisstonn, ",
" Set missing value", " setmisstodis - Set missing value",
"", "",
"SYNOPSIS", "SYNOPSIS",
" setmissval,newmiss ifile ofile", " setmissval,newmiss ifile ofile",
...@@ -1240,6 +1240,7 @@ static const char *SetmissHelp[] = { ...@@ -1240,6 +1240,7 @@ static const char *SetmissHelp[] = {
" setrtomiss,rmin,rmax ifile ofile", " setrtomiss,rmin,rmax ifile ofile",
" setvrange,rmin,rmax ifile ofile", " setvrange,rmin,rmax ifile ofile",
" setmisstonn ifile ofile", " setmisstonn ifile ofile",
" setmisstodis[,neighbors] ifile ofile",
"", "",
"DESCRIPTION", "DESCRIPTION",
" This module sets part of a field to missing value or missing values", " This module sets part of a field to missing value or missing values",
...@@ -1247,37 +1248,41 @@ static const char *SetmissHelp[] = { ...@@ -1247,37 +1248,41 @@ static const char *SetmissHelp[] = {
" chosen operator.", " chosen operator.",
"", "",
"OPERATORS", "OPERATORS",
" setmissval Set a new missing value", " setmissval Set a new missing value",
" / newmiss if i(t,x) EQ miss", " / newmiss if i(t,x) EQ miss",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) NE miss", " \\ i(t,x) if i(t,x) NE miss",
" setctomiss Set constant to missing value", " setctomiss Set constant to missing value",
" / miss if i(t,x) EQ c", " / miss if i(t,x) EQ c",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) NE c", " \\ i(t,x) if i(t,x) NE c",
" setmisstoc Set missing value to constant", " setmisstoc Set missing value to constant",
" / c if i(t,x) EQ miss", " / c if i(t,x) EQ miss",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) NE miss", " \\ i(t,x) if i(t,x) NE miss",
" setrtomiss Set range to missing value", " setrtomiss Set range to missing value",
" / miss if i(t,x) GE rmin AND i(t,x) LE rmax", " / miss if i(t,x) GE rmin AND i(t,x) LE rmax",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) LT rmin OR i(t,x) GT rmax", " \\ i(t,x) if i(t,x) LT rmin OR i(t,x) GT rmax",
" setvrange Set valid range", " setvrange Set valid range",
" / miss if i(t,x) LT rmin OR i(t,x) GT rmax", " / miss if i(t,x) LT rmin OR i(t,x) GT rmax",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) GE rmin AND i(t,x) LE rmax", " \\ i(t,x) if i(t,x) GE rmin AND i(t,x) LE rmax",
" setmisstonn Set missing value to nearest neighbor", " setmisstonn Set missing value to nearest neighbor",
" Set all missing values to the nearest non missing value.", " Set all missing values to the nearest non missing value.",
" / i(t,y) if i(t,x) EQ miss AND i(t,y) NE miss", " / i(t,y) if i(t,x) EQ miss AND i(t,y) NE miss",
" o(t,x) = ", " o(t,x) = ",
" \\ i(t,x) if i(t,x) NE miss", " \\ i(t,x) if i(t,x) NE miss",
" setmisstodis Set missing value to distance-weighted average",
" Set all missing values to the distance-weighted average of the nearest non missing values.",
" The default number of nearest neighbors is 4.",
"", "",
"PARAMETER", "PARAMETER",
" newmiss FLOAT New missing value", " neighbors INTEGER Number of nearest neighbors",
" c FLOAT Constant", " newmiss FLOAT New missing value",
" rmin FLOAT Lower bound", " c FLOAT Constant",
" rmax FLOAT Upper bound", " rmin FLOAT Lower bound",
" rmax FLOAT Upper bound",
NULL NULL
}; };
......
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