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
7b447d7e
Commit
7b447d7e
authored
Nov 19, 2013
by
Thomas Jahns
🤸
Browse files
Compute variable codes.
parent
f19009a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/simple_model.c
View file @
7b447d7e
...
...
@@ -70,7 +70,6 @@ uniform_partition_start(int set_interval[2], int nparts, int part_idx);
void
modelRun
(
struct
model_config
setup
,
MPI_Comm
comm
)
{
static
int
varCodes
[
nVars
]
=
{
129
,
130
,
131
,
132
,
133
};
static
const
char
*
const
fname_prefix
=
"example"
;
int
gridID
,
zaxisID
[
nVars
],
taxisID
;
...
...
@@ -157,6 +156,10 @@ modelRun(struct model_config setup, MPI_Comm comm)
;
}
int
*
varCodes
=
xmalloc
(
nVars
*
sizeof
(
varCodes
[
0
]));
for
(
int
varIdx
=
0
;
varIdx
<
nVars
;
++
varIdx
)
varCodes
[
varIdx
]
=
129
+
varIdx
;
vlistID
=
vlistCreate
();
for
(
i
=
0
;
i
<
nVars
;
i
++
)
...
...
@@ -184,6 +187,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
vlistDefVarCode
(
vlistID
,
varIDs
[
i
],
varCodes
[
i
]);
vlistDefVarDatatype
(
vlistID
,
varIDs
[
i
],
setup
.
datatype
);
}
free
(
varCodes
);
taxisID
=
taxisCreate
(
TAXIS_ABSOLUTE
);
vlistDefTaxis
(
vlistID
,
taxisID
);
...
...
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