Commit c855999f authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

remap_contest: init num_weights (bug fix)

parent 3f869341
......@@ -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
......
......@@ -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 )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment