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
d0ef9091
Commit
d0ef9091
authored
Apr 16, 2019
by
Oliver Heidmann
Browse files
replaced cdo I/O functions with new calls/system
parent
6bdf7045
Changes
90
Expand all
Hide whitespace changes
Inline
Side-by-side
src/Afterburner.cc
View file @
d0ef9091
...
...
@@ -485,7 +485,7 @@ after_defineNextTimestep(struct Control *globs)
if
(
otsID
==
0
)
{
int
nvars
=
vlistNvars
(
globs
->
ovlistID
);
if
(
nvars
==
0
)
Err
or
(
"No variable selected!"
);
if
(
nvars
==
0
)
cdoAb
or
t
(
"No variable selected!"
);
vlistDefTaxis
(
globs
->
ovlistID
,
globs
->
taxisID2
);
streamDefVlist
(
globs
->
ostreamID
,
globs
->
ovlistID
);
}
...
...
@@ -512,7 +512,7 @@ after_setEndOfInterval(struct Control *globs, int nrecs)
else
if
(
globs
->
OutputInterval
==
UNLIM_INTERVAL
)
globs
->
EndOfInterval
=
false
;
else
Err
or
(
"output interval %d not implemented!"
,
globs
->
OutputInterval
);
cdoAb
or
t
(
"output interval %d not implemented!"
,
globs
->
OutputInterval
);
}
}
...
...
@@ -569,7 +569,7 @@ after_check_content(struct Variable *vars, int timestep)
if
(
vars
[
code
].
needed
&&
!
vars
[
code
].
selected
&&
vars
[
code
].
spectral
==
nullptr
&&
vars
[
code
].
hybrid
==
nullptr
)
{
static
bool
lwarn
=
true
;
if
(
lwarn
)
Warning
(
"No humidity in data file, set to zero !"
);
if
(
lwarn
)
cdo
Warning
(
"No humidity in data file, set to zero !"
);
lwarn
=
false
;
vars
[
code
].
needed
=
false
;
}
...
...
@@ -579,9 +579,9 @@ after_check_content(struct Variable *vars, int timestep)
if
(
vars
[
code
].
needed
&&
!
vars
[
code
].
comp
&&
vars
[
code
].
spectral
==
nullptr
&&
vars
[
code
].
hybrid
==
nullptr
)
{
if
(
labort_after
)
Err
or
(
"Code %3d not found at timestep %d!"
,
code
,
timestep
);
cdoAb
or
t
(
"Code %3d not found at timestep %d!"
,
code
,
timestep
);
else
Warning
(
"Code %3d not found at timestep %d!"
,
code
,
timestep
);
cdo
Warning
(
"Code %3d not found at timestep %d!"
,
code
,
timestep
);
}
}
}
...
...
@@ -595,12 +595,12 @@ after_check_content(struct Variable *vars, int timestep)
code = HALF_PRESS;
if ( vars[code].needed && !vars[code].comp &&
vars[code].spectral == nullptr && vars[code].hybrid == nullptr )
Err
or( "Hybrid model level not found!");
cdoAb
or
t
( "Hybrid model level not found!");
code = FULL_PRESS;
if ( vars[code].needed && !vars[code].comp &&
vars[code].spectral == nullptr && vars[code].hybrid == nullptr )
Err
or( "Hybrid model level not found!");
cdoAb
or
t
( "Hybrid model level not found!");
*/
}
...
...
@@ -621,7 +621,7 @@ after_control(struct Control *globs, struct Variable *vars)
if
(
read_task
==
nullptr
)
{
lparallelread
=
false
;
Warning
(
"CDO tasks not available!"
);
cdo
Warning
(
"CDO tasks not available!"
);
}
}
...
...
@@ -700,14 +700,14 @@ after_control(struct Control *globs, struct Variable *vars)
if
(
lparallelread
)
{
status
=
*
(
int
*
)
cdo_task_wait
(
read_task
);
if
(
status
<
0
)
Err
or
(
"after_readTimestep error! (status = %d)"
,
status
);
if
(
status
<
0
)
cdoAb
or
t
(
"after_readTimestep error! (status = %d)"
,
status
);
}
tsFirst
=
false
;
}
else
{
status
=
*
(
int
*
)
cdo_task_wait
(
read_task
);
if
(
status
<
0
)
Err
or
(
"after_readTimestep error! (status = %d)"
,
status
);
if
(
status
<
0
)
cdoAb
or
t
(
"after_readTimestep error! (status = %d)"
,
status
);
}
nrecs
=
status
;
...
...
@@ -905,9 +905,9 @@ after_setLevel(struct Control *globs)
extern
int
labort_after
;
if
(
globs
->
Verbose
)
lprintf
(
stdout
);
if
(
labort_after
)
Err
or
(
"Inconsistent or invalid level list!"
);
cdoAb
or
t
(
"Inconsistent or invalid level list!"
);
else
Warning
(
"Inconsistent or invalid level list!"
);
cdo
Warning
(
"Inconsistent or invalid level list!"
);
}
globs
->
NumLevelRequest
=
l
;
...
...
@@ -937,7 +937,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
{
if
(
oVertID
==
-
1
)
{
if
(
globs
->
NumLevelRequest
>
globs
->
NumLevelFound
)
Err
or
(
"Too much level requested"
);
if
(
globs
->
NumLevelRequest
>
globs
->
NumLevelFound
)
cdoAb
or
t
(
"Too much level requested"
);
if
(
globs
->
NumLevelFound
==
globs
->
NumLevelRequest
)
{
...
...
@@ -969,7 +969,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
else
{
zaxisName
(
zaxisInqType
(
iVertID
),
zaxistypename
);
Err
or
(
"%s level data unsupported for TYPE %d"
,
zaxistypename
,
globs
->
Type
);
cdoAb
or
t
(
"%s level data unsupported for TYPE %d"
,
zaxistypename
,
globs
->
Type
);
}
break
;
}
...
...
@@ -1009,7 +1009,7 @@ after_defineLevel(struct Control *globs, struct Variable *vars)
break
;
}
default:
Err
or
(
"TYPE %d unsupported"
,
globs
->
Type
);
default:
cdoAb
or
t
(
"TYPE %d unsupported"
,
globs
->
Type
);
}
}
...
...
@@ -1028,8 +1028,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if
(
specGridID
==
-
1
)
{
if
(
globs
->
DimSP
==
0
)
Err
or
(
"dim spectral undefined"
);
if
(
globs
->
Truncation
==
0
)
Err
or
(
"truncation undefined"
);
if
(
globs
->
DimSP
==
0
)
cdoAb
or
t
(
"dim spectral undefined"
);
if
(
globs
->
Truncation
==
0
)
cdoAb
or
t
(
"truncation undefined"
);
specGridID
=
gridCreate
(
GRID_SPECTRAL
,
globs
->
DimSP
);
gridDefTrunc
(
specGridID
,
globs
->
Truncation
);
...
...
@@ -1044,8 +1044,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
{
if
(
gaussGridID
==
-
1
)
{
if
(
globs
->
Longitudes
==
0
)
Err
or
(
"number of longitudes undefined"
);
if
(
globs
->
Latitudes
==
0
)
Err
or
(
"number of latitudes undefined"
);
if
(
globs
->
Longitudes
==
0
)
cdoAb
or
t
(
"number of longitudes undefined"
);
if
(
globs
->
Latitudes
==
0
)
cdoAb
or
t
(
"number of latitudes undefined"
);
gaussGridID
=
gridCreate
(
GRID_GAUSSIAN
,
globs
->
Longitudes
*
globs
->
Latitudes
);
gridDefXsize
(
gaussGridID
,
globs
->
Longitudes
);
...
...
@@ -1059,8 +1059,8 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case
40
:
case
60
:
{
if
(
globs
->
Fouriers
==
0
)
Err
or
(
"number of fourier coefficients undefined"
);
if
(
globs
->
Latitudes
==
0
)
Err
or
(
"number of latitudes undefined"
);
if
(
globs
->
Fouriers
==
0
)
cdoAb
or
t
(
"number of fourier coefficients undefined"
);
if
(
globs
->
Latitudes
==
0
)
cdoAb
or
t
(
"number of latitudes undefined"
);
ogridID
=
gridCreate
(
GRID_FOURIER
,
globs
->
Fouriers
*
globs
->
Latitudes
);
gridDefXsize
(
ogridID
,
globs
->
Latitudes
);
...
...
@@ -1071,14 +1071,14 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
case
41
:
case
61
:
{
if
(
globs
->
Latitudes
==
0
)
Err
or
(
"Number of latitudes undefined"
);
if
(
globs
->
Latitudes
==
0
)
cdoAb
or
t
(
"Number of latitudes undefined"
);
ogridID
=
gridCreate
(
GRID_GAUSSIAN
,
globs
->
Latitudes
);
gridDefXsize
(
ogridID
,
1
);
gridDefYsize
(
ogridID
,
globs
->
Latitudes
);
break
;
}
default:
Err
or
(
"TYPE %d unsupported"
,
globs
->
Type
);
default:
cdoAb
or
t
(
"TYPE %d unsupported"
,
globs
->
Type
);
}
if
(
ogridID
!=
-
1
)
...
...
@@ -1090,7 +1090,7 @@ after_defineGrid(struct Control *globs, struct Variable *vars)
}
}
if
(
ogridID
==
-
1
)
Err
or
(
"out grid undefined"
);
if
(
ogridID
==
-
1
)
cdoAb
or
t
(
"out grid undefined"
);
}
static
void
...
...
@@ -1164,13 +1164,13 @@ after_checkNamelist(struct Control *globs)
{
if
(
globs
->
Mean
&&
globs
->
Type
<
20
)
{
Err
or
(
"Mean is only available for TYPE >= 20!"
);
cdoAb
or
t
(
"Mean is only available for TYPE >= 20!"
);
}
if
(
globs
->
Extrapolate
==
false
&&
globs
->
Type
>=
30
)
{
if
(
globs
->
Type
>
30
)
Err
or
(
"EXTRAPOLATE = 0 is only available for TYPE = 30!"
);
if
(
globs
->
Mean
)
Err
or
(
"EXTRAPOLATE = 0 is only available with MEAN = 0!"
);
if
(
globs
->
Type
>
30
)
cdoAb
or
t
(
"EXTRAPOLATE = 0 is only available for TYPE = 30!"
);
if
(
globs
->
Mean
)
cdoAb
or
t
(
"EXTRAPOLATE = 0 is only available with MEAN = 0!"
);
}
}
...
...
@@ -1238,7 +1238,7 @@ after_parini(struct Control *globs, struct Variable *vars)
int
gribFormat
=
scan_par_obsolate
(
namelist
,
"grib"
,
0
);
int
cdfFormat
=
scan_par_obsolate
(
namelist
,
"netcdf"
,
0
);
if
(
gribFormat
&&
cdfFormat
)
Err
or
(
"GRIB or NetCDF?"
);
if
(
gribFormat
&&
cdfFormat
)
cdoAb
or
t
(
"GRIB or NetCDF?"
);
switch
(
fileFormat
)
{
...
...
@@ -1250,7 +1250,7 @@ after_parini(struct Control *globs, struct Variable *vars)
case
4
:
ofiletype
=
CDI_FILETYPE_NC2
;
break
;
case
5
:
ofiletype
=
CDI_FILETYPE_NC5
;
break
;
case
6
:
ofiletype
=
CDI_FILETYPE_NC4
;
break
;
default:
Err
or
(
"unknown file format %d"
,
fileFormat
);
default:
cdoAb
or
t
(
"unknown file format %d"
,
fileFormat
);
}
if
(
gribFormat
)
ofiletype
=
CDI_FILETYPE_GRB
;
...
...
@@ -1264,7 +1264,7 @@ after_parini(struct Control *globs, struct Variable *vars)
case
24
:
DataType
=
CDI_DATATYPE_PACK24
;
break
;
case
32
:
DataType
=
CDI_DATATYPE_FLT32
;
break
;
case
64
:
DataType
=
CDI_DATATYPE_FLT64
;
break
;
default:
Err
or
(
"unsupported data precision %d"
,
precision
);
default:
cdoAb
or
t
(
"unsupported data precision %d"
,
precision
);
}
globs
->
unitsel
=
scan_par
(
globs
->
Verbose
,
namelist
,
"unitsel"
,
0
);
...
...
@@ -1359,10 +1359,10 @@ after_precntl(struct Control *globs, struct Variable *vars)
if
(
globs
->
Debug
)
{
Message
(
"nvars = %d"
,
nvars
);
Message
(
"ngrids = %d"
,
ngrids
);
Message
(
"nverts = %d"
,
nverts
);
Message
(
"ntsteps = %d"
,
ntsteps
);
cdo
Message
(
"nvars = %d"
,
nvars
);
cdo
Message
(
"ngrids = %d"
,
ngrids
);
cdo
Message
(
"nverts = %d"
,
nverts
);
cdo
Message
(
"ntsteps = %d"
,
ntsteps
);
}
for
(
index
=
0
;
index
<
ngrids
;
index
++
)
...
...
@@ -1386,7 +1386,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if
(
globs
->
Truncation
==
0
&&
globs
->
Latitudes
==
0
)
Err
or
(
"Unsupported file structure (no spectral or Gaussian data found)!"
);
if
(
globs
->
Truncation
==
0
&&
globs
->
Latitudes
==
0
)
cdoAb
or
t
(
"Unsupported file structure (no spectral or Gaussian data found)!"
);
if
(
globs
->
Truncation
==
0
)
{
...
...
@@ -1429,11 +1429,11 @@ after_precntl(struct Control *globs, struct Variable *vars)
{
if
(
nvct
==
0
)
{
if
(
numlevel
!=
191
)
Warning
(
"VCT missing for hybrid level data with %d levels!"
,
numlevel
);
if
(
numlevel
!=
191
)
cdo
Warning
(
"VCT missing for hybrid level data with %d levels!"
,
numlevel
);
}
else
{
Warning
(
"Skip %d hybrid level data with %d levels!"
,
(
nvct
/
2
-
1
),
numlevel
);
cdo
Warning
(
"Skip %d hybrid level data with %d levels!"
,
(
nvct
/
2
-
1
),
numlevel
);
}
continue
;
}
...
...
@@ -1441,7 +1441,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
else
if
(
leveltype
==
ZAXIS_HYBRID
&&
globs
->
nvct
==
zaxisInqVctSize
(
zaxisID
))
continue
;
if
(
iVertID
!=
-
1
)
Warning
(
"More than %d different vertical grid structure found!"
,
vertfound
);
if
(
iVertID
!=
-
1
)
cdo
Warning
(
"More than %d different vertical grid structure found!"
,
vertfound
);
vertfound
++
;
...
...
@@ -1468,12 +1468,12 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
else
{
Err
or
(
"VCT not defined in inputfile!"
);
cdoAb
or
t
(
"VCT not defined in inputfile!"
);
}
}
if
(
numlevel
!=
(
globs
->
nvct
/
2
-
1
))
Err
or
(
"Number of hybrid levels %d does not match VCT levels %d"
,
numlevel
,
globs
->
nvct
/
2
-
1
);
cdoAb
or
t
(
"Number of hybrid levels %d does not match VCT levels %d"
,
numlevel
,
globs
->
nvct
/
2
-
1
);
if
(
globs
->
Debug
)
for
(
i
=
0
;
i
<
globs
->
nvct
/
2
;
i
++
)
...
...
@@ -1485,7 +1485,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
}
}
if
(
nhzaxis
>
0
&&
globs
->
nvct
==
0
)
Err
or
(
"VCT missing!"
);
if
(
nhzaxis
>
0
&&
globs
->
nvct
==
0
)
cdoAb
or
t
(
"VCT missing!"
);
globs
->
NumLevel
=
globs
->
NumLevelFound
;
...
...
@@ -1534,7 +1534,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
code
=
vlistInqVarCode
(
globs
->
ivlistID
,
varID
);
if
(
code
<=
0
||
code
>=
MaxCodes
)
{
Warning
(
"Code number %d out of range, variable ignored!"
,
code
);
cdo
Warning
(
"Code number %d out of range, variable ignored!"
,
code
);
continue
;
}
gridtype
=
gridInqType
(
gridID
);
...
...
@@ -1553,7 +1553,7 @@ after_precntl(struct Control *globs, struct Variable *vars)
fprintf
(
stderr
,
"Code %3d Levels = %3d LevelType = %3d GridType = %3d
\n
"
,
code
,
numlevel
,
leveltype
,
gridtype
);
}
if
(
globs
->
Debug
)
Message
(
"FieldDim = %d"
,
FieldDim
);
if
(
globs
->
Debug
)
cdo
Message
(
"FieldDim = %d"
,
FieldDim
);
globs
->
Field
=
(
double
*
)
Malloc
(
FieldDim
*
sizeof
(
double
));
...
...
@@ -1613,14 +1613,14 @@ after_postcntl(struct Control *globs, struct Variable *vars)
if
(
ogridID
==
-
1
)
{
/*
Warning( "undefined grid for code %d", code);
cdo
Warning( "undefined grid for code %d", code);
*/
continue
;
}
if
(
ozaxisID
==
-
1
)
{
/*
Warning( "undefined level for code %d", code);
cdo
Warning( "undefined level for code %d", code);
*/
continue
;
}
...
...
@@ -1704,7 +1704,7 @@ after_readVct(struct Control *globs, const char *vctfile)
double
va
,
vb
;
FILE
*
fp
=
fopen
(
vctfile
,
"r"
);
if
(
fp
==
nullptr
)
SysError
(
"Open failed on %s"
,
vctfile
);
if
(
fp
==
nullptr
)
cdo
SysError
(
"Open failed on %s"
,
vctfile
);
while
(
fgets
(
line
,
1023
,
fp
))
{
...
...
@@ -1842,10 +1842,10 @@ after_processing(struct Control *globs, struct Variable *vars)
if
(
globs
->
Type
==
10
||
globs
->
Type
==
40
||
globs
->
Type
==
60
)
{
if
(
ofiletype
==
CDI_FILETYPE_GRB
)
Err
or
(
"Can't write fourier coefficients to GRIB!"
);
cdoAb
or
t
(
"Can't write fourier coefficients to GRIB!"
);
else
if
(
ofiletype
==
CDI_FILETYPE_NC
||
ofiletype
==
CDI_FILETYPE_NC2
||
ofiletype
==
CDI_FILETYPE_NC4
||
ofiletype
==
CDI_FILETYPE_NC4C
||
ofiletype
==
CDI_FILETYPE_NC5
)
Err
or
(
"Can't write fourier coefficients to NetCDF!"
);
cdoAb
or
t
(
"Can't write fourier coefficients to NetCDF!"
);
}
filename
=
strrchr
(
ifile
,
'/'
);
...
...
@@ -1972,7 +1972,7 @@ Afterburner(void *process)
globs
->
Nfiles
=
nfiles
-
1
;
if
(
globs
->
Nfiles
>
0
)
{
if
(
globs
->
Multi
>
0
)
Err
or
(
"Namelist parameter MULTI works only with one inputfile"
);
if
(
globs
->
Multi
>
0
)
cdoAb
or
t
(
"Namelist parameter MULTI works only with one inputfile"
);
ifiles
=
(
const
char
**
)
Malloc
(
globs
->
Nfiles
*
sizeof
(
char
*
));
for
(
int
i
=
0
;
i
<
globs
->
Nfiles
;
++
i
)
ifiles
[
i
]
=
cdoGetStreamName
(
--
nfiles
);
...
...
src/CMOR.cc
View file @
d0ef9091
This diff is collapsed.
Click to expand it.
src/CMOR_lite.cc
View file @
d0ef9091
...
...
@@ -93,33 +93,33 @@ cmor_check_eval(int vlistID, int nvars, std::vector<CmorVar> &vars)
vlistInqVarName
(
vlistID
,
varID
,
varname
);
if
(
n_lower_min
>
0
)
Warning
(
"Invalid value(s) detected for variable '%s': %ld values were lower than minimum valid value (%.4g)."
,
cdo
Warning
(
"Invalid value(s) detected for variable '%s': %ld values were lower than minimum valid value (%.4g)."
,
varname
,
n_lower_min
,
var
.
valid_min
);
if
(
n_greater_max
>
0
)
Warning
(
"Invalid value(s) detected for variable '%s': %ld values were greater than maximum valid value (%.4g)."
,
cdo
Warning
(
"Invalid value(s) detected for variable '%s': %ld values were greater than maximum valid value (%.4g)."
,
varname
,
n_greater_max
,
var
.
valid_max
);
if
(
var
.
check_min_mean_abs
)
{
if
(
amean
<
.1
*
var
.
ok_min_mean_abs
)
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is lower by more than an order of magnitude than "
cdo
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is lower by more than an order of magnitude than "
"minimum allowed: %.4g"
,
varname
,
amean
,
var
.
ok_min_mean_abs
);
if
(
amean
<
var
.
ok_min_mean_abs
)
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is lower than minimum allowed: %.4g"
,
varname
,
amean
,
cdo
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is lower than minimum allowed: %.4g"
,
varname
,
amean
,
var
.
ok_min_mean_abs
);
}
if
(
var
.
check_max_mean_abs
)
{
if
(
amean
>
10.
*
var
.
ok_max_mean_abs
)
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is greater by more than an order of magnitude than "
cdo
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is greater by more than an order of magnitude than "
"maximum allowed: %.4g"
,
varname
,
amean
,
var
.
ok_max_mean_abs
);
if
(
amean
>
var
.
ok_max_mean_abs
)
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is greater than maximum allowed: %.4g"
,
varname
,
amean
,
cdo
Warning
(
"Invalid Absolute Mean for variable '%s' (%.5g) is greater than maximum allowed: %.4g"
,
varname
,
amean
,
var
.
ok_max_mean_abs
);
}
}
...
...
@@ -499,7 +499,7 @@ CMOR_lite(void *process)
}
if
(
nerr
)
{
Warning
(
"Udunits: Error converting units from [%s] to [%s], parameter: %s"
,
var
.
units_old
,
var
.
units
,
cdo
Warning
(
"Udunits: Error converting units from [%s] to [%s], parameter: %s"
,
var
.
units_old
,
var
.
units
,
var
.
name
);
var
.
changeunits
=
false
;
}
...
...
src/Change.cc
View file @
d0ef9091
...
...
@@ -141,7 +141,7 @@ changeName(const int vlistID1, const int vlistID2, const int nch, char *chnames[
}
for
(
int
i
=
0
;
i
<
npairs
;
++
i
)
if
(
!
namefound
[
i
])
Warning
(
"Variable name %s not found!"
,
vpairs
[
i
].
first
);
if
(
!
namefound
[
i
])
cdo
Warning
(
"Variable name %s not found!"
,
vpairs
[
i
].
first
);
}
void
*
...
...
src/Change_e5slm.cc
View file @
d0ef9091
...
...
@@ -72,7 +72,7 @@ Change_e5slm(void *process)
double
minval
,
maxval
;
arrayMinMax
(
gridsize
,
cland
.
data
(),
minval
,
maxval
);
if
(
minval
<
0
||
maxval
>
1
)
Warning
(
"Values of SLM out of bounds! (minval=%g, maxval=%g)"
,
minval
,
maxval
);
if
(
minval
<
0
||
maxval
>
1
)
cdo
Warning
(
"Values of SLM out of bounds! (minval=%g, maxval=%g)"
,
minval
,
maxval
);
streamClose
(
streamIDslm
);
...
...
src/Deltime.cc
View file @
d0ef9091
...
...
@@ -141,7 +141,7 @@ Deltime(void *process)
cdoStreamClose
(
streamID2
);
cdoStreamClose
(
streamID1
);
if
(
nfound
==
0
)
Warning
(
"Day %d%s not found!"
,
dday
,
cmons
[
dmon
]);
if
(
nfound
==
0
)
cdo
Warning
(
"Day %d%s not found!"
,
dday
,
cmons
[
dmon
]);
vlistDestroy
(
vlistID2
);
...
...
src/Derivepar.cc
View file @
d0ef9091
...
...
@@ -220,7 +220,7 @@ Derivepar(void *process)
if
(
operatorID
==
GHEIGHT
)
{
if
(
humID
==
-
1
)
Warning
(
"%s not found - using algorithm without %s!"
,
var_stdname
(
specific_humidity
),
var_stdname
(
specific_humidity
));
cdo
Warning
(
"%s not found - using algorithm without %s!"
,
var_stdname
(
specific_humidity
),
var_stdname
(
specific_humidity
));
else
hum
.
resize
(
gridsize
*
nhlevf
);
...
...
@@ -240,7 +240,7 @@ Derivepar(void *process)
if
(
zaxisIDh
!=
-
1
&&
sgeopotID
==
-
1
)
{
if
(
geopotID
==
-
1
)
Warning
(
"%s not found - set to zero!"
,
var_stdname
(
surface_geopotential
));
cdo
Warning
(
"%s not found - set to zero!"
,
var_stdname
(
surface_geopotential
));
else
cdoPrint
(
"%s not found - using bottom layer of %s!"
,
var_stdname
(
surface_geopotential
),
var_stdname
(
geopotential
));
...
...
@@ -335,11 +335,11 @@ Derivepar(void *process)
{
// check range of ps_prog
arrayMinMax
(
gridsize
,
ps
.
data
(),
minval
,
maxval
);
if
(
minval
<
MIN_PS
||
maxval
>
MAX_PS
)
Warning
(
"Surface pressure out of range (min=%g max=%g)!"
,
minval
,
maxval
);
if
(
minval
<
MIN_PS
||
maxval
>
MAX_PS
)
cdo
Warning
(
"Surface pressure out of range (min=%g max=%g)!"
,
minval
,
maxval
);
// check range of surface geopot
arrayMinMax
(
gridsize
,
sgeopot
.
data
(),
minval
,
maxval
);
if
(
minval
<
MIN_FIS
||
maxval
>
MAX_FIS
)
Warning
(
"Orography out of range (min=%g max=%g)!"
,
minval
,
maxval
);
if
(
minval
<
MIN_FIS
||
maxval
>
MAX_FIS
)
cdo
Warning
(
"Orography out of range (min=%g max=%g)!"
,
minval
,
maxval
);
}
varID
=
tempID
;
...
...
@@ -351,7 +351,7 @@ Derivepar(void *process)
arrayMinMax
(
gridsize
,
single2
,
minval
,
maxval
);
if
(
minval
<
MIN_T
||
maxval
>
MAX_T
)
Warning
(
"Input temperature at level %d out of range (min=%g max=%g)!"
,
levelID
+
1
,
minval
,
maxval
);
cdo
Warning
(
"Input temperature at level %d out of range (min=%g max=%g)!"
,
levelID
+
1
,
minval
,
maxval
);
}
if
(
humID
!=
-
1
)
...
...
@@ -367,7 +367,7 @@ Derivepar(void *process)
arrayMinMax
(
gridsize
,
single2
,
minval
,
maxval
);
if
(
minval
<
-
0.1
||
maxval
>
MAX_Q
)
Warning
(
"Input humidity at level %d out of range (min=%g max=%g)!"
,
levelID
+
1
,
minval
,
maxval
);
cdo
Warning
(
"Input humidity at level %d out of range (min=%g max=%g)!"
,
levelID
+
1
,
minval
,
maxval
);
}
}
...
...
src/Diff.cc
View file @
d0ef9091
...
...
@@ -324,8 +324,8 @@ Diff(void *process)
// fprintf(stdout, " %d of %d records differ more then one thousandth\n", nprec, ngrec);
}
if
(
nrecs
==
0
&&
nrecs2
>
0
)
Warning
(
"stream2 has more time steps than stream1!"
);
if
(
nrecs
>
0
&&
nrecs2
==
0
)
Warning
(
"stream1 has more time steps than stream2!"
);
if
(
nrecs
==
0
&&
nrecs2
>
0
)
cdo
Warning
(
"stream2 has more time steps than stream1!"
);
if
(
nrecs
>
0
&&
nrecs2
==
0
)
cdo
Warning
(
"stream1 has more time steps than stream2!"
);
cdoStreamClose
(
streamID1
);
cdoStreamClose
(
streamID2
);
...
...
src/EOFs.cc
View file @
d0ef9091
...
...
@@ -116,9 +116,9 @@ get_eigenmode(void)
eigen_mode
=
JACOBI
;
else
{
Warning
(
"Unknown environmental setting %s for CDO_SVD_MODE. Available options are"
,
envstr
);
Warning
(
" - 'jacobi' for a one-sided parallelized jacobi algorithm"
);
Warning
(
" - 'danielson_lanzcos' for the D/L algorithm"
);
cdo
Warning
(
"Unknown environmental setting %s for CDO_SVD_MODE. Available options are"
,
envstr
);
cdo
Warning
(
" - 'jacobi' for a one-sided parallelized jacobi algorithm"
);
cdo
Warning
(
" - 'danielson_lanzcos' for the D/L algorithm"
);
}
}
...
...
@@ -129,9 +129,9 @@ get_eigenmode(void)
#ifdef _OPENMP
if
(
omp_get_max_threads
()
>
1
&&
eigen_mode
==
DANIELSON_LANCZOS
)
{
Warning
(
"Requested parallel computation with %i Threads "
,
omp_get_max_threads
());
Warning
(
" but environmental setting CDO_SVD_MODE causes sequential "
);
Warning
(
" Singular value decomposition"
);
cdo
Warning
(
"Requested parallel computation with %i Threads "
,
omp_get_max_threads
());
cdo
Warning
(
" but environmental setting CDO_SVD_MODE causes sequential "
);
cdo
Warning
(
" Singular value decomposition"
);
}
#endif
...
...
@@ -151,7 +151,7 @@ get_weightmode(void)
else
if
(
!
strncmp
(
envstr
,
"on"
,
2
))
weight_mode
=
WEIGHT_ON
;
else
Warning
(
"Unknown environmental setting %s for CDO_WEIGHT_MODE. Available options are: on/off"
,
envstr
);
cdo
Warning
(
"Unknown environmental setting %s for CDO_WEIGHT_MODE. Available options are: on/off"
,
envstr
);
}
if
(
Options
::
cdoVerbose
)
...
...
@@ -272,10 +272,10 @@ EOFs(void *process)
{
if
(
n_eig
>
nts
)
{
Warning
(
"Solving in time-space:"
);
Warning
(
"Number of eigen-functions to write out is bigger than number of time-steps."
);
Warning
(
"Setting n_eig to %d."
,
nts
);
Warning
(
"If You want to force a solution in grid-space use operator eofspatial"
);
cdo
Warning
(
"Solving in time-space:"
);
cdo
Warning
(
"Number of eigen-functions to write out is bigger than number of time-steps."
);
cdo
Warning
(
"Setting n_eig to %d."
,
nts
);
cdo
Warning
(
"If You want to force a solution in grid-space use operator eofspatial"
);
n_eig
=
nts
;
}
n
=
nts
;
...
...
@@ -286,10 +286,10 @@ EOFs(void *process)
if
((
size_t
)
n_eig
>
gridsize
)
{
Warning
(
"Solving in spatial space"
);
Warning
(
"Number of eigen-functions to write out is bigger than grid size"
);
Warning
(
"Setting n_eig to %zu"
,
gridsize
);
Warning
(
"If You want to force a solution in time-space use operator eoftime"
);
cdo
Warning
(
"Solving in spatial space"
);
cdo
Warning
(
"Number of eigen-functions to write out is bigger than grid size"
);
cdo
Warning
(
"Setting n_eig to %zu"
,
gridsize
);
cdo
Warning
(
"If You want to force a solution in time-space use operator eoftime"
);
n_eig
=
gridsize
;
}
n
=
gridsize
;
...
...
@@ -307,7 +307,7 @@ EOFs(void *process)
if
(
wstatus
!=
0
)
{
weight_mode
=
WEIGHT_OFF
;
Warning
(
"Using constant grid cell area weights!"
);
cdo
Warning
(
"Using constant grid cell area weights!"
);
}
}
...
...
src/EcaIndices.cc
View file @
d0ef9091
...
...
@@ -1330,7 +1330,7 @@ EcaRx1day(void *process)
if
(
'm'
==
operatorArgv
()[
0
][
0
])
cdoOperatorAdd
(
"eca_rx1day"
,
0
,
8
,
nullptr
);
/* monthly mode */
else
Warning
(
"Parameter value '%s' is invalid. The only valid value is "
cdo
Warning
(
"Parameter value '%s' is invalid. The only valid value is "
"'m' indicating monthly mode. Operating in yearly mode now."
,
operatorArgv
()[
0
]);
}
...
...
src/Echam5ini.cc
View file @
d0ef9091
...
...
@@ -380,7 +380,7 @@ export_e5ml(const char *filename, VAR *vars, int nvars, int64_t vdate, int vtime
#if defined(NC_64BIT_OFFSET)
writemode
=
NC_CLOBBER
|
NC_64BIT_OFFSET
;
#else
Warning
(
"Datasize > 2GB and NC_64BIT_OFFSET not available!"
);
cdo
Warning
(
"Datasize > 2GB and NC_64BIT_OFFSET not available!"
);
#endif
}
...
...
src/Ensstat.cc
View file @
d0ef9091
...
...
@@ -273,17 +273,17 @@ Ensstat(void *process)
if
(
nrecs
==
0
)
{
lwarning
=
true
;
Warning
(
"Inconsistent ensemble file, too few time steps in %s!"
,
cdoGetStreamName
(
fileID
));
cdo
Warning
(
"Inconsistent ensemble file, too few time steps in %s!"
,
cdoGetStreamName
(
fileID
));
}
else
if
(
nrecs0
==
0
)
{
lwarning
=
true
;
Warning
(
"Inconsistent ensemble file, too few time steps in %s!"
,
cdoGetStreamName
(
0
));
cdo
Warning
(
"Inconsistent ensemble file, too few time steps in %s!"
,
cdoGetStreamName
(
0
));
}
else
{
lerror
=
true
;
Warning
(
"Inconsistent ensemble file, number of records at time step %d of %s and %s differ!"
,
tsID
+
1
,
cdo
Warning
(
"Inconsistent ensemble file, number of records at time step %d of %s and %s differ!"
,
tsID
+
1
,
cdoGetStreamName
(
0
),
cdoGetStreamName
(
fileID
));
}
goto
CLEANUP
;
...
...
@@ -332,7 +332,7 @@ Ensstat(void *process)
CLEANUP:
if
(
lwarning
)
Warning
(
"Inconsistent ensemble, processed only the first %d timesteps!"
,
tsID
);
if
(
lwarning
)
cdo
Warning
(
"Inconsistent ensemble, processed only the first %d timesteps!"
,
tsID
);
if
(
lerror
)
cdoAbort
(
"Inconsistent ensemble, processed only the first %d timesteps!"
,
tsID
);
for
(
int
fileID
=
0
;
fileID
<
nfiles
;
fileID
++
)
cdoStreamClose
(
ef
[
fileID
].
streamID
);
...
...
src/Ensstat3.cc
View file @
d0ef9091
...
...
@@ -194,9 +194,9 @@ Ensstat3(void *process)
{
if
(
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
))
>
1
)
{
Warning
(
"More than one level not supported when processing ranked histograms."
);
Warning
(
"Try to use `cdo splitlevel` to split the dataset into levels and apply"
);
Warning
(
"the operator seperately to each level."
);
cdo
Warning
(
"More than one level not supported when processing ranked histograms."
);
cdo
Warning
(
"Try to use `cdo splitlevel` to split the dataset into levels and apply"
);
cdo
Warning
(
"the operator seperately to each level."
);
cdoAbort
(
"Exit due to unsupported file structure"
);
}