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
libcdi
Commits
0f9e1795
Commit
0f9e1795
authored
Jul 13, 2016
by
Uwe Schulzweida
Browse files
cdf_define_all_grids: cleanup.
parent
66583b7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
0f9e1795
...
...
@@ -2622,15 +2622,35 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
}
else
if
(
testproj
)
{
grid_t
*
projgrid
=
grid
;
if
(
lgrid
)
{
projgrid
=
proj
;
int
dumid
;
cdf_read_coordinates
(
lazyProj
,
ncvar
,
ncvars
,
ncdims
,
timedimid
,
xaxisid
,
yaxisid
,
xsize
,
ysize
,
&
dumid
);
}
}
}
if
(
CDI_Debug
||
testproj
)
{
Message
(
"grid: type = %d, size = %d, nx = %d, ny %d"
,
grid
->
type
,
grid
->
size
,
grid
->
x
.
size
,
grid
->
y
.
size
);
Message
(
"proj: type = %d, size = %d, nx = %d, ny %d"
,
proj
->
type
,
proj
->
size
,
proj
->
x
.
size
,
proj
->
y
.
size
);
}
gridAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
grid
,
1
);
ncvar
->
gridID
=
gridAdded
.
Id
;
if
(
lgrid
&&
lproj
)
{
if
(
testproj
)
{
projAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
proj
,
1
);
int
projID
=
projAdded
.
Id
;
printf
(
"proj size = %d type %d
\n
"
,
gridInqSize
(
projID
),
gridInqType
(
projID
));
int
ncid
=
ncvars
[
gmapvarid
].
ncid
;
nc_type
atttype
;
size_t
attlen
;
char
attname
[
CDI_MAX_NAME
];
...
...
@@ -2643,7 +2663,7 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
}
else
{
Warning
(
"
A
ttribute %s:grid_mapping_name missing!"
,
ncvars
[
gmapvarid
].
name
);
Warning
(
"
Text a
ttribute %s:grid_mapping_name missing!"
,
ncvars
[
gmapvarid
].
name
);
}
int
nvatts
;
...
...
@@ -2673,26 +2693,6 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
}
}
}
}
if
(
CDI_Debug
||
testproj
)
{
Message
(
"grid: type = %d, size = %d, nx = %d, ny %d"
,
grid
->
type
,
grid
->
size
,
grid
->
x
.
size
,
grid
->
y
.
size
);
Message
(
"proj: type = %d, size = %d, nx = %d, ny %d"
,
proj
->
type
,
proj
->
size
,
proj
->
x
.
size
,
proj
->
y
.
size
);
}
gridAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
grid
,
1
);
ncvar
->
gridID
=
gridAdded
.
Id
;
if
(
lgrid
&&
lproj
)
{
if
(
testproj
)
{
projAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
proj
,
1
);
int
projID
=
projAdded
.
Id
;
printf
(
"proj size = %d type %d
\n
"
,
gridInqSize
(
projID
),
gridInqType
(
projID
));
}
}
int
gridID
=
ncvar
->
gridID
;
...
...
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