Skip to content
GitLab
Menu
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
b6f91ca1
Commit
b6f91ca1
authored
Aug 03, 2016
by
Uwe Schulzweida
Browse files
gridarea: added support for CDI_PROJ_LAEA.
parent
bb10202d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Gridcell.c
View file @
b6f91ca1
...
...
@@ -41,8 +41,11 @@ double orthodrome(double px1, double py1, double px2, double py2)
void
grid_cell_area
(
int
gridID
,
double
*
array
)
{
int
gridtype
=
gridInqType
(
gridID
);
int
projtype
=
(
gridtype
==
GRID_PROJECTION
)
?
gridInqProjType
(
gridID
)
:
-
1
;
if
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_GAUSSIAN
||
gridtype
==
GRID_LAEA
||
projtype
==
CDI_PROJ_LAEA
||
gridtype
==
GRID_LCC
||
gridtype
==
GRID_GME
||
gridtype
==
GRID_CURVILINEAR
||
...
...
@@ -178,8 +181,7 @@ void *Gridcell(void *argument)
else
if
(
operatorID
==
GRIDWGTS
)
{
status
=
gridWeights
(
gridID
,
array
);
if
(
status
!=
0
)
cdoWarning
(
"Using constant grid cell area weights!"
);
if
(
status
!=
0
)
cdoWarning
(
"Using constant grid cell area weights!"
);
}
else
if
(
operatorID
==
GRIDMASK
)
{
...
...
src/grid.c
View file @
b6f91ca1
...
...
@@ -1761,8 +1761,9 @@ int gridWeights(int gridID, double *grid_wgts)
int
w_status
=
1
;
int
a_status
=
0
;
int
gridtype
=
gridInqType
(
gridID
);
int
gridsize
=
gridInqSize
(
gridID
);
int
gridtype
=
gridInqType
(
gridID
);
int
projtype
=
(
gridtype
==
GRID_PROJECTION
)
?
gridInqProjType
(
gridID
)
:
-
1
;
double
*
grid_area
=
(
double
*
)
Malloc
(
gridsize
*
sizeof
(
double
));
...
...
@@ -1778,6 +1779,7 @@ int gridWeights(int gridID, double *grid_wgts)
gridtype
==
GRID_LCC
||
gridtype
==
GRID_LCC2
||
gridtype
==
GRID_LAEA
||
projtype
==
CDI_PROJ_LAEA
||
gridtype
==
GRID_SINUSOIDAL
||
gridtype
==
GRID_GME
||
gridtype
==
GRID_CURVILINEAR
||
...
...
src/grid_area.c
View file @
b6f91ca1
...
...
@@ -292,12 +292,14 @@ int gridGenArea(int gridID, double* area)
long
gridsize
=
gridInqSize
(
gridID
);
int
gridtype
=
gridInqType
(
gridID
);
int
projtype
=
(
gridtype
==
GRID_PROJECTION
)
?
gridInqProjType
(
gridID
)
:
-
1
;
if
(
gridtype
!=
GRID_LONLAT
&&
gridtype
!=
GRID_GAUSSIAN
&&
gridtype
!=
GRID_LCC
&&
gridtype
!=
GRID_LCC2
&&
gridtype
!=
GRID_LAEA
&&
projtype
!=
CDI_PROJ_LAEA
&&
gridtype
!=
GRID_SINUSOIDAL
&&
gridtype
!=
GRID_GME
&&
gridtype
!=
GRID_CURVILINEAR
&&
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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