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
8bd3fabd
Commit
8bd3fabd
authored
Feb 18, 2010
by
Uwe Schulzweida
Browse files
grib1: bug fix for description of gaussian reduced grids
parent
488af424
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
8bd3fabd
2010-02-18 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* grib1: bug fix for description of gaussian reduced grids [report: Kaus Wyser]
2010-02-16 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gauaw: new code to calculate gaussian grid [Luis Kornblueh]
...
...
src/stream_cgribex.c
View file @
8bd3fabd
...
...
@@ -1757,13 +1757,22 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
ISEC2_NumLat
=
nlat
;
ISEC2_FirstLat
=
NINT
(
gridInqYval
(
gridID
,
0
)
*
1000
);
ISEC2_LastLat
=
NINT
(
gridInqYval
(
gridID
,
nlat
-
1
)
*
1000
);
ISEC2_FirstLon
=
NINT
(
gridInqXval
(
gridID
,
0
)
*
1000
);
ISEC2_LastLon
=
NINT
(
gridInqXval
(
gridID
,
nlon
-
1
)
*
1000
);
ISEC2_LonIncr
=
NINT
(
gridInqXinc
(
gridID
)
*
1000
);
if
(
gridtype
==
GRID_GAUSSIAN_REDUCED
)
{
ISEC2_FirstLon
=
0
;
ISEC2_LastLon
=
NINT
(
1000
*
(
360
.
-
360
.
/
(
nlat
*
2
)));
ISEC2_LonIncr
=
NINT
(
1000
*
360
.
/
(
nlat
*
2
));
}
else
{
ISEC2_FirstLon
=
NINT
(
gridInqXval
(
gridID
,
0
)
*
1000
);
ISEC2_LastLon
=
NINT
(
gridInqXval
(
gridID
,
nlon
-
1
)
*
1000
);
ISEC2_LonIncr
=
NINT
(
gridInqXinc
(
gridID
)
*
1000
);
}
if
(
fabs
(
gridInqXinc
(
gridID
)
*
1000
-
ISEC2_LonIncr
)
>
FLT_EPSILON
)
ISEC2_LonIncr
=
0
;
if
(
gridtype
==
GRID_GAUSSIAN
)
if
(
gridtype
==
GRID_GAUSSIAN
||
gridtype
==
GRID_GAUSSIAN_REDUCED
)
ISEC2_NumPar
=
nlat
/
2
;
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