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
b73395c1
Commit
b73395c1
authored
4 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
cdf_get_vara_double: print start[0] and count[0] on error.
parent
da0486a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!7
Replaced gridDefDatatype()/gridInqDatatype() by cdiDefKeyInt()/cdiInqKeyInt()...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cdf_int.c
+50
-50
50 additions, 50 deletions
src/cdf_int.c
with
50 additions
and
50 deletions
src/cdf_int.c
+
50
−
50
View file @
b73395c1
...
...
@@ -28,7 +28,7 @@ void cdf_create(const char *path, int cmode, int *ncidp)
int
status
=
my_nc__create
(
path
,
cmode
,
initialsz
,
&
chunksizehint
,
ncidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d mode
=
%d chunksizehint
=
%zu file
=
%s"
,
*
ncidp
,
cmode
,
chunksizehint
,
path
);
Message
(
"ncid
=
%d mode
=
%d chunksizehint
=
%zu
file
=
%s"
,
*
ncidp
,
cmode
,
chunksizehint
,
path
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s: %s"
,
path
,
nc_strerror
(
status
));
...
...
@@ -75,7 +75,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
}
if
(
CDF_Debug
)
Message
(
"ncid
=
%d mode
=
%d file
=
%s"
,
*
ncidp
,
omode
,
path
);
Message
(
"ncid
=
%d mode
=
%d file
=
%s"
,
*
ncidp
,
omode
,
path
);
if
(
CDF_Debug
&&
status
!=
NC_NOERR
)
Message
(
"%s"
,
nc_strerror
(
status
));
...
...
@@ -128,7 +128,7 @@ void cdf_inq(int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp)
int
status
=
nc_inq
(
ncid
,
ndimsp
,
nvarsp
,
ngattsp
,
unlimdimidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d ndims
=
%d nvars
=
%d ngatts
=
%d unlimid
=
%d"
,
Message
(
"ncid
=
%d
ndims
=
%d
nvars
=
%d
ngatts
=
%d
unlimid
=
%d"
,
ncid
,
*
ndimsp
,
*
nvarsp
,
*
ngattsp
,
*
unlimdimidp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
...
...
@@ -140,7 +140,7 @@ void cdf_def_dim(int ncid, const char *name, size_t len, int *dimidp)
int
status
=
nc_def_dim
(
ncid
,
name
,
len
,
dimidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d name
=
%s len
=
%d"
,
ncid
,
name
,
len
);
Message
(
"ncid
=
%d name
=
%s len
=
%d"
,
ncid
,
name
,
len
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -151,7 +151,7 @@ void cdf_inq_dimid(int ncid, const char *name, int *dimidp)
int
status
=
nc_inq_dimid
(
ncid
,
name
,
dimidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d name
=
%s dimid=
%d"
,
ncid
,
name
,
*
dimidp
);
Message
(
"ncid
=
%d name
=
%s dimid=%d"
,
ncid
,
name
,
*
dimidp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -162,7 +162,7 @@ void cdf_inq_dim(int ncid, int dimid, char *name, size_t * lengthp)
int
status
=
nc_inq_dim
(
ncid
,
dimid
,
name
,
lengthp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d dimid
=
%d length
=
%d name
=
%s"
,
ncid
,
dimid
,
*
lengthp
,
name
);
Message
(
"ncid
=
%d dimid
=
%d length
=
%d
name
=
%s"
,
ncid
,
dimid
,
*
lengthp
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -173,7 +173,7 @@ void cdf_inq_dimname(int ncid, int dimid, char *name)
int
status
=
nc_inq_dimname
(
ncid
,
dimid
,
name
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d dimid
=
%d name
=
%s"
,
ncid
,
dimid
,
name
);
Message
(
"ncid
=
%d dimid
=
%d name
=
%s"
,
ncid
,
dimid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -184,7 +184,7 @@ void cdf_inq_dimlen(int ncid, int dimid, size_t * lengthp)
int
status
=
nc_inq_dimlen
(
ncid
,
dimid
,
lengthp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d dimid
=
%d length
=
%d"
,
ncid
,
dimid
,
*
lengthp
);
Message
(
"ncid
=
%d
dimid
=
%d
length
=
%d"
,
ncid
,
dimid
,
*
lengthp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -205,7 +205,7 @@ cdf_def_var_serial(int ncid, const char *name, nc_type xtype, int ndims,
int
status
=
nc_def_var
(
ncid
,
name
,
xtype
,
ndims
,
dimids
,
varidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d name
=
%s xtype
=
%d ndims
=
%d varid
=
%d"
,
Message
(
"ncid
=
%d name
=
%s xtype
=
%d ndims
=
%d varid
=
%d"
,
ncid
,
name
,
xtype
,
ndims
,
*
varidp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
...
...
@@ -218,7 +218,7 @@ void cdf_inq_varid(int ncid, const char *name, int *varidp)
int
status
=
nc_inq_varid
(
ncid
,
name
,
varidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d name
=
%s varid
=
%d
"
,
ncid
,
name
,
*
varidp
);
Message
(
"ncid
=
%d name
=
%s varid
=
%d"
,
ncid
,
name
,
*
varidp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -229,7 +229,7 @@ void cdf_inq_nvars(int ncid, int *nvarsp)
int
status
=
nc_inq_nvars
(
ncid
,
nvarsp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d nvars
=
%d"
,
ncid
,
*
nvarsp
);
Message
(
"ncid
=
%d nvars
=
%d"
,
ncid
,
*
nvarsp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -241,7 +241,7 @@ void cdf_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp,
int
status
=
nc_inq_var
(
ncid
,
varid
,
name
,
xtypep
,
ndimsp
,
dimids
,
nattsp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d ndims
=
%d xtype
=
%d natts
=
%d name
=
%s"
,
Message
(
"ncid
=
%d
varid
=
%d
ndims
=
%d
xtype
=
%d
natts
=
%d
name
=
%s"
,
ncid
,
varid
,
*
ndimsp
,
*
xtypep
,
*
nattsp
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
...
...
@@ -253,7 +253,7 @@ void cdf_inq_varname(int ncid, int varid, char *name)
int
status
=
nc_inq_varname
(
ncid
,
varid
,
name
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d name
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
name
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -264,7 +264,7 @@ void cdf_inq_vartype(int ncid, int varid, nc_type *xtypep)
int
status
=
nc_inq_vartype
(
ncid
,
varid
,
xtypep
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d xtype
=
%s"
,
ncid
,
varid
,
*
xtypep
);
Message
(
"ncid
=
%d
varid
=
%d
xtype
=
%s"
,
ncid
,
varid
,
*
xtypep
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -275,7 +275,7 @@ void cdf_inq_varndims(int ncid, int varid, int *ndimsp)
int
status
=
nc_inq_varndims
(
ncid
,
varid
,
ndimsp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -286,7 +286,7 @@ void cdf_inq_vardimid(int ncid, int varid, int dimids[])
int
status
=
nc_inq_vardimid
(
ncid
,
varid
,
dimids
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -297,7 +297,7 @@ void cdf_inq_varnatts(int ncid, int varid, int *nattsp)
int
status
=
nc_inq_varnatts
(
ncid
,
varid
,
nattsp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d nattsp
=
%d"
,
ncid
,
varid
,
*
nattsp
);
Message
(
"ncid
=
%d
varid
=
%d
nattsp
=
%d"
,
ncid
,
varid
,
*
nattsp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -421,7 +421,7 @@ void cdf_put_vara_double(int ncid, int varid, const size_t start[],
size_t
nvals
=
1
;
for
(
int
i
=
0
;
i
<
ndims
;
++
i
)
nvals
*=
count
[
i
];
minmaxval
(
nvals
,
dp
,
&
minval
,
&
maxval
);
// Message("ncid
=
%d varid
=
%d val0
=
%f", ncid, varid, *dp);
// Message("ncid
=
%d
varid
=
%d
val0
=
%f", ncid, varid, *dp);
Message
(
"name=%s type=%s minval=%f maxval=%f"
,
name
,
cdf_var_type
(
xtype
),
minval
,
maxval
);
}
...
...
@@ -446,7 +446,7 @@ void cdf_put_vara_float(int ncid, int varid, const size_t start[],
size_t
nvals
=
1
;
for
(
int
i
=
0
;
i
<
ndims
;
++
i
)
nvals
*=
count
[
i
];
minmaxvalf
(
nvals
,
fp
,
&
minval
,
&
maxval
);
// Message("ncid
=
%d varid
=
%d val0
=
%f", ncid, varid, *dp);
// Message("ncid
=
%d
varid
=
%d
val0
=
%f", ncid, varid, *dp);
Message
(
"name=%s type=%s minval=%f maxval=%f"
,
name
,
cdf_var_type
(
xtype
),
minval
,
maxval
);
}
...
...
@@ -459,7 +459,7 @@ void cdf_put_vara(int ncid, int varid, const size_t start[], const size_t count[
int
status
=
nc_put_vara
(
ncid
,
varid
,
start
,
count
,
cp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -470,7 +470,7 @@ void cdf_get_vara(int ncid, int varid, const size_t start[], const size_t count[
int
status
=
nc_get_vara
(
ncid
,
varid
,
start
,
count
,
cp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -481,7 +481,7 @@ void cdf_get_vara_int(int ncid, int varid, const size_t start[], const size_t co
int
status
=
nc_get_vara_int
(
ncid
,
varid
,
start
,
count
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -492,7 +492,7 @@ void cdf_get_vara_double(int ncid, int varid, const size_t start[], const size_t
int
status
=
nc_get_vara_double
(
ncid
,
varid
,
start
,
count
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
= %d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=%d start[0]=%zu count[0]=%zu"
,
ncid
,
varid
,
start
[
0
],
count
[
0
]
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -503,7 +503,7 @@ void cdf_get_vara_float(int ncid, int varid, const size_t start[], const size_t
int
status
=
nc_get_vara_float
(
ncid
,
varid
,
start
,
count
,
fp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
= %d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=%d start[0]=%zu count[0]=%zu"
,
ncid
,
varid
,
start
[
0
],
count
[
0
]
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -514,7 +514,7 @@ void cdf_get_vara_text(int ncid, int varid, const size_t start[], const size_t c
int
status
=
nc_get_vara_text
(
ncid
,
varid
,
start
,
count
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -525,7 +525,7 @@ void cdf_get_vara_uchar(int ncid, int varid, const size_t start[], const size_t
int
status
=
nc_get_vara_uchar
(
ncid
,
varid
,
start
,
count
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -536,7 +536,7 @@ void cdf_put_var_double(int ncid, int varid, const double *dp)
int
status
=
nc_put_var_double
(
ncid
,
varid
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d val0
=
%f"
,
ncid
,
varid
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
val0
=
%f"
,
ncid
,
varid
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -547,7 +547,7 @@ void cdf_get_var1_text(int ncid, int varid, const size_t index[], char *tp)
int
status
=
nc_get_var1_text
(
ncid
,
varid
,
index
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -558,7 +558,7 @@ void cdf_get_var1_double(int ncid, int varid, const size_t index[], double *dp)
int
status
=
nc_get_var1_double
(
ncid
,
varid
,
index
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -569,7 +569,7 @@ void cdf_put_var1_double(int ncid, int varid, const size_t index[], const double
int
status
=
nc_put_var1_double
(
ncid
,
varid
,
index
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d val
=
%f"
,
ncid
,
varid
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
val
=
%f"
,
ncid
,
varid
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -580,7 +580,7 @@ void cdf_get_var_text(int ncid, int varid, char *tp)
int
status
=
nc_get_var_text
(
ncid
,
varid
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -591,7 +591,7 @@ void cdf_get_var_short(int ncid, int varid, short *sp)
int
status
=
nc_get_var_short
(
ncid
,
varid
,
sp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -602,7 +602,7 @@ void cdf_get_var_int(int ncid, int varid, int *ip)
int
status
=
nc_get_var_int
(
ncid
,
varid
,
ip
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -613,7 +613,7 @@ void cdf_get_var_long(int ncid, int varid, long *lp)
int
status
=
nc_get_var_long
(
ncid
,
varid
,
lp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -624,7 +624,7 @@ void cdf_get_var_float(int ncid, int varid, float *fp)
int
status
=
nc_get_var_float
(
ncid
,
varid
,
fp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d"
,
ncid
,
varid
);
Message
(
"ncid
=
%d
varid
=
%d"
,
ncid
,
varid
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -635,7 +635,7 @@ void cdf_get_var_double(int ncid, int varid, double *dp)
int
status
=
nc_get_var_double
(
ncid
,
varid
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d val[0]
=
%f"
,
ncid
,
varid
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
val[0]
=
%f"
,
ncid
,
varid
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -657,7 +657,7 @@ void cdf_put_att_text(int ncid, int varid, const char *name, size_t len, const c
int
status
=
nc_put_att_text
(
ncid
,
varid
,
name
,
len
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s text
=
%.*s"
,
ncid
,
varid
,
name
,
(
int
)
len
,
tp
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
text
=
%.*s"
,
ncid
,
varid
,
name
,
(
int
)
len
,
tp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -668,7 +668,7 @@ void cdf_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_
int
status
=
nc_put_att_int
(
ncid
,
varid
,
name
,
xtype
,
len
,
ip
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%d"
,
ncid
,
varid
,
name
,
*
ip
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%d"
,
ncid
,
varid
,
name
,
*
ip
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -679,7 +679,7 @@ void cdf_put_att_float(int ncid, int varid, const char *name, nc_type xtype, siz
int
status
=
nc_put_att_float
(
ncid
,
varid
,
name
,
xtype
,
len
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%g"
,
ncid
,
varid
,
name
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%g"
,
ncid
,
varid
,
name
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -690,7 +690,7 @@ void cdf_put_att_double(int ncid, int varid, const char *name, nc_type xtype, si
int
status
=
nc_put_att_double
(
ncid
,
varid
,
name
,
xtype
,
len
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%g"
,
ncid
,
varid
,
name
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%g"
,
ncid
,
varid
,
name
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -701,7 +701,7 @@ void cdf_get_att_text(int ncid, int varid, const char *name, char *tp)
int
status
=
nc_get_att_text
(
ncid
,
varid
,
name
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d name
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
name
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -713,7 +713,7 @@ void cdf_get_att_string(int ncid, int varid, const char *name, char **tp)
int
status
=
nc_get_att_string
(
ncid
,
varid
,
name
,
tp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d name
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
name
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
#endif
...
...
@@ -725,7 +725,7 @@ void cdf_get_att_int(int ncid, int varid, const char *name, int *ip)
int
status
=
nc_get_att_int
(
ncid
,
varid
,
name
,
ip
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%d"
,
ncid
,
varid
,
name
,
*
ip
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%d"
,
ncid
,
varid
,
name
,
*
ip
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -737,7 +737,7 @@ void cdf_get_att_long(int ncid, int varid, const char *name, long *ip)
int
status
=
nc_get_att_long
(
ncid
,
varid
,
name
,
ip
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%ld"
,
ncid
,
varid
,
name
,
*
ip
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%ld"
,
ncid
,
varid
,
name
,
*
ip
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
#endif
...
...
@@ -751,7 +751,7 @@ void cdf_get_att_double(int ncid, int varid, const char *name, double *dp)
status
=
nc_get_att_double
(
ncid
,
varid
,
name
,
dp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s val
=
%.9g"
,
ncid
,
varid
,
name
,
*
dp
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
val
=
%.9g"
,
ncid
,
varid
,
name
,
*
dp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -762,7 +762,7 @@ void cdf_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t
int
status
=
nc_inq_att
(
ncid
,
varid
,
name
,
xtypep
,
lenp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -773,7 +773,7 @@ void cdf_inq_atttype(int ncid, int varid, const char *name, nc_type * xtypep)
int
status
=
nc_inq_atttype
(
ncid
,
varid
,
name
,
xtypep
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -784,7 +784,7 @@ void cdf_inq_attlen(int ncid, int varid, const char *name, size_t * lenp)
int
status
=
nc_inq_attlen
(
ncid
,
varid
,
name
,
lenp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s len
=
%d"
,
ncid
,
varid
,
name
,
*
lenp
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s
len
=
%d"
,
ncid
,
varid
,
name
,
*
lenp
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -795,7 +795,7 @@ void cdf_inq_attname(int ncid, int varid, int attnum, char *name)
int
status
=
nc_inq_attname
(
ncid
,
varid
,
attnum
,
name
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d attnum
=
%d att
=
%s"
,
ncid
,
varid
,
attnum
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
attnum
=
%d
att
=
%s"
,
ncid
,
varid
,
attnum
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
@@ -806,7 +806,7 @@ void cdf_inq_attid(int ncid, int varid, const char *name, int *attnump)
int
status
=
nc_inq_attid
(
ncid
,
varid
,
name
,
attnump
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
Message
(
"ncid
=
%d varid
=
%d att
=
%s"
,
ncid
,
varid
,
name
);
Message
(
"ncid
=
%d
varid
=
%d
att
=
%s"
,
ncid
,
varid
,
name
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
...
...
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