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
c953303b
Commit
c953303b
authored
12 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Fldstat: set weight to 1 if gridsize is 1
parent
f0992a77
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
src/Fldstat.c
+18
-18
18 additions, 18 deletions
src/Fldstat.c
with
22 additions
and
18 deletions
ChangeLog
+
4
−
0
View file @
c953303b
...
...
@@ -3,6 +3,10 @@
* using CDI library version 1.5.8
* Version 1.5.8 released
2012-10-19 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Fldstat: set weight to 1 if gridsize is1
2012-10-19 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added operator seinfo
...
...
This diff is collapsed.
Click to expand it.
src/Fldstat.c
+
18
−
18
View file @
c953303b
...
...
@@ -36,10 +36,13 @@
static
void
print_location_LL
(
int
operfunc
,
int
vlistID
,
int
varID
,
int
levelID
,
int
gridID
,
double
sglval
,
double
*
fieldptr
,
int
code
,
int
vdate
,
int
vtime
)
int
vdate
,
int
vtime
)
{
static
int
showHeader
=
TRUE
;
int
year
,
month
,
day
,
hour
,
minute
,
second
;
int
code
;
code
=
vlistInqVarCode
(
vlistID
,
varID
);
cdiDecodeDate
(
vdate
,
&
year
,
&
month
,
&
day
);
cdiDecodeTime
(
vtime
,
&
hour
,
&
minute
,
&
second
);
...
...
@@ -88,8 +91,6 @@ void *Fldstat(void *argument)
int
streamID1
,
streamID2
;
int
vlistID1
,
vlistID2
;
int
gridID2
,
lastgrid
=
-
1
;
int
wstatus
=
FALSE
;
int
code
=
0
,
oldcode
=
0
;
int
index
,
ngrids
;
int
recID
,
nrecs
;
int
tsID
,
varID
,
levelID
;
...
...
@@ -174,7 +175,7 @@ void *Fldstat(void *argument)
streamDefTimestep
(
streamID2
,
tsID
);
/* Precompute date + time for later representation in verbose mode */
int
vdate
,
vtime
;
int
vdate
=
0
,
vtime
=
0
;
if
(
cdoVerbose
)
{
if
(
operfunc
==
func_min
||
operfunc
==
func_max
)
...
...
@@ -194,29 +195,28 @@ void *Fldstat(void *argument)
if
(
needWeights
&&
field
.
grid
!=
lastgrid
)
{
lastgrid
=
field
.
grid
;
wstatus
=
gridWeights
(
field
.
grid
,
field
.
weight
);
field
.
weight
[
0
]
=
1
;
if
(
field
.
size
>
1
)
{
int
wstatus
=
gridWeights
(
field
.
grid
,
field
.
weight
);
if
(
wstatus
!=
0
&&
tsID
==
0
&&
levelID
==
0
)
{
char
varname
[
CDI_MAX_NAME
];
vlistInqVarName
(
vlistID1
,
varID
,
varname
);
cdoWarning
(
"Using constant grid cell area weights for variable %s!"
,
varname
);
}
}
}
code
=
vlistInqVarCode
(
vlistID1
,
varID
);
if
(
wstatus
!=
0
&&
tsID
==
0
&&
code
!=
oldcode
)
cdoWarning
(
"Using constant grid cell area weights for code %d!"
,
oldcode
=
code
);
field
.
missval
=
vlistInqVarMissval
(
vlistID1
,
varID
);
/* RQ */
if
(
operfunc
==
func_pctl
)
sglval
=
fldpctl
(
field
,
pn
);
else
sglval
=
fldfun
(
field
,
operfunc
);
/* QR */
if
(
cdoVerbose
)
{
if
(
operfunc
==
func_min
||
operfunc
==
func_max
)
{
print_location_LL
(
operfunc
,
vlistID1
,
varID
,
levelID
,
field
.
grid
,
sglval
,
field
.
ptr
,
code
,
vdate
,
vtime
);
}
}
if
(
cdoVerbose
&&
(
operfunc
==
func_min
||
operfunc
==
func_max
)
)
print_location_LL
(
operfunc
,
vlistID1
,
varID
,
levelID
,
field
.
grid
,
sglval
,
field
.
ptr
,
vdate
,
vtime
);
if
(
DBL_IS_EQUAL
(
sglval
,
field
.
missval
)
)
nmiss
=
1
;
...
...
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