Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YAC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
dkrz-sw
YAC
Commits
02c453b5
Commit
02c453b5
authored
8 years ago
by
Rene Redler
Browse files
Options
Downloads
Patches
Plain Diff
bug fix in runoff example; exchange between land and ocean boundary cells
parent
e6aa808e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/toy_icon_runoff_atm.c
+7
-6
7 additions, 6 deletions
examples/toy_icon_runoff_atm.c
examples/toy_icon_runoff_ocn.c
+7
-6
7 additions, 6 deletions
examples/toy_icon_runoff_ocn.c
with
14 additions
and
12 deletions
examples/toy_icon_runoff_atm.c
+
7
−
6
View file @
02c453b5
...
...
@@ -207,7 +207,7 @@ int main () {
if
(
checksum_mask
>
0
)
{
for
(
int
i
=
0
;
i
<
num_cells
;
++
i
)
{
if
(
cell_mask
[
i
]
==
-
1
)
cell_mask_own
[
i
]
=
0
;
if
(
cell_mask
[
i
]
==
1
)
cell_mask_own
[
i
]
=
0
;
else
cell_mask_own
[
i
]
=
1
;
}
}
...
...
@@ -224,7 +224,6 @@ int main () {
#endif
yac_cdef_mask
(
cell_mask_own
,
point_id
,
&
mask_id
);
free
(
cell_mask_own
);
/* Field definition for the first component (toy-icon-atmosphere) */
...
...
@@ -322,9 +321,9 @@ int main () {
}
for
(
int
i
=
0
;
i
<
num_cells
;
++
i
)
{
if
(
cell_mask
[
i
]
>
0
)
{
if
(
cell_mask
_own
[
i
]
>
0
)
{
cell_out_runoff_data
[
i
]
=
-
99999
;
cell_in_runoff_data
[
i
]
=
-
999
;
cell_in_runoff_data
[
i
]
=
-
999
99
;
}
}
...
...
@@ -407,9 +406,9 @@ int main () {
vtk_close
(
vtk_file
);
for
(
int
i
=
0
;
i
<
num_cells
;
++
i
)
{
if
(
cell_mask
[
i
]
>
0
)
{
if
(
cell_mask
_own
[
i
]
>
0
)
{
cell_out_runoff_data
[
i
]
=
-
99999
;
cell_in_runoff_data
[
i
]
=
-
999
;
cell_in_runoff_data
[
i
]
=
-
999
99
;
}
else
{
cell_out_runoff_data
[
i
]
=
cell_in_runoff_data
[
i
];
cell_in_runoff_data
[
i
]
=
-
10
;
...
...
@@ -424,6 +423,8 @@ int main () {
printf
(
"toy-icon-atmosphere: Time for ping-pong %f %f %f
\n
"
,
time_min_acc
,
time_max_acc
,
time_ave_acc
);
}
free
(
cell_mask_own
);
yac_cfinalize
();
MPI_Finalize
();
...
...
This diff is collapsed.
Click to expand it.
examples/toy_icon_runoff_ocn.c
+
7
−
6
View file @
02c453b5
...
...
@@ -133,7 +133,7 @@ int main () {
/* Grid definition for the first component (toy-icon-ocean) */
// char * filename = "
r2b4_amip
.nc";
// char * filename = "
iconR2B04-grid
.nc";
char
*
filename
=
"Earth_Icos_0039km_from160km-amip-cor.nc"
;
int
num_vertices
;
...
...
@@ -225,7 +225,6 @@ int main () {
#endif
yac_cdef_mask
(
cell_mask_own
,
point_id
,
&
mask_id
);
free
(
cell_mask_own
);
/* Field definition for the first component (toy-icon-ocean) */
...
...
@@ -323,9 +322,9 @@ int main () {
}
for
(
int
i
=
0
;
i
<
num_cells
;
++
i
)
{
if
(
cell_mask
[
i
]
>
0
)
{
if
(
cell_mask
_own
[
i
]
>
0
)
{
cell_out_runoff_data
[
i
]
=
-
99999
;
cell_in_runoff_data
[
i
]
=
-
999
;
cell_in_runoff_data
[
i
]
=
-
999
99
;
}
}
...
...
@@ -408,9 +407,9 @@ int main () {
vtk_close
(
vtk_file
);
for
(
int
i
=
0
;
i
<
num_cells
;
++
i
)
{
if
(
cell_mask
[
i
]
>
0
)
{
if
(
cell_mask
_own
[
i
]
>
0
)
{
cell_out_runoff_data
[
i
]
=
-
99999
;
cell_in_runoff_data
[
i
]
=
-
999
;
cell_in_runoff_data
[
i
]
=
-
999
99
;
}
else
{
cell_out_runoff_data
[
i
]
=
cell_in_runoff_data
[
i
];
cell_in_runoff_data
[
i
]
=
-
10
;
...
...
@@ -425,6 +424,8 @@ int main () {
printf
(
"toy-icon-atmosphere: Time for ping-pong %f %f %f
\n
"
,
time_min_acc
,
time_max_acc
,
time_ave_acc
);
}
free
(
cell_mask_own
);
yac_cfinalize
();
MPI_Finalize
();
...
...
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