Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
3321a174
Commit
3321a174
authored
2 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
remap_bicubic: use remap_set_mask().
parent
34e8ca12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/remap.h
+3
-0
3 additions, 0 deletions
src/remap.h
src/remap_bicubic.cc
+1
-14
1 addition, 14 deletions
src/remap_bicubic.cc
with
4 additions
and
14 deletions
src/remap.h
+
3
−
0
View file @
3321a174
...
...
@@ -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 */
This diff is collapsed.
Click to expand it.
src/remap_bicubic.cc
+
1
−
14
View file @
3321a174
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment