Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
3a2a339d
Commit
3a2a339d
authored
Apr 06, 2009
by
Uwe Schulzweida
Browse files
No commit message
No commit message
parent
15645451
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
3a2a339d
...
...
@@ -6,6 +6,7 @@
* add support for TUNIT_QUARTER (15 minutes)
* use env GRIB_INVENTORY_MODE=timestep to skip double entries
* grbDefTime: define tunit also for absolute time [report: Pruek Pongprueksa]
* set default calendar with env CDI_DEFAULT_CALENDAR
* change default calendar to CALENDAR_PROLEPTIC
* gridInqXinc: bug fix
* grid_check_cyclic: support for curvilinear grids without bounds
...
...
src/stream_cdf.c
View file @
3a2a339d
...
...
@@ -791,11 +791,12 @@ void cdfDefTime(int streamID)
len
=
strlen
(
calstr
);
if
(
len
)
cdf_put_att_text
(
fileID
,
time_varid
,
"calendar"
,
len
,
calstr
);
{
cdf_put_att_text
(
fileID
,
time_varid
,
"calendar"
,
len
,
calstr
);
if
(
taxis
->
has_bounds
)
if
(
len
)
cdf_put_att_text
(
fileID
,
time_bndsid
,
"calendar"
,
len
,
calstr
);
if
(
taxis
->
has_bounds
)
cdf_put_att_text
(
fileID
,
time_bndsid
,
"calendar"
,
len
,
calstr
);
}
}
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
...
...
src/stream_int.c
View file @
3a2a339d
...
...
@@ -15,11 +15,13 @@
#include
"stream_int.h"
int
cdiDefaultInstID
=
CDI_UNDEFID
;
int
cdiDefaultModelID
=
CDI_UNDEFID
;
int
cdiDefaultTableID
=
CDI_UNDEFID
;
int
cdiNcMissingValue
=
CDI_UNDEFID
;
int
cdiSplitLtype105
=
CDI_UNDEFID
;
int
cdiDefaultCalendar
=
CALENDAR_PROLEPTIC
;
int
cdiDefaultInstID
=
CDI_UNDEFID
;
int
cdiDefaultModelID
=
CDI_UNDEFID
;
int
cdiDefaultTableID
=
CDI_UNDEFID
;
int
cdiNcMissingValue
=
CDI_UNDEFID
;
int
cdiSplitLtype105
=
CDI_UNDEFID
;
int
cdiIgnoreAttCoordinates
=
FALSE
;
int
cdiInventoryMode
=
1
;
...
...
@@ -135,6 +137,26 @@ void cdiInitialize(void)
}
}
envString
=
getenv
(
"CDI_CALENDAR"
);
if
(
envString
)
{
if
(
strncmp
(
envString
,
"standard"
,
8
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_STANDARD
;
else
if
(
strncmp
(
envString
,
"proleptic"
,
9
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_PROLEPTIC
;
else
if
(
strncmp
(
envString
,
"360days"
,
7
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_360DAYS
;
else
if
(
strncmp
(
envString
,
"365days"
,
7
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_365DAYS
;
else
if
(
strncmp
(
envString
,
"366days"
,
7
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_366DAYS
;
else
if
(
strncmp
(
envString
,
"none"
,
4
)
==
0
)
cdiDefaultCalendar
=
CALENDAR_NONE
;
if
(
CDI_Debug
)
Message
(
func
,
"Default calendar set to %s!"
,
envString
);
}
envString
=
getenv
(
"PARTAB_INTERN"
);
if
(
envString
)
cdiPartabIntern
=
atoi
(
envString
);
...
...
src/taxis.c
View file @
3a2a339d
...
...
@@ -10,9 +10,10 @@
#include
"stream_int.h"
#include
"calendar.h"
extern
int
cdiDefaultCalendar
;
static
int
DefaultTimeType
=
TAXIS_ABSOLUTE
;
static
int
DefaultTimeUnit
=
TUNIT_HOUR
;
static
int
DefaultCalendar
=
CALENDAR_PROLEPTIC
;
char
*
Timeunits
[]
=
{
...
...
@@ -206,7 +207,7 @@ void taxis_init_ptr(TAXIS *taxisptr)
taxisptr
->
vtime
=
0
;
taxisptr
->
rdate
=
CDI_UNDEFID
;
taxisptr
->
rtime
=
0
;
taxisptr
->
calendar
=
DefaultCalendar
;
taxisptr
->
calendar
=
cdi
DefaultCalendar
;
taxisptr
->
unit
=
DefaultTimeUnit
;
taxisptr
->
numavg
=
0
;
taxisptr
->
has_bounds
=
FALSE
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment