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
09e8616a
Commit
09e8616a
authored
Feb 20, 2019
by
Uwe Schulzweida
Browse files
Removed unused CDI function gridDefUvRelativeToGrid.
parent
3bf9a83b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/cdi.h
View file @
09e8616a
...
...
@@ -1002,9 +1002,6 @@ void gridChangeType(int gridID, int gridtype);
void
gridDefComplexPacking
(
int
gridID
,
int
lpack
);
int
gridInqComplexPacking
(
int
gridID
);
void
gridDefUvRelativeToGrid
(
int
gridID
,
int
uvRelativeToGrid
);
int
gridInqUvRelativeToGrid
(
int
gridID
);
void
gridDefScanningMode
(
int
gridID
,
int
mode
);
int
gridInqScanningMode
(
int
gridID
);
...
...
src/gribapi_utilities.c
View file @
09e8616a
#ifdef HAVE_CONFIG_H
#
include "config.h"
#include "config.h"
#endif
#ifdef HAVE_LIBGRIB_API
...
...
@@ -834,7 +834,6 @@ bool gribapiGetGrid(grib_handle *gh, grid_t *grid)
long
temp
;
GRIB_CHECK
(
grib_get_long
(
gh
,
"uvRelativeToGrid"
,
&
temp
),
0
);
assert
(
temp
==
0
||
temp
==
1
);
grid
->
uvRelativeToGrid
=
(
bool
)
temp
;
uvRelativeToGrid
=
(
bool
)
temp
;
}
...
...
src/grid.c
View file @
09e8616a
...
...
@@ -180,7 +180,6 @@ void grid_init(grid_t *gridptr)
gridptr
->
vtable
=
&
cdiGridVtable
;
gridptr
->
atts
.
nalloc
=
MAX_ATTRIBUTES
;
gridptr
->
atts
.
nelems
=
0
;
gridptr
->
uvRelativeToGrid
=
0
;
// Some models deliver wind U,V relative to the grid-cell
gridptr
->
iScansNegatively
=
0
;
gridptr
->
jScansPositively
=
1
;
gridptr
->
jPointsAreConsecutive
=
0
;
...
...
@@ -2429,14 +2428,14 @@ bool gridCompare(int gridID, const grid_t *grid, bool coord_compare)
}
}
if
(
(
grid
->
scanningMode
!=
gridInqScanningMode
(
gridID
))
||
(
grid
->
uvRelativeToGrid
!=
gridInqUvRelativeToGrid
(
gridID
))
)
if
(
(
grid
->
scanningMode
!=
gridInqScanningMode
(
gridID
))
)
{
// often grid definition may differ in UV-relativeToGrid
differ
=
1
;
#ifdef HIRLAM_EXTENSIONS
if
(
cdiDebugExt
>=
200
)
printf
(
"gridCompare(gridID=%d): Differs: grid.scanningMode [%d] != gridInqScanningMode(gridID)
[%d] or grid.uvRelativeToGrid [%d] != gridInqUvRelativeToGrid(gridID)
[%d]
\n
"
,
gridID
,
grid
->
scanningMode
,
gridInqScanningMode
(
gridID
)
,
grid
->
uvRelativeToGrid
,
gridInqUvRelativeToGrid
(
gridID
)
);
printf
(
"gridCompare(gridID=%d): Differs: grid.scanningMode [%d] != gridInqScanningMode(gridID) [%d]
\n
"
,
gridID
,
grid
->
scanningMode
,
gridInqScanningMode
(
gridID
));
#endif // HIRLAM_EXTENSIONS
}
...
...
@@ -2490,7 +2489,6 @@ int gridCompareP(void *gridptr1, void *gridptr2)
if
(
IS_NOT_EQUAL
(
g1
->
y
.
last
,
g2
->
y
.
last
)
)
return
differ
;
if
(
IS_NOT_EQUAL
(
g1
->
x
.
inc
,
g2
->
x
.
inc
)
)
return
differ
;
if
(
IS_NOT_EQUAL
(
g1
->
y
.
inc
,
g2
->
y
.
inc
)
)
return
differ
;
if
(
IS_NOT_EQUAL
(
g1
->
uvRelativeToGrid
,
g2
->
uvRelativeToGrid
)
)
return
differ
;
if
(
IS_NOT_EQUAL
(
g1
->
scanningMode
,
g2
->
scanningMode
)
)
return
differ
;
const
double
*
restrict
g1_xvals
=
g1
->
vtable
->
inqXValsPtr
(
g1
),
...
...
@@ -2808,7 +2806,6 @@ int gridGenerate(const grid_t *grid)
gridDefArea
(
gridID
,
grid
->
area
);
gridptr
->
number
=
grid
->
number
;
gridptr
->
position
=
grid
->
position
;
gridptr
->
uvRelativeToGrid
=
grid
->
uvRelativeToGrid
;
gridptr
->
scanningMode
=
grid
->
scanningMode
;
gridptr
->
iScansNegatively
=
grid
->
iScansNegatively
;
gridptr
->
jScansPositively
=
grid
->
jScansPositively
;
...
...
@@ -4382,25 +4379,6 @@ void gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE])
}
void
gridDefUvRelativeToGrid
(
int
gridID
,
int
uvRelativeToGrid
)
{
grid_t
*
gridptr
=
grid_to_pointer
(
gridID
);
if
(
gridptr
->
uvRelativeToGrid
!=
uvRelativeToGrid
)
{
gridMark4Update
(
gridID
);
gridptr
->
uvRelativeToGrid
=
(
bool
)
uvRelativeToGrid
;
}
}
int
gridInqUvRelativeToGrid
(
int
gridID
)
{
grid_t
*
gridptr
=
grid_to_pointer
(
gridID
);
return
gridptr
->
uvRelativeToGrid
;
}
void
gridDefScanningMode
(
int
gridID
,
int
mode
)
{
grid_t
*
gridptr
=
grid_to_pointer
(
gridID
);
...
...
@@ -4461,7 +4439,6 @@ enum {
GRID_PACK_INT_IDX_MEMBERMASK
,
GRID_PACK_INT_IDX_XTSTDNNAME
,
GRID_PACK_INT_IDX_YTSTDNNAME
,
GRID_PACK_INT_IDX_UVRELATIVETOGRID
,
GRID_PACK_INT_IDX_ISCANSNEGATIVELY
,
GRID_PACK_INT_IDX_JSCANSPOSITIVELY
,
GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE
,
...
...
@@ -4669,7 +4646,6 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
xystdname_tab
[
intBuffer
[
GRID_PACK_INT_IDX_XTSTDNNAME
]][
0
];
gridP
->
y
.
stdname
=
xystdname_tab
[
intBuffer
[
GRID_PACK_INT_IDX_YTSTDNNAME
]][
1
];
gridP
->
uvRelativeToGrid
=
intBuffer
[
GRID_PACK_INT_IDX_UVRELATIVETOGRID
];
gridP
->
iScansNegatively
=
(
bool
)
intBuffer
[
GRID_PACK_INT_IDX_ISCANSNEGATIVELY
];
gridP
->
jScansPositively
=
(
bool
)
intBuffer
[
GRID_PACK_INT_IDX_JSCANSPOSITIVELY
];
gridP
->
jPointsAreConsecutive
=
(
bool
)
intBuffer
[
GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE
];
...
...
@@ -4858,7 +4834,6 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
(
int
)((
const
char
(
*
)[
2
][
24
])
gridP
->
y
.
stdname
-
(
const
char
(
*
)[
2
][
24
])
xystdname_tab
[
0
][
1
]);
intBuffer
[
GRID_PACK_INT_IDX_UVRELATIVETOGRID
]
=
gridP
->
uvRelativeToGrid
;
intBuffer
[
GRID_PACK_INT_IDX_ISCANSNEGATIVELY
]
=
gridP
->
iScansNegatively
;
intBuffer
[
GRID_PACK_INT_IDX_JSCANSPOSITIVELY
]
=
gridP
->
jScansPositively
;
intBuffer
[
GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE
]
=
gridP
->
jPointsAreConsecutive
;
...
...
src/grid.h
View file @
09e8616a
...
...
@@ -108,7 +108,6 @@ struct grid_t {
*/
bool
lcomplex
;
bool
hasdims
;
bool
uvRelativeToGrid
;
/* Some models deliver wind U,V relative to the grid-cell */
struct
gridaxis_t
x
;
struct
gridaxis_t
y
;
const
struct
gridVirtTable
*
vtable
;
...
...
src/stream_cgribex.c
View file @
09e8616a
...
...
@@ -442,8 +442,6 @@ bool cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
grid
->
type
=
gridtype
;
grid
->
projtype
=
projtype
;
if
(
uvRelativeToGrid
)
grid
->
uvRelativeToGrid
=
1
;
return
uvRelativeToGrid
;
}
...
...
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