Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor 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
cdo
Commits
735218a6
Commit
735218a6
authored
10 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
eofcoeff: remove scaling with grib cell area weights
parent
628d9fd1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+6
-0
6 additions, 0 deletions
ChangeLog
NEWS
+3
-1
3 additions, 1 deletion
NEWS
src/Eofcoeff.c
+10
-10
10 additions, 10 deletions
src/Eofcoeff.c
src/Eofcoeff3d.c
+9
-9
9 additions, 9 deletions
src/Eofcoeff3d.c
with
28 additions
and
20 deletions
ChangeLog
+
6
−
0
View file @
735218a6
...
...
@@ -3,6 +3,12 @@
* using CDI library version 1.6.4
* Version 1.6.4 released
2014-06-10 Uwe Schulzweida
* eof3d: set sum weights to 1 (bug fix)
* eofcoeff: remove scaling with grid cell area weights (bug fix)
* eofcoeff3d: remove scaling with grid cell area weights (bug fix)
2014-06-02 Uwe Schulzweida
* tinfo: added support for forecast time axis
...
...
This diff is collapsed.
Click to expand it.
NEWS
+
3
−
1
View file @
735218a6
...
...
@@ -11,7 +11,9 @@ Version 1.6.4 (26 June 2014):
* diff: print number of different values
Fixed bugs:
* filter:
* eof:
* eof3d: set sum of weights to 1
* eofcoeff: remove scaling with grib cell area weights
* eofcoeff3d: remove scaling with grib cell area weights
Version 1.6.3 (18 February 2014):
...
...
This diff is collapsed.
Click to expand it.
src/Eofcoeff.c
+
10
−
10
View file @
735218a6
...
...
@@ -35,25 +35,25 @@ void *Eofcoeff(void * argument)
{
char
eof_name
[
8
],
oname
[
1024
],
filesuffix
[
32
];
const
char
*
refname
;
double
*
w
;
//
double *w;
double
missval1
=
-
999
,
missval2
;
double
*
xvals
,
*
yvals
;
field_t
***
eof
;
field_t
in
;
field_t
out
;
int
operatorID
;
//
int operatorID;
int
gridsize
;
int
i
,
varID
,
recID
,
levelID
,
tsID
,
eofID
;
int
gridID1
,
gridID2
,
gridID3
;
int
gridID1
,
gridID3
;
int
nrecs
,
nvars
,
nlevs
,
neof
,
nchars
,
nmiss
,
ngrids
;
int
reached_eof
;
int
streamID1
,
streamID2
,
*
streamIDs
;
int
taxisID1
,
taxisID2
,
taxisID3
;
int
taxisID2
,
taxisID3
;
int
vlistID1
,
vlistID2
,
vlistID3
;
cdoInitialize
(
argument
);
cdoOperatorAdd
(
"eofcoeff"
,
0
,
0
,
NULL
);
operatorID
=
cdoOperatorID
();
//
operatorID = cdoOperatorID();
streamID1
=
streamOpenRead
(
cdoStreamName
(
0
));
streamID2
=
streamOpenRead
(
cdoStreamName
(
1
));
...
...
@@ -62,16 +62,16 @@ void *Eofcoeff(void * argument)
vlistID2
=
streamInqVlist
(
streamID2
);
vlistID3
=
vlistDuplicate
(
vlistID2
);
taxisID1
=
vlistInqTaxis
(
vlistID1
);
//
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2
=
vlistInqTaxis
(
vlistID2
);
taxisID3
=
taxisDuplicate
(
taxisID2
);
gridID1
=
vlistInqVarGrid
(
vlistID1
,
0
);
gridID2
=
vlistInqVarGrid
(
vlistID2
,
0
);
//
gridID2 = vlistInqVarGrid(vlistID2, 0);
if
(
vlistGridsizeMax
(
vlistID1
)
==
vlistGridsizeMax
(
vlistID2
)
)
gridsize
=
vlistGridsizeMax
(
vlistID1
);
else
else
{
gridsize
=
-
1
;
cdoAbort
(
"Gridsize of input files does not match"
);
...
...
@@ -84,8 +84,8 @@ void *Eofcoeff(void * argument)
nvars
=
vlistNvars
(
vlistID1
)
==
vlistNvars
(
vlistID2
)
?
vlistNvars
(
vlistID1
)
:
-
1
;
nrecs
=
vlistNrecs
(
vlistID1
);
nlevs
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
0
));
w
=
(
double
*
)
malloc
(
gridsize
*
sizeof
(
double
));
gridWeights
(
gridID2
,
&
w
[
0
]
);
//
w = (double*) malloc(gridsize*sizeof(double));
//
gridWeights(gridID2,
w
);
...
...
This diff is collapsed.
Click to expand it.
src/Eofcoeff3d.c
+
9
−
9
View file @
735218a6
...
...
@@ -35,26 +35,26 @@ void *Eofcoeff3d(void * argument)
{
char
eof_name
[
6
],
oname
[
1024
],
filesuffix
[
32
];
const
char
*
refname
;
double
*
w
;
//
double *w;
double
missval1
=
-
999
,
missval2
=
-
999
;
double
*
xvals
,
*
yvals
,
*
zvals
;
field_t
***
eof
;
field_t
in
;
field_t
**
out
;
int
operatorID
,
operfunc
;
//
int operatorID, operfunc;
int
gridsize
;
int
i
,
varID
,
recID
,
levelID
,
tsID
,
eofID
,
*
varID3
;
int
gridID1
,
gridID2
,
gridID3
;
int
gridID1
,
gridID3
;
int
nrecs
,
nvars
,
nlevs
,
neof
,
nchars
,
nmiss
;
int
reached_eof
;
int
streamID1
,
streamID2
,
*
streamIDs
;
int
taxisID1
,
taxisID2
,
taxisID3
;
int
taxisID2
,
taxisID3
;
int
vlistID1
,
vlistID2
,
vlistID3
;
int
zaxisID3
;
cdoInitialize
(
argument
);
cdoOperatorAdd
(
"eofcoeff3d"
,
0
,
0
,
NULL
);
operatorID
=
cdoOperatorID
();
//
operatorID = cdoOperatorID();
// operfunc = cdoOperatorFunc(operatorID);
streamID1
=
streamOpenRead
(
cdoStreamName
(
0
));
...
...
@@ -63,12 +63,12 @@ void *Eofcoeff3d(void * argument)
vlistID1
=
streamInqVlist
(
streamID1
);
vlistID2
=
streamInqVlist
(
streamID2
);
taxisID1
=
vlistInqTaxis
(
vlistID1
);
//
taxisID1 = vlistInqTaxis(vlistID1);
taxisID2
=
vlistInqTaxis
(
vlistID2
);
taxisID3
=
taxisDuplicate
(
taxisID2
);
gridID1
=
vlistInqVarGrid
(
vlistID1
,
0
);
gridID2
=
vlistInqVarGrid
(
vlistID2
,
0
);
//
gridID2 = vlistInqVarGrid(vlistID2, 0);
if
(
vlistGridsizeMax
(
vlistID1
)
==
vlistGridsizeMax
(
vlistID2
)
)
gridsize
=
vlistGridsizeMax
(
vlistID1
);
...
...
@@ -85,8 +85,8 @@ void *Eofcoeff3d(void * argument)
nvars
=
vlistNvars
(
vlistID1
)
==
vlistNvars
(
vlistID2
)
?
vlistNvars
(
vlistID1
)
:
-
1
;
nrecs
=
vlistNrecs
(
vlistID1
);
nlevs
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
0
));
w
=
(
double
*
)
malloc
(
gridsize
*
sizeof
(
double
));
gridWeights
(
gridID2
,
&
w
[
0
]
);
//
w = (double*) malloc(gridsize*sizeof(double));
//
gridWeights(gridID2,
w
);
if
(
vlistGridsizeMax
(
vlistID2
)
!=
gridsize
||
...
...
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