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
1549d6e7
Commit
1549d6e7
authored
1 week ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
vlistChangeZaxis: added call to delete_chunks() (bug fix)
parent
3b65d721
No related branches found
Branches containing commit
No related tags found
1 merge request
!146
enable-hirlam-extensions failed since release 2.5.1 (bug fix)
Pipeline
#101439
passed
1 week ago
Stage: basic
Stage: levante
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
src/vlist.c
+19
-16
19 additions, 16 deletions
src/vlist.c
with
23 additions
and
16 deletions
ChangeLog
+
4
−
0
View file @
1549d6e7
2025-03-27 Uwe Schulzweida
* vlistChangeZaxis: added call to delete_chunks() (bug fix)
2025-03-14 Uwe Schulzweida
2025-03-14 Uwe Schulzweida
* enable-hirlam-extensions failed since release 2.5.1 (bug fix)
* enable-hirlam-extensions failed since release 2.5.1 (bug fix)
...
...
This diff is collapsed.
Click to expand it.
src/vlist.c
+
19
−
16
View file @
1549d6e7
...
@@ -507,6 +507,22 @@ vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *leve
...
@@ -507,6 +507,22 @@ vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *leve
return
zaxisID
;
return
zaxisID
;
}
}
static
void
delete_chunks
(
int
vlistID
,
int
varID
)
{
int
chunkKeys
[
4
]
=
{
CDI_KEY_CHUNKSIZE_DIMX
,
CDI_KEY_CHUNKSIZE_DIMY
,
CDI_KEY_CHUNKSIZE_DIMZ
,
CDI_KEY_CHUNKSIZE_DIMT
};
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
int
chunkSize
=
0
;
cdiInqKeyInt
(
vlistID
,
varID
,
chunkKeys
[
i
],
&
chunkSize
);
if
(
chunkSize
!=
0
)
cdiDeleteKey
(
vlistID
,
varID
,
chunkKeys
[
i
]);
}
int
chunkSize
=
0
;
cdiInqKeyInt
(
vlistID
,
varID
,
CDI_KEY_CHUNKSIZE
,
&
chunkSize
);
if
(
chunkSize
>
0
)
cdiDeleteKey
(
vlistID
,
varID
,
CDI_KEY_CHUNKSIZE
);
}
/*
/*
@Function vlistCopyFlag
@Function vlistCopyFlag
@Title Copy some entries of a variable list
@Title Copy some entries of a variable list
...
@@ -708,6 +724,7 @@ vlistCopyFlag(int vlistID2, int vlistID1)
...
@@ -708,6 +724,7 @@ vlistCopyFlag(int vlistID2, int vlistID1)
zaxisID
=
zaxisID2
;
zaxisID
=
zaxisID2
;
vars2
[
varID2
].
zaxisID
=
zaxisID2
;
vars2
[
varID2
].
zaxisID
=
zaxisID2
;
delete_chunks
(
vlistID2
,
varID2
);
}
}
for
(
int
levID
=
0
;
levID
<
nlevs2
;
levID
++
)
for
(
int
levID
=
0
;
levID
<
nlevs2
;
levID
++
)
...
@@ -1350,22 +1367,6 @@ vlistGridIndex(int vlistID, int gridID)
...
@@ -1350,22 +1367,6 @@ vlistGridIndex(int vlistID, int gridID)
return
index
;
return
index
;
}
}
static
void
delete_chunks
(
int
vlistID
,
int
varID
)
{
int
chunkKeys
[
4
]
=
{
CDI_KEY_CHUNKSIZE_DIMX
,
CDI_KEY_CHUNKSIZE_DIMY
,
CDI_KEY_CHUNKSIZE_DIMZ
,
CDI_KEY_CHUNKSIZE_DIMT
};
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
int
chunkSize
=
0
;
cdiInqKeyInt
(
vlistID
,
varID
,
chunkKeys
[
i
],
&
chunkSize
);
if
(
chunkSize
!=
0
)
cdiDeleteKey
(
vlistID
,
varID
,
chunkKeys
[
i
]);
}
int
chunkSize
=
0
;
cdiInqKeyInt
(
vlistID
,
varID
,
CDI_KEY_CHUNKSIZE
,
&
chunkSize
);
if
(
chunkSize
>
0
)
cdiDeleteKey
(
vlistID
,
varID
,
CDI_KEY_CHUNKSIZE
);
}
void
void
vlistChangeGridIndex
(
int
vlistID
,
int
index
,
int
gridID
)
vlistChangeGridIndex
(
int
vlistID
,
int
index
,
int
gridID
)
{
{
...
@@ -1457,6 +1458,7 @@ vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
...
@@ -1457,6 +1458,7 @@ vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
if
(
vlistptr
->
vars
[
varID
].
zaxisID
==
zaxisIDold
)
if
(
vlistptr
->
vars
[
varID
].
zaxisID
==
zaxisIDold
)
{
{
vlistptr
->
vars
[
varID
].
zaxisID
=
zaxisID
;
vlistptr
->
vars
[
varID
].
zaxisID
=
zaxisID
;
delete_chunks
(
vlistID
,
varID
);
if
(
vlistptr
->
vars
[
varID
].
levinfo
&&
nlevs
!=
nlevsOld
)
if
(
vlistptr
->
vars
[
varID
].
levinfo
&&
nlevs
!=
nlevsOld
)
{
{
vlistptr
->
vars
[
varID
].
levinfo
vlistptr
->
vars
[
varID
].
levinfo
...
@@ -1490,6 +1492,7 @@ vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
...
@@ -1490,6 +1492,7 @@ vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
if
(
vlistptr
->
vars
[
varID
].
zaxisID
==
zaxisID1
)
if
(
vlistptr
->
vars
[
varID
].
zaxisID
==
zaxisID1
)
{
{
vlistptr
->
vars
[
varID
].
zaxisID
=
zaxisID2
;
vlistptr
->
vars
[
varID
].
zaxisID
=
zaxisID2
;
delete_chunks
(
vlistID
,
varID
);
if
(
vlistptr
->
vars
[
varID
].
levinfo
&&
nlevs2
!=
nlevs1
)
if
(
vlistptr
->
vars
[
varID
].
levinfo
&&
nlevs2
!=
nlevs1
)
{
{
...
...
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