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
d020b9f2
Commit
d020b9f2
authored
Feb 29, 2008
by
Uwe Schulzweida
Browse files
cdfInqContents: bug fix for inconsistent curvilinear grid
parent
19a05bb1
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d020b9f2
2008-04-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2008-04-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfInqContents: bug fix for inconsistent curvilinear grid [report: Holger Goettel]
* cdfInqContents: check type of _FillValue
* cdfInqContents: check type of _FillValue
* gridCompare: compare grid.yinc only if set
* grid_check_cyclic: bug fix
* grid_check_cyclic: bug fix
* Version 1.1.1 released
* Version 1.1.1 released
...
...
config/default
View file @
d020b9f2
...
@@ -42,7 +42,7 @@ case "${HOSTNAME}" in
...
@@ -42,7 +42,7 @@ case "${HOSTNAME}" in
executor
|
yang
|
yin
)
executor
|
yang
|
yin
)
./configure
--prefix
=
$HOME
/local/SUN64
\
./configure
--prefix
=
$HOME
/local/SUN64
\
--with-netcdf
=
/scratch/small/m214/m214089/local/SunOS64
\
--with-netcdf
=
/scratch/small/m214/m214089/local/SunOS64
\
CC
=
cc
CFLAGS
=
"-g -mt -fast -xtarget=native -
xarch=v9a
"
CC
=
cc
CFLAGS
=
"-g -mt -fast -xtarget=native -
m64
"
;;
;;
# sx6-nec-superux12.2
# sx6-nec-superux12.2
cs
*
)
cs
*
)
...
...
src/grid.c
View file @
d020b9f2
...
@@ -2205,13 +2205,23 @@ int gridCompare(int gridID, GRID grid)
...
@@ -2205,13 +2205,23 @@ int gridCompare(int gridID, GRID grid)
if
(
!
(
DBL_IS_EQUAL
(
grid
.
xfirst
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
xlast
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
xinc
,
0
))
&&
if
(
!
(
DBL_IS_EQUAL
(
grid
.
xfirst
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
xlast
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
xinc
,
0
))
&&
!
(
DBL_IS_EQUAL
(
grid
.
yfirst
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
ylast
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
yinc
,
0
))
&&
!
(
DBL_IS_EQUAL
(
grid
.
yfirst
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
ylast
,
0
)
&&
DBL_IS_EQUAL
(
grid
.
yinc
,
0
))
&&
!
DBL_IS_EQUAL
(
grid
.
xfirst
,
grid
.
xlast
)
&&
!
DBL_IS_EQUAL
(
grid
.
yfirst
,
grid
.
ylast
)
)
!
DBL_IS_EQUAL
(
grid
.
xfirst
,
grid
.
xlast
)
&&
!
DBL_IS_EQUAL
(
grid
.
yfirst
,
grid
.
ylast
)
)
if
(
!
DBL_IS_EQUAL
(
grid
.
xfirst
,
gridInqXval
(
gridID
,
0
))
||
{
!
DBL_IS_EQUAL
(
grid
.
yfirst
,
gridInqYval
(
gridID
,
0
))
||
if
(
!
DBL_IS_EQUAL
(
grid
.
xfirst
,
gridInqXval
(
gridID
,
0
))
||
fabs
(
fabs
(
grid
.
xinc
)
-
fabs
(
gridInqXinc
(
gridID
)))
>
fabs
(
grid
.
xinc
/
1000
)
||
!
DBL_IS_EQUAL
(
grid
.
yfirst
,
gridInqYval
(
gridID
,
0
)))
fabs
(
fabs
(
grid
.
yinc
)
-
fabs
(
gridInqYinc
(
gridID
)))
>
fabs
(
grid
.
yinc
/
1000
)
)
{
{
differ
=
1
;
differ
=
1
;
}
}
if
(
!
differ
&&
fabs
(
grid
.
xinc
)
>
0
&&
fabs
(
fabs
(
grid
.
xinc
)
-
fabs
(
gridInqXinc
(
gridID
)))
>
fabs
(
grid
.
xinc
/
1000
))
{
differ
=
1
;
}
if
(
!
differ
&&
fabs
(
grid
.
yinc
)
>
0
&&
fabs
(
fabs
(
grid
.
yinc
)
-
fabs
(
gridInqYinc
(
gridID
)))
>
fabs
(
grid
.
yinc
/
1000
))
{
differ
=
1
;
}
}
}
}
else
else
differ
=
1
;
differ
=
1
;
...
...
src/stream_cdf.c
View file @
d020b9f2
...
@@ -4255,6 +4255,19 @@ int cdfInqContents(int streamID)
...
@@ -4255,6 +4255,19 @@ int cdfInqContents(int streamID)
}
}
else
else
{
{
if
(
xvarid
!=
UNDEFID
&&
yvarid
!=
UNDEFID
)
{
if
(
ncvars
[
xvarid
].
ndims
!=
ncvars
[
yvarid
].
ndims
)
{
Warning
(
func
,
"Inconsistent grid structure for variable %s!"
,
ncvars
[
ncvarid
].
name
);
ncvars
[
ncvarid
].
xvarid
=
UNDEFID
;
ncvars
[
ncvarid
].
yvarid
=
UNDEFID
;
xvarid
=
UNDEFID
;
yvarid
=
UNDEFID
;
}
}
if
(
xvarid
!=
UNDEFID
)
if
(
xvarid
!=
UNDEFID
)
{
{
islon
=
ncvars
[
xvarid
].
islon
;
islon
=
ncvars
[
xvarid
].
islon
;
...
...
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