Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
b1aeefc2
Commit
b1aeefc2
authored
Jul 23, 2016
by
Uwe Schulzweida
Browse files
printinfo.h update.
parent
045ae96d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/printinfo.h
View file @
b1aeefc2
...
...
@@ -9,15 +9,9 @@
#define DATE_FORMAT "%5.4d-%2.2d-%2.2d"
#define TIME_FORMAT "%2.2d:%2.2d:%2.2d"
void
my_set_text_color
(
FILE
*
fp
,
int
attr
,
int
fg
)
{
#ifdef CDO
set_text_color
(
fp
,
attr
,
fg
);
#endif
}
void
my_reset_text_color
(
FILE
*
fp
)
{
(
void
)
fp
;
#ifdef CDO
reset_text_color
(
fp
);
#endif
...
...
@@ -300,7 +294,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
if
(
!
lproj
)
{
fprintf
(
stdout
,
" %4d : "
,
index
+
1
);
my_set_text_color
(
stdout
,
RESET
,
BLUE
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
BLUE
);
#endif
fprintf
(
stdout
,
"%-24s"
,
gridNamePtr
(
gridtype
));
my_reset_text_color
(
stdout
);
fprintf
(
stdout
,
" : "
);
...
...
@@ -317,7 +313,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
{
if
(
!
lproj
)
{
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"points=%d"
,
gridsize
);
if
(
gridtype
==
GRID_GAUSSIAN_REDUCED
)
fprintf
(
stdout
,
" nlat=%d"
,
ysize
);
...
...
@@ -336,11 +334,15 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
if
(
gridtype
==
GRID_PROJECTION
||
name
[
0
]
)
{
if
(
name
[
0
]
==
0
)
strcpy
(
name
,
"undefined"
);
my_set_text_color
(
stdout
,
RESET
,
BLUE
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
BLUE
);
#endif
fprintf
(
stdout
,
" %24s"
,
"mapping"
);
my_reset_text_color
(
stdout
);
fprintf
(
stdout
,
" : "
);
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"%s
\n
"
,
name
);
my_reset_text_color
(
stdout
);
}
...
...
@@ -384,7 +386,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
}
else
if
(
gridtype
==
GRID_SPECTRAL
)
{
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"points=%d nsp=%d truncation=%d"
,
gridsize
,
gridsize
/
2
,
trunc
);
if
(
gridInqComplexPacking
(
gridID
)
)
fprintf
(
stdout
,
" complexPacking"
);
my_reset_text_color
(
stdout
);
...
...
@@ -392,7 +396,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
}
else
if
(
gridtype
==
GRID_FOURIER
)
{
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"points=%d nfc=%d truncation=%d
\n
"
,
gridsize
,
gridsize
/
2
,
trunc
);
my_reset_text_color
(
stdout
);
}
...
...
@@ -400,13 +406,17 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
{
int
ni
=
gridInqGMEni
(
gridID
);
int
nd
=
gridInqGMEnd
(
gridID
);
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"points=%d nd=%d ni=%d
\n
"
,
gridsize
,
nd
,
ni
);
my_reset_text_color
(
stdout
);
}
else
if
(
gridtype
==
GRID_CURVILINEAR
||
gridtype
==
GRID_UNSTRUCTURED
)
{
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
if
(
gridtype
==
GRID_CURVILINEAR
)
fprintf
(
stdout
,
"points=%d (%dx%d)"
,
gridsize
,
xsize
,
ysize
);
else
...
...
@@ -443,7 +453,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
gridInqLCC
(
gridID
,
&
originLon
,
&
originLat
,
&
lonParY
,
&
lat1
,
&
lat2
,
&
xincm
,
&
yincm
,
&
projflag
,
&
scanflag
);
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
"points=%d (%dx%d) "
,
gridsize
,
xsize
,
ysize
);
if
(
(
projflag
&
128
)
==
0
)
fprintf
(
stdout
,
"North Pole
\n
"
);
...
...
@@ -456,7 +468,9 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
}
else
/* if ( gridtype == GRID_GENERIC ) */
{
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
if
(
ysize
==
0
)
fprintf
(
stdout
,
"points=%d
\n
"
,
gridsize
);
else
...
...
@@ -527,7 +541,9 @@ void printZaxisInfo(int vlistID)
zunits
[
12
]
=
0
;
fprintf
(
stdout
,
" %4d : "
,
vlistZaxisIndex
(
vlistID
,
zaxisID
)
+
1
);
my_set_text_color
(
stdout
,
RESET
,
BLUE
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
BLUE
);
#endif
if
(
zaxistype
==
ZAXIS_GENERIC
&&
ltype
!=
0
)
fprintf
(
stdout
,
"%-12s (ltype=%3d) :"
,
zaxisname
,
ltype
);
else
...
...
@@ -536,7 +552,9 @@ void printZaxisInfo(int vlistID)
fprintf
(
stdout
,
" :"
);
my_set_text_color
(
stdout
,
RESET
,
GREEN
);
#ifdef CDO
set_text_color
(
stdout
,
RESET
,
GREEN
);
#endif
fprintf
(
stdout
,
" levels=%d"
,
levelsize
);
my_reset_text_color
(
stdout
);
fprintf
(
stdout
,
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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