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
0e6af634
Commit
0e6af634
authored
Sep 10, 2012
by
Uwe Schulzweida
Browse files
using CGRIBEX library version 1.5.5
parent
f87e5451
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
0e6af634
2012-10-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Version 1.5.8 released
* using CGRIBEX library version 1.5.5
2012-09-05 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cgribexEncode: initialize the first 256 entries of isec1 to zero
...
...
src/cgribexlib.c
View file @
0e6af634
/* Automatically generated by m214003 at 2012-0
8-22
, do not edit */
/* Automatically generated by m214003 at 2012-0
9-10
, do not edit */
/* CGRIBEXLIB_VERSION="1.5.
4
" */
/* CGRIBEXLIB_VERSION="1.5.
5
" */
#ifdef _ARCH_PWR6
#pragma options nostrict
...
...
@@ -5979,34 +5979,55 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
}
}
if
(
dfunc
==
'R'
&&
ISEC2_Reduced
)
if
(
ISEC2_Reduced
)
{
int
nlon
,
nlat
;
int
lsect3
,
lperio
,
lveggy
;
ISEC2_Reduced
=
0
;
ISEC2_NumLon
=
ISEC2_NumLat
*
2
;
nlon
=
ISEC2_NumLon
;
nlat
=
ISEC2_NumLat
;
ISEC4_NumValues
=
nlon
*
nlat
;
int
lsect3
,
lperio
=
1
,
lveggy
;
int
ilat
;
int
nvalues
=
0
;
int
dlon
;
lsect3
=
bitmapSize
>
0
;
lperio
=
1
;
lveggy
=
(
ISEC1_CodeTable
==
128
)
&&
(
ISEC1_CenterID
==
98
)
&&
((
ISEC1_Parameter
==
27
)
||
(
ISEC1_Parameter
==
28
)
||
(
ISEC1_Parameter
==
29
)
||
(
ISEC1_Parameter
==
30
));
(
void
)
qu2reg3
(
fsec4
,
ISEC2_RowLonPtr
,
nlat
,
nlon
,
FSEC3_MissVal
,
iret
,
lsect3
,
lperio
,
lveggy
);
nlat
=
ISEC2_NumLat
;
nlon
=
ISEC2_RowLonPtr
[
0
];
for
(
ilat
=
0
;
ilat
<
nlat
;
++
ilat
)
nvalues
+=
ISEC2_RowLon
(
ilat
);
for
(
ilat
=
1
;
ilat
<
nlat
;
++
ilat
)
if
(
ISEC2_RowLon
(
ilat
)
>
nlon
)
nlon
=
ISEC2_RowLon
(
ilat
);
if
(
bitmapSize
>
0
)
dlon
=
ISEC2_LastLon
-
ISEC2_FirstLon
;
if
(
dlon
<
0
)
dlon
+=
360000
;
if
(
nvalues
!=
ISEC4_NumValues
)
{
long
i
;
int
j
=
0
;
for
(
i
=
0
;
i
<
ISEC4_NumValues
;
i
++
)
if
(
IS_NOT_EQUAL
(
fsec4
[
i
],
FSEC3_MissVal
)
)
j
++
;
*
iret
=
-
801
;
}
ISEC4_NumNonMissValues
=
j
;
if
(
dfunc
==
'R'
&&
*
iret
==
-
801
)
gprintf
(
__func__
,
"Number of values (%d) and sum of lons per row (%d) differ, abort conversion to regular grid!"
,
ISEC4_NumValues
,
nvalues
);
if
(
dfunc
==
'R'
&&
*
iret
!=
-
801
)
{
ISEC2_Reduced
=
0
;
ISEC2_NumLon
=
nlon
;
ISEC4_NumValues
=
nlon
*
nlat
;
lsect3
=
bitmapSize
>
0
;
lveggy
=
(
ISEC1_CodeTable
==
128
)
&&
(
ISEC1_CenterID
==
98
)
&&
((
ISEC1_Parameter
==
27
)
||
(
ISEC1_Parameter
==
28
)
||
(
ISEC1_Parameter
==
29
)
||
(
ISEC1_Parameter
==
30
));
(
void
)
qu2reg3
(
fsec4
,
ISEC2_RowLonPtr
,
nlat
,
nlon
,
FSEC3_MissVal
,
iret
,
lsect3
,
lperio
,
lveggy
);
if
(
bitmapSize
>
0
)
{
long
i
;
int
j
=
0
;
for
(
i
=
0
;
i
<
ISEC4_NumValues
;
i
++
)
if
(
IS_NOT_EQUAL
(
fsec4
[
i
],
FSEC3_MissVal
)
)
j
++
;
ISEC4_NumNonMissValues
=
j
;
}
}
}
...
...
@@ -7046,8 +7067,8 @@ C OMISNG - True if missing values are present in field.
C
C OPERIO - True if input field is periodic.
C
C OVEGGY
- True if 'nearest neighbour' processing must be used
C
for interpolation
C OVEGGY - True if 'nearest neighbour' processing must be used
C for interpolation
C
C Output Parameters.
C ------------------
...
...
@@ -7110,13 +7131,26 @@ C -----------------------------------------------------------------
for
(
jl
=
1
;
jl
<=
ki
;
++
jl
)
pw
[
jl
+
pw_dim1
]
=
p
[
jl
];
/* Arrange wrap-around value in work array */
pw
[
ki
+
1
+
pw_dim1
]
=
p
[
1
];
if
(
operio
)
{
/* Arrange wrap-around value in work array */
pw
[
ki
+
1
+
pw_dim1
]
=
p
[
1
];
/* Set up constants to be used to figure out weighting for */
/* values in interpolation. */
zrdi
=
(
double
)
ki
;
zdo
=
1
.
0
/
(
double
)
ko
;
/* Set up constants to be used to figure out weighting for */
/* values in interpolation. */
zrdi
=
(
double
)
ki
;
zdo
=
1
.
0
/
(
double
)
ko
;
}
else
{
/* Repeat last value, to cope with "implicit truncation" below */
pw
[
ki
+
1
+
pw_dim1
]
=
p
[
ki
];
/* Set up constants to be used to figure out weighting for */
/* values in interpolation. */
zrdi
=
(
double
)
(
ki
-
1
);
zdo
=
1
.
0
/
(
double
)
(
ko
-
1
);
}
/* Loop through the output points */
for
(
jl
=
1
;
jl
<=
ko
;
++
jl
)
...
...
@@ -9978,7 +10012,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.5.
4
"
" of ""
Aug 22
2012"" ""14:
22
:44"
;
static
const
char
grb_libvers
[]
=
"1.5.
5
"
" of ""
Sep 10
2012"" ""14:
09
:44"
;
const
char
*
cgribexLibraryVersion
(
void
)
{
...
...
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