Skip to content
GitLab
Menu
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
78f222c9
Commit
78f222c9
authored
Nov 27, 2008
by
Uwe Schulzweida
Browse files
add support for GRID type LAEA
parent
4e02e382
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/cdi.c
View file @
78f222c9
...
...
@@ -267,6 +267,7 @@ static void printGridInfo(int vlistID)
gridID
+
1
,
gridNamePtr
(
gridtype
));
if
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_LAEA
||
gridtype
==
GRID_SINUSOIDAL
||
gridtype
==
GRID_GAUSSIAN
||
gridtype
==
GRID_GAUSSIAN_REDUCED
)
...
...
@@ -301,7 +302,8 @@ static void printGridInfo(int vlistID)
}
fprintf
(
stdout
,
"%*s"
,
nbyte0
,
""
);
fprintf
(
stdout
,
"%-9s : first = %.9g last = %.9g"
,
yname
,
yfirst
,
ylast
);
if
(
!
DBL_IS_EQUAL
(
yinc
,
0
)
&&
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_SINUSOIDAL
)
)
if
(
!
DBL_IS_EQUAL
(
yinc
,
0
)
&&
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_SINUSOIDAL
||
gridtype
==
GRID_LAEA
)
)
fprintf
(
stdout
,
" inc = %.9g"
,
yinc
);
fprintf
(
stdout
,
" %s"
,
yunits
);
fprintf
(
stdout
,
"
\n
"
);
...
...
@@ -323,6 +325,14 @@ static void printGridInfo(int vlistID)
if
(
gridInqYbounds
(
gridID
,
NULL
)
)
fprintf
(
stdout
,
" ybounds"
);
fprintf
(
stdout
,
"
\n
"
);
}
if
(
gridtype
==
GRID_LAEA
)
{
double
a
,
lon_0
,
lat_0
;
gridInqLaea
(
gridID
,
&
a
,
&
lon_0
,
&
lat_0
);
fprintf
(
stdout
,
"%*s"
,
nbyte0
,
""
);
fprintf
(
stdout
,
"projpar : a = %g lon_0 = %g lat_0 = %g
\n
"
,
a
,
lon_0
,
lat_0
);
}
}
else
if
(
gridtype
==
GRID_SPECTRAL
)
{
...
...
src/grid.c
View file @
78f222c9
...
...
@@ -2430,6 +2430,9 @@ int gridGenerate(grid_t grid)
gridDefArea
(
gridID
,
grid
.
area
);
}
if
(
grid
.
type
==
GRID_LAEA
)
gridDefLaea
(
gridID
,
grid
.
laea_a
,
grid
.
laea_lon_0
,
grid
.
laea_lat_0
);
if
(
grid
.
type
==
GRID_LCC
)
gridDefLCC
(
gridID
,
grid
.
lcc_originLon
,
grid
.
lcc_originLat
,
grid
.
lcc_lonParY
,
grid
.
lcc_lat1
,
grid
.
lcc_lat2
,
grid
.
lcc_xinc
,
grid
.
lcc_yinc
,
...
...
src/stream_cdf.c
View file @
78f222c9
...
...
@@ -4956,6 +4956,18 @@ int cdfInqContents(int streamID)
else
if
(
strcmp
(
attstring
,
"lambert_azimuthal_equal_area"
)
==
0
)
grid
.
type
=
GRID_LAEA
;
}
else
if
(
strcmp
(
attname
,
"earth_radius"
)
==
0
)
{
cdfGetAttDouble
(
fileID
,
ncvars
[
ncvarid
].
gmapid
,
attname
,
1
,
&
grid
.
laea_a
);
}
else
if
(
strcmp
(
attname
,
"longitude_of_projection_origin"
)
==
0
)
{
cdfGetAttDouble
(
fileID
,
ncvars
[
ncvarid
].
gmapid
,
attname
,
1
,
&
grid
.
laea_lon_0
);
}
else
if
(
strcmp
(
attname
,
"latitude_of_projection_origin"
)
==
0
)
{
cdfGetAttDouble
(
fileID
,
ncvars
[
ncvarid
].
gmapid
,
attname
,
1
,
&
grid
.
laea_lat_0
);
}
else
if
(
strcmp
(
attname
,
"grid_north_pole_latitude"
)
==
0
)
{
cdfGetAttDouble
(
fileID
,
ncvars
[
ncvarid
].
gmapid
,
attname
,
1
,
&
grid
.
ypole
);
...
...
Write
Preview
Supports
Markdown
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