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

Simplify initialization of sort_add.

parent a4466eda
......@@ -775,27 +775,6 @@ void remap_vars_init(RemapType mapType, size_t src_grid_size, size_t tgt_grid_si
/* Determine the number of weights */
#ifdef _OPENMP
if ( ompNumThreads > 1 )
{
if ( mapType == RemapType::CONSERV ) rv->sort_add = true;
else if ( mapType == RemapType::CONSERV_YAC ) rv->sort_add = false;
else if ( mapType == RemapType::BILINEAR ) rv->sort_add = false;
else if ( mapType == RemapType::BICUBIC ) rv->sort_add = false;
else if ( mapType == RemapType::DISTWGT ) rv->sort_add = false;
else cdoAbort("Unknown mapping method!");
}
else
#endif
{
if ( mapType == RemapType::CONSERV ) rv->sort_add = true;
else if ( mapType == RemapType::CONSERV_YAC ) rv->sort_add = false;
else if ( mapType == RemapType::BILINEAR ) rv->sort_add = false;
else if ( mapType == RemapType::BICUBIC ) rv->sort_add = false;
else if ( mapType == RemapType::DISTWGT ) rv->sort_add = false;
else cdoAbort("Unknown mapping method!");
}
if ( mapType == RemapType::CONSERV ) rv->num_wts = 3;
else if ( mapType == RemapType::CONSERV_YAC ) rv->num_wts = 1;
else if ( mapType == RemapType::BILINEAR ) rv->num_wts = 1;
......@@ -803,6 +782,8 @@ void remap_vars_init(RemapType mapType, size_t src_grid_size, size_t tgt_grid_si
else if ( mapType == RemapType::DISTWGT ) rv->num_wts = 1;
else cdoAbort("Unknown mapping method!");
rv->sort_add = (mapType == RemapType::CONSERV);
rv->links_per_value = -1;
/*
......
Markdown is supported
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