Skip to content
GitLab
Menu
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
b0caeaca
Commit
b0caeaca
authored
Sep 04, 2006
by
Uwe Schulzweida
Browse files
Add operator selall
parent
338595c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Copy.c
View file @
b0caeaca
...
...
@@ -33,9 +33,12 @@
void
*
Copy
(
void
*
argument
)
{
static
char
func
[]
=
"Copy"
;
int
COPY
,
SELALL
;
int
operatorID
;
int
streamID1
,
streamID2
=
CDI_UNDEFID
;
int
nrecs
;
int
tsID1
,
tsID2
,
recID
,
varID
,
levelID
;
int
lcopy
=
FALSE
;
int
gridsize
;
int
vlistID1
,
vlistID2
;
int
nmiss
;
...
...
@@ -45,6 +48,13 @@ void *Copy(void *argument)
cdoInitialize
(
argument
);
COPY
=
cdoOperatorAdd
(
"copy"
,
0
,
0
,
NULL
);
SELALL
=
cdoOperatorAdd
(
"selall"
,
0
,
0
,
NULL
);
if
(
UNCHANGED_RECORD
)
lcopy
=
TRUE
;
operatorID
=
cdoOperatorID
();
streamCnt
=
cdoStreamCnt
();
nfiles
=
streamCnt
-
1
;
...
...
@@ -84,12 +94,20 @@ void *Copy(void *argument)
streamInqRecord
(
streamID1
,
&
varID
,
&
levelID
);
streamDefRecord
(
streamID2
,
varID
,
levelID
);
streamReadRecord
(
streamID1
,
array
,
&
nmiss
);
streamWriteRecord
(
streamID2
,
array
,
nmiss
);
if
(
lcopy
&&
operatorID
==
SELALL
)
{
streamCopyRecord
(
streamID2
,
streamID1
);
}
else
{
streamReadRecord
(
streamID1
,
array
,
&
nmiss
);
streamWriteRecord
(
streamID2
,
array
,
nmiss
);
}
}
tsID1
++
;
tsID2
++
;
}
streamClose
(
streamID1
);
}
...
...
src/Select.c
View file @
b0caeaca
...
...
@@ -22,7 +22,7 @@
Select delcode Delete codes
Select selvar Select variables
Select delvar Delete variables
Select selstdname
Select variables by CF name
Select selstdname Select variables by CF
standard
name
Select sellevel Select levels
Select selgrid Select grids
Select selgridname Select grid by name
...
...
src/cdo.c
View file @
b0caeaca
...
...
@@ -513,7 +513,7 @@ int main(int argc, char *argv[])
if
(
noff
)
setDefaultFileType
(
Progname
+
noff
,
0
);
while
(
(
c
=
cdoGetopt
(
argc
,
argv
,
"f:b:p:g:i:l:m:t:D:z:aBdhRrsT
u
VvZ"
))
!=
-
1
)
while
(
(
c
=
cdoGetopt
(
argc
,
argv
,
"f:b:p:g:i:l:m:t:D:z:aBdhRrsTVvZ"
))
!=
-
1
)
{
switch
(
c
)
{
...
...
src/modules.c
View file @
b0caeaca
...
...
@@ -143,7 +143,7 @@ void *Zonstat(void *argument);
#define CondOperators {"ifthen", "ifnotthen"}
#define Cond2Operators {"ifthenelse"}
#define CondcOperators {"ifthenc", "ifnotthenc"}
#define CopyOperators {"copy"}
#define CopyOperators {"copy"
, "selall"
}
#define DetrendOperators {"detrend"}
#define DiffOperators {"diff", "diffv"}
#define EnlargeOperators {"enlarge"}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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