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
da823214
Commit
da823214
authored
Oct 16, 2006
by
Uwe Schulzweida
Browse files
New operator: intntime
parent
9c0b5a46
Changes
12
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
da823214
...
...
@@ -171,8 +171,8 @@ src/Info.c -text
src/Input.c -text
src/Intgrid.c -text
src/Intgridtraj.c -text
src/Intntime.c -text
src/Inttime.c -text
src/Inttime2.c -text
src/Intyear.c -text
src/Invert.c -text
src/Makefile.am -text
...
...
ChangeLog
View file @
da823214
2006-11-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CDI library version 1.0.3
* New operator: inttime
2
[request: Michael Boettinger]
* New operator: int
n
time [request: Michael Boettinger]
* inttime: extention for months and years [request: Holger Goettel]
* remaplib.sort_add: don't sort if num_links <= 1
* remaplib.remap_bi?: check that src_add is valid
...
...
OPERATORS
View file @
da823214
...
...
@@ -305,6 +305,7 @@ Operator catalog:
Vertint ml2pl Model to pressure level interpolation
Vertint ml2hl Model to height level interpolation
Inttime inttime Time interpolation
Inttime intntime Time interpolation
Intyear intyear Year interpolation
-------------------------------------------------------------
Transformation
...
...
doc/cdo_refcard.pdf
View file @
da823214
No preview for this file type
doc/tex/mod/Intgrid
View file @
da823214
...
...
@@ -11,6 +11,7 @@
@BeginDescription
This module contains operators to interpolate all input fields to a new grid.
All interpolation methods in this module work only on rectangular grids.
@EndDescription
@EndModule
...
...
@@ -48,7 +49,8 @@ For a detailed description of this interpolation method see @cite{PINGO}.
@BeginDescription
Performs a bilinear interpolation on all input fields. This implementation
is a faster than @oper{remapbil}. Missing values are not supported yet!
is faster than @oper{remapbil}. The complete source grid must be inside
the target grid. Missing values are not supported yet!
@EndDescription
@EndOperator
...
...
doc/tex/mod/Inttime
View file @
da823214
...
...
@@ -5,7 +5,11 @@
@Section = Interpolation
@Class = Interpolation
@Arguments = ifile ofile
@Operators = inttime
@Operators = inttime intntime
@BeginDescription
This module performs linear interpolation between time steps.
@EndDescription
@EndModule
...
...
@@ -13,9 +17,24 @@
@Title = Time interpolation
@Parameter = date time [inc]
@BeginDescription
This operator creates a new dataset by linear interpolation between time steps.
The user has to define the start date/time with an optional increment.
@EndDescription
@EndOperator
@BeginOperator_intntime
@Title = Time interpolation
@Parameter = n
@BeginDescription
This operator performs linear interpolation between time steps.
The user has to define the number of time steps form one time step
to the next.
@EndDescription
@EndOperator
@BeginParameter date
@Item = date
...
...
@@ -24,14 +43,19 @@ STRING Start date (format YYYY-MM-DD)
STRING Start time (format hh:mm)
@Item = inc
STRING Optional increment (minutes, hours, days, months, years) [default: 0hour]
@Item = n
INTEGER Number of time steps from one time step to the next
@EndParameter
@EndOperator
@BeginExample
Assumed a 6 hourly dataset starts at 1987-01-01 12:00.
To interpolate this time series to a 2 hourly dataset, use:
To interpolate this time series to a one hourly dataset, use:
@BeginVerbatim
cdo inttime,1987-01-01,12:00,1hour ifile ofile
@EndVerbatim
The same result with @oper{intntime}:
@BeginVerbatim
cdo inttime,
1987-01-01,12:00,2hour
ifile ofile
cdo int
n
time,
6
ifile ofile
@EndVerbatim
@EndExample
doc/tex/mod/Intyear
View file @
da823214
@BeginModule
@NewPage
@Name = Intyear
@Title = Year interpolation
@Section = Interpolation
...
...
src/Inttime
2
.c
→
src/Int
n
time.c
View file @
da823214
...
...
@@ -18,13 +18,10 @@
/*
This module contains the following operators:
Inttime
2
inttime
2
Time interpolation
Int
n
time int
n
time Time interpolation
*/
#include
<string.h>
#include
<ctype.h>
/* isdigit */
#include
"cdi.h"
#include
"cdo.h"
#include
"cdo_int.h"
...
...
@@ -32,9 +29,9 @@
#include
"interpol.h"
void
*
Inttime
2
(
void
*
argument
)
void
*
Int
n
time
(
void
*
argument
)
{
static
char
func
[]
=
"Inttime
2
"
;
static
char
func
[]
=
"Int
n
time"
;
int
streamID1
,
streamID2
;
int
nrecs
,
nvars
,
nlevel
;
int
i
,
nrecords
;
...
...
src/Makefile.am
View file @
da823214
...
...
@@ -31,7 +31,7 @@ cdo_SOURCES = Arith.c \
Intgrid.c
\
Intgridtraj.c
\
Inttime.c
\
Inttime
2
.c
\
Int
n
time.c
\
Intyear.c
\
Invert.c
\
Maskbox.c
\
...
...
src/Makefile.in
View file @
da823214
...
...
@@ -111,7 +111,7 @@ cdo_SOURCES = Arith.c \
Intgrid.c
\
Intgridtraj.c
\
Inttime.c
\
Inttime
2
.c
\
Int
n
time.c
\
Intyear.c
\
Invert.c
\
Maskbox.c
\
...
...
@@ -263,7 +263,7 @@ am_cdo_OBJECTS = Arith.$(OBJEXT) Arithc.$(OBJEXT) Arithdays.$(OBJEXT) \
Fldrms.
$(OBJEXT)
Fldstat.
$(OBJEXT)
Gradsdes.
$(OBJEXT)
\
Histogram.
$(OBJEXT)
Info.
$(OBJEXT)
Input.
$(OBJEXT)
\
Intgrid.
$(OBJEXT)
Intgridtraj.
$(OBJEXT)
Inttime.
$(OBJEXT)
\
Inttime
2
.
$(OBJEXT)
Intyear.
$(OBJEXT)
Invert.
$(OBJEXT)
\
Int
n
time.
$(OBJEXT)
Intyear.
$(OBJEXT)
Invert.
$(OBJEXT)
\
Maskbox.
$(OBJEXT)
Mastrfu.
$(OBJEXT)
Math.
$(OBJEXT)
\
Merge.
$(OBJEXT)
Mergegrid.
$(OBJEXT)
Mergetime.
$(OBJEXT)
\
Merstat.
$(OBJEXT)
Ninfo.
$(OBJEXT)
Nmltest.
$(OBJEXT)
\
...
...
@@ -322,7 +322,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./
$(DEPDIR)
/Gradsdes.Po ./
$(DEPDIR)
/Histogram.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Info.Po ./
$(DEPDIR)
/Input.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Intgrid.Po ./
$(DEPDIR)
/Intgridtraj.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Inttime.Po ./
$(DEPDIR)
/Inttime
2
.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Int
n
time.Po ./
$(DEPDIR)
/Inttime.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Intyear.Po ./
$(DEPDIR)
/Invert.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Maskbox.Po ./
$(DEPDIR)
/Mastrfu.Po
\
@AMDEP_TRUE@ ./
$(DEPDIR)
/Math.Po ./
$(DEPDIR)
/Merge.Po
\
...
...
@@ -473,8 +473,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Input.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Intgrid.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Intgridtraj.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Intntime.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Inttime.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Inttime2.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Intyear.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Invert.Po@am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/Maskbox.Po@am__quote@
...
...
src/modules.c
View file @
da823214
...
...
@@ -65,7 +65,7 @@ void *Input(void *argument);
void
*
Intgrid
(
void
*
argument
);
void
*
Intgridtraj
(
void
*
argument
);
void
*
Inttime
(
void
*
argument
);
void
*
Inttime
2
(
void
*
argument
);
void
*
Int
n
time
(
void
*
argument
);
void
*
Intyear
(
void
*
argument
);
void
*
Invert
(
void
*
argument
);
void
*
Maskbox
(
void
*
argument
);
...
...
@@ -162,7 +162,7 @@ void *Zonstat(void *argument);
#define IntgridOperators {"intgridbil", "intpoint", "interpolate", "intarea"}
#define IntgridtrajOperators {"intgridtraj"}
#define InttimeOperators {"inttime"}
#define Inttime
2
Operators {"inttime
2
"}
#define Int
n
timeOperators {"int
n
time"}
#define IntyearOperators {"intyear"}
#define InvertOperators {"invertlat", "invertlon", "invertlatdes", "invertlondes", \
"invertlatdata", "invertlondata"}
...
...
@@ -275,7 +275,7 @@ static MODULES Modules[] =
{
Intgrid
,
IntgridHelp
,
IntgridOperators
,
1
,
1
},
{
Intgridtraj
,
NULL
,
IntgridtrajOperators
,
1
,
1
},
{
Inttime
,
InttimeHelp
,
InttimeOperators
,
1
,
1
},
{
Inttime
2
,
NULL
,
Inttime
2
Operators
,
1
,
1
},
{
Int
n
time
,
InttimeHelp
,
Int
n
timeOperators
,
1
,
1
},
{
Intyear
,
IntyearHelp
,
IntyearOperators
,
2
,
1
},
{
Invert
,
InvertHelp
,
InvertOperators
,
1
,
1
},
{
Maskbox
,
MaskboxHelp
,
MaskboxOperators
,
1
,
1
},
...
...
src/operator_help.h
View file @
da823214
...
...
@@ -685,7 +685,7 @@ static char *SettimeHelp[] = {
" day INTEGER Value of the new day"
,
" month INTEGER Value of the new month"
,
" year INTEGER Value of the new year"
,
" units STRING Base units of the time axis (minutes, hours, days, months, years)
.
"
,
" units STRING Base units of the time axis (minutes, hours, days, months, years)"
,
" date STRING Date (format YYYY-MM-DD)"
,
" time STRING Time (format HH:MM)"
,
" inc STRING Optional increment (minutes, hours, days, months, years) [default: 0hour]"
,
...
...
@@ -1949,7 +1949,8 @@ static char *IntgridHelp[] = {
" For a detailed description of this interpolation method see PINGO."
,
" intgridbil Bilinear grid interpolation"
,
" Performs a bilinear interpolation on all input fields. This implementation"
,
" is a faster than remapbil. Missing values are not supported yet!"
,
" is faster than remapbil. The complete source grid must be inside"
,
" the target grid. Missing values are not supported yet!"
,
""
,
"PARAMETER"
,
" grid STRING Target grid description file or name"
,
...
...
@@ -1991,18 +1992,29 @@ static char *IntvertHelp[] = {
static
char
*
InttimeHelp
[]
=
{
"NAME"
,
" inttime - Time interpolation"
,
" inttime
, intntime
- Time interpolation"
,
""
,
"SYNOPSIS"
,
" inttime,date,time[,inc] ifile ofile"
,
" intntime,n ifile ofile"
,
""
,
"DESCRIPTION"
,
" This operator performs linear interpolation between time steps."
,
" This module performs linear interpolation between time steps."
,
""
,
"OPERATORS"
,
" inttime Time interpolation"
,
" This operator creates a new dataset by linear interpolation between time steps."
,
" The user has to define the start date/time with an optional increment."
,
" intntime Time interpolation"
,
" This operator performs linear interpolation between time steps."
,
" The user has to define the number of time steps form one time step"
,
" to the next."
,
""
,
"PARAMETER"
,
" date STRING Start date (format YYYY-MM-DD)"
,
" time STRING Start time (format hh:mm)"
,
" inc STRING Optional increment (minutes, hours, days, months, years) [default: 0hour]"
,
" n INTEGER Number of time steps from one time step to the next"
,
NULL
};
...
...
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