Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
mpim-sw
libcdi
Commits
15351e5a
Commit
15351e5a
authored
5 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Added function grid_axis_init().
parent
6e370b19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/grid.c
+25
-31
25 additions, 31 deletions
src/grid.c
with
25 additions
and
31 deletions
src/grid.c
+
25
−
31
View file @
15351e5a
...
...
@@ -112,6 +112,26 @@ bool cdiInqAttConvertedToFloat(int gridID, int atttype, const char *attname, int
return
status
;
}
static
void
grid_axis_init
(
struct
gridaxis_t
*
axisptr
)
{
axisptr
->
size
=
0
;
axisptr
->
vals
=
NULL
;
axisptr
->
bounds
=
NULL
;
axisptr
->
flag
=
0
;
axisptr
->
first
=
0
.
0
;
axisptr
->
last
=
0
.
0
;
axisptr
->
inc
=
0
.
0
;
#ifndef USE_MPI
axisptr
->
clength
=
0
;
axisptr
->
cvals
=
NULL
;
#endif
axisptr
->
dimname
[
0
]
=
0
;
axisptr
->
name
[
0
]
=
0
;
axisptr
->
longname
[
0
]
=
0
;
axisptr
->
units
[
0
]
=
0
;
axisptr
->
stdname
=
NULL
;
}
void
grid_init
(
grid_t
*
gridptr
)
{
...
...
@@ -121,25 +141,14 @@ void grid_init(grid_t *gridptr)
gridptr
->
projtype
=
CDI_UNDEFID
;
gridptr
->
mask
=
NULL
;
gridptr
->
mask_gme
=
NULL
;
gridptr
->
x
.
vals
=
NULL
;
gridptr
->
y
.
vals
=
NULL
;
gridptr
->
x
.
bounds
=
NULL
;
gridptr
->
y
.
bounds
=
NULL
;
gridptr
->
size
=
0
;
grid_axis_init
(
&
gridptr
->
x
);
grid_axis_init
(
&
gridptr
->
y
);
gridptr
->
area
=
NULL
;
gridptr
->
rowlon
=
NULL
;
gridptr
->
nrowlon
=
0
;
#ifndef USE_MPI
gridptr
->
x
.
clength
=
0
;
gridptr
->
y
.
clength
=
0
;
gridptr
->
x
.
cvals
=
NULL
;
gridptr
->
y
.
cvals
=
NULL
;
#endif
gridptr
->
x
.
first
=
0
.
0
;
gridptr
->
x
.
last
=
0
.
0
;
gridptr
->
x
.
inc
=
0
.
0
;
gridptr
->
y
.
first
=
0
.
0
;
gridptr
->
y
.
last
=
0
.
0
;
gridptr
->
y
.
inc
=
0
.
0
;
gridptr
->
gme
.
nd
=
0
;
gridptr
->
gme
.
ni
=
0
;
...
...
@@ -152,26 +161,11 @@ void grid_init(grid_t *gridptr)
gridptr
->
position
=
0
;
gridptr
->
reference
=
NULL
;
gridptr
->
datatype
=
CDI_DATATYPE_FLT64
;
gridptr
->
size
=
0
;
gridptr
->
x
.
size
=
0
;
gridptr
->
y
.
size
=
0
;
gridptr
->
np
=
0
;
gridptr
->
x
.
flag
=
0
;
gridptr
->
y
.
flag
=
0
;
gridptr
->
isCyclic
=
CDI_UNDEFID
;
gridptr
->
lcomplex
=
false
;
gridptr
->
hasdims
=
true
;
gridptr
->
x
.
dimname
[
0
]
=
0
;
gridptr
->
y
.
dimname
[
0
]
=
0
;
gridptr
->
x
.
name
[
0
]
=
0
;
gridptr
->
y
.
name
[
0
]
=
0
;
gridptr
->
x
.
longname
[
0
]
=
0
;
gridptr
->
y
.
longname
[
0
]
=
0
;
gridptr
->
x
.
units
[
0
]
=
0
;
gridptr
->
y
.
units
[
0
]
=
0
;
gridptr
->
x
.
stdname
=
NULL
;
gridptr
->
y
.
stdname
=
NULL
;
gridptr
->
vdimname
[
0
]
=
0
;
gridptr
->
mapname
[
0
]
=
0
;
gridptr
->
mapping
[
0
]
=
0
;
...
...
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