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
2c86aabf
Commit
2c86aabf
authored
Jul 27, 2009
by
Uwe Schulzweida
Browse files
ieg: added support for Gaussian grids
parent
e4b428dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
2c86aabf
...
...
@@ -4,6 +4,7 @@
* changed C compiler to ANSI C99
* changed time format from hhmm to hhmmss
* changed encode/decode_time to seconds
* ieg: added support for Gaussian grids [request: Ralf Podzun]
* added support for netCDF timeseries without grid
* julday_add_seconds: bug fix for adjusting negative seconds
* Version 1.4.0 released
...
...
src/stream_ieg.c
View file @
2c86aabf
...
...
@@ -254,7 +254,7 @@ void iegDefGrid(int *gdb, int gridID)
gridtype
=
GRID_LONLAT
;
}
if
(
gridtype
==
GRID_LONLAT
)
if
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_GAUSSIAN
)
{
int
nlon
,
nlat
;
...
...
@@ -262,7 +262,9 @@ void iegDefGrid(int *gdb, int gridID)
nlat
=
(
int
)
gridInqYsize
(
gridID
);
if
(
gridtype
==
GRID_LONLAT
&&
gridIsRotated
(
gridID
)
)
if
(
gridtype
==
GRID_GAUSSIAN
)
IEG_G_GridType
(
gdb
)
=
4
;
else
if
(
gridtype
==
GRID_LONLAT
&&
gridIsRotated
(
gridID
)
)
IEG_G_GridType
(
gdb
)
=
10
;
else
IEG_G_GridType
(
gdb
)
=
0
;
...
...
@@ -277,9 +279,14 @@ void iegDefGrid(int *gdb, int gridID)
if
(
fabs
(
gridInqXinc
(
gridID
)
*
1000
-
IEG_G_LonIncr
(
gdb
))
>
FLT_EPSILON
)
IEG_G_LonIncr
(
gdb
)
=
0
;
IEG_G_LatIncr
(
gdb
)
=
NINT
(
gridInqYinc
(
gridID
)
*
1000
);
if
(
fabs
(
gridInqYinc
(
gridID
)
*
1000
-
IEG_G_LatIncr
(
gdb
))
>
FLT_EPSILON
)
IEG_G_LatIncr
(
gdb
)
=
0
;
if
(
gridtype
==
GRID_GAUSSIAN
)
IEG_G_LatIncr
(
gdb
)
=
nlat
/
2
;
else
{
IEG_G_LatIncr
(
gdb
)
=
NINT
(
gridInqYinc
(
gridID
)
*
1000
);
if
(
fabs
(
gridInqYinc
(
gridID
)
*
1000
-
IEG_G_LatIncr
(
gdb
))
>
FLT_EPSILON
)
IEG_G_LatIncr
(
gdb
)
=
0
;
}
if
(
gridIsRotated
(
gridID
)
)
{
...
...
@@ -645,6 +652,8 @@ void iegAddRecord(int streamID, int code, int *pdb, int *gdb, double *vct,
if
(
IEG_G_GridType
(
gdb
)
==
0
||
IEG_G_GridType
(
gdb
)
==
10
)
gridtype
=
GRID_LONLAT
;
if
(
IEG_G_GridType
(
gdb
)
==
4
)
gridtype
=
GRID_GAUSSIAN
;
else
gridtype
=
GRID_GENERIC
;
...
...
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