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
fb775f27
Commit
fb775f27
authored
Jan 06, 2012
by
Uwe Schulzweida
Browse files
added support for GRIB gaussian grid parameter NumPar on non global grids [Bug #1711]
parent
f799a0bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
fb775f27
2012-01-
06 Luis Kornblueh <Luis.Kornblueh
@zmaw.de>
2012-01-
?? Uwe Schulzweida <Uwe.Schulzweida
@zmaw.de>
* Version 1.5.4 released
2012-01-06 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for GRIB gaussian grid parameter NumPar on non global grids [Bug #1711]
* added interface functions gridDefNP/gridInqNP (number of parallels between a pole and the equator)
2011-12-19 Luis Kornblueh <Luis.Kornblueh@zmaw.de>
...
...
src/stream_cdf.c
View file @
fb775f27
...
...
@@ -4217,7 +4217,7 @@ int isGaussGrid(long ysize, double yinc, double *yvals)
for
(
i
=
0
;
i
<
ysize
;
i
++
)
if
(
fabs
(
yv
[
i
]
-
yvals
[
i
])
>
((
yv
[
0
]
-
yv
[
1
])
/
500
)
)
break
;
if
(
i
==
ysize
)
lgauss
=
TRUE
;
/* check S->N */
...
...
@@ -5109,7 +5109,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
grid_t
grid
;
grid_t
proj
;
int
gridindex
;
size_t
size
=
0
,
xsize
,
ysize
;
size_t
size
=
0
,
xsize
,
ysize
,
np
;
char
name
[
256
];
int
iatt
;
int
ltwarn
=
TRUE
;
...
...
@@ -5131,6 +5131,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
xsize
=
0
;
ysize
=
0
;
np
=
0
;
ndims
=
ncvars
[
ncvarid
].
ndims
;
for
(
i
=
0
;
i
<
ndims
;
i
++
)
...
...
@@ -5409,15 +5410,21 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
if
(
islat
&&
islon
)
{
if
(
isGaussGrid
(
ysize
,
yinc
,
grid
.
yvals
)
)
ncvars
[
ncvarid
].
gridtype
=
GRID_GAUSSIAN
;
else
{
ncvars
[
ncvarid
].
gridtype
=
GRID_GAUSSIAN
;
np
=
ysize
/
2
;
}
else
ncvars
[
ncvarid
].
gridtype
=
GRID_LONLAT
;
}
else
if
(
islat
&&
!
islon
&&
xsize
==
0
)
{
if
(
isGaussGrid
(
ysize
,
yinc
,
grid
.
yvals
)
)
ncvars
[
ncvarid
].
gridtype
=
GRID_GAUSSIAN
;
else
{
ncvars
[
ncvarid
].
gridtype
=
GRID_GAUSSIAN
;
np
=
ysize
/
2
;
}
else
ncvars
[
ncvarid
].
gridtype
=
GRID_LONLAT
;
}
else
if
(
islon
&&
!
islat
&&
ysize
==
0
)
...
...
@@ -5439,6 +5446,7 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
grid
.
size
=
size
;
grid
.
xsize
=
xsize
;
grid
.
ysize
=
ysize
;
grid
.
np
=
np
;
if
(
xvarid
!=
UNDEFID
)
{
grid
.
xdef
=
1
;
...
...
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