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
46ebf9d7
Commit
46ebf9d7
authored
1 month ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Replaced gridDefDatatype()/gridInqDatatype() by cdiDefKeyInt()/cdiInqKeyInt() with CDI_KEY_DATATYPE
parent
e311236c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!136
M214003/develop
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/printinfo.c
+5
-4
5 additions, 4 deletions
app/printinfo.c
examples/pio/compareResourcesArray.c
+1
-1
1 addition, 1 deletion
examples/pio/compareResourcesArray.c
tests/test_resource_copy.c
+2
-2
2 additions, 2 deletions
tests/test_resource_copy.c
with
8 additions
and
7 deletions
app/printinfo.c
+
5
−
4
View file @
46ebf9d7
...
...
@@ -300,8 +300,8 @@ printGridInfoKernel(int gridID, int index, bool lproj)
size_t
xsize
=
(
size_t
)
gridInqXsize
(
gridID
);
size_t
ysize
=
(
size_t
)
gridInqYsize
(
gridID
);
// int
prec = gridInqDatatype(gridID)
;
//
int dig = (prec ==
CDI_DATATYPE
_FLT64) ? 15 : 7
;
// int
datatype
;
//
cdiInqKeyInt(gridID, CDI_GLOBAL,
CDI_
KEY_
DATATYPE
, &datatype)
;
int
dig
=
7
;
if
(
!
lproj
)
...
...
@@ -537,8 +537,9 @@ printZaxisInfo(int vlistID)
int
ltype
=
0
;
cdiInqKeyInt
(
zaxisID
,
CDI_GLOBAL
,
CDI_KEY_TYPEOFFIRSTFIXEDSURFACE
,
&
ltype
);
int
levelsize
=
zaxisInqSize
(
zaxisID
);
// int prec = zaxisInqDatatype(zaxisID);
// int dig = (prec == CDI_DATATYPE_FLT64) ? 15 : 7;
// int datatype;
// cdiInqKeyInt(gridID, CDI_GLOBAL, CDI_KEY_DATATYPE, &datatype);
// int dig = (datatype == CDI_DATATYPE_FLT64) ? 15 : 7;
zaxisName
(
zaxistype
,
zaxisname
);
int
length
=
CDI_MAX_NAME
;
...
...
This diff is collapsed.
Click to expand it.
examples/pio/compareResourcesArray.c
+
1
−
1
View file @
46ebf9d7
...
...
@@ -60,7 +60,7 @@ defineGrid()
cdiDefKeyString
(
gridID
,
CDI_XAXIS
,
CDI_KEY_UNITS
,
"myXunits"
);
cdiDefKeyString
(
gridID
,
CDI_YAXIS
,
CDI_KEY_UNITS
,
"myYunits"
);
gridDefDatatype
(
gridID
,
DOUBLE_PRECISION
);
cdiDefKeyInt
(
gridID
,
CDI_GLOBAL
,
CDI_KEY_DATATYPE
,
DOUBLE_PRECISION
);
gridDefTrunc
(
gridID
,
1
);
cdiDefKeyInt
(
gridID
,
CDI_GLOBAL
,
CDI_KEY_NUMBEROFGRIDUSED
,
6
);
...
...
This diff is collapsed.
Click to expand it.
tests/test_resource_copy.c
+
2
−
2
View file @
46ebf9d7
...
...
@@ -63,7 +63,7 @@ defineGrid(void)
cdiDefKeyString
(
gridID
,
CDI_XAXIS
,
CDI_KEY_UNITS
,
"myXunits"
);
cdiDefKeyString
(
gridID
,
CDI_YAXIS
,
CDI_KEY_UNITS
,
"myYunits"
);
gridDefDatatype
(
gridID
,
DOUBLE_PRECISION
);
cdiDefKeyInt
(
gridID
,
CDI_GLOBAL
,
CDI_KEY_DATATYPE
,
DOUBLE_PRECISION
);
gridDefTrunc
(
gridID
,
1
);
gridDefParamGME
(
gridID
,
2
,
3
,
4
,
5
);
...
...
@@ -164,7 +164,7 @@ defineVlist(int gridID, int zaxisID, int taxisID)
cdiDefAttTxt
(
vlistID
,
varID2
,
"txt demo"
,
6
,
"banana"
);
vlistDefTaxis
(
vlistID
,
taxisID
);
int
vlistID2
=
vlistDuplicate
(
vlistID
);
return
(
struct
idPair
){
vlistID
,
vlistID2
};
return
(
struct
idPair
)
{
vlistID
,
vlistID2
};
}
static
int
...
...
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