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
26bf1fda
Commit
26bf1fda
authored
7 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Changed app/cdi -s format.
parent
51151b5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/cdi.c
+9
-5
9 additions, 5 deletions
app/cdi.c
tests/test_cdf_const.in
+3
-3
3 additions, 3 deletions
tests/test_cdf_const.in
with
12 additions
and
8 deletions
app/cdi.c
+
9
−
5
View file @
26bf1fda
...
...
@@ -344,9 +344,9 @@ void printShortinfo(int streamID, int vlistID, int vardis)
int
nsubtypes
=
vlistNsubtypes
(
vlistID
);
if
(
nsubtypes
>
0
)
fprintf
(
stdout
,
" Var : Institut Source Ttype
Subtypes
Num
Levels Num
Gridsize
Num Dtype : "
);
fprintf
(
stdout
,
" Var : Institut Source T
Step
type Subtypes Levels Num
Points
Num Dtype : "
);
else
fprintf
(
stdout
,
" Var : Institut Source Ttype
Levels Num
Gridsize
Num Dtype : "
);
fprintf
(
stdout
,
" Var : Institut Source T
Step
type Levels Num
Points
Num Dtype : "
);
if
(
vardis
)
fprintf
(
stdout
,
"Parameter name
\n
"
);
...
...
@@ -361,21 +361,25 @@ void printShortinfo(int streamID, int vlistID, int vardis)
fprintf
(
stdout
,
"%6d : "
,
varID
+
1
);
/
*
institute info
*/
/
/
institute info
const
char
*
instptr
=
institutInqNamePtr
(
vlistInqVarInstitut
(
vlistID
,
varID
));
strcpy
(
tmpname
,
"unknown"
);
if
(
instptr
)
strncpy
(
tmpname
,
instptr
,
CDI_MAX_NAME
);
limit_string_length
(
tmpname
,
CDI_MAX_NAME
);
fprintf
(
stdout
,
"%-8s "
,
tmpname
);
/
*
source info
*/
/
/
source info
const
char
*
modelptr
=
modelInqNamePtr
(
vlistInqVarModel
(
vlistID
,
varID
));
strcpy
(
tmpname
,
"unknown"
);
if
(
modelptr
)
strncpy
(
tmpname
,
modelptr
,
CDI_MAX_NAME
);
limit_string_length
(
tmpname
,
CDI_MAX_NAME
);
fprintf
(
stdout
,
"%-8s "
,
tmpname
);
/* tsteptype */
// timetype
int
timetype
=
vlistInqVarTimetype
(
vlistID
,
varID
);
fprintf
(
stdout
,
"%c "
,
timetype
==
TIME_CONSTANT
?
'c'
:
'v'
);
// tsteptype
int
tsteptype
=
vlistInqVarTsteptype
(
vlistID
,
varID
);
if
(
tsteptype
==
TSTEP_INSTANT
)
fprintf
(
stdout
,
"%-8s "
,
"instant"
);
else
if
(
tsteptype
==
TSTEP_INSTANT2
)
fprintf
(
stdout
,
"%-8s "
,
"instant"
);
...
...
This diff is collapsed.
Click to expand it.
tests/test_cdf_const.in
+
3
−
3
View file @
26bf1fda
...
...
@@ -39,9 +39,9 @@ fi
#PATTERNS
#^ File format : NetCDF
#^ Var : Institut Source Ttype
Levels Num
Gridsize
Num Dtype : Parameter ID
#^ 1 : unknown unknown instant 1 1 72 1 F32 : -1
#^ 2 : unknown unknown instant 5 2 72 1 F32 : -2
#^ Var : Institut Source T
Step
type Levels Num
Points
Num Dtype : Parameter ID
#^ 1 : unknown unknown
c
instant 1 1 72 1 F32 : -1
#^ 2 : unknown unknown
c
instant 5 2 72 1 F32 : -2
#^ Grid coordinates :
#^ 1 : lonlat : points=72 (12x6)
#^ lon : 0 to 330 by 30 degrees_east circular
...
...
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