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
1cc2e835
Commit
1cc2e835
authored
Mar 11, 2009
by
Uwe Schulzweida
Browse files
using GRIB library version 1.3.0
parent
6c9c2aed
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1cc2e835
2009-03-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.3.0
* add support for NaN in DBL_IS_EQUAL
* add support for GRID type LCC2 (LCC PROJ.4 version)
* grbDefTime: define tunit also for absolute time [report: Pruek Pongprueksa]
...
...
@@ -7,7 +8,7 @@
* gridInqXinc: bug fix
* grid_check_cyclic: support for curvilinear grids without bounds
* streamOpenAppen: set ncmode to 2 (bug fix)
* Version 1.3.
0
released
* Version 1.3.
1
released
2009-01-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/griblib.c
View file @
1cc2e835
/*
Generated a
utomatically
from m214003 on Wed Feb 25 14:24:51 CET 2009
*/
/*
A
utomatically
generated by m214003 at 2009-03-11, do not edit
*/
/* GRIBLIB_VERSION="1.
2.2
" */
/* GRIBLIB_VERSION="1.
3.0
" */
#if defined (HAVE_CONFIG_H)
# include "config.h"
...
...
@@ -3341,6 +3341,8 @@ int encodeBDS(GRIBPACK *lGrib, int *gribLen, int decscale, int *isec2, int *isec
as a guideline).
*/
range
=
fabs
(
fmax
-
fmin
);
if
(
fabs
(
fmin
)
<
FLT_MIN
)
fmin
=
0
;
/*
Have to allow tolerance in comparisons on some platforms
(eg vpp700 and linux), such as 0.9999999999999999 = 1.0,
...
...
@@ -8378,7 +8380,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.
2.2
"
" of ""
Feb 25
2009"" ""1
4:24:52
"
;
static
const
char
grb_libvers
[]
=
"1.
3.0
"
" of ""
Mar 11
2009"" ""1
2:04:04
"
;
const
char
*
gribLibraryVersion
(
void
)
{
...
...
src/make_cdilib
View file @
1cc2e835
...
...
@@ -13,7 +13,7 @@ echo "output is ${PROG}"
rm
-f
${
PROG
}
DATE
=
`
date
`
DATE
=
`
date
+%F
`
if
test
-f
config.h
;
then
CDILIBVERSION
=
`
grep
PACKAGE_VERSION config.h |
cut
-f3
-d
" "
`
...
...
@@ -21,7 +21,7 @@ fi
cat
>
${
PROG
}
<<
EOR
/*
Generated a
utomatically
from
$USER
on
$DATE
*/
/*
A
utomatically
generated by
$USER
at
$DATE
, do not edit
*/
/* CDILIB_VERSION=
$CDILIBVERSION
*/
...
...
src/stream_cdf.c
View file @
1cc2e835
...
...
@@ -3231,6 +3231,7 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
int
dtype
;
int
vlistID
;
STREAM
*
streamptr
;
extern
int
CDF_Debug
;
streamptr
=
stream_to_pointer
(
streamID
);
...
...
@@ -3314,12 +3315,12 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
laddoffset
=
IS_NOT_EQUAL
(
addoffset
,
0
);
lscalefactor
=
IS_NOT_EQUAL
(
scalefactor
,
1
);
missval
=
vlistInqVarMissval
(
vlistID
,
varID
);
nvals
=
gridInqSize
(
gridID
);
if
(
laddoffset
||
lscalefactor
)
{
missval
=
vlistInqVarMissval
(
vlistID
,
varID
);
if
(
nmiss
>
0
)
{
for
(
i
=
0
;
i
<
nvals
;
i
++
)
...
...
@@ -3346,6 +3347,23 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
{
for
(
i
=
0
;
i
<
nvals
;
i
++
)
data
[
i
]
=
NINT
(
data
[
i
]);
}
if
(
CDF_Debug
)
{
double
fmin
,
fmax
;
fmin
=
1.0e200
;
fmax
=
-
1.0e200
;
for
(
i
=
1
;
i
<
nvals
;
++
i
)
{
if
(
!
DBL_IS_EQUAL
(
data
[
i
],
missval
)
)
{
if
(
data
[
i
]
<
fmin
)
fmin
=
data
[
i
];
if
(
data
[
i
]
>
fmax
)
fmax
=
data
[
i
];
}
}
Message
(
func
,
"nvals = %d, nmiss = %d, missval = %g, minval = %g, maxval = %g"
,
nvals
,
nmiss
,
missval
,
fmin
,
fmax
);
}
}
cdf_put_vara_double
(
fileID
,
ncvarid
,
start
,
count
,
data
);
...
...
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