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
c855999f
Commit
c855999f
authored
Dec 04, 2013
by
Uwe Schulzweida
Browse files
remap_contest: init num_weights (bug fix)
parent
3f869341
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
c855999f
...
...
@@ -7,6 +7,10 @@
* eca_csu: added number of csu periods with more than 5days per time period [request: Moritz Maneke]
* eca_cfd: added number of cfd periods with more than 5days per time period [request: Moritz Maneke]
2013-11-29 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* remapdis: optimization for regular 2D source grids
2013-11-28 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* remapbic: optimization for regular 2D source grids
...
...
src/remaplib.c
View file @
c855999f
...
...
@@ -5538,15 +5538,9 @@ void remap_contest(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv
tgt_area
=
huiliers_area
(
TargetCell
);
// tgt_area = cell_area(TargetCell);
for
(
n
=
0
;
n
<
nSourceCells
;
++
n
)
for
(
num_weights
=
0
,
n
=
0
;
n
<
nSourceCells
;
++
n
)
{
if
(
area
[
n
]
>
tgt_area
)
{
if
(
cdoVerbose
)
cdoWarning
(
"Source grid cell area larger than target cell, skipped! (tgt_add: %ld tgt_area: %g src_add: %d src_area: %g)"
,
tgt_grid_add
,
tgt_area
,
srch_add
[
n
],
area
[
n
]);
continue
;
}
if
(
area
[
n
]
>
0
)
{
weight
[
num_weights
]
=
area
[
n
]
/
tgt_area
;
...
...
@@ -5555,7 +5549,7 @@ void remap_contest(remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv
}
}
correct_weights
(
num_weights
,
weight
);
//
correct_weights(num_weights, weight);
#endif
for
(
n
=
0
;
n
<
num_weights
;
++
n
)
...
...
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