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
49ad33da
Commit
49ad33da
authored
Jun 26, 2017
by
Uwe Schulzweida
Browse files
remap_define_reg2d: bug fix for non monotonic increasing longitudes.
parent
534e23ca
Changes
1
Show whitespace changes
Inline
Side-by-side
src/remaplib.cc
View file @
49ad33da
...
...
@@ -570,6 +570,11 @@ void remap_define_reg2d(int gridID, remapgrid_t *grid)
grid_to_radian
(
yunits
,
nx
,
grid
->
reg2d_center_lon
,
"grid reg2d center lon"
);
grid_to_radian
(
yunits
,
ny
,
grid
->
reg2d_center_lat
,
"grid reg2d center lat"
);
if
(
grid
->
reg2d_center_lon
[
nx
-
1
]
<
grid
->
reg2d_center_lon
[
0
]
)
for
(
long
i
=
1
;
i
<
nx
;
++
i
)
if
(
grid
->
reg2d_center_lon
[
i
]
<
grid
->
reg2d_center_lon
[
i
-
1
]
)
grid
->
reg2d_center_lon
[
i
]
+=
PI2
;
if
(
grid
->
is_cyclic
)
grid
->
reg2d_center_lon
[
nx
]
=
grid
->
reg2d_center_lon
[
0
]
+
PI2
;
grid
->
reg2d_corner_lon
=
(
double
*
)
Malloc
(
nxp1
*
sizeof
(
double
));
...
...
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