Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
e45c9153
Commit
e45c9153
authored
16 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
set default missval of INT8/16/32 to SCHAR_MIN/SHRT_MIN/INT_MIN
parent
b3675328
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
src/vlist_var.c
+35
-1
35 additions, 1 deletion
src/vlist_var.c
with
36 additions
and
1 deletion
ChangeLog
+
1
−
0
View file @
e45c9153
...
...
@@ -3,6 +3,7 @@
* add support for GRID type SINUSOIDAL
* add support for GRID type LAEA
* add support of GRIB level type MEANSEA
* set default missval of INT8/16/32 to SCHAR_MIN/SHRT_MIN/INT_MIN
* move grid_lcc, grid_gme, grid_rot code to CDO
* move gridToCurvilinear and gridToCell code to CDO
* cdf_inq_contents: check zaxis type "depth_blow_sea/land" (bug fix)
...
...
This diff is collapsed.
Click to expand it.
src/vlist_var.c
+
35
−
1
View file @
e45c9153
...
...
@@ -2,6 +2,8 @@
# include "config.h"
#endif
#include
<limits.h>
#include
"dmemory.h"
#include
"cdi.h"
#include
"stream_int.h"
...
...
@@ -696,9 +698,35 @@ void vlistDefVarDatatype(int vlistID, int varID, int datatype)
vlistCheckVarID
(
func
,
vlistID
,
varID
);
vlistptr
->
vars
[
varID
].
datatype
=
datatype
;
vlistptr
->
vars
[
varID
].
datatype
=
datatype
;
if
(
vlistptr
->
vars
[
varID
].
missvalused
==
FALSE
)
{
switch
(
datatype
)
{
case
DATATYPE_INT8
:
vlistptr
->
vars
[
varID
].
missval
=
SCHAR_MIN
;
break
;
case
DATATYPE_UINT8
:
vlistptr
->
vars
[
varID
].
missval
=
UCHAR_MAX
;
break
;
case
DATATYPE_INT16
:
vlistptr
->
vars
[
varID
].
missval
=
SHRT_MIN
;
break
;
case
DATATYPE_UINT16
:
vlistptr
->
vars
[
varID
].
missval
=
USHRT_MAX
;
break
;
case
DATATYPE_INT32
:
vlistptr
->
vars
[
varID
].
missval
=
INT_MIN
;
break
;
case
DATATYPE_UINT32
:
vlistptr
->
vars
[
varID
].
missval
=
UINT_MAX
;
break
;
}
}
}
void
vlistDefVarInstitut
(
int
vlistID
,
int
varID
,
int
instID
)
{
VLIST
*
vlistptr
;
...
...
@@ -708,6 +736,7 @@ void vlistDefVarInstitut(int vlistID, int varID, int instID)
vlistptr
->
vars
[
varID
].
instID
=
instID
;
}
int
vlistInqVarInstitut
(
int
vlistID
,
int
varID
)
{
VLIST
*
vlistptr
;
...
...
@@ -717,6 +746,7 @@ int vlistInqVarInstitut(int vlistID, int varID)
return
(
vlistptr
->
vars
[
varID
].
instID
);
}
void
vlistDefVarModel
(
int
vlistID
,
int
varID
,
int
modelID
)
{
VLIST
*
vlistptr
;
...
...
@@ -726,6 +756,7 @@ void vlistDefVarModel(int vlistID, int varID, int modelID)
vlistptr
->
vars
[
varID
].
modelID
=
modelID
;
}
int
vlistInqVarModel
(
int
vlistID
,
int
varID
)
{
VLIST
*
vlistptr
;
...
...
@@ -735,6 +766,7 @@ int vlistInqVarModel(int vlistID, int varID)
return
(
vlistptr
->
vars
[
varID
].
modelID
);
}
void
vlistDefVarTable
(
int
vlistID
,
int
varID
,
int
tableID
)
{
VLIST
*
vlistptr
;
...
...
@@ -744,6 +776,7 @@ void vlistDefVarTable(int vlistID, int varID, int tableID)
vlistptr
->
vars
[
varID
].
tableID
=
tableID
;
}
int
vlistInqVarTable
(
int
vlistID
,
int
varID
)
{
int
tableID
;
...
...
@@ -945,6 +978,7 @@ void vlistDefVarMissval(int vlistID, int varID, double missval)
vlistptr
->
vars
[
varID
].
missvalused
=
TRUE
;
}
void
vlistDefVarScalefactor
(
int
vlistID
,
int
varID
,
double
scalefactor
)
{
static
char
func
[]
=
"vlistDefVarScalefactor"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment