From ea4731fe001a7e42019ae4781293dc40d4abfe74 Mon Sep 17 00:00:00 2001 From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de> Date: Sun, 12 Apr 2015 12:36:05 +0000 Subject: [PATCH] afterburner: added support for output pipes --- .gitattributes | 1 + src/pstream_write.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/pstream_write.h diff --git a/.gitattributes b/.gitattributes index a97207145..dd9d5440a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -619,6 +619,7 @@ src/process.h -text src/pstream.c -text src/pstream.h -text src/pstream_int.h -text +src/pstream_write.h -text src/pthread_debug.c -text src/pthread_debug.h -text src/readline.c -text diff --git a/src/pstream_write.h b/src/pstream_write.h new file mode 100644 index 000000000..3feb228f9 --- /dev/null +++ b/src/pstream_write.h @@ -0,0 +1,45 @@ +/* + This file is part of CDO. CDO is a collection of Operators to + manipulate and analyse Climate model Data. + + Copyright (C) 2003-2015 Uwe Schulzweida, <uwe.schulzweida AT mpimet.mpg.de> + See COPYING file for copying and redistribution conditions. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +*/ + +#ifndef _PSTREAM_WRITE_H +#define _PSTREAM_WRITE_H + +#define streamOpenWrite pstreamOpenWrite + +#define streamDefVlist pstreamDefVlist + +#define streamDefTimestep pstreamDefTimestep + +#define streamDefRecord pstreamDefRecord + +#define streamWriteRecord pstreamWriteRecord +#define streamWriteRecordF pstreamWriteRecordF + + +int pstreamOpenWrite(const argument_t *argument, int filetype); +void pstreamClose(int pstreamID); + +void pstreamDefVlist(int pstreamID, int vlistID); + +void pstreamDefTimestep(int pstreamID, int tsID); + +void pstreamDefRecord(int pstreamID, int varID, int levelID); + +void pstreamWriteRecord(int pstreamID, double *data, int nmiss); +void pstreamWriteRecordF(int pstreamID, float *data, int nmiss); + +#endif /* _PSTREAM_WRITE_H */ -- GitLab