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
4e937121
Commit
4e937121
authored
Jul 18, 2016
by
Uwe Schulzweida
Browse files
Print grid mapping.
parent
b3220c0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/printinfo.h
View file @
4e937121
...
...
@@ -283,9 +283,7 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
// int dig = (prec == DATATYPE_FLT64) ? 15 : 7;
int
dig
=
7
;
if
(
lproj
)
fprintf
(
stdout
,
" %24s"
,
gridNamePtr
(
gridtype
));
else
if
(
!
lproj
)
fprintf
(
stdout
,
" %4d : %-24s"
,
index
+
1
,
gridNamePtr
(
gridtype
));
if
(
gridtype
==
GRID_LONLAT
||
...
...
@@ -408,14 +406,7 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
}
else
if
(
gridtype
==
GRID_PROJECTION
)
{
if
(
lproj
)
{
char
name
[
CDI_MAX_NAME
];
name
[
0
]
=
0
;
cdiGridInqKeyStr
(
gridID
,
CDI_KEY_MAPPING
,
CDI_MAX_NAME
,
name
);
if
(
name
[
0
]
==
0
)
strcpy
(
name
,
"undefined"
);
fprintf
(
stdout
,
" : %s
\n
"
,
name
);
}
else
if
(
!
lproj
)
{
if
(
ysize
==
0
)
fprintf
(
stdout
,
" : points=%d
\n
"
,
gridsize
);
...
...
@@ -423,6 +414,12 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
fprintf
(
stdout
,
" : points=%d (%dx%d)
\n
"
,
gridsize
,
xsize
,
ysize
);
}
fprintf
(
stdout
,
" %24s"
,
"mapping"
);
char
name
[
CDI_MAX_NAME
];
name
[
0
]
=
0
;
cdiGridInqKeyStr
(
gridID
,
CDI_KEY_MAPPING
,
CDI_MAX_NAME
,
name
);
if
(
name
[
0
]
==
0
)
strcpy
(
name
,
"undefined"
);
fprintf
(
stdout
,
" : %s
\n
"
,
name
);
print_xvals
(
gridID
,
dig
);
print_yvals
(
gridID
,
dig
);
}
...
...
src/Makefile.in
View file @
4e937121
...
...
@@ -942,8 +942,8 @@ distclean-generic:
maintainer-clean-generic
:
@
echo
"This command is intended for maintainers to use"
@
echo
"it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
@ENABLE_CDI_LIB_FALSE@uninstall-local
:
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
clean
:
clean-am
clean-am
:
clean-generic clean-libLTLIBRARIES clean-libtool
\
...
...
src/stream_cdf_i.c
View file @
4e937121
...
...
@@ -2645,9 +2645,17 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
if
(
lgrid
&&
lproj
&&
testproj
)
{
projAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
proj
,
2
);
int
projID
=
projAdded
.
Id
;
grid
->
proj
=
projID
;
grid
->
proj
=
projAdded
.
Id
;
}
gridAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
grid
,
1
);
ncvar
->
gridID
=
gridAdded
.
Id
;
int
gridID
=
ncvar
->
gridID
;
if
(
lproj
)
{
int
projID
=
lgrid
?
grid
->
proj
:
gridID
;
int
ncid
=
ncvars
[
gmapvarid
].
ncid
;
nc_type
atttype
;
size_t
attlen
;
...
...
@@ -2693,11 +2701,6 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
}
}
gridAdded
=
cdiVlistAddGridIfNew
(
vlistID
,
grid
,
1
);
ncvar
->
gridID
=
gridAdded
.
Id
;
int
gridID
=
ncvar
->
gridID
;
if
(
grid
->
type
==
GRID_UNSTRUCTURED
&&
gridfile
[
0
]
!=
0
)
gridDefReference
(
gridID
,
gridfile
);
...
...
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