Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
1c3e51bc
Commit
1c3e51bc
authored
Aug 01, 2016
by
Uwe Schulzweida
Browse files
grb2 read: added support for projection CDI_PROJ_RLL.
parent
55a27d6e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1c3e51bc
2016-08-01 Uwe Schulzweida
* grb write: added support for projection CDI_PROJ_RLL
* ieg read: added support for projection CDI_PROJ_RLL
*
grb, grb2,
ieg read: added support for projection CDI_PROJ_RLL
2016-07-30 Uwe Schulzweida
...
...
src/gribapi_utilities.c
View file @
1c3e51bc
This diff is collapsed.
Click to expand it.
src/stream_cgribex.c
View file @
1c3e51bc
...
...
@@ -164,6 +164,7 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, double *fsec2, int *isec4,
grid_init
(
grid
);
cdiGridTypeInit
(
grid
,
gridtype
,
0
);
if
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_GAUSSIAN
||
projtype
==
CDI_PROJ_RLL
)
{
if
(
ISEC4_NumValues
!=
ISEC2_NumLon
*
ISEC2_NumLat
)
...
...
src/stream_gribapi.c
View file @
1c3e51bc
...
...
@@ -459,12 +459,24 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
// I. e. kick the fixed size array and allocate enough space, whatever that may be.
strncpy
(
record
->
varname
,
varname
,
sizeof
(
record
->
varname
));
grid_t
*
grid
=
(
grid_t
*
)
Malloc
(
sizeof
(
*
grid
));
grid_t
*
grid
=
(
grid_t
*
)
Malloc
(
sizeof
(
*
grid
));
gribapiGetGrid
(
gh
,
grid
);
struct
addIfNewRes
gridAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
grid
,
0
);
int
gridID
=
gridAdded
.
Id
;
if
(
!
gridAdded
.
isNew
)
Free
(
grid
);
if
(
!
gridAdded
.
isNew
)
Free
(
grid
);
else
if
(
grid
->
projtype
==
CDI_PROJ_RLL
)
{
double
xpole
=
0
,
ypole
=
0
,
angle
=
0
;
grib_get_double
(
gh
,
"latitudeOfSouthernPoleInDegrees"
,
&
ypole
);
grib_get_double
(
gh
,
"longitudeOfSouthernPoleInDegrees"
,
&
xpole
);
grib_get_double
(
gh
,
"angleOfRotation"
,
&
angle
);
xpole
=
xpole
-
180
;
if
(
fabs
(
ypole
)
>
0
)
ypole
=
-
ypole
;
// change from south to north pole
if
(
fabs
(
angle
)
>
0
)
angle
=
-
angle
;
gridDefProjParamRLL
(
gridID
,
xpole
,
ypole
,
angle
);
}
int
zaxistype
=
gribapiGetZaxisType
(
gribEditionNumber
(
gh
),
leveltype1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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