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
e45f0016
Commit
e45f0016
authored
9 years ago
by
Thomas Jahns
Committed by
Sergey Kosukhin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Do not unnecessarily switch NetCDF files to data mode.
parent
444d35e9
No related branches found
No related tags found
2 merge requests
!34
Version 2.2.0
,
!13
Consolidation with CDI-PIO (develop)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/stream_cdf_o.c
+12
-3
12 additions, 3 deletions
src/stream_cdf_o.c
with
12 additions
and
3 deletions
src/stream_cdf_o.c
+
12
−
3
View file @
e45f0016
...
...
@@ -236,7 +236,13 @@ cdfDefTrajLatLon(stream_t *streamptr, int gridID, int gridIndex, const struct cd
{
int
dimNcID
=
streamptr
->
basetime
.
ncvarid
;
const
int
fileID
=
streamptr
->
fileID
;
if
(
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
bool
switch2Data
=
false
;
if
(
streamptr
->
ncmode
==
2
)
{
cdf_redef
(
fileID
);
switch2Data
=
true
;
streamptr
->
ncmode
=
1
;
}
char
axisname
[
CDI_MAX_NAME
];
const
int
axistype
=
(
inqs
->
axisSym
==
'X'
)
?
CDI_XAXIS
:
CDI_YAXIS
;
...
...
@@ -244,8 +250,11 @@ cdfDefTrajLatLon(stream_t *streamptr, int gridID, int gridIndex, const struct cd
cdiInqKeyString
(
gridID
,
axistype
,
CDI_KEY_NAME
,
axisname
,
&
length
);
cdf_def_var
(
fileID
,
axisname
,
xtype
,
1
,
&
dimNcID
,
&
ncvarid
);
cdfPutGridStdAtts
(
fileID
,
ncvarid
,
gridID
,
inqs
->
axisSym
);
cdf_enddef
(
fileID
);
streamptr
->
ncmode
=
2
;
if
(
switch2Data
)
{
cdf_enddef
(
fileID
);
streamptr
->
ncmode
=
2
;
}
}
ncgrid
[
gridIndex
].
gridID
=
gridID
;
...
...
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