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
7ca61648
Commit
7ca61648
authored
Jan 15, 2010
by
Uwe Schulzweida
Browse files
added tabnum to cgribexDefParam (bug fix)
parent
0675f171
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf.c
View file @
7ca61648
...
...
@@ -6128,9 +6128,12 @@ void cdfDefInstitut(int streamID)
if
(
longname
)
{
len
=
strlen
(
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_put_att_text
(
fileID
,
NC_GLOBAL
,
"institution"
,
len
,
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
if
(
len
>
0
)
{
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_put_att_text
(
fileID
,
NC_GLOBAL
,
"institution"
,
len
,
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
}
}
}
#endif
...
...
@@ -6157,9 +6160,12 @@ void cdfDefSource(int streamID)
if
(
longname
)
{
len
=
strlen
(
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_put_att_text
(
fileID
,
NC_GLOBAL
,
"source"
,
len
,
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
if
(
len
>
0
)
{
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
cdf_put_att_text
(
fileID
,
NC_GLOBAL
,
"source"
,
len
,
longname
);
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
}
}
}
#endif
...
...
src/stream_cgribex.c
View file @
7ca61648
...
...
@@ -1396,7 +1396,7 @@ void cgribexDefModel(int *isec1, int vlistID, int varID)
}
static
void
cgribexDefParam
(
int
*
isec1
,
int
param
)
void
cgribexDefParam
(
int
*
isec1
,
int
param
,
int
tabnum
)
{
static
char
func
[]
=
"cgribexDefParam"
;
int
pdis
,
pcat
,
pnum
;
...
...
@@ -1412,6 +1412,8 @@ void cgribexDefParam(int *isec1, int param)
if
(
pnum
<
0
)
pnum
=
-
pnum
;
if
(
pcat
==
255
)
pcat
=
tabnum
;
ISEC1_CodeTable
=
pcat
;
ISEC1_Parameter
=
pnum
;
}
...
...
@@ -2004,7 +2006,7 @@ size_t cgribexEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
datatype
=
vlistInqVarDatatype
(
vlistID
,
varID
);
cgribexDefParam
(
isec1
,
param
);
cgribexDefParam
(
isec1
,
param
,
tabnum
);
cgribexDefTime
(
isec1
,
date
,
time
,
numavg
,
vlistInqTaxis
(
vlistID
));
cgribexDefGrid
(
isec1
,
isec2
,
gridID
);
cgribexDefLevel
(
isec1
,
isec2
,
fsec2
,
zaxisID
,
levelID
);
...
...
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