Commit 7bbc76a0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

remap_distwgt_weights: call remapgrid_get_lonlat()

parent ed84c4c2
...@@ -403,8 +403,8 @@ void remap_distwgt_weights(unsigned num_neighbors, remapgrid_t *src_grid, remapg ...@@ -403,8 +403,8 @@ void remap_distwgt_weights(unsigned num_neighbors, remapgrid_t *src_grid, remapg
if ( ! tgt_grid->mask[tgt_cell_add] ) continue; if ( ! tgt_grid->mask[tgt_cell_add] ) continue;
double plat = tgt_grid->cell_center_lat[tgt_cell_add]; double plon = 0, plat = 0;
double plon = tgt_grid->cell_center_lon[tgt_cell_add]; remapgrid_get_lonlat(tgt_grid, tgt_cell_add, &plon, &plat);
/* Find nearest grid points on source grid and distances to each point */ /* Find nearest grid points on source grid and distances to each point */
if ( remap_grid_type == REMAP_GRID_TYPE_REG2D ) if ( remap_grid_type == REMAP_GRID_TYPE_REG2D )
......
...@@ -1450,7 +1450,6 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem ...@@ -1450,7 +1450,6 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem
long n, ns, i; long n, ns, i;
long idiff, imax, imin, icount; long idiff, imax, imin, icount;
int *tgt_count; int *tgt_count;
double minval, maxval, sum;
if ( remap_order == 2 ) if ( remap_order == 2 )
cdoPrint("Second order mapping from grid1 to grid2:"); 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 ...@@ -1459,9 +1458,9 @@ void remap_stat(int remap_order, remapgrid_t src_grid, remapgrid_t tgt_grid, rem
cdoPrint("----------------------------------------"); cdoPrint("----------------------------------------");
ns = 0; ns = 0;
sum = 0; double sum = 0;
minval = DBL_MAX; double minval = DBL_MAX;
maxval = -DBL_MAX; double maxval = -DBL_MAX;
for ( n = 0; n < src_grid.size; ++n ) for ( n = 0; n < src_grid.size; ++n )
{ {
if ( !DBL_IS_EQUAL(array1[n], missval) ) if ( !DBL_IS_EQUAL(array1[n], missval) )
......
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