Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
9a3aa1f7
Commit
9a3aa1f7
authored
Oct 16, 2020
by
Uwe Schulzweida
Browse files
Renamed sort_add_and_weights to sort_weights.
parent
aaa4096b
Pipeline
#4674
passed with stages
in 16 minutes and 38 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/remap_bicubic.cc
View file @
9a3aa1f7
...
...
@@ -282,7 +282,7 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
{
// Successfully found iw,jw - compute weights
bicubicSetWeights
(
iw
,
jw
,
weights
);
sort_
add_and_
weights_bicubic
(
src_add
,
weights
);
sort_weights_bicubic
(
src_add
,
weights
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
weights
,
src_add
,
gradients
);
}
else
...
...
@@ -300,7 +300,7 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
weights
);
sort_
add_and_
weights_bicubic
(
src_add
,
weights
);
sort_weights_bicubic
(
src_add
,
weights
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
weights
,
src_add
,
gradients
);
}
}
...
...
src/remap_bilinear.cc
View file @
9a3aa1f7
...
...
@@ -325,7 +325,7 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
{
// Successfully found iw,jw - compute weights
bilinearSetWeights
(
iw
,
jw
,
weights
);
sort_
add_and_4
weights
(
src_add
,
weights
);
sort_weights
_n4
(
src_add
,
weights
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
weights
,
src_add
);
}
else
...
...
@@ -345,7 +345,7 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
weights
);
sort_
add_and_4
weights
(
src_add
,
weights
);
sort_weights
_n4
(
src_add
,
weights
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
weights
,
src_add
);
}
}
...
...
src/remap_conserv.cc
View file @
9a3aa1f7
...
...
@@ -948,7 +948,7 @@ remapConserv(NormOpt normOpt, RemapSearch &rsearch, const double *restrict src_a
if
(
num_weights
)
{
sort_
add_and_
weights
(
num_weights
,
srch_add
[
ompthID
].
data
(),
partial_weights
.
data
());
sort_weights
(
num_weights
,
srch_add
[
ompthID
].
data
(),
partial_weights
.
data
());
// Normalize weights using destination area if requested
remapNormalizeWeights
(
normOpt
,
tgt_area
,
tgt_grid
->
cell_frac
[
tgt_cell_add
],
num_weights
,
partial_weights
.
data
());
tgt_array
[
tgt_cell_add
]
=
conservRemap
(
src_array
,
num_weights
,
partial_weights
,
srch_add
[
ompthID
]);
...
...
src/remap_store_link.cc
View file @
9a3aa1f7
...
...
@@ -74,7 +74,7 @@ sortAddweights4(Addweight4 *addweights)
}
void
sort_
add_and_4
weights
(
size_t
*
src_add
,
double
*
weights
)
sort_weights
_n4
(
size_t
*
src_add
,
double
*
weights
)
{
constexpr
size_t
numWeights
=
4
;
size_t
n
;
...
...
@@ -100,7 +100,7 @@ sort_add_and_4weights(size_t *src_add, double *weights)
}
void
sort_
add_and_
weights
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
)
sort_weights
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
)
{
size_t
n
;
for
(
n
=
1
;
n
<
numWeights
;
++
n
)
...
...
@@ -128,7 +128,7 @@ sort_add_and_weights(size_t numWeights, size_t *src_add, double *weights)
}
void
sort_
add_and_
weights_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
])
sort_weights_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
])
{
constexpr
size_t
numWeights
=
4
;
size_t
n
;
...
...
src/remap_store_link.h
View file @
9a3aa1f7
...
...
@@ -55,8 +55,8 @@ void store_weightlinks(int lalloc, size_t numWeights, size_t *srch_add, double *
void
store_weightlinks_bicubic
(
size_t
*
srch_add
,
double
(
&
weights
)[
4
][
4
],
size_t
cell_add
,
std
::
vector
<
WeightLinks4
>
&
weightLinks
);
void
weightLinksToRemapLinks
(
int
lalloc
,
size_t
gridSize
,
std
::
vector
<
WeightLinks
>
&
weightLinks
,
RemapVars
&
rv
);
void
weightLinks4ToRemapLinks
(
size_t
gridSize
,
std
::
vector
<
WeightLinks4
>
&
weightLinks
,
RemapVars
&
rv
);
void
sort_
add_and_
weights
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
);
void
sort_
add_and_4
weights
(
size_t
*
src_add
,
double
*
weights
);
void
sort_
add_and_
weights_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
]);
void
sort_weights
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
);
void
sort_weights
_n4
(
size_t
*
src_add
,
double
*
weights
);
void
sort_weights_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
]);
#endif
/* REMAP_STORE_LINK */
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment