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

remapdis: potentialy wrong results on non global grids (bug fix) (bug was...

remapdis: potentialy wrong results on non global grids (bug fix) (bug was introduced in last revision).
parent 79f2aee6
......@@ -3,6 +3,10 @@
* Using CDI library version 1.8.1
* Version 1.8.1 release
2017-03-21 Uwe Schulzweida
* remapdis: potentialy wrong results on non global grids (bug fix) (bug was introduced in last revision)
2017-03-13 Uwe Schulzweida
* selindexbox: added support for LCC grid
......
......@@ -729,17 +729,30 @@ void links_per_value(remapvars_t *remapvars)
else break;
if ( num_links%lpv != 0 ) lpv = -1;
else if ( lpv == 1 )
{
for ( long n = 1; n < num_links; ++n )
{
if ( dst_add[n] == dst_add[n-1] )
{
lpv = -1;
break;
}
}
}
else if ( lpv > 1 )
{
for ( long n = 1; n < num_links/lpv; ++n )
{
ival = dst_add[n*lpv];
for ( int k = 1; k < lpv; ++k )
if ( dst_add[n*lpv+k] != ival )
{
lpv = -1;
break;
}
{
if ( dst_add[n*lpv+k] != ival )
{
lpv = -1;
break;
}
}
if ( lpv == -1 ) break;
}
}
......
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