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
87380ae6
Commit
87380ae6
authored
Jan 26, 2009
by
Uwe Schulzweida
Browse files
mermean: bug fix for weights from 'zonmean'
parent
1b0ebd86
Changes
7
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
87380ae6
...
...
@@ -4,6 +4,7 @@
* add support for GRID type Lambert Conformal Conic
* Sinusoidal and Lambert Azimuthal Equal Area grids with units [km]
* gridFromName: define GRID with one point lon=<LON>_lat=<LAT>
* mermean: bug fix for weights from 'zonmean' (report: Michael Sigmond)
* remap: read grid corners only if needed
* Version 1.3.1 released
...
...
src/Merstat.c
View file @
87380ae6
...
...
@@ -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-200
9
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
...
...
src/Outputgmt.c
View file @
87380ae6
...
...
@@ -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-200
9
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
...
...
@@ -776,7 +776,7 @@ void *Outputgmt(void *argument)
if
(
lgrid_gen_bounds
)
{
if
(
!
(
lzon
||
lmer
)
)
genXbounds
(
nlon
,
nlat
,
grid_center_lon
,
grid_corner_lon
);
genXbounds
(
nlon
,
nlat
,
grid_center_lon
,
grid_corner_lon
,
0
);
genYbounds
(
nlon
,
nlat
,
grid_center_lat
,
grid_corner_lat
);
}
else
...
...
src/Zonstat.c
View file @
87380ae6
...
...
@@ -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-200
9
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
...
...
src/cdo.h
View file @
87380ae6
...
...
@@ -117,7 +117,7 @@ void vlistCompare(int vlistID1, int vlistID2, int function);
int
gridWeights
(
int
gridID
,
double
*
weights
);
int
gridGenArea
(
int
gridID
,
double
*
area
);
void
gaussaw
(
double
pa
[],
double
pw
[],
int
nlat
);
void
genXbounds
(
int
xsize
,
int
ysize
,
double
*
grid_center_lon
,
double
*
grid_corner_lon
);
void
genXbounds
(
int
xsize
,
int
ysize
,
double
*
grid_center_lon
,
double
*
grid_corner_lon
,
double
dlon
);
void
genYbounds
(
int
xsize
,
int
ysize
,
double
*
grid_center_lat
,
double
*
grid_corner_lat
);
void
writeNCgrid
(
const
char
*
gridfile
,
int
gridID
,
int
*
imask
);
void
defineZaxis
(
const
char
*
zaxisarg
);
...
...
src/grid.c
View file @
87380ae6
...
...
@@ -1112,7 +1112,12 @@ int gridGenArea(int gridID, double *area)
{
int
nlon
=
gridInqXsize
(
gridID
);
int
nlat
=
gridInqYsize
(
gridID
);
genXbounds
(
nlon
,
nlat
,
grid_center_lon
,
grid_corner_lon
);
double
dlon
=
0
;
if
(
nlon
==
1
)
{
dlon
=
1
;
}
genXbounds
(
nlon
,
nlat
,
grid_center_lon
,
grid_corner_lon
,
dlon
);
genYbounds
(
nlon
,
nlat
,
grid_center_lat
,
grid_corner_lat
);
}
else
...
...
src/remaplib.c
View file @
87380ae6
...
...
@@ -178,12 +178,12 @@ void remapVarsFree(REMAPVARS *rv)
/*****************************************************************************/
void
genXbounds
(
int
xsize
,
int
ysize
,
double
*
grid_center_lon
,
double
*
grid_corner_lon
)
void
genXbounds
(
int
xsize
,
int
ysize
,
double
*
grid_center_lon
,
double
*
grid_corner_lon
,
double
dlon
)
{
int
i
,
j
,
index
;
double
dlon
,
minlon
,
maxlon
;
double
minlon
,
maxlon
;
dlon
=
360
.
/
xsize
;
if
(
!
(
dlon
>
0
)
)
dlon
=
360
.
/
xsize
;
/*
if ( xsize == 1 || (grid_center_lon[xsize-1]-grid_center_lon[0]+dlon) < 359 )
cdoAbort("Cannot calculate Xbounds for %d vals with dlon = %g", xsize, dlon);
...
...
@@ -751,7 +751,7 @@ void remapGridInit(int map_type, int gridID1, int gridID2, REMAPGRID *rg)
{
if
(
lgrid1_gen_bounds
)
{
genXbounds
(
rg
->
grid1_dims
[
0
],
rg
->
grid1_dims
[
1
],
rg
->
grid1_center_lon
,
rg
->
grid1_corner_lon
);
genXbounds
(
rg
->
grid1_dims
[
0
],
rg
->
grid1_dims
[
1
],
rg
->
grid1_center_lon
,
rg
->
grid1_corner_lon
,
0
);
genYbounds
(
rg
->
grid1_dims
[
0
],
rg
->
grid1_dims
[
1
],
rg
->
grid1_center_lat
,
rg
->
grid1_corner_lat
);
}
else
...
...
@@ -827,7 +827,7 @@ void remapGridInit(int map_type, int gridID1, int gridID2, REMAPGRID *rg)
{
if
(
lgrid2_gen_bounds
)
{
genXbounds
(
rg
->
grid2_dims
[
0
],
rg
->
grid2_dims
[
1
],
rg
->
grid2_center_lon
,
rg
->
grid2_corner_lon
);
genXbounds
(
rg
->
grid2_dims
[
0
],
rg
->
grid2_dims
[
1
],
rg
->
grid2_center_lon
,
rg
->
grid2_corner_lon
,
0
);
genYbounds
(
rg
->
grid2_dims
[
0
],
rg
->
grid2_dims
[
1
],
rg
->
grid2_center_lat
,
rg
->
grid2_corner_lat
);
}
else
...
...
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