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
cdo
Commits
b86c3b83
Commit
b86c3b83
authored
Jan 03, 2010
by
Uwe Schulzweida
Browse files
renamed FIELD to field_t
parent
6118e878
Changes
67
Hide whitespace changes
Inline
Side-by-side
src/Arith.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
8
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -52,7 +52,7 @@ void *Arith(void *argument)
int
ntsteps1
,
ntsteps2
;
int
vlistIDx1
,
vlistIDx2
,
vlistID1
,
vlistID2
,
vlistID3
;
int
taxisIDx1
,
taxisID1
,
taxisID2
,
taxisID3
;
FIELD
*
fieldx1
,
*
fieldx2
,
fieldrec
,
field1
,
field2
;
field_t
*
fieldx1
,
*
fieldx2
,
fieldrec
,
field1
,
field2
;
int
**
varnmiss
=
NULL
;
double
**
vardata
=
NULL
;
...
...
src/Arithc.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -43,7 +43,7 @@ void *Arithc(void *argument)
int
varID
,
levelID
;
int
vlistID1
,
vlistID2
;
double
rconst
;
FIELD
field
;
field_t
field
;
int
taxisID1
,
taxisID2
;
cdoInitialize
(
argument
);
...
...
src/Arithdays.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
6
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -47,7 +47,7 @@ void *Arithdays(void *argument)
int
year
,
month
,
day
;
int
calendar
;
double
rconst
;
FIELD
field
;
field_t
field
;
cdoInitialize
(
argument
);
...
...
src/Detrend.c
View file @
b86c3b83
...
...
@@ -83,7 +83,7 @@ void *Detrend(void *argument)
int
nvars
,
nlevel
;
int
*
vdate
=
NULL
,
*
vtime
=
NULL
;
double
missval
;
FIELD
***
vars
=
NULL
;
field_t
***
vars
=
NULL
;
typedef
struct
{
double
*
array1
;
...
...
@@ -118,13 +118,13 @@ void *Detrend(void *argument)
nalloc
+=
NALLOC_INC
;
vdate
=
(
int
*
)
realloc
(
vdate
,
nalloc
*
sizeof
(
int
));
vtime
=
(
int
*
)
realloc
(
vtime
,
nalloc
*
sizeof
(
int
));
vars
=
(
FIELD
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
FIELD
**
));
vars
=
(
field_t
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
field_t
**
));
}
vdate
[
tsID
]
=
taxisInqVdate
(
taxisID1
);
vtime
[
tsID
]
=
taxisInqVtime
(
taxisID1
);
vars
[
tsID
]
=
(
FIELD
**
)
malloc
(
nvars
*
sizeof
(
FIELD
*
));
vars
[
tsID
]
=
(
field_t
**
)
malloc
(
nvars
*
sizeof
(
field_t
*
));
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
...
...
@@ -132,7 +132,7 @@ void *Detrend(void *argument)
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
nlevel
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
));
vars
[
tsID
][
varID
]
=
(
FIELD
*
)
malloc
(
nlevel
*
sizeof
(
FIELD
));
vars
[
tsID
][
varID
]
=
(
field_t
*
)
malloc
(
nlevel
*
sizeof
(
field_t
));
for
(
levelID
=
0
;
levelID
<
nlevel
;
levelID
++
)
{
...
...
src/Ensstat.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -60,7 +60,7 @@ void *Ensstat(void *argument)
int
ompthID
;
double
missval
;
double
*
array2
=
NULL
;
FIELD
*
field
;
field_t
*
field
;
int
fileID
,
nfiles
;
typedef
struct
{
...
...
@@ -107,7 +107,7 @@ void *Ensstat(void *argument)
ef
=
(
ens_file_t
*
)
malloc
(
nfiles
*
sizeof
(
ens_file_t
));
field
=
(
FIELD
*
)
malloc
(
ompNumThreads
*
sizeof
(
FIELD
));
field
=
(
field_t
*
)
malloc
(
ompNumThreads
*
sizeof
(
field_t
));
for
(
i
=
0
;
i
<
ompNumThreads
;
i
++
)
{
field
[
i
].
size
=
nfiles
;
...
...
src/Eofcoeff.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 200
7
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 200
3-2010
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -40,9 +40,9 @@ void *Eofcoeff(void * argument)
double
*
w
;
double
missval1
=-
999
,
missval2
;
double
*
xvals
,
*
yvals
;
FIELD
***
eof
;
FIELD
in
;
FIELD
out
;
field_t
***
eof
;
field_t
in
;
field_t
out
;
int
operatorID
,
operfunc
;
int
gridsize
;
int
i
,
varID
,
recID
,
levelID
,
tsID
,
eofID
;
...
...
@@ -112,9 +112,9 @@ void *Eofcoeff(void * argument)
}
eof
=
(
FIELD
***
)
malloc
(
nvars
*
sizeof
(
FIELD
**
)
);
eof
=
(
field_t
***
)
malloc
(
nvars
*
sizeof
(
field_t
**
)
);
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
eof
[
varID
]
=
(
FIELD
**
)
malloc
(
nlevs
*
sizeof
(
FIELD
*
));
eof
[
varID
]
=
(
field_t
**
)
malloc
(
nlevs
*
sizeof
(
field_t
*
));
reached_eof
=
0
;
eofID
=
0
;
while
(
1
)
...
...
@@ -130,9 +130,9 @@ void *Eofcoeff(void * argument)
streamInqRecord
(
streamID1
,
&
varID
,
&
levelID
);
missval1
=
vlistInqVarMissval
(
vlistID1
,
varID
);
if
(
eofID
==
0
)
eof
[
varID
][
levelID
]
=
(
FIELD
*
)
malloc
(
1
*
sizeof
(
FIELD
));
eof
[
varID
][
levelID
]
=
(
field_t
*
)
malloc
(
1
*
sizeof
(
field_t
));
else
eof
[
varID
][
levelID
]
=
(
FIELD
*
)
realloc
(
eof
[
varID
][
levelID
],
(
eofID
+
1
)
*
sizeof
(
FIELD
));
eof
[
varID
][
levelID
]
=
(
field_t
*
)
realloc
(
eof
[
varID
][
levelID
],
(
eofID
+
1
)
*
sizeof
(
field_t
));
eof
[
varID
][
levelID
][
eofID
].
grid
=
gridID1
;
eof
[
varID
][
levelID
][
eofID
].
nmiss
=
0
;
eof
[
varID
][
levelID
][
eofID
].
missval
=
missval1
;
...
...
src/Fillmiss.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -30,7 +30,7 @@
#include
"interpol.h"
void
fillmiss
(
FIELD
*
field1
,
FIELD
*
field2
,
int
nfill
)
void
fillmiss
(
field_t
*
field1
,
field_t
*
field2
,
int
nfill
)
{
static
char
func
[]
=
"fillmiss"
;
int
gridID
,
nx
,
ny
,
i
,
j
;
...
...
@@ -152,7 +152,7 @@ void *Fillmiss(void *argument)
int
gridsize
;
int
vlistID1
,
vlistID2
;
int
gridID1
=
-
1
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
int
taxisID1
,
taxisID2
;
int
nmiss
,
i
,
nfill
=
1
;
...
...
src/Filter.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -165,7 +165,7 @@ void *Filter(void *argument)
double
missval
;
double
*
array1
,
*
array2
;
double
fdata
=
0
;
FIELD
***
vars
=
NULL
;
field_t
***
vars
=
NULL
;
double
fmin
,
fmax
;
int
*
fmasc
;
...
...
@@ -207,13 +207,13 @@ void *Filter(void *argument)
nalloc
+=
NALLOC_INC
;
vdate
=
(
int
*
)
realloc
(
vdate
,
nalloc
*
sizeof
(
int
));
vtime
=
(
int
*
)
realloc
(
vtime
,
nalloc
*
sizeof
(
int
));
vars
=
(
FIELD
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
FIELD
**
));
vars
=
(
field_t
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
field_t
**
));
}
vdate
[
tsID
]
=
taxisInqVdate
(
taxisID1
);
vtime
[
tsID
]
=
taxisInqVtime
(
taxisID1
);
vars
[
tsID
]
=
(
FIELD
**
)
malloc
(
nvars
*
sizeof
(
FIELD
*
));
vars
[
tsID
]
=
(
field_t
**
)
malloc
(
nvars
*
sizeof
(
field_t
*
));
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
...
...
@@ -221,7 +221,7 @@ void *Filter(void *argument)
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
nlevel
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
));
vars
[
tsID
][
varID
]
=
(
FIELD
*
)
malloc
(
nlevel
*
sizeof
(
FIELD
));
vars
[
tsID
][
varID
]
=
(
field_t
*
)
malloc
(
nlevel
*
sizeof
(
field_t
));
for
(
levelID
=
0
;
levelID
<
nlevel
;
levelID
++
)
{
...
...
src/Fldrms.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
7
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -44,7 +44,7 @@ void *Fldrms(void *argument)
int
needWeights
=
FALSE
;
double
slon
,
slat
;
double
sglval
;
FIELD
field1
,
field2
,
field3
;
field_t
field1
,
field2
,
field3
;
int
taxisID1
,
taxisID3
;
cdoInitialize
(
argument
);
...
...
src/Fldstat.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -54,7 +54,7 @@ void *Fldstat(void *argument)
int
nmiss
;
double
slon
,
slat
;
double
sglval
;
FIELD
field
;
field_t
field
;
int
taxisID1
,
taxisID2
;
/* RQ */
int
pn
=
0
;
...
...
src/Fourier.c
View file @
b86c3b83
...
...
@@ -47,7 +47,7 @@ void *Fourier(void *argument)
int
nvars
,
nlevel
;
int
*
vdate
=
NULL
,
*
vtime
=
NULL
;
double
missval
;
FIELD
***
vars
=
NULL
;
field_t
***
vars
=
NULL
;
typedef
struct
{
double
*
real
;
...
...
@@ -88,13 +88,13 @@ void *Fourier(void *argument)
nalloc
+=
NALLOC_INC
;
vdate
=
(
int
*
)
realloc
(
vdate
,
nalloc
*
sizeof
(
int
));
vtime
=
(
int
*
)
realloc
(
vtime
,
nalloc
*
sizeof
(
int
));
vars
=
(
FIELD
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
FIELD
**
));
vars
=
(
field_t
***
)
realloc
(
vars
,
nalloc
*
sizeof
(
field_t
**
));
}
vdate
[
tsID
]
=
taxisInqVdate
(
taxisID1
);
vtime
[
tsID
]
=
taxisInqVtime
(
taxisID1
);
vars
[
tsID
]
=
(
FIELD
**
)
malloc
(
nvars
*
sizeof
(
FIELD
*
));
vars
[
tsID
]
=
(
field_t
**
)
malloc
(
nvars
*
sizeof
(
field_t
*
));
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
...
...
@@ -102,7 +102,7 @@ void *Fourier(void *argument)
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
nlevel
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
));
vars
[
tsID
][
varID
]
=
(
FIELD
*
)
malloc
(
nlevel
*
sizeof
(
FIELD
));
vars
[
tsID
][
varID
]
=
(
field_t
*
)
malloc
(
nlevel
*
sizeof
(
field_t
));
for
(
levelID
=
0
;
levelID
<
nlevel
;
levelID
++
)
{
...
...
src/Gridboxstat.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -494,7 +494,7 @@ int genBoxGrid(int gridID1, int xinc, int yinc)
static
void
gridboxstat
(
FIELD
*
field1
,
FIELD
*
field2
,
int
xinc
,
int
yinc
,
int
statfunc
)
void
gridboxstat
(
field_t
*
field1
,
field_t
*
field2
,
int
xinc
,
int
yinc
,
int
statfunc
)
{
static
char
func
[]
=
"gridboxstat"
;
int
nlon1
,
nlat1
;
...
...
@@ -508,7 +508,7 @@ void gridboxstat(FIELD *field1, FIELD *field2, int xinc, int yinc, int statfunc)
double
missval
;
int
i
,
j
,
ii
,
jj
;
double
**
xfield2
;
FIELD
field
;
field_t
field
;
int
isize
;
int
useWeight
=
FALSE
;
...
...
@@ -604,7 +604,7 @@ void *Gridboxstat(void *argument)
int
needWeights
=
FALSE
;
int
gridID1
,
gridID2
;
int
gridsize1
,
gridsize2
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
int
taxisID1
,
taxisID2
;
int
xinc
,
yinc
;
...
...
src/Hi.c
View file @
b86c3b83
...
...
@@ -50,7 +50,7 @@ static double humidityIndex(double t, double e, double r, double missval)
}
static
void
farexpr
(
FIELD
*
field1
,
FIELD
field2
,
FIELD
field3
,
double
(
*
expression
)(
double
,
double
,
double
,
double
))
static
void
farexpr
(
field_t
*
field1
,
field_t
field2
,
field_t
field3
,
double
(
*
expression
)(
double
,
double
,
double
,
double
))
{
static
char
func
[]
=
"farexpr"
;
int
i
,
len
;
...
...
@@ -104,7 +104,7 @@ void *Hi(void *argument)
int
levelID1
,
levelID2
,
levelID3
;
int
vlistID1
,
vlistID2
,
vlistID3
,
vlistID4
;
int
taxisID1
,
taxisID2
,
taxisID3
,
taxisID4
;
FIELD
field1
,
field2
,
field3
;
field_t
field1
,
field2
,
field3
;
cdoInitialize
(
argument
);
cdoOperatorAdd
(
"hi"
,
0
,
0
,
NULL
);
...
...
src/Info.c
View file @
b86c3b83
...
...
@@ -236,7 +236,6 @@ void *Info(void *argument)
int
vlistID
;
int
nmiss
;
int
number
;
int
datatype
;
int
ivals
=
0
,
nvals
=
0
;
int
imiss
=
0
;
char
varname
[
128
];
...
...
@@ -307,12 +306,7 @@ void *Info(void *argument)
zaxisID
=
vlistInqVarZaxis
(
vlistID
,
varID
);
missval
=
vlistInqVarMissval
(
vlistID
,
varID
);
gridsize
=
gridInqSize
(
gridID
);
datatype
=
vlistInqVarDatatype
(
vlistID
,
varID
);
if
(
datatype
==
DATATYPE_CPX32
||
datatype
==
DATATYPE_CPX64
)
number
=
CDI_COMP
;
else
number
=
CDI_REAL
;
number
=
vlistInqVarNumber
(
vlistID
,
varID
);
if
(
param
==
CDI_UNDEFPARAM
)
param
=
cdiEncodeParam
(
code
,
tabnum
,
255
);
param2str
(
param
,
paramstr
,
sizeof
(
paramstr
));
...
...
src/Intgrid.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
7
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -186,7 +186,7 @@ int genBoxavgGrid(int gridID1, int xinc, int yinc)
}
void
boxavg
(
FIELD
*
field1
,
FIELD
*
field2
,
int
xinc
,
int
yinc
)
void
boxavg
(
field_t
*
field1
,
field_t
*
field2
,
int
xinc
,
int
yinc
)
{
static
char
func
[]
=
"boxavg"
;
int
nlon1
,
nlat1
;
...
...
@@ -256,7 +256,7 @@ void boxavg(FIELD *field1, FIELD *field2, int xinc, int yinc)
}
void
thinout
(
FIELD
*
field1
,
FIELD
*
field2
,
int
xinc
,
int
yinc
)
void
thinout
(
field_t
*
field1
,
field_t
*
field2
,
int
xinc
,
int
yinc
)
{
static
char
func
[]
=
"thinout"
;
int
nlon1
,
nlat1
;
...
...
@@ -333,7 +333,7 @@ void *Intgrid(void *argument)
double
missval
;
double
slon
,
slat
;
double
*
array1
=
NULL
,
*
array2
=
NULL
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
int
taxisID1
,
taxisID2
;
cdoInitialize
(
argument
);
...
...
src/Intgridtraj.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -80,7 +80,7 @@ void *Intgridtraj(void *argument)
char
*
posfile
;
double
missval
;
int
calendar
=
CALENDAR_STANDARD
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
FILE
*
fp
;
cdoInitialize
(
argument
);
...
...
src/Merstat.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
9
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -55,7 +55,7 @@ void *Merstat(void *argument)
int
ndiffgrids
;
int
taxisID1
,
taxisID2
;
int
needWeights
=
FALSE
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
/* RQ */
int
pn
=
0
;
/* QR */
...
...
src/Monarith.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
7
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -48,7 +48,7 @@ void *Monarith(void *argument)
int
taxisID1
,
taxisID2
,
taxisID3
;
int
vdate
;
int
yearmon1
,
yearmon2
=
-
1
;
FIELD
field1
,
field2
;
field_t
field1
,
field2
;
int
**
varnmiss2
;
double
**
vardata2
;
...
...
src/Regres.c
View file @
b86c3b83
...
...
@@ -2,7 +2,7 @@
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-200
8
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
Copyright (C) 2003-20
1
0 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
...
...
@@ -46,8 +46,8 @@ void *Regres(void *argument)
int
nwork
=
5
;
double
temp1
,
temp2
;
double
missval
,
missval1
,
missval2
;
FIELD
**
work
[
5
];
FIELD
field1
,
field2
;
field_t
**
work
[
5
];
field_t
field1
,
field2
;
cdoInitialize
(
argument
);
...
...
@@ -85,7 +85,7 @@ void *Regres(void *argument)
field2
.
ptr
=
(
double
*
)
malloc
(
gridsize
*
sizeof
(
double
));
for
(
w
=
0
;
w
<
nwork
;
w
++
)
work
[
w
]
=
(
FIELD
**
)
malloc
(
nvars
*
sizeof
(
FIELD
*
));
work
[
w
]
=
(
field_t
**
)
malloc
(
nvars
*
sizeof
(
field_t
*
));
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
...
...
@@ -95,7 +95,7 @@ void *Regres(void *argument)
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
for
(
w
=
0
;
w
<
nwork
;
w
++
)
work
[
w
][
varID
]
=
(
FIELD
*
)
malloc
(
nlevel
*
sizeof
(
FIELD
));
work
[
w
][
varID
]
=
(
field_t
*
)
malloc
(
nlevel
*
sizeof
(
field_t
));
for
(
levelID
=
0
;
levelID
<
nlevel
;
levelID
++
)
{
...
...
src/Runpctl.c
View file @
b86c3b83
...
...
@@ -52,7 +52,7 @@ void *Runpctl(void *argument)
int
nvars
,
nlevels
;
int
*
recVarID
,
*
recLevelID
;
double
missval
,
val
;
FIELD
***
vars1
=
NULL
;
field_t
***
vars1
=
NULL
;
datetime_t
*
datetime
;
int
taxisID1
,
taxisID2
;
int
calendar
,
dpy
;
...
...
@@ -96,12 +96,12 @@ void *Runpctl(void *argument)
recLevelID
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
datetime
=
(
datetime_t
*
)
malloc
((
ndates
+
1
)
*
sizeof
(
datetime_t
));
vars1
=
(
FIELD
***
)
malloc
((
ndates
+
1
)
*
sizeof
(
FIELD
**
));
vars1
=
(
field_t
***
)
malloc
((
ndates
+
1
)
*
sizeof
(
field_t
**
));
array
=
(
double
*
)
malloc
(
ndates
*
sizeof
(
double
));
for
(
its
=
0
;
its
<
ndates
;
its
++
)
{
vars1
[
its
]
=
(
FIELD
**
)
malloc
(
nvars
*
sizeof
(
FIELD
*
));
vars1
[
its
]
=
(
field_t
**
)
malloc
(
nvars
*
sizeof
(
field_t
*
));
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
...
...
@@ -110,7 +110,7 @@ void *Runpctl(void *argument)
nlevels
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
));
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
vars1
[
its
][
varID
]
=
(
FIELD
*
)
malloc
(
nlevels
*
sizeof
(
FIELD
));
vars1
[
its
][
varID
]
=
(
field_t
*
)
malloc
(
nlevels
*
sizeof
(
field_t
));
for
(
levelID
=
0
;
levelID
<
nlevels
;
levelID
++
)
{
...
...
Prev
1
2
3
4
Next
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