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
libcdi
Commits
5c871957
Commit
5c871957
authored
Aug 11, 2016
by
Uwe Schulzweida
Browse files
Removed obsolete grid type GRID_SINUSOIDAL.
parent
fa49b868
Changes
7
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
5c871957
2016-08-11 Uwe Schulzweida
* Removed obsolete grid type GRID_SINUSOIDAL
* Removed obsolete CDI grid functions gridXXXXpole(), gridXXXYpole(), gridXXXAngle() and gridIsRotated()
2016-08-11 Uwe Schulzweida
...
...
app/printinfo.h
View file @
5c871957
...
...
@@ -301,9 +301,6 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
}
if
(
gridtype
==
GRID_LONLAT
||
gridtype
==
GRID_LCC2
||
gridtype
==
GRID_LAEA
||
gridtype
==
GRID_SINUSOIDAL
||
gridtype
==
GRID_PROJECTION
||
gridtype
==
GRID_GENERIC
||
gridtype
==
GRID_GAUSSIAN
||
...
...
src/cdf_write.c
View file @
5c871957
...
...
@@ -624,8 +624,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
char
gmapvarname
[
CDI_MAX_NAME
];
gmapvarname
[
0
]
=
0
;
if
(
gridtype
==
GRID_SINUSOIDAL
)
strcpy
(
gmapvarname
,
"Sinusoidal"
);
else
if
(
gridtype
==
GRID_LAEA
)
strcpy
(
gmapvarname
,
"Lambert_AEA"
);
if
(
gridtype
==
GRID_LAEA
)
strcpy
(
gmapvarname
,
"Lambert_AEA"
);
else
if
(
gridtype
==
GRID_LCC2
)
strcpy
(
gmapvarname
,
"Lambert_CC"
);
else
cdf_get_gmapvarname
(
gridID
,
gmapvarname
);
...
...
src/cdi.h
View file @
5c871957
...
...
@@ -139,8 +139,7 @@ extern "C" {
#define GRID_LCC 11
/* Lambert Conformal Conic (GRIB) */
#define GRID_LCC2 12
/* Lambert Conformal Conic (PROJ) */
#define GRID_LAEA 13
/* Lambert Azimuthal Equal Area */
#define GRID_SINUSOIDAL 14
/* Sinusoidal */
#define GRID_PROJECTION 15
/* Projected coordinates */
#define GRID_PROJECTION 14
/* Projected coordinates */
#define CDI_PROJ_RLL 21
/* Rotated Latitude Longitude */
#define CDI_PROJ_LCC 22
/* Lambert Conformal Conic */
...
...
src/grid.c
View file @
5c871957
...
...
@@ -40,7 +40,6 @@ static const char Grids[][17] = {
/* 11 */
"lcc"
,
/* 12 */
"lcc2"
,
/* 13 */
"laea"
,
/* 14 */
"sinusoidal"
,
/* 15 */
"projection"
,
};
...
...
@@ -315,7 +314,6 @@ void cdiGridTypeInit(grid_t *gridptr, int gridtype, int size)
case
GRID_GENERIC
:
case
GRID_PROJECTION
:
case
GRID_LCC2
:
case
GRID_SINUSOIDAL
:
case
GRID_LAEA
:
{
if
(
gridptr
->
x
.
name
[
0
]
==
0
)
gridSetName
(
gridptr
->
x
.
name
,
"x"
);
...
...
@@ -2545,7 +2543,6 @@ void gridComplete(grid_t *grid)
case
GRID_GENERIC
:
case
GRID_LCC
:
case
GRID_LCC2
:
case
GRID_SINUSOIDAL
:
case
GRID_LAEA
:
case
GRID_PROJECTION
:
{
...
...
@@ -2709,7 +2706,7 @@ int gridGenerate(const grid_t *grid)
int
valdef_group1
=
0
;
static
const
int
valdef_group1_tab
[]
=
{
GRID_LONLAT
,
GRID_GAUSSIAN
,
GRID_UNSTRUCTURED
,
GRID_CURVILINEAR
,
GRID_GENERIC
,
GRID_LCC
,
GRID_LCC2
,
GRID_SINUSOIDAL
,
GRID_LAEA
,
GRID_GENERIC
,
GRID_LCC
,
GRID_LCC2
,
GRID_LAEA
,
GRID_PROJECTION
};
for
(
size_t
i
=
0
;
i
<
sizeof
(
valdef_group1_tab
)
/
sizeof
(
valdef_group1_tab
[
0
]);
++
i
)
...
...
@@ -3444,7 +3441,6 @@ void gridPrintKernel(grid_t *gridptr, int index, int opt, FILE *fp)
case
GRID_GAUSSIAN_REDUCED
:
case
GRID_GENERIC
:
case
GRID_LCC2
:
case
GRID_SINUSOIDAL
:
case
GRID_LAEA
:
case
GRID_PROJECTION
:
case
GRID_CURVILINEAR
:
...
...
@@ -3521,7 +3517,7 @@ void gridPrintKernel(grid_t *gridptr, int index, int opt, FILE *fp)
if
(
type
==
GRID_LONLAT
||
type
==
GRID_GAUSSIAN
||
type
==
GRID_PROJECTION
||
type
==
GRID_GENERIC
||
type
==
GRID_LCC2
||
type
==
GRID_SINUSOIDAL
||
type
==
GRID_LAEA
)
type
==
GRID_LAEA
)
{
xfirst
=
gridInqXval
(
gridID
,
0
);
xinc
=
gridInqXinc
(
gridID
);
...
...
@@ -3555,7 +3551,7 @@ void gridPrintKernel(grid_t *gridptr, int index, int opt, FILE *fp)
if
(
type
==
GRID_LONLAT
||
type
==
GRID_GENERIC
||
type
==
GRID_PROJECTION
||
type
==
GRID_GENERIC
||
type
==
GRID_LCC2
||
type
==
GRID_SINUSOIDAL
||
type
==
GRID_LAEA
)
type
==
GRID_LAEA
)
{
yfirst
=
gridInqYval
(
gridID
,
0
);
yinc
=
gridInqYinc
(
gridID
);
...
...
src/stream_cdf_i.c
View file @
5c871957
...
...
@@ -2502,9 +2502,7 @@ void cdf_set_proj_atts(int ncid, int gmapvarid, grid_t *grid)
cdfGetAttText
(
ncid
,
gmapvarid
,
attname
,
attstringlen
,
attstring
);
str_tolower
(
attstring
);
if
(
strcmp
(
attstring
,
"sinusoidal"
)
==
0
)
grid
->
type
=
GRID_SINUSOIDAL
;
else
if
(
strcmp
(
attstring
,
"lambert_azimuthal_equal_area"
)
==
0
)
if
(
strcmp
(
attstring
,
"lambert_azimuthal_equal_area"
)
==
0
)
grid
->
type
=
GRID_LAEA
;
else
if
(
strcmp
(
attstring
,
"lambert_conformal_conic"
)
==
0
)
grid
->
type
=
GRID_LCC2
;
...
...
@@ -2613,11 +2611,7 @@ static
void
cdf_define_all_grids
(
stream_t
*
streamptr
,
int
vlistID
,
ncdim_t
*
ncdims
,
int
nvars
,
ncvar_t
*
ncvars
,
int
timedimid
,
unsigned
char
*
uuidOfHGrid
,
char
*
gridfile
,
int
number_of_grid_used
)
{
#ifdef TEST_PROJECTION
bool
testproj
=
true
;
#else
bool
testproj
=
false
;
#endif
for
(
int
ncvarid
=
0
;
ncvarid
<
nvars
;
++
ncvarid
)
{
...
...
@@ -2632,7 +2626,6 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
int
vdimid
=
UNDEFID
;
struct
addIfNewRes
projAdded
=
{
.
Id
=
CDI_UNDEFID
,
.
isNew
=
0
},
gridAdded
=
{
.
Id
=
CDI_UNDEFID
,
.
isNew
=
0
};
int
xdimid
=
UNDEFID
,
ydimid
=
UNDEFID
;
int
nydims
=
cdf_get_xydimid
(
ndims
,
ncvar
->
dimids
,
dimtype
,
&
xdimid
,
&
ydimid
);
...
...
@@ -2660,11 +2653,7 @@ void cdf_define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
struct
cdfLazyGrid
*
restrict
lazyGrid
=
NULL
,
*
restrict
lazyProj
=
NULL
;
{
#ifdef TEST_PROJECTION
int
gridtype
=
!
lgrid
?
GRID_PROJECTION
:
ncvar
->
gridtype
;
#else
int
gridtype
=
ncvar
->
gridtype
;
#endif
if
(
CDI_netcdf_lazy_grid_load
)
{
cdfLazyGridRenew
(
&
lazyGrid
,
gridtype
);
...
...
src/stream_cdf_o.c
View file @
5c871957
...
...
@@ -1936,26 +1936,7 @@ void cdfDefMapping(stream_t *streamptr, int gridID)
int
ncvarid
=
UNDEFID
;
int
fileID
=
streamptr
->
fileID
;
if
(
gridInqType
(
gridID
)
==
GRID_SINUSOIDAL
)
{
static
const
char
varname
[]
=
"Sinusoidal"
;
static
const
char
mapname
[]
=
"sinusoidal"
;
cdf_redef
(
fileID
);
int
ncerrcode
=
nc_def_var
(
fileID
,
varname
,
(
nc_type
)
NC_CHAR
,
0
,
NULL
,
&
ncvarid
);
if
(
ncerrcode
==
NC_NOERR
)
{
cdf_put_att_text
(
fileID
,
ncvarid
,
"grid_mapping_name"
,
strlen
(
mapname
),
mapname
);
/*
cdf_put_att_double(fileID, ncvarid, "grid_north_pole_latitude", NC_DOUBLE, 1, &ypole);
cdf_put_att_double(fileID, ncvarid, "grid_north_pole_longitude", NC_DOUBLE, 1, &xpole);
*/
}
cdf_enddef
(
fileID
);
}
else
if
(
gridInqType
(
gridID
)
==
GRID_LAEA
)
if
(
gridInqType
(
gridID
)
==
GRID_LAEA
)
{
static
const
char
varname
[]
=
"Lambert_AEA"
;
static
const
char
mapname
[]
=
"lambert_azimuthal_equal_area"
;
...
...
@@ -2091,7 +2072,7 @@ void cdfDefGrid(stream_t *streamptr, int gridID, int gridindex)
cdfDefTrajLon
(
streamptr
,
gridID
,
gridindex
);
cdfDefTrajLat
(
streamptr
,
gridID
,
gridindex
);
}
else
if
(
gridtype
==
GRID_SINUSOIDAL
||
gridtype
==
GRID_LAEA
||
gridtype
==
GRID_LCC2
)
else
if
(
gridtype
==
GRID_LAEA
||
gridtype
==
GRID_LCC2
)
{
cdfDefXaxis
(
streamptr
,
gridID
,
gridindex
,
1
);
cdfDefYaxis
(
streamptr
,
gridID
,
gridindex
,
1
);
...
...
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