Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
7bbc76a0
Commit
7bbc76a0
authored
Oct 14, 2015
by
Uwe Schulzweida
Browse files
remap_distwgt_weights: call remapgrid_get_lonlat()
parent
ed84c4c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/remap_distwgt.c
View file @
7bbc76a0
...
...
@@ -403,8 +403,8 @@ void remap_distwgt_weights(unsigned num_neighbors, remapgrid_t *src_grid, remapg
if
(
!
tgt_grid
->
mask
[
tgt_cell_add
]
)
continue
;
double
pl
at
=
tgt_grid
->
cell_center_lat
[
tgt_cell_add
]
;
double
plon
=
tgt_grid
->
cell_center_lon
[
tgt_cell_add
]
;
double
pl
on
=
0
,
plat
=
0
;
remapgrid_get_lonlat
(
tgt_grid
,
tgt_cell_add
,
&
plon
,
&
plat
)
;
/* Find nearest grid points on source grid and distances to each point */
if
(
remap_grid_type
==
REMAP_GRID_TYPE_REG2D
)
...
...
src/remaplib.c
View file @
7bbc76a0
...
...
@@ -1450,7 +1450,6 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem
long
n
,
ns
,
i
;
long
idiff
,
imax
,
imin
,
icount
;
int
*
tgt_count
;
double
minval
,
maxval
,
sum
;
if
(
remap_order
==
2
)
cdoPrint
(
"Second order mapping from grid1 to grid2:"
);
...
...
@@ -1459,9 +1458,9 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem
cdoPrint
(
"----------------------------------------"
);
ns
=
0
;
sum
=
0
;
minval
=
DBL_MAX
;
maxval
=
-
DBL_MAX
;
double
sum
=
0
;
double
minval
=
DBL_MAX
;
double
maxval
=
-
DBL_MAX
;
for
(
n
=
0
;
n
<
src_grid
.
size
;
++
n
)
{
if
(
!
DBL_IS_EQUAL
(
array1
[
n
],
missval
)
)
...
...
Write
Preview
Supports
Markdown
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