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
6e466df0
Commit
6e466df0
authored
1 year ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
gridGetPlanetRadius: read attribute earth_radius directly
parent
958bc53f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!159
M214003/develop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mpim_grid/grid_proj.cc
+2
-18
2 additions, 18 deletions
src/mpim_grid/grid_proj.cc
with
2 additions
and
18 deletions
src/mpim_grid/grid_proj.cc
+
2
−
18
View file @
6e466df0
...
...
@@ -610,22 +610,6 @@ cdo_proj_to_lonlat(char *proj_params, size_t nvals, double *xvals, double *yvals
double
gridGetPlanetRadius
(
int
gridID
)
{
double
planetRadius
=
0.0
;
auto
gridtype
=
gridInqType
(
gridID
);
auto
projtype
=
(
gridtype
==
GRID_PROJECTION
)
?
gridInqProjType
(
gridID
)
:
-
1
;
if
(
projtype
==
CDI_PROJ_LCC
)
{
CDI_GridProjParams
gpp
;
gridInqParamsLCC
(
gridID
,
&
gpp
);
if
(
IS_EQUAL
(
gpp
.
b
,
gpp
.
mv
))
planetRadius
=
gpp
.
a
;
}
else
if
(
projtype
==
CDI_PROJ_STERE
)
{
CDI_GridProjParams
gpp
;
gridInqParamsSTERE
(
gridID
,
&
gpp
);
if
(
IS_EQUAL
(
gpp
.
b
,
gpp
.
mv
))
planetRadius
=
gpp
.
a
;
}
return
planetRadius
;
double
radius
{
0
};
return
(
CDI_NOERR
==
cdiInqAttFlt
(
gridID
,
CDI_GLOBAL
,
"earth_radius"
,
1
,
&
radius
)
&&
radius
>
1
)
?
radius
:
0.0
;
}
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