Skip to content
GitLab
Menu
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
0fecc513
Commit
0fecc513
authored
Dec 04, 2017
by
Uwe Schulzweida
Browse files
find_ij_weights: swap parameter src_lons, src_lats.
parent
16016475
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/remap_bicubic_scrip.cc
View file @
0fecc513
...
...
@@ -155,7 +155,7 @@ void scrip_remap_bicubic_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid, r
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
double
iw
,
jw
;
/* current guess for bilinear coordinate */
if
(
find_ij_weights
(
plon
,
plat
,
src_l
at
s
,
src_l
on
s
,
&
iw
,
&
jw
)
)
if
(
find_ij_weights
(
plon
,
plat
,
src_l
on
s
,
src_l
at
s
,
&
iw
,
&
jw
)
)
{
/* Successfully found iw,jw - compute weights */
set_bicubic_weights
(
iw
,
jw
,
wgts
);
...
...
@@ -276,7 +276,7 @@ void scrip_remap_bicubic(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const dou
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
double
iw
,
jw
;
/* current guess for bilinear coordinate */
if
(
find_ij_weights
(
plon
,
plat
,
src_l
at
s
,
src_l
on
s
,
&
iw
,
&
jw
)
)
if
(
find_ij_weights
(
plon
,
plat
,
src_l
on
s
,
src_l
at
s
,
&
iw
,
&
jw
)
)
{
/* Successfully found iw,jw - compute weights */
set_bicubic_weights
(
iw
,
jw
,
wgts
);
...
...
src/remap_bilinear_scrip.cc
View file @
0fecc513
...
...
@@ -12,7 +12,7 @@
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
bool
find_ij_weights
(
double
plon
,
double
plat
,
double
*
restrict
src_l
at
s
,
double
*
restrict
src_l
on
s
,
double
*
ig
,
double
*
jg
)
bool
find_ij_weights
(
double
plon
,
double
plat
,
double
*
restrict
src_l
on
s
,
double
*
restrict
src_l
at
s
,
double
*
ig
,
double
*
jg
)
{
bool
lfound
=
false
;
long
iter
;
/* iteration counters */
...
...
@@ -236,7 +236,7 @@ void scrip_remap_bilinear_weights(remapgrid_t *src_grid, remapgrid_t *tgt_grid,
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
double
iw
,
jw
;
// current guess for bilinear coordinate
if
(
find_ij_weights
(
plon
,
plat
,
src_l
at
s
,
src_l
on
s
,
&
iw
,
&
jw
)
)
if
(
find_ij_weights
(
plon
,
plat
,
src_l
on
s
,
src_l
at
s
,
&
iw
,
&
jw
)
)
{
// Successfully found iw,jw - compute weights
set_bilinear_weights
(
iw
,
jw
,
wgts
);
...
...
@@ -353,7 +353,7 @@ void scrip_remap_bilinear(remapgrid_t *src_grid, remapgrid_t *tgt_grid, const do
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
double
iw
,
jw
;
// current guess for bilinear coordinate
if
(
find_ij_weights
(
plon
,
plat
,
src_l
at
s
,
src_l
on
s
,
&
iw
,
&
jw
)
)
if
(
find_ij_weights
(
plon
,
plat
,
src_l
on
s
,
src_l
at
s
,
&
iw
,
&
jw
)
)
{
// Successfully found iw,jw - compute weights
set_bilinear_weights
(
iw
,
jw
,
wgts
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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