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

New operator: intntime

parent 9c0b5a46
......@@ -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
......
2006-11-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CDI library version 1.0.3
* New operator: inttime2 [request: Michael Boettinger]
* New operator: intntime [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
......
......@@ -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
......
No preview for this file type
......@@ -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
......
......@@ -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 intntime,6 ifile ofile
@EndVerbatim
@EndExample
@BeginModule
@NewPage
@Name = Intyear
@Title = Year interpolation
@Section = Interpolation
......
......@@ -18,13 +18,10 @@
/*
This module contains the following operators:
Inttime2 inttime2 Time interpolation
Intntime intntime 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 *Inttime2(void *argument)
void *Intntime(void *argument)
{
static char func[] = "Inttime2";
static char func[] = "Intntime";
int streamID1, streamID2;
int nrecs, nvars, nlevel;
int i, nrecords;
......
......@@ -31,7 +31,7 @@ cdo_SOURCES = Arith.c \
Intgrid.c \
Intgridtraj.c \
Inttime.c \
Inttime2.c \
Intntime.c \
Intyear.c \
Invert.c \
Maskbox.c \
......
......@@ -111,7 +111,7 @@ cdo_SOURCES = Arith.c \
Intgrid.c \
Intgridtraj.c \
Inttime.c \
Inttime2.c \
Intntime.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) \
Inttime2.$(OBJEXT) Intyear.$(OBJEXT) Invert.$(OBJEXT) \
Intntime.$(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)/Inttime2.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/Intntime.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@
......
......@@ -65,7 +65,7 @@ void *Input(void *argument);
void *Intgrid(void *argument);
void *Intgridtraj(void *argument);
void *Inttime(void *argument);
void *Inttime2(void *argument);
void *Intntime(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 Inttime2Operators {"inttime2"}
#define IntntimeOperators {"intntime"}
#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 },
{ Inttime2, NULL, Inttime2Operators, 1, 1 },
{ Intntime, InttimeHelp, IntntimeOperators, 1, 1 },
{ Intyear, IntyearHelp, IntyearOperators, 2, 1 },
{ Invert, InvertHelp, InvertOperators, 1, 1 },
{ Maskbox, MaskboxHelp, MaskboxOperators, 1, 1 },
......
......@@ -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
};
......
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