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
847d04a2
Commit
847d04a2
authored
May 07, 2010
by
Uwe Schulzweida
Browse files
gridGenYvals: bug fix for nlat > 4096
parent
be870182
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
847d04a2
2010-05-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gridGenYvals: bug fix for nlat > 4096 [report: Thomas Bergmann]
2010-04-29 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Version 1.4.4 released
...
...
src/grid.c
View file @
847d04a2
...
...
@@ -398,15 +398,18 @@ void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double y
int
ny
=
(
int
)
(
180
.
/
yinc
+
0
.
5
);
ny
-=
ny
%
2
;
/* printf("%g %g %g %g %g %d\n", ylast, yfirst, ylast-yfirst,yinc, 180/yinc, ny); */
ytmp
=
(
double
*
)
malloc
(
ny
*
sizeof
(
double
));
calc_gaussgrid
(
ytmp
,
ny
,
yfirst
,
ylast
);
for
(
i
=
0
;
i
<
(
ny
-
ysize
);
i
++
)
if
(
fabs
(
ytmp
[
i
]
-
yfirst
)
<
0
.
001
)
break
;
if
(
ny
<
4096
)
{
ytmp
=
(
double
*
)
malloc
(
ny
*
sizeof
(
double
));
calc_gaussgrid
(
ytmp
,
ny
,
yfirst
,
ylast
);
for
(
i
=
0
;
i
<
(
ny
-
ysize
);
i
++
)
if
(
fabs
(
ytmp
[
i
]
-
yfirst
)
<
0
.
001
)
break
;
nstart
=
i
;
nstart
=
i
;
if
(
(
nstart
+
ysize
-
1
)
<
ny
)
if
(
fabs
(
ytmp
[
nstart
+
ysize
-
1
]
-
ylast
)
<
0
.
001
)
lfound
=
1
;
if
(
(
nstart
+
ysize
-
1
)
<
ny
)
if
(
fabs
(
ytmp
[
nstart
+
ysize
-
1
]
-
ylast
)
<
0
.
001
)
lfound
=
1
;
}
if
(
lfound
)
{
...
...
@@ -420,7 +423,8 @@ void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double y
yvals
[
ysize
-
1
]
=
ylast
;
}
free
(
ytmp
);
if
(
ny
<
4096
)
free
(
ytmp
);
}
}
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