Skip to content
Snippets Groups Projects
Commit 3321a174 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

remap_bicubic: use remap_set_mask().

parent 34e8ca12
No related branches found
No related tags found
No related merge requests found
......@@ -207,4 +207,7 @@ LonLatPoint remapgrid_get_lonlat(RemapGrid *grid, size_t cell_add);
void remap_check_area(size_t grid_size, double *cell_area, const char *name);
template <typename T>
void remap_set_mask(size_t gridsize, const Varray<T> &v, T missval, Varray<short> &mask);
#endif /* REMAP_H */
......@@ -252,20 +252,7 @@ remap_bicubic(RemapSearch &rsearch, const Varray<T> &srcArray, Varray<T> &tgtArr
if (nmiss)
{
srcGridMask.resize(srcGridSize, 1);
if (std::isnan(missval))
{
#ifdef _OPENMP
#pragma omp parallel for default(shared) schedule(static)
#endif
for (size_t i = 0; i < srcGridSize; ++i) srcGridMask[i] = !DBL_IS_EQUAL(srcArray[i], missval);
}
else
{
#ifdef _OPENMP
#pragma omp parallel for default(shared) schedule(static)
#endif
for (size_t i = 0; i < srcGridSize; ++i) srcGridMask[i] = !IS_EQUAL(srcArray[i], missval);
}
remap_set_mask(srcGridSize, srcArray, missval, srcGridMask);
}
// Compute mappings from source to target grid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment