Commit 3fa8cb9b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grid_def_param_sinu: added attribute grid_mapping_name.

parent ac8983f8
......@@ -494,18 +494,22 @@ void sinusoidal_to_geo(int gridsize, double *xvals, double *yvals)
void grid_def_param_sinu(int gridID)
{
const char *projection = "sinusoidal";
cdiGridDefKeyStr(gridID, CDI_KEY_MAPPING, (int)(strlen(projection)+1), projection);
cdiGridDefKeyStr(gridID, CDI_KEY_MAPPING, (int)strlen(projection)+1, projection);
const char *mapvarname = "Sinusoidal";
cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, (int)(strlen(mapvarname)+1), mapvarname);
cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, (int)strlen(mapvarname)+1, mapvarname);
vlistDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int)strlen(projection)+1, projection);
}
void grid_def_param_laea(int gridID, double a, double lon_0, double lat_0)
{
const char *projection = "lambert_azimuthal_equal_area";
cdiGridDefKeyStr(gridID, CDI_KEY_MAPPING, (int)(strlen(projection)+1), projection);
cdiGridDefKeyStr(gridID, CDI_KEY_MAPPING, (int)strlen(projection)+1, projection);
const char *mapvarname = "Lambert_AEA";
cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, (int)(strlen(mapvarname)+1), mapvarname);
cdiGridDefKeyStr(gridID, CDI_KEY_MAPNAME, (int)strlen(mapvarname)+1, mapvarname);
vlistDefAttTxt(gridID, CDI_GLOBAL, "grid_mapping_name", (int)strlen(projection)+1, projection);
vlistDefAttFlt(gridID, CDI_GLOBAL, "earth_radius", DATATYPE_FLT64, 1, &a);
vlistDefAttFlt(gridID, CDI_GLOBAL, "longitude_of_projection_origin", DATATYPE_FLT64, 1, &lon_0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment