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
c985f7c6
Commit
c985f7c6
authored
May 15, 2014
by
Uwe Schulzweida
Browse files
cgribexGetGrid: correct last lon when last lon < first lon
parent
41320a58
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
c985f7c6
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
* using EXSE library version 1.3.2
* using EXSE library version 1.3.2
* using CGRIBEX library version 1.6.4
* using CGRIBEX library version 1.6.4
2014-05-15 Uwe Schulzweida
* cgribexGetGrid: correct last lon when last lon < first lon
2014-05-14 Uwe Schulzweida
2014-05-14 Uwe Schulzweida
* netCDF: skip unsupported dimension (no xyzt)
* netCDF: skip unsupported dimension (no xyzt)
...
...
src/stream_cgribex.c
View file @
c985f7c6
...
@@ -187,9 +187,10 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
...
@@ -187,9 +187,10 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
{
{
int
recompinc
=
TRUE
;
int
recompinc
=
TRUE
;
if
(
ISEC2_LastLon
<
ISEC2_FirstLon
&&
ISEC2_LastLon
<
0
)
ISEC2_LastLon
+=
360000
;
if
(
ISEC2_ResFlag
&&
ISEC2_LonIncr
>
0
)
if
(
ISEC2_ResFlag
&&
ISEC2_LonIncr
>
0
)
{
{
if
(
ISEC2_LastLon
<
ISEC2_FirstLon
&&
ISEC2_LastLon
<
0
)
ISEC2_LastLon
+=
360000
;
if
(
abs
(
ISEC2_LastLon
-
(
ISEC2_FirstLon
+
ISEC2_LonIncr
*
(
grid
->
xsize
-
1
)))
<=
2
)
if
(
abs
(
ISEC2_LastLon
-
(
ISEC2_FirstLon
+
ISEC2_LonIncr
*
(
grid
->
xsize
-
1
)))
<=
2
)
{
{
recompinc
=
FALSE
;
recompinc
=
FALSE
;
...
@@ -254,6 +255,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
...
@@ -254,6 +255,8 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
{
{
if
(
grid
->
xsize
>
1
)
if
(
grid
->
xsize
>
1
)
{
{
if
(
ISEC2_LastLon
<
ISEC2_FirstLon
&&
ISEC2_LastLon
<
0
)
ISEC2_LastLon
+=
360000
;
if
(
ISEC2_ResFlag
&&
ISEC2_LonIncr
>
0
)
if
(
ISEC2_ResFlag
&&
ISEC2_LonIncr
>
0
)
grid
->
xinc
=
ISEC2_LonIncr
*
0
.
001
;
grid
->
xinc
=
ISEC2_LonIncr
*
0
.
001
;
else
else
...
...
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