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
2a5da824
Commit
2a5da824
authored
6 months ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
absolute timeaxis failed with timeunits seconds [Bug #11916]
parent
397588b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!100
absolute timeaxis failed with timeunits seconds [Bug #11916]
Pipeline
#81733
canceled
6 months ago
Stage: basic
Stage: levante
Stage: breeze
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+8
-0
8 additions, 0 deletions
ChangeLog
src/stream_cdf_time.c
+3
-5
3 additions, 5 deletions
src/stream_cdf_time.c
src/taxis.c
+4
-1
4 additions, 1 deletion
src/taxis.c
with
15 additions
and
6 deletions
ChangeLog
+
8
−
0
View file @
2a5da824
2024-09-19 Uwe Schulzweida
* Version 2.4.4 released
2024-09-18 Uwe Schulzweida
* absolute timeaxis failed with timeunits seconds [Bug #11916]
2024-08-14 Uwe Schulzweida
* Version 2.4.3 released
...
...
This diff is collapsed.
Click to expand it.
src/stream_cdf_time.c
+
3
−
5
View file @
2a5da824
...
...
@@ -203,11 +203,9 @@ cdfDefTime(stream_t *streamptr)
}
else
{
/* define bogus value since at this time, streamDefTimestep has
* not been called yet
* but since taxis->units is not set, it clearly will not
* exceed the size of unitstr_, i.e. when defining the units
* attribute to this value, a later redefinition will not
/* define bogus value since at this time, streamDefTimestep has not been called yet
* but since taxis->units is not set, it clearly will not exceed the size of unitstr_,
* i.e. when defining the units attribute to this value, a later redefinition will not
* cause a recreation of on-disk data
*/
for
(
size_t
i
=
0
;
i
<
CDF_MAX_TIME_UNIT_STR
;
++
i
)
unitsStr_
[
i
]
=
'a'
;
...
...
This diff is collapsed.
Click to expand it.
src/taxis.c
+
4
−
1
View file @
2a5da824
...
...
@@ -1289,6 +1289,7 @@ cdi_decode_timeval(double timevalue, const taxis_t *taxis)
return
(
taxis
->
type
==
TAXIS_ABSOLUTE
)
?
split_timevalue
(
timevalue
,
taxis
->
unit
)
:
rtimeval2datetime
(
timevalue
,
taxis
);
}
/*
static int64_t
datetime2seconds(CdiDateTime datetime)
{
...
...
@@ -1305,7 +1306,7 @@ datetime2seconds(CdiDateTime datetime)
return seconds;
}
*/
double
cdi_encode_timeval
(
CdiDateTime
datetime
,
taxis_t
*
taxis
)
{
...
...
@@ -1322,10 +1323,12 @@ cdi_encode_timeval(CdiDateTime datetime, taxis_t *taxis)
int64_t
xdate
=
cdiDate_get
(
datetime
.
date
);
timeValue
=
(
double
)
xdate
/
100
+
copysign
((
double
)
(
datetime
.
date
.
day
!=
0
)
*
0
.
5
,
(
double
)
xdate
);
}
/*
else if (taxis->unit == TUNIT_SECOND)
{
timeValue = (double) datetime2seconds(datetime);
}
*/
else
{
int
hour
,
minute
,
second
,
ms
;
...
...
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