Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
202f3638
Commit
202f3638
authored
Feb 20, 2017
by
Uwe Schulzweida
Browse files
New operator samplegrid: resample grid (patch from Michal Koutek, KMNI).
parent
df24740b
Changes
11
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
202f3638
2017-02-20 Uwe Schulzweida
* New operator samplegrid: resample grid (patch from Michal Koutek, KMNI)
* setgridtype,curvilinear: bug fix for source gridtype GRID_LCC
2017-02-16 Uwe Schulzweida
...
...
OPERATORS
View file @
202f3638
...
...
@@ -94,6 +94,7 @@ Operator catalog:
Seltime selsmon Select single month
Selbox sellonlatbox Select a longitude/latitude box
Selbox selindexbox Select an index box
Samplegrid samplegrid Resample grid
-------------------------------------------------------------
Conditional selection
-------------------------------------------------------------
...
...
doc/tex/Modules
View file @
202f3638
...
...
@@ -18,6 +18,7 @@ Select Selection
Selvar Selection
Seltime Selection
Selbox Selection
Samplegrid Selection
Cond Conditional selection
Cond2 Conditional selection
Condc Conditional selection
...
...
doc/tex/mod/Distgrid
View file @
202f3638
...
...
@@ -14,9 +14,9 @@
@Parameter = nx [ny]
@BeginDescription
This operator distributes a dataset into smaller pieces. Each output file contains a different region of the
horizontal
source grid. A target grid region contains a structured longitude/latitude box of the source grid.
Only rectilinear and
curvilinear source grids are supported by this operator.
This operator distributes a dataset into smaller pieces. Each output file contains a different region of the
horizontal
source grid. A target grid region contains a structured longitude/latitude box of the source grid.
Only rectilinear and
curvilinear source grids are supported by this operator.
The number of different regions can be specified with the parameter @var{nx} and @var{ny}. The output files will be named
<obase><xxx><suffix> where suffix is the filename extension derived from the file format. xxx will have five digits with
the number of the target region.
...
...
doc/tex/mod/Samplegrid
0 → 100644
View file @
202f3638
@BeginModule
@NewPage
@Name = Samplegrid
@Title = Resample grid
@Section = Selection
@Class = Selection
@Arguments = infile outfile
@Operators = samplegrid
@BeginDescription
This is a special operator for resampling the horizontal grid.
No interpolation takes place. Factor=2 mean every second grid point is removed.
Only rectilinear and curvilinear source grids are supported by this operator.
@EndDescription
@EndModule
@BeginOperator_samplegrid
@Title = Resample grid
@Parameter = resamplefactor
@EndOperator
@BeginParameter
@Item = resamplefactor
FLOAT typically 2, which will half the resolution
@EndParameter
doc/tex/mod/Selbox
View file @
202f3638
...
...
@@ -8,7 +8,7 @@
@Operators = sellonlatbox selindexbox
@BeginDescription
Selects a box of the rectangularly understood field.
All input fields need to have the same horizontal grid.
Selects a box of the rectangularly understood field.
@EndDescription
@EndModule
...
...
src/Makefile.am
View file @
202f3638
...
...
@@ -300,7 +300,7 @@ cdo_SOURCES += Adisit.c \
Rotuv.c
\
Runpctl.c
\
Runstat.c
\
Sample
G
rid.c
\
Sample
g
rid.c
\
Seascount.c
\
Seaspctl.c
\
Seasstat.c
\
...
...
src/Makefile.in
View file @
202f3638
...
...
@@ -215,7 +215,7 @@ am_cdo_OBJECTS = cdo-cdo.$(OBJEXT) cdo-Adisit.$(OBJEXT) \
cdo-Remap.$(OBJEXT) cdo-Remapeta.$(OBJEXT) \
cdo-Replace.$(OBJEXT) cdo-Replacevalues.$(OBJEXT) \
cdo-Rhopot.$(OBJEXT) cdo-Rotuv.$(OBJEXT) cdo-Runpctl.$(OBJEXT) \
cdo-Runstat.$(OBJEXT) cdo-Sample
G
rid.$(OBJEXT) \
cdo-Runstat.$(OBJEXT) cdo-Sample
g
rid.$(OBJEXT) \
cdo-Seascount.$(OBJEXT) cdo-Seaspctl.$(OBJEXT) \
cdo-Seasstat.$(OBJEXT) cdo-Selbox.$(OBJEXT) \
cdo-Selindex.$(OBJEXT) cdo-Select.$(OBJEXT) \
...
...
@@ -581,7 +581,7 @@ cdo_SOURCES = cdo.c Adisit.c Afterburner.c Arith.c Arithc.c \
Mrotuv.c Mrotuvb.c Ninfo.c Nmldump.c Output.c Outputgmt.c \
Pack.c Pardup.c Pinfo.c Pressure.c Regres.c Remap.c Remapeta.c \
Replace.c Replacevalues.c Rhopot.c Rotuv.c Runpctl.c Runstat.c \
Sample
G
rid.c Seascount.c Seaspctl.c Seasstat.c Selbox.c \
Sample
g
rid.c Seascount.c Seaspctl.c Seasstat.c Selbox.c \
Selindex.c Select.c Selmulti.c Seloperator.c Selrec.c \
Seltime.c Selvar.c Set.c Setattribute.c Setbox.c Setgatt.c \
Setgrid.c Sethalo.c Setmiss.c Setpartab.c Setrcaname.c \
...
...
@@ -918,7 +918,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Rotuv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Runpctl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Runstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Sample
G
rid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Sample
g
rid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Seascount.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Seaspctl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Seasstat.Po@am__quote@
...
...
@@ -3405,19 +3405,19 @@ cdo-Runstat.obj: Runstat.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Runstat.obj `if test -f 'Runstat.c'; then $(CYGPATH_W) 'Runstat.c'; else $(CYGPATH_W) '$(srcdir)/Runstat.c'; fi`
cdo-Sample
G
rid.o: Sample
G
rid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sample
G
rid.o -MD -MP -MF $(DEPDIR)/cdo-Sample
G
rid.Tpo -c -o cdo-Sample
G
rid.o `test -f 'Sample
G
rid.c' || echo '$(srcdir)/'`Sample
G
rid.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sample
G
rid.Tpo $(DEPDIR)/cdo-Sample
G
rid.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sample
G
rid.c' object='cdo-Sample
G
rid.o' libtool=no @AMDEPBACKSLASH@
cdo-Sample
g
rid.o: Sample
g
rid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sample
g
rid.o -MD -MP -MF $(DEPDIR)/cdo-Sample
g
rid.Tpo -c -o cdo-Sample
g
rid.o `test -f 'Sample
g
rid.c' || echo '$(srcdir)/'`Sample
g
rid.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sample
g
rid.Tpo $(DEPDIR)/cdo-Sample
g
rid.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sample
g
rid.c' object='cdo-Sample
g
rid.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sample
G
rid.o `test -f 'Sample
G
rid.c' || echo '$(srcdir)/'`Sample
G
rid.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sample
g
rid.o `test -f 'Sample
g
rid.c' || echo '$(srcdir)/'`Sample
g
rid.c
cdo-Sample
G
rid.obj: Sample
G
rid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sample
G
rid.obj -MD -MP -MF $(DEPDIR)/cdo-Sample
G
rid.Tpo -c -o cdo-Sample
G
rid.obj `if test -f 'Sample
G
rid.c'; then $(CYGPATH_W) 'Sample
G
rid.c'; else $(CYGPATH_W) '$(srcdir)/Sample
G
rid.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sample
G
rid.Tpo $(DEPDIR)/cdo-Sample
G
rid.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sample
G
rid.c' object='cdo-Sample
G
rid.obj' libtool=no @AMDEPBACKSLASH@
cdo-Sample
g
rid.obj: Sample
g
rid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Sample
g
rid.obj -MD -MP -MF $(DEPDIR)/cdo-Sample
g
rid.Tpo -c -o cdo-Sample
g
rid.obj `if test -f 'Sample
g
rid.c'; then $(CYGPATH_W) 'Sample
g
rid.c'; else $(CYGPATH_W) '$(srcdir)/Sample
g
rid.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Sample
g
rid.Tpo $(DEPDIR)/cdo-Sample
g
rid.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Sample
g
rid.c' object='cdo-Sample
g
rid.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sample
G
rid.obj `if test -f 'Sample
G
rid.c'; then $(CYGPATH_W) 'Sample
G
rid.c'; else $(CYGPATH_W) '$(srcdir)/Sample
G
rid.c'; fi`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Sample
g
rid.obj `if test -f 'Sample
g
rid.c'; then $(CYGPATH_W) 'Sample
g
rid.c'; else $(CYGPATH_W) '$(srcdir)/Sample
g
rid.c'; fi`
cdo-Seascount.o: Seascount.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Seascount.o -MD -MP -MF $(DEPDIR)/cdo-Seascount.Tpo -c -o cdo-Seascount.o `test -f 'Seascount.c' || echo '$(srcdir)/'`Seascount.c
...
...
src/Sample
G
rid.c
→
src/Sample
g
rid.c
View file @
202f3638
...
...
@@ -52,7 +52,7 @@ void cropData(double *array1, int gridID1, double *array2, int gridID2, int subI
}
void
*
Sample
G
rid
(
void
*
argument
)
void
*
Sample
g
rid
(
void
*
argument
)
{
int
nrecs
;
int
varID
,
levelID
;
...
...
src/modules.c
View file @
202f3638
...
...
@@ -282,7 +282,7 @@ void *Maggraph(void *argument);
// HIRLAM_EXTENSIONS
void
*
Selmulti
(
void
*
argument
);
// "selmulti", "delmulti"
void
*
WindTrans
(
void
*
argument
);
// "uvDestag", "rotuvN", "rotuvNorth", "projuvLatLon"
void
*
Sample
G
rid
(
void
*
argument
);
// "samplegrid", "subgrid"
void
*
Sample
g
rid
(
void
*
argument
);
// "samplegrid", "subgrid"
#define AdisitOperators {"adisit", "adipot"}
...
...
@@ -570,7 +570,7 @@ void *SampleGrid(void *argument); // "samplegrid", "subgrid"
// HIRLAM_EXTENSIONS
#define SelmultiOperators {"selmulti", "delmulti", "changemulti"}
#define WindTransOperators {"uvDestag", "rotuvN","rotuvNorth", "projuvLatLon"}
#define Sample
G
ridOperators {"samplegrid", "subgrid"}
#define Sample
g
ridOperators {"samplegrid", "subgrid"}
static
modules_t
Modules
[]
=
...
...
@@ -843,7 +843,7 @@ static modules_t Modules[] =
{
Magvector
,
MagvectorHelp
,
MagvectorOperators
,
1
,
CDI_REAL
,
1
,
1
},
{
Maggraph
,
MaggraphHelp
,
MaggraphOperators
,
1
,
CDI_REAL
,
-
1
,
1
},
// HIRLAM_EXTENSIONS
{
Sample
G
rid
,
NULL
,
Sample
G
ridOperators
,
1
,
CDI_REAL
,
1
,
1
},
{
Sample
g
rid
,
SamplegridHelp
,
Sample
g
ridOperators
,
1
,
CDI_REAL
,
1
,
1
},
{
Selmulti
,
NULL
,
SelmultiOperators
,
1
,
CDI_REAL
,
1
,
1
},
{
WindTrans
,
NULL
,
WindTransOperators
,
1
,
CDI_REAL
,
1
,
1
},
};
...
...
src/operator_help.h
View file @
202f3638
...
...
@@ -426,9 +426,9 @@ static const char *DistgridHelp[] = {
" distgrid,nx[,ny] infile obase"
,
""
,
"DESCRIPTION"
,
" This operator distributes a dataset into smaller pieces. Each output file contains a different region of the
horizontal
"
,
" source grid. A target grid region contains a structured longitude/latitude box of the source grid.
Only rectilinear and
"
,
" curvilinear source grids are supported by this operator."
,
" This operator distributes a dataset into smaller pieces. Each output file contains a different region of the"
,
"
horizontal
source grid. A target grid region contains a structured longitude/latitude box of the source grid."
,
"
Only rectilinear and
curvilinear source grids are supported by this operator."
,
" The number of different regions can be specified with the parameter nx and ny. The output files will be named "
,
" <obase><xxx><suffix> where suffix is the filename extension derived from the file format. xxx will have five digits with "
,
" the number of the target region."
,
...
...
@@ -645,7 +645,7 @@ static const char *SelboxHelp[] = {
" selindexbox,idx1,idx2,idy1,idy2 infile outfile"
,
""
,
"DESCRIPTION"
,
" Selects a box of the rectangularly understood field.
All input fields need to have the same horizontal grid.
"
,
" Selects a box of the rectangularly understood field."
,
""
,
"OPERATORS"
,
" sellonlatbox Select a longitude/latitude box"
,
...
...
@@ -668,6 +668,23 @@ static const char *SelboxHelp[] = {
NULL
};
static
const
char
*
SamplegridHelp
[]
=
{
"NAME"
,
" samplegrid - Resample grid"
,
""
,
"SYNOPSIS"
,
" samplegrid,resamplefactor 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."
,
" Only rectilinear and curvilinear source grids are supported by this operator."
,
""
,
"PARAMETER"
,
" resamplefactor FLOAT typically 2, which will half the resolution"
,
NULL
};
static
const
char
*
CondHelp
[]
=
{
"NAME"
,
" ifthen, ifnotthen - Conditional select one field"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment