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
d39f7c5a
Commit
d39f7c5a
authored
Sep 05, 2019
by
Ralf Mueller
🎣
Browse files
avoid "variable length array folded to constant array" error with clang
parent
b0fde8de
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/cdi_copy.c
View file @
d39f7c5a
...
...
@@ -3,10 +3,12 @@
int
main
(
void
)
{
const
int
nlon
=
12
;
// Number of longitudes
const
int
nlat
=
6
;
// Number of latitudes
const
int
nlev
=
5
;
// Number of levels
const
int
nts
=
3
;
// Number of time steps
enum
{
nlon
=
12
,
// Number of longitudes
nlat
=
6
,
// Number of latitudes
nlev
=
5
,
// Number of levels
nts
=
3
,
// Number of time steps
};
size_t
nmiss
;
double
var1
[
nlon
*
nlat
];
double
var2
[
nlon
*
nlat
*
nlev
];
...
...
examples/cdi_read.c
View file @
d39f7c5a
...
...
@@ -3,10 +3,12 @@
int
main
(
void
)
{
const
int
nlon
=
12
;
// Number of longitudes
const
int
nlat
=
6
;
// Number of latitudes
const
int
nlev
=
5
;
// Number of levels
const
int
nts
=
3
;
// Number of time steps
enum
{
nlon
=
12
,
// Number of longitudes
nlat
=
6
,
// Number of latitudes
nlev
=
5
,
// Number of levels
nts
=
3
,
// Number of time steps
};
size_t
nmiss
;
double
var1
[
nlon
*
nlat
];
double
var2
[
nlon
*
nlat
*
nlev
];
...
...
examples/cdi_write.c
View file @
d39f7c5a
...
...
@@ -3,10 +3,12 @@
int
main
(
void
)
{
const
int
nlon
=
12
;
// Number of longitudes
const
int
nlat
=
6
;
// Number of latitudes
const
int
nlev
=
5
;
// Number of levels
const
int
nts
=
3
;
// Number of time steps
enum
{
nlon
=
12
,
// Number of longitudes
nlat
=
6
,
// Number of latitudes
nlev
=
5
,
// Number of levels
nts
=
3
,
// Number of time steps
};
size_t
nmiss
=
0
;
double
lons
[]
=
{
0
,
30
,
60
,
90
,
120
,
150
,
180
,
210
,
240
,
270
,
300
,
330
};
double
lats
[]
=
{
-
75
,
-
45
,
-
15
,
15
,
45
,
75
};
...
...
examples/cdi_write_relativ.c
View file @
d39f7c5a
...
...
@@ -3,10 +3,12 @@
int
main
(
void
)
{
const
int
nlon
=
12
;
// Number of longitudes
const
int
nlat
=
6
;
// Number of latitudes
const
int
nlev
=
5
;
// Number of levels
const
int
nts
=
3
;
// Number of time steps
enum
{
nlon
=
12
,
// Number of longitudes
nlat
=
6
,
// Number of latitudes
nlev
=
5
,
// Number of levels
nts
=
3
,
// Number of time steps
};
int
nmiss
=
0
;
double
lons
[]
=
{
0
,
30
,
60
,
90
,
120
,
150
,
180
,
210
,
240
,
270
,
300
,
330
};
double
lats
[]
=
{
-
75
,
-
45
,
-
15
,
15
,
45
,
75
};
...
...
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