Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
5f98297a
Commit
5f98297a
authored
Oct 14, 2020
by
Uwe Schulzweida
Browse files
Pack: added docu.
parent
0a0fc0a8
Changes
7
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
5f98297a
...
...
@@ -16,6 +16,7 @@ Version 1.9.9 (29 October 2020):
* Yearly arithmetic: yearadd, yearsub, yearmul, yeardiv
* apply: Apply an operator on each input file
* gh2hl: Interpolate 3D geometric height to height levels
* pack: Pack data (NetCDF attribute add_offset/scale_factor)
* verifygrid: Verify grid coordinates
* addtrend: Add trend
* isosurface: Extract isosurface
...
...
OPERATORS
View file @
5f98297a
...
...
@@ -46,6 +46,7 @@ Operator catalog:
Copy copy Copy datasets
Copy cat Concatenate datasets
Tee tee Duplicate a data stream
Pack pack Pack data
Replace replace Replace variables
Duplicate duplicate Duplicates a dataset
Mergegrid mergegrid Merge grid
...
...
doc/tex/Modules
View file @
5f98297a
...
...
@@ -8,6 +8,7 @@ Filedes Information
Apply File operations
Copy File operations
Tee File operations
Pack File operations
Replace File operations
Duplicate File operations
Mergegrid File operations
...
...
src/Pack.cc
View file @
5f98297a
...
...
@@ -123,7 +123,7 @@ Pack(void *process)
tsID
++
;
}
const
int
nts
=
tsID
;
const
auto
nts
=
tsID
;
if
(
CdoDefault
::
DataType
!=
CDI_UNDEFID
)
{
...
...
src/module_list.h
View file @
5f98297a
...
...
@@ -114,7 +114,7 @@ static const module_t module_Nmldump = {Nmldump , {}
static
const
module_t
module_Output
=
{
Output
,
OutputHelp
,
OutputOperators
,
EXPOSED
,
CDI_BOTH
,
-
1
,
0
,
NoRestriction
};
static
const
module_t
module_Outputtab
=
{
Output
,
OutputtabHelp
,
OutputtabOperators
,
EXPOSED
,
CDI_REAL
,
-
1
,
0
,
NoRestriction
};
static
const
module_t
module_Outputgmt
=
{
Outputgmt
,
OutputgmtHelp
,
OutputgmtOperators
,
EXPOSED
,
CDI_REAL
,
1
,
0
,
NoRestriction
};
static
const
module_t
module_Pack
=
{
Pack
,
{}
,
PackOperators
,
EXPOSED
,
CDI_REAL
,
1
,
1
,
NoRestriction
};
static
const
module_t
module_Pack
=
{
Pack
,
PackHelp
,
PackOperators
,
EXPOSED
,
CDI_REAL
,
1
,
1
,
NoRestriction
};
static
const
module_t
module_Pardup
=
{
Pardup
,
{}
,
PardupOperators
,
EXPOSED
,
CDI_REAL
,
1
,
1
,
NoRestriction
};
static
const
module_t
module_Pinfo
=
{
Pinfo
,
{}
,
PinfoOperators
,
EXPOSED
,
CDI_REAL
,
1
,
1
,
NoRestriction
};
static
const
module_t
module_Pressure
=
{
Pressure
,
{}
,
PressureOperators
,
EXPOSED
,
CDI_REAL
,
1
,
1
,
NoRestriction
};
...
...
src/operator_help.h
View file @
5f98297a
...
...
@@ -291,6 +291,23 @@ static const char *TeeHelp[] = {
nullptr
};
static
const
char
*
PackHelp
[]
=
{
"NAME"
,
" pack - Pack data"
,
""
,
"SYNOPSIS"
,
" pack infile outfile"
,
""
,
"DESCRIPTION"
,
" Packing reduces the data volume by reducing the precision of the stored numbers."
,
" It is implemented using the NetCDF attributes add_offset and scale_factor."
,
" The operator pack calculates the attributes add_offset and scale_factor for all variables."
,
" The default data type for all variables is automatically changed to 16-bit integer."
,
" Use the CDO option -b to change the data type to a different integer precision, if needed."
,
" Missing values are automatically transformed to the current data type."
,
nullptr
};
static
const
char
*
ReplaceHelp
[]
=
{
"NAME"
,
" replace - Replace variables"
,
...
...
src/util_files.cc
View file @
5f98297a
...
...
@@ -21,15 +21,9 @@
bool
fileExists
(
const
char
*
restrict
filename
)
{
bool
status
=
false
;
struct
stat
buf
;
if
(
stat
(
filename
,
&
buf
)
==
0
)
{
if
(
S_ISREG
(
buf
.
st_mode
)
&&
buf
.
st_size
>
0
)
status
=
true
;
}
return
status
;
const
auto
status
=
stat
(
filename
,
&
buf
);
return
(
status
==
0
)
&&
(
S_ISREG
(
buf
.
st_mode
)
&&
buf
.
st_size
>
0
);
}
bool
...
...
Write
Preview
Markdown
is supported
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