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
55cde1d5
Commit
55cde1d5
authored
Jun 30, 2017
by
Uwe Schulzweida
Browse files
table.h update.
parent
e29c60ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/table.c
View file @
55cde1d5
...
...
@@ -758,7 +758,7 @@ void tableFWriteC(FILE *ptfp, int tableID)
?
strlen
(
parTable
[
tableID
].
pars
[
item
].
longname
)
:
0
,
ulen
=
parTable
[
tableID
].
pars
[
item
].
units
?
strlen
(
parTable
[
tableID
].
pars
[
item
].
units
)
:
0
;
fprintf
(
ptfp
,
" {%4d, 0,
\"
%s
\"
, %-*s%c%s%s, %-*s%c%s%s %-*s},
\n
"
,
fprintf
(
ptfp
,
" {%4d,
-1,
0,
\"
%s
\"
, %-*s%c%s%s, %-*s%c%s%s %-*s},
\n
"
,
parTable
[
tableID
].
pars
[
item
].
id
,
parTable
[
tableID
].
pars
[
item
].
name
,
(
int
)(
maxname
-
len
),
chelp
,
llen
?
'"'
:
' '
,
...
...
src/table.h
View file @
55cde1d5
...
...
@@ -1228,199 +1228,186 @@ static const param_type cosmo250[] = {
static
void
tableDefault
(
void
)
{
int
tableID
,
instID
,
modelID
;
/*
* define table : echam4
*/
// define table : echam4
{
int
instID
=
institutInq
(
98
,
255
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
98
,
255
,
"MPIMET"
,
NULL
);
in
s
tID
=
institutInq
(
98
,
255
,
"MPIMET"
,
NULL
);
if
(
inst
ID
==
-
1
)
inst
ID
=
institutDef
(
98
,
255
,
"MPIMET"
,
NULL
);
int
model
ID
=
modelInq
(
instID
,
0
,
"ECHAM4"
);
if
(
model
ID
==
-
1
)
model
ID
=
modelDef
(
instID
,
0
,
"ECHAM4"
);
modelID
=
modelInq
(
instID
,
0
,
"ECHAM4"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"ECHAM4"
);
int
tableID
=
tableDef
(
modelID
,
128
,
"echam4"
);
tableID
=
tableDef
(
modelID
,
128
,
"echam4"
);
tableLink
(
tableID
,
echam4
,
sizeof
(
echam4
)
/
sizeof
(
param_type
));
}
tableLink
(
tableID
,
echam4
,
sizeof
(
echam4
)
/
sizeof
(
param_type
));
// define table : echam5
{
int
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
/*
* define table : echam5
*/
int
modelID
=
modelInq
(
instID
,
0
,
"ECHAM5"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"ECHAM5"
);
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
int
tableID
=
tableDef
(
modelID
,
128
,
"echam5"
);
modelID
=
modelInq
(
instID
,
0
,
"ECHAM5"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"ECHAM5"
);
tableLink
(
tableID
,
echam5
,
sizeof
(
echam5
)
/
sizeof
(
param_type
));
}
tableID
=
tableDef
(
modelID
,
128
,
"echam5"
);
// define table : echam6
{
int
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
tableLink
(
tableID
,
echam5
,
sizeof
(
echam5
)
/
sizeof
(
param_type
));
int
modelID
=
modelInq
(
instID
,
0
,
"ECHAM6"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"ECHAM6"
);
/*
* define table : echam6
*/
int
tableID
=
tableDef
(
modelID
,
128
,
"echam6"
);
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
tableLink
(
tableID
,
echam6
,
sizeof
(
echam6
)
/
sizeof
(
param_type
));
}
modelID
=
modelInq
(
instID
,
0
,
"ECHAM6"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"ECHAM6"
);
// define table : mpiom1
{
int
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
tableID
=
tableDef
(
modelID
,
128
,
"echam6"
);
int
modelID
=
modelInq
(
instID
,
0
,
"MPIOM1"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"MPIOM1"
);
tableLink
(
tableID
,
echam6
,
sizeof
(
echam6
)
/
sizeof
(
param_type
)
);
int
tableID
=
tableDef
(
modelID
,
128
,
"mpiom1"
);
/*
* define table : mpiom1
*/
tableLink
(
tableID
,
mpiom1
,
sizeof
(
mpiom1
)
/
sizeof
(
param_type
));
}
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
// define table : ecmwf
{
int
instID
=
institutInq
(
0
,
0
,
"ECMWF"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"ECMWF"
,
NULL
);
modelID
=
modelInq
(
instID
,
0
,
"
MPIOM1
"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"
MPIOM1
"
);
int
modelID
=
modelInq
(
instID
,
0
,
""
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
""
);
tableID
=
tableDef
(
modelID
,
128
,
"
mpiom1
"
);
int
tableID
=
tableDef
(
modelID
,
128
,
"
ecmwf
"
);
tableLink
(
tableID
,
mpiom1
,
sizeof
(
mpiom1
)
/
sizeof
(
param_type
));
tableLink
(
tableID
,
ecmwf
,
sizeof
(
ecmwf
)
/
sizeof
(
param_type
));
}
/*
* define table : ecmwf
*/
// define table : remo
{
int
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
in
s
tID
=
institutInq
(
0
,
0
,
"ECMWF"
,
NULL
);
if
(
inst
ID
==
-
1
)
inst
ID
=
institutDef
(
0
,
0
,
"ECMWF"
,
NULL
);
int
model
ID
=
modelInq
(
instID
,
0
,
"REMO"
);
if
(
model
ID
==
-
1
)
model
ID
=
modelDef
(
instID
,
0
,
"REMO"
);
modelID
=
modelInq
(
instID
,
0
,
""
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
""
);
int
tableID
=
tableDef
(
modelID
,
128
,
"remo"
);
tableID
=
tableDef
(
modelID
,
128
,
"ecmwf"
);
tableLink
(
tableID
,
remo
,
sizeof
(
remo
)
/
sizeof
(
param_type
));
}
tableLink
(
tableID
,
ecmwf
,
sizeof
(
ecmwf
)
/
sizeof
(
param_type
));
// define table : cosmo002
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
/*
* define table : remo
*/
int
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
instID
=
institutInq
(
0
,
0
,
"MPIMET"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MPIMET"
,
NULL
);
int
tableID
=
tableDef
(
modelID
,
002
,
"cosmo002"
);
modelID
=
modelInq
(
instID
,
0
,
"REMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"REMO"
);
tableLink
(
tableID
,
cosmo002
,
sizeof
(
cosmo002
)
/
sizeof
(
param_type
));
}
tableID
=
tableDef
(
modelID
,
128
,
"remo"
);
// define table : cosmo201
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
tableLink
(
tableID
,
remo
,
sizeof
(
remo
)
/
sizeof
(
param_type
));
int
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
/*
* define table : cosmo002
*/
int
tableID
=
tableDef
(
modelID
,
201
,
"cosmo201"
);
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
tableLink
(
tableID
,
cosmo201
,
sizeof
(
cosmo201
)
/
sizeof
(
param_type
));
}
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
// define table : cosmo202
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
tableID
=
tableDef
(
modelID
,
002
,
"cosmo002"
);
int
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
tableLink
(
tableID
,
cosmo002
,
sizeof
(
cosmo
0
02
)
/
sizeof
(
param_type
)
);
int
tableID
=
tableDef
(
modelID
,
202
,
"
cosmo
2
02
"
);
/*
* define table : cosmo201
*/
tableLink
(
tableID
,
cosmo202
,
sizeof
(
cosmo202
)
/
sizeof
(
param_type
));
}
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
// define table : cosmo203
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
int
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
tableID
=
tableDef
(
modelID
,
20
1
,
"cosmo20
1
"
);
int
tableID
=
tableDef
(
modelID
,
20
3
,
"cosmo20
3
"
);
tableLink
(
tableID
,
cosmo201
,
sizeof
(
cosmo201
)
/
sizeof
(
param_type
));
tableLink
(
tableID
,
cosmo203
,
sizeof
(
cosmo203
)
/
sizeof
(
param_type
));
}
/*
* define table : cosmo202
*/
// define table : cosmo205
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
in
s
tID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
inst
ID
==
-
1
)
inst
ID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
int
model
ID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
model
ID
==
-
1
)
model
ID
=
modelDef
(
instID
,
0
,
"COSMO"
);
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
int
tableID
=
tableDef
(
modelID
,
205
,
"cosmo205"
);
tableID
=
tableDef
(
modelID
,
202
,
"cosmo202"
);
tableLink
(
tableID
,
cosmo205
,
sizeof
(
cosmo205
)
/
sizeof
(
param_type
));
}
tableLink
(
tableID
,
cosmo202
,
sizeof
(
cosmo202
)
/
sizeof
(
param_type
));
// define table : cosmo250
{
int
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
/*
* define table : cosmo203
*/
int
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
int
tableID
=
tableDef
(
modelID
,
250
,
"cosmo250"
);
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
tableID
=
tableDef
(
modelID
,
203
,
"cosmo203"
);
tableLink
(
tableID
,
cosmo203
,
sizeof
(
cosmo203
)
/
sizeof
(
param_type
));
/*
* define table : cosmo205
*/
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
tableID
=
tableDef
(
modelID
,
205
,
"cosmo205"
);
tableLink
(
tableID
,
cosmo205
,
sizeof
(
cosmo205
)
/
sizeof
(
param_type
));
/*
* define table : cosmo250
*/
instID
=
institutInq
(
0
,
0
,
"MCH"
,
NULL
);
if
(
instID
==
-
1
)
instID
=
institutDef
(
0
,
0
,
"MCH"
,
NULL
);
modelID
=
modelInq
(
instID
,
0
,
"COSMO"
);
if
(
modelID
==
-
1
)
modelID
=
modelDef
(
instID
,
0
,
"COSMO"
);
tableID
=
tableDef
(
modelID
,
250
,
"cosmo250"
);
tableLink
(
tableID
,
cosmo250
,
sizeof
(
cosmo250
)
/
sizeof
(
param_type
));
tableLink
(
tableID
,
cosmo250
,
sizeof
(
cosmo250
)
/
sizeof
(
param_type
));
}
}
#endif
/* TABLE_H */
tables/gen_tableheaderfile.in
View file @
55cde1d5
...
...
@@ -6,7 +6,6 @@
set
-e
DEFTABLES
=
@abs_top_srcdir@/tables/default_tables
OFILE
=
@abs_top_srcdir@/src/table.h
OFILE
=
table.h
PTFILES
=
""
#
#########################################
...
...
@@ -89,7 +88,7 @@ cat >&4 <<EOF
int tableID = tableDef(modelID,
${
TABLE_ID
}
, "
${
TABLE_NA
}
");
tableLink(tableID,
${
TABLENAME
}
, sizeof(
${
TABLENAME
}
) / sizeof(
PAR
));
tableLink(tableID,
${
TABLENAME
}
, sizeof(
${
TABLENAME
}
) / sizeof(
param_type
));
}
EOF
#
...
...
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