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
95107baa
Commit
95107baa
authored
Sep 22, 2017
by
Uwe Schulzweida
Browse files
Renamed DefPrec/InqPrec to DefDatatype/InqDatatype.
parent
be89c982
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/cdi.h
View file @
95107baa
...
...
@@ -883,11 +883,11 @@ void gridInqXstdname(int gridID, char *xstdname);
/* gridInqYstdname: Get the standard name of a Y-axis */
void
gridInqYstdname
(
int
gridID
,
char
*
ystdname
);
/* gridDef
Prec
: Define the precision of a Grid */
void
gridDef
Prec
(
int
gridID
,
int
prec
);
/* gridDef
Datatype
: Define the precision of a Grid */
void
gridDef
Datatype
(
int
gridID
,
int
prec
);
/* gridInq
Prec
: Get the precision of a Grid */
int
gridInq
Prec
(
int
gridID
);
/* gridInq
Datatype
: Get the precision of a Grid */
int
gridInq
Datatype
(
int
gridID
);
/* gridInqXval: Get one value of a X-axis */
double
gridInqXval
(
int
gridID
,
int
index
);
...
...
@@ -1072,8 +1072,8 @@ void zaxisInqUnits(int zaxisID, char *units);
/* zaxisInqStdname: Get the standard name of a Z-axis */
void
zaxisInqStdname
(
int
zaxisID
,
char
*
stdname
);
void
zaxisDef
Prec
(
int
zaxisID
,
int
prec
);
int
zaxisInq
Prec
(
int
zaxisID
);
void
zaxisDef
Datatype
(
int
zaxisID
,
int
prec
);
int
zaxisInq
Datatype
(
int
zaxisID
);
void
zaxisDefPositive
(
int
zaxisID
,
int
positive
);
int
zaxisInqPositive
(
int
zaxisID
);
...
...
src/cdiFortran.c
View file @
95107baa
...
...
@@ -370,8 +370,8 @@ FCALLSCSUB2 (gridDefYunits, GRIDDEFYUNITS, griddefyunits, INT, STRING)
FCALLSCSUB2
(
gridInqYunits
,
GRIDINQYUNITS
,
gridinqyunits
,
INT
,
PSTRING
)
FCALLSCSUB2
(
gridInqXstdname
,
GRIDINQXSTDNAME
,
gridinqxstdname
,
INT
,
PSTRING
)
FCALLSCSUB2
(
gridInqYstdname
,
GRIDINQYSTDNAME
,
gridinqystdname
,
INT
,
PSTRING
)
FCALLSCSUB2
(
gridDef
Prec
,
GRIDDEFPREC
,
griddefprec
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
gridInq
Prec
,
GRIDINQPREC
,
gridinqprec
,
INT
)
FCALLSCSUB2
(
gridDef
Datatype
,
GRIDDEFPREC
,
griddefprec
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
gridInq
Datatype
,
GRIDINQPREC
,
gridinqprec
,
INT
)
FCALLSCFUN2
(
DOUBLE
,
gridInqXval
,
GRIDINQXVAL
,
gridinqxval
,
INT
,
INT
)
FCALLSCFUN2
(
DOUBLE
,
gridInqYval
,
GRIDINQYVAL
,
gridinqyval
,
INT
,
INT
)
FCALLSCFUN1
(
DOUBLE
,
gridInqXinc
,
GRIDINQXINC
,
gridinqxinc
,
INT
)
...
...
@@ -454,8 +454,8 @@ FCALLSCSUB2 (zaxisInqLongname, ZAXISINQLONGNAME, zaxisinqlongname, INT, PSTRING)
FCALLSCSUB2
(
zaxisDefUnits
,
ZAXISDEFUNITS
,
zaxisdefunits
,
INT
,
STRING
)
FCALLSCSUB2
(
zaxisInqUnits
,
ZAXISINQUNITS
,
zaxisinqunits
,
INT
,
PSTRING
)
FCALLSCSUB2
(
zaxisInqStdname
,
ZAXISINQSTDNAME
,
zaxisinqstdname
,
INT
,
PSTRING
)
FCALLSCSUB2
(
zaxisDef
Prec
,
ZAXISDEFPREC
,
zaxisdefprec
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInq
Prec
,
ZAXISINQPREC
,
zaxisinqprec
,
INT
)
FCALLSCSUB2
(
zaxisDef
Datatype
,
ZAXISDEFPREC
,
zaxisdefprec
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInq
Datatype
,
ZAXISINQPREC
,
zaxisinqprec
,
INT
)
FCALLSCSUB2
(
zaxisDefPositive
,
ZAXISDEFPOSITIVE
,
zaxisdefpositive
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInqPositive
,
ZAXISINQPOSITIVE
,
zaxisinqpositive
,
INT
)
FCALLSCSUB1
(
zaxisDefScalar
,
ZAXISDEFSCALAR
,
zaxisdefscalar
,
INT
)
...
...
src/grid.c
View file @
95107baa
...
...
@@ -1210,7 +1210,7 @@ void gridDefXsize(int gridID, int xsize)
@EndFunction
*/
void
gridDef
Prec
(
int
gridID
,
int
prec
)
void
gridDef
Datatype
(
int
gridID
,
int
prec
)
{
grid_t
*
gridptr
=
grid_to_pointer
(
gridID
);
...
...
@@ -1231,7 +1231,7 @@ void gridDefPrec(int gridID, int prec)
@EndFunction
*/
int
gridInq
Prec
(
int
gridID
)
int
gridInq
Datatype
(
int
gridID
)
{
grid_t
*
gridptr
=
grid_to_pointer
(
gridID
);
return
gridptr
->
prec
;
...
...
@@ -2569,7 +2569,7 @@ static
void
gridComplete
(
grid_t
*
grid
)
{
int
gridID
=
grid
->
self
;
gridDef
Prec
(
gridID
,
grid
->
prec
);
gridDef
Datatype
(
gridID
,
grid
->
prec
);
int
gridtype
=
grid
->
type
;
switch
(
gridtype
)
...
...
@@ -3394,7 +3394,7 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
int
xstrlen
=
gridInqXIsc
(
gridID
);
int
ystrlen
=
gridInqYIsc
(
gridID
);
int
nvertex
=
gridInqNvertex
(
gridID
);
int
prec
=
gridInq
Prec
(
gridID
);
int
prec
=
gridInq
Datatype
(
gridID
);
int
dig
=
(
prec
==
CDI_DATATYPE_FLT64
)
?
15
:
7
;
...
...
src/mo_cdi.f90
View file @
95107baa
...
...
@@ -506,8 +506,8 @@ module mo_cdi
public
::
gridInqYunits
public
::
gridInqXstdname
public
::
gridInqYstdname
public
::
gridDef
Prec
public
::
gridInq
Prec
public
::
gridDef
Datatype
public
::
gridInq
Datatype
public
::
gridInqXval
public
::
gridInqYval
public
::
gridInqXinc
...
...
@@ -574,8 +574,8 @@ module mo_cdi
public
::
zaxisDefUnits
public
::
zaxisInqUnits
public
::
zaxisInqStdname
public
::
zaxisDef
Prec
public
::
zaxisInq
Prec
public
::
zaxisDef
Datatype
public
::
zaxisInq
Datatype
public
::
zaxisDefPositive
public
::
zaxisInqPositive
public
::
zaxisDefScalar
...
...
@@ -1957,19 +1957,19 @@ module mo_cdi
integer
(
c_int
)
::
f_result
end
function
cdiZaxisInqKeyFlt
subroutine
gridDef
Prec
(
gridID_dummy
,
prec_dummy
)
bind
(
c
,
name
=
&
&
'gridDef
Prec
'
)
subroutine
gridDef
Datatype
(
gridID_dummy
,
prec_dummy
)
bind
(
c
,
name
=
&
&
'gridDef
Datatype
'
)
import
c_int
integer
(
c_int
),
value
::
gridID_dummy
integer
(
c_int
),
value
::
prec_dummy
end
subroutine
gridDef
Prec
end
subroutine
gridDef
Datatype
function
gridInq
Prec
(
gridID_dummy
)
bind
(
c
,
name
=
'gridInq
Prec
'
)&
function
gridInq
Datatype
(
gridID_dummy
)
bind
(
c
,
name
=
'gridInq
Datatype
'
)&
&
result
(
f_result
)
import
c_int
integer
(
c_int
),
value
::
gridID_dummy
integer
(
c_int
)
::
f_result
end
function
gridInq
Prec
end
function
gridInq
Datatype
function
gridInqXval
(
gridID_dummy
,
index_dummy
)
bind
(
c
,
name
=
&
&
'gridInqXval'
)
result
(
f_result
)
...
...
@@ -2381,19 +2381,19 @@ module mo_cdi
integer
(
kind
=
c_signed_char
),
intent
(
inout
)
::
uuid_dummy
(
CDI_UUID_SIZE
)
end
subroutine
zaxisInqUUID
subroutine
zaxisDef
Prec
(
zaxisID_dummy
,
prec_dummy
)
bind
(
c
,
name
=
&
&
'zaxisDef
Prec
'
)
subroutine
zaxisDef
Datatype
(
zaxisID_dummy
,
prec_dummy
)
bind
(
c
,
name
=
&
&
'zaxisDef
Datatype
'
)
import
c_int
integer
(
c_int
),
value
::
zaxisID_dummy
integer
(
c_int
),
value
::
prec_dummy
end
subroutine
zaxisDef
Prec
end
subroutine
zaxisDef
Datatype
function
zaxisInq
Prec
(
zaxisID_dummy
)
bind
(
c
,
name
=
'zaxisInq
Prec
'
)&
function
zaxisInq
Datatype
(
zaxisID_dummy
)
bind
(
c
,
name
=
'zaxisInq
Datatype
'
)&
&
result
(
f_result
)
import
c_int
integer
(
c_int
),
value
::
zaxisID_dummy
integer
(
c_int
)
::
f_result
end
function
zaxisInq
Prec
end
function
zaxisInq
Datatype
subroutine
zaxisDefPositive
(
zaxisID_dummy
,
positive_dummy
)
bind
(
c
,
name
=
&
&
'zaxisDefPositive'
)
...
...
src/stream_cdf_o.c
View file @
95107baa
...
...
@@ -297,7 +297,7 @@ static void
cdfDefTrajLatLon
(
stream_t
*
streamptr
,
int
gridID
,
int
gridindex
,
const
struct
cdfDefGridAxisInqs
*
inqs
,
int
dimtype
)
{
nc_type
xtype
=
(
gridInq
Prec
(
gridID
)
==
CDI_DATATYPE_FLT32
)
?
NC_FLOAT
:
NC_DOUBLE
;
nc_type
xtype
=
(
gridInq
Datatype
(
gridID
)
==
CDI_DATATYPE_FLT32
)
?
NC_FLOAT
:
NC_DOUBLE
;
ncgrid_t
*
ncgrid
=
streamptr
->
ncgrid
;
int
dimlen
=
inqs
->
axisSize
(
gridID
);
...
...
@@ -453,7 +453,7 @@ cdfDefAxisCommon(stream_t *streamptr, int gridID, int gridindex, int ndims,
int
nvdimID
=
CDI_UNDEFID
;
int
fileID
=
streamptr
->
fileID
;
size_t
dimlen
=
(
size_t
)
gridAxisInq
->
axisSize
(
gridID
);
nc_type
xtype
=
(
nc_type
)
cdfDefDatatype
(
gridInq
Prec
(
gridID
),
streamptr
->
filetype
);
nc_type
xtype
=
(
nc_type
)
cdfDefDatatype
(
gridInq
Datatype
(
gridID
),
streamptr
->
filetype
);
ncgrid_t
*
ncgrid
=
streamptr
->
ncgrid
;
...
...
@@ -664,7 +664,7 @@ cdfDefIrregularGridCommon(stream_t *streamptr, int gridID,
size_t
nvertex
,
const
char
*
vdimname_default
,
bool
setVdimname
)
{
nc_type
xtype
=
(
nc_type
)
cdfDefDatatype
(
gridInq
Prec
(
gridID
),
streamptr
->
filetype
);
nc_type
xtype
=
(
nc_type
)
cdfDefDatatype
(
gridInq
Datatype
(
gridID
),
streamptr
->
filetype
);
int
xdimID
=
CDI_UNDEFID
;
int
ydimID
=
CDI_UNDEFID
;
int
ncxvarid
=
CDI_UNDEFID
,
ncyvarid
=
CDI_UNDEFID
,
ncavarid
=
CDI_UNDEFID
;
...
...
@@ -1478,7 +1478,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
char
axisname
[
CDI_MAX_NAME
];
int
dimID
=
CDI_UNDEFID
;
int
ncvarid
=
CDI_UNDEFID
,
ncbvarid
=
CDI_UNDEFID
;
int
xtype
=
zaxisInq
Prec
(
zaxisID
)
==
CDI_DATATYPE_FLT32
?
NC_FLOAT
:
NC_DOUBLE
;
int
xtype
=
zaxisInq
Datatype
(
zaxisID
)
==
CDI_DATATYPE_FLT32
?
NC_FLOAT
:
NC_DOUBLE
;
int
vlistID
=
streamptr
->
vlistID
;
int
fileID
=
streamptr
->
fileID
;
...
...
src/varscan.c
View file @
95107baa
...
...
@@ -1019,7 +1019,7 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, const double *levels, c
if
(
name
&&
name
[
0
]
)
zaxisDefName
(
zaxisID
,
name
);
if
(
longname
&&
longname
[
0
]
)
zaxisDefLongname
(
zaxisID
,
longname
);
if
(
units
&&
units
[
0
]
)
zaxisDefUnits
(
zaxisID
,
units
);
zaxisDef
Prec
(
zaxisID
,
prec
);
zaxisDef
Datatype
(
zaxisID
,
prec
);
zaxisDefLtype
(
zaxisID
,
ltype1
);
}
...
...
src/vlist.c
View file @
95107baa
...
...
@@ -682,7 +682,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
zaxisDefLongname
(
zaxisID2
,
ctemp
);
zaxisInqUnits
(
zaxisID
,
ctemp
);
zaxisDefUnits
(
zaxisID2
,
ctemp
);
zaxisDef
Prec
(
zaxisID2
,
zaxisInq
Prec
(
zaxisID
));
zaxisDef
Datatype
(
zaxisID2
,
zaxisInq
Datatype
(
zaxisID
));
if
(
zaxisType
==
ZAXIS_CHAR
)
{
...
...
src/zaxis.c
View file @
95107baa
...
...
@@ -659,7 +659,7 @@ void zaxisInqStdname(int zaxisID, char *stdname)
}
void
zaxisDef
Prec
(
int
zaxisID
,
int
prec
)
void
zaxisDef
Datatype
(
int
zaxisID
,
int
prec
)
{
zaxis_t
*
zaxisptr
=
zaxis_to_pointer
(
zaxisID
);
...
...
@@ -671,7 +671,7 @@ void zaxisDefPrec(int zaxisID, int prec)
}
int
zaxisInq
Prec
(
int
zaxisID
)
int
zaxisInq
Datatype
(
int
zaxisID
)
{
zaxis_t
*
zaxisptr
=
zaxis_to_pointer
(
zaxisID
);
return
zaxisptr
->
prec
;
...
...
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