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
68bb046b
Commit
68bb046b
authored
Mar 14, 2007
by
Uwe Schulzweida
Browse files
cdfInqContents: check also x/yvarid to compare curvilinear grids
parent
b1b5c7ca
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
68bb046b
2007-03-05 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2007-05-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfInqContents: check also x/yvarid to compare curvilinear grids
* Version 1.0.7 released
2007-03-06 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.0.5
* use GRIB ltype to define GENERIC zaxis
...
...
configure.ac
View file @
68bb046b
# Process this file with autoconf to produce a configure script.
AC_INIT(cdi, 1.0.
6
, Uwe.Schulzweida@zmaw.de)
AC_INIT(cdi, 1.0.
7
, Uwe.Schulzweida@zmaw.de)
CONFIG_ABORT=yes
...
...
src/stream_cdf.c
View file @
68bb046b
...
...
@@ -4372,10 +4372,21 @@ int cdfInqContents(int streamID)
if
(
xdimid
==
xdimid2
&&
(
ydimid
==
ydimid2
||
(
xdimid
==
ydimid
&&
ydimid2
==
UNDEFID
))
)
{
if
(
CDI_Debug
)
Message
(
func
,
"gridID %d %d %s"
,
ncvars
[
ncvarid
].
gridID
,
ncvarid2
,
ncvars
[
ncvarid2
].
name
);
ncvars
[
ncvarid2
].
gridID
=
ncvars
[
ncvarid
].
gridID
;
int
same_grid
=
TRUE
;
if
(
xvarid
!=
-
1
&&
ncvars
[
ncvarid2
].
xvarid
!=
UNDEFID
&&
xvarid
!=
ncvars
[
ncvarid2
].
xvarid
)
same_grid
=
FALSE
;
if
(
yvarid
!=
-
1
&&
ncvars
[
ncvarid2
].
yvarid
!=
UNDEFID
&&
yvarid
!=
ncvars
[
ncvarid2
].
yvarid
)
same_grid
=
FALSE
;
if
(
same_grid
)
{
if
(
CDI_Debug
)
Message
(
func
,
"gridID %d %d %s"
,
ncvars
[
ncvarid
].
gridID
,
ncvarid2
,
ncvars
[
ncvarid2
].
name
);
ncvars
[
ncvarid2
].
gridID
=
ncvars
[
ncvarid
].
gridID
;
}
}
}
}
...
...
src/stream_grb.c
View file @
68bb046b
...
...
@@ -535,9 +535,10 @@ int grbScanTimestep(int streamID)
ipunp
,
(
int
*
)
gribbuffer
,
recsize
,
&
iword
,
"J"
,
&
iret
);
rcode
=
ISEC1_Parameter
;
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
if
(
ISEC1_LevelType
==
100
)
level1
*=
100
;
gribDateTime
(
isec1
,
&
vdate
,
&
vtime
);
...
...
@@ -717,7 +718,6 @@ void grbAddRecord(int streamID, int code, int *isec1, int *isec2, double *fsec2,
numavg
=
ISEC1_AvgNum
;
level1
=
ISEC1_Level1
;
if
(
ISEC1_LevelType
==
100
)
level1
*=
100
;
level2
=
ISEC1_Level2
;
/* fprintf(stderr, "code %d %d %d %d\n", code, level1, level2, ISEC1_LevelType); */
...
...
@@ -1024,9 +1024,10 @@ void grbScanTimestep1(int streamID)
ipunp
,
(
int
*
)
gribbuffer
,
recsize
,
&
iword
,
"J"
,
&
iret
);
rcode
=
ISEC1_Parameter
;
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
if
(
ISEC1_LevelType
==
100
)
level1
*=
100
;
if
(
ISEC4_NumBits
>
0
&&
ISEC4_NumBits
<=
32
)
prec
=
ISEC4_NumBits
;
...
...
@@ -1261,9 +1262,10 @@ int grbScanTimestep2(int streamID)
ipunp
,
(
int
*
)
gribbuffer
,
recsize
,
&
iword
,
"J"
,
&
iret
);
rcode
=
ISEC1_Parameter
;
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
if
(
ISEC1_LevelType
==
100
)
level1
*=
100
;
gribDateTime
(
isec1
,
&
vdate
,
&
vtime
);
...
...
src/varscan.c
View file @
68bb046b
...
...
@@ -579,8 +579,11 @@ int zaxisCompare(int zaxisID, int zaxistype, int nlevels, int lbounds, double *l
int
differ
=
1
;
int
levelID
;
int
zlbounds
=
0
;
int
ltype_is_equal
=
FALSE
;
if
(
ltype
==
zaxisInqLtype
(
zaxisID
)
&&
(
zaxistype
==
zaxisInqType
(
zaxisID
)
||
zaxistype
==
ZAXIS_GENERIC
)
)
if
(
ltype
==
zaxisInqLtype
(
zaxisID
)
)
ltype_is_equal
=
TRUE
;
if
(
ltype_is_equal
&&
(
zaxistype
==
zaxisInqType
(
zaxisID
)
||
zaxistype
==
ZAXIS_GENERIC
)
)
{
if
(
zaxisInqLbounds
(
zaxisID
,
NULL
)
>
0
)
zlbounds
=
1
;
if
(
nlevels
==
zaxisInqSize
(
zaxisID
)
&&
zlbounds
==
lbounds
)
...
...
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