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
6b2d05f5
Commit
6b2d05f5
authored
Apr 16, 2014
by
Uwe Schulzweida
Browse files
select/delete: add support for negative timesteps
parent
d0369052
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6b2d05f5
...
...
@@ -5,6 +5,7 @@
2014-04-15 Uwe Schulzweida
* select/delete: add support for negative timesteps
* seltimestep: add support for negative timesteps [patch from: Etienne Tourigny]
2014-04-14 Uwe Schulzweida
...
...
src/Select.c
View file @
6b2d05f5
...
...
@@ -283,7 +283,6 @@ int pml_add_entry(pml_entry_t *entry, char *arg)
void
pmlProcess
(
pml_entry_t
*
entry
,
int
argc
,
char
**
argv
)
{
int
i
;
int
len
;
char
*
parg
;
char
*
epos
;
...
...
@@ -606,7 +605,7 @@ void *Select(void *argument)
vlistDefFlag
(
vlistID1
,
varID
,
levID
,
TRUE
);
}
}
else
else
if
(
operatorID
==
SELECT
)
{
result
=
TRUE
;
}
...
...
@@ -789,6 +788,20 @@ void *Select(void *argument)
vlistDefVarTsteptype
(
vlistID2
,
varID
,
TSTEP_INSTANT
);
}
/* add support for negative timestep values */
if
(
npar_timestep
>
0
&&
ntsteps
>
0
&&
nfiles
==
1
)
{
for
(
i
=
0
;
i
<
npar_timestep
;
i
++
)
{
if
(
par_timestep
[
i
]
<
0
)
{
if
(
cdoVerbose
)
cdoPrint
(
"timestep %d changed to %d"
,
par_timestep
[
i
],
ntsteps
+
1
+
par_timestep
[
i
]);
par_timestep
[
i
]
=
ntsteps
+
1
+
par_timestep
[
i
];
}
}
}
if
(
!
lcopy
)
{
gridsize
=
vlistGridsizeMax
(
vlistID1
);
...
...
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