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
libcdi
Commits
3256ff69
Commit
3256ff69
authored
Oct 08, 2017
by
Uwe Schulzweida
Browse files
Merge branch 'develop' into gridsize
parents
15e51519
a8cb47fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Makefile.in
View file @
3256ff69
...
...
@@ -947,8 +947,8 @@ distclean-generic:
maintainer-clean-generic
:
@
echo
"This command is intended for maintainers to use"
@
echo
"it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
@ENABLE_CDI_LIB_FALSE@uninstall-local
:
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
clean
:
clean-am
clean-am
:
clean-generic clean-libLTLIBRARIES clean-libtool
\
...
...
src/varscan.c
View file @
3256ff69
...
...
@@ -446,10 +446,10 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
if
(
numavg
)
vartable
[
varID
].
timave
=
1
;
if
(
name
)
if
(
name
[
0
]
)
vartable
[
varID
].
name
=
strdup
(
name
);
if
(
stdname
)
if
(
stdname
[
0
]
)
vartable
[
varID
].
stdname
=
strdup
(
stdname
);
if
(
longname
)
if
(
longname
[
0
]
)
vartable
[
varID
].
longname
=
strdup
(
longname
);
if
(
units
)
if
(
units
[
0
]
)
vartable
[
varID
].
units
=
strdup
(
units
);
if
(
name
&&
name
[
0
]
)
vartable
[
varID
].
name
=
strdup
(
name
);
if
(
stdname
&&
stdname
[
0
]
)
vartable
[
varID
].
stdname
=
strdup
(
stdname
);
if
(
longname
&&
longname
[
0
]
)
vartable
[
varID
].
longname
=
strdup
(
longname
);
if
(
units
&&
units
[
0
]
)
vartable
[
varID
].
units
=
strdup
(
units
);
}
else
{
...
...
@@ -902,17 +902,17 @@ bool zaxisCompare(int zaxisID, int zaxistype, int nlevels, bool lbounds, const d
if
(
!
differ
)
{
if
(
longname
)
if
(
longname
&&
longname
[
0
]
)
{
char
zlongname
[
CDI_MAX_NAME
];
char
zlongname
[
CDI_MAX_NAME
];
zlongname
[
0
]
=
0
;
zaxisInqLongname
(
zaxisID
,
zlongname
);
if
(
zlongname
[
0
]
&&
strcmp
(
longname
,
zlongname
)
!=
0
)
differ
=
true
;
if
(
zlongname
[
0
]
&&
(
strcmp
(
longname
,
zlongname
)
!=
0
)
)
differ
=
true
;
}
if
(
units
)
if
(
units
&&
units
[
0
]
)
{
char
zunits
[
CDI_MAX_NAME
];
char
zunits
[
CDI_MAX_NAME
];
zunits
[
0
]
=
0
;
zaxisInqUnits
(
zaxisID
,
zunits
);
if
(
zunits
[
0
]
&&
strcmp
(
units
,
zunits
)
!=
0
)
differ
=
true
;
if
(
zunits
[
0
]
&&
(
strcmp
(
units
,
zunits
)
!=
0
)
)
differ
=
true
;
}
}
}
...
...
@@ -950,7 +950,8 @@ varDefZAxisSearch(int id, void *res, void *data)
}
int
varDefZaxis
(
int
vlistID
,
int
zaxistype
,
int
nlevels
,
const
double
*
levels
,
const
char
**
cvals
,
size_t
clength
,
bool
lbounds
,
const
double
*
levels1
,
const
double
*
levels2
,
int
vctsize
,
const
double
*
vct
,
char
*
name
,
int
varDefZaxis
(
int
vlistID
,
int
zaxistype
,
int
nlevels
,
const
double
*
levels
,
const
char
**
cvals
,
size_t
clength
,
bool
lbounds
,
const
double
*
levels1
,
const
double
*
levels2
,
int
vctsize
,
const
double
*
vct
,
char
*
name
,
const
char
*
longname
,
const
char
*
units
,
int
prec
,
int
mode
,
int
ltype1
)
{
/*
...
...
@@ -1019,7 +1020,9 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, const double *levels, c
if
(
name
&&
name
[
0
]
)
zaxisDefName
(
zaxisID
,
name
);
if
(
longname
&&
longname
[
0
]
)
zaxisDefLongname
(
zaxisID
,
longname
);
else
zaxisDefLongname
(
zaxisID
,
""
);
if
(
units
&&
units
[
0
]
)
zaxisDefUnits
(
zaxisID
,
units
);
else
zaxisDefUnits
(
zaxisID
,
""
);
zaxisDefDatatype
(
zaxisID
,
prec
);
zaxisDefLtype
(
zaxisID
,
ltype1
);
}
...
...
src/zaxis.c
View file @
3256ff69
...
...
@@ -387,7 +387,7 @@ The function @func{cdiZaxisDefKeyStr} defines a CDI Z-axis string value from a k
*/
int
cdiZaxisDefKeyStr
(
int
zaxisID
,
int
key
,
int
size
,
const
char
*
mesg
)
{
if
(
size
<
1
||
mesg
==
NULL
||
*
mesg
==
0
)
return
-
1
;
if
(
size
<
1
||
mesg
==
NULL
)
return
-
1
;
zaxis_t
*
zaxisptr
=
zaxis_to_pointer
(
zaxisID
);
...
...
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