Commit 88a01f0c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced grid_to_degree() by cdo_grid_to_degree().

parent 866ac0e9
......@@ -52,37 +52,23 @@ genGridIndex(int gridID1, int gridID2, std::vector<int> &index)
if (!(gridInqXvals(gridID2, nullptr) && gridInqYvals(gridID2, nullptr))) cdoAbort("Grid 2 has no values!");
Varray<double> xvals1(nlon1);
Varray<double> yvals1(nlat1);
Varray<double> xvals2(nlon2);
Varray<double> yvals2(nlat2);
std::vector<int> xindex(nlon2);
std::vector<int> yindex(nlat2);
Varray<double> xvals1(nlon1), yvals1(nlat1);
Varray<double> xvals2(nlon2), yvals2(nlat2);
std::vector<int> xindex(nlon2), yindex(nlat2);
gridInqXvals(gridID1, xvals1.data());
gridInqYvals(gridID1, yvals1.data());
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID1, units);
grid_to_degree(units, nlon1, xvals1.data(), "grid1 center lon");
gridInqYunits(gridID1, units);
grid_to_degree(units, nlat1, yvals1.data(), "grid1 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID1, CDI_XAXIS, nlon1, xvals1.data(), "grid1 center lon");
cdo_grid_to_degree(gridID1, CDI_YAXIS, nlat1, yvals1.data(), "grid1 center lat");
gridInqXvals(gridID2, xvals2.data());
gridInqYvals(gridID2, yvals2.data());
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID2, units);
grid_to_degree(units, nlon2, xvals2.data(), "grid2 center lon");
gridInqYunits(gridID2, units);
grid_to_degree(units, nlat2, yvals2.data(), "grid2 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID2, CDI_XAXIS, nlon2, xvals2.data(), "grid2 center lon");
cdo_grid_to_degree(gridID2, CDI_YAXIS, nlat2, yvals2.data(), "grid2 center lat");
for (size_t i2 = 0; i2 < nlat2; i2++)
{
......@@ -164,19 +150,15 @@ Enlargegrid(void *process)
const auto gridsize1 = gridInqSize(gridID1);
const auto gridsize2 = gridInqSize(gridID2);
Varray<double> array1(gridsize1);
Varray<double> array2(gridsize2);
Varray<double> array1(gridsize1), array2(gridsize2);
std::vector<int> gindex(gridsize1);
genGridIndex(gridID2, gridID1, gindex);
const int vlistID2 = vlistDuplicate(vlistID1);
const auto vlistID2 = vlistDuplicate(vlistID1);
const int ngrids = vlistNgrids(vlistID1);
for (int index = 0; index < ngrids; index++)
{
vlistChangeGridIndex(vlistID2, index, gridID2);
}
const auto ngrids = vlistNgrids(vlistID1);
for (int index = 0; index < ngrids; index++) vlistChangeGridIndex(vlistID2, index, gridID2);
const auto streamID2 = cdoOpenWrite(1);
......
......@@ -138,13 +138,8 @@ genBoxGridCurv2D(int gridID1, size_t xinc, size_t yinc, int gridID2)
gridInqYvals(gridID1, yvals1.data());
// Convert lat/lon units if required
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID1, units);
grid_to_degree(units, gridsize1, xvals1.data(), "grid center lon");
gridInqYunits(gridID1, units);
grid_to_degree(units, gridsize1, yvals1.data(), "grid center lat");
}
cdo_grid_to_degree(gridID1, CDI_XAXIS, gridsize1, xvals1.data(), "grid center lon");
cdo_grid_to_degree(gridID1, CDI_YAXIS, gridsize1, yvals1.data(), "grid center lat");
Varray<double> grid1_corner_lon, grid1_corner_lat;
Varray<double> grid2_corner_lon, grid2_corner_lat;
......@@ -158,13 +153,8 @@ genBoxGridCurv2D(int gridID1, size_t xinc, size_t yinc, int gridID2)
gridInqYbounds(gridID1, grid1_corner_lat.data());
// Convert lat/lon units if required
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID1, units);
grid_to_degree(units, 4 * gridsize1, grid1_corner_lon.data(), "grid corner lon");
gridInqYunits(gridID1, units);
grid_to_degree(units, 4 * gridsize1, grid1_corner_lat.data(), "grid corner lat");
}
cdo_grid_to_degree(gridID1, CDI_XAXIS, 4 * gridsize1, grid1_corner_lon.data(), "grid corner lon");
cdo_grid_to_degree(gridID1, CDI_YAXIS, 4 * gridsize1, grid1_corner_lat.data(), "grid corner lat");
}
// Process grid2 bounds
......
......@@ -117,13 +117,8 @@ Importobs(void *process)
gridInqYvals(gridID, yvals.data());
// Convert lat/lon units if required
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, xvals.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, yvals.data(), "grid center lat");
}
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, xvals.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, yvals.data(), "grid center lat");
auto fp = fopen(cdoGetStreamName(0), "r");
if (fp == nullptr)
......
......@@ -1105,10 +1105,8 @@ Magplot(void *process)
gridInqYvals(gridID, grid_center_lat.data());
// Convert lat/lon units if required
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lon.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lat.data(), "grid center lat");
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, grid_center_lon.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, grid_center_lat.data(), "grid center lat");
int tsID = 0;
......
......@@ -306,7 +306,6 @@ Magvector(void *process)
int levelID;
size_t nmiss;
char varname[CDI_MAX_NAME];
char units[CDI_MAX_NAME];
char datetimestr[64];
const auto nparam = operatorArgc();
......@@ -347,19 +346,15 @@ Magvector(void *process)
int nlat = gridInqYsize(gridID);
// int nlev = zaxisInqSize(zaxisID);
Varray<double> uarray(gridsize);
Varray<double> varray(gridsize);
Varray<double> grid_center_lat(gridsize);
Varray<double> grid_center_lon(gridsize);
Varray<double> uarray(gridsize), varray(gridsize);
Varray<double> grid_center_lat(gridsize), grid_center_lon(gridsize);
gridInqYvals(gridID, grid_center_lat.data());
gridInqXvals(gridID, grid_center_lon.data());
/* Convert lat/lon units if required */
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lon.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lat.data(), "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, grid_center_lon.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, grid_center_lat.data(), "grid center lat");
int tsID = 0;
......
......@@ -165,14 +165,9 @@ maskregion(std::vector<bool> &mask, const int gridID, const Varray<double> &xcoo
gridInqXvals(gridID, &xvals[0]);
gridInqYvals(gridID, &yvals[0]);
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, nlon, &xvals[0], "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, nlat, &yvals[0], "grid center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, nlon, &xvals[0], "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, nlat, &yvals[0], "grid center lat");
const auto xmm = varrayMinMax(xvals);
const auto ymm = varrayMinMax(yvals);
......
......@@ -249,14 +249,9 @@ Mrotuv(void *process)
gridInqXvals(gridID1, grid1x.data());
gridInqYvals(gridID1, grid1y.data());
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID1, units);
grid_to_degree(units, gridsize, grid1x.data(), "grid center lon");
gridInqYunits(gridID1, units);
grid_to_degree(units, gridsize, grid1y.data(), "grid center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID1, CDI_XAXIS, gridsize, grid1x.data(), "grid center lon");
cdo_grid_to_degree(gridID1, CDI_YAXIS, gridsize, grid1y.data(), "grid center lat");
p_to_uv_grid(nlon, nlat, grid1x.data(), grid1y.data(), gridux.data(), griduy.data(), gridvx.data(), gridvy.data());
......
......@@ -301,26 +301,16 @@ Mrotuvb(void *process)
gridInqXvals(gridID1, grid1x.data());
gridInqYvals(gridID1, grid1y.data());
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID1, units);
grid_to_degree(units, gridsize, grid1x.data(), "grid1 center lon");
gridInqYunits(gridID1, units);
grid_to_degree(units, gridsize, grid1y.data(), "grid1 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID1, CDI_XAXIS, gridsize, grid1x.data(), "grid1 center lon");
cdo_grid_to_degree(gridID1, CDI_YAXIS, gridsize, grid1y.data(), "grid1 center lat");
gridInqXvals(gridID2, grid2x.data());
gridInqYvals(gridID2, grid2y.data());
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridID2, units);
grid_to_degree(units, gridsize, grid2x.data(), "grid2 center lon");
gridInqYunits(gridID2, units);
grid_to_degree(units, gridsize, grid2y.data(), "grid2 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridID2, CDI_XAXIS, gridsize, grid2x.data(), "grid2 center lon");
cdo_grid_to_degree(gridID2, CDI_YAXIS, gridsize, grid2y.data(), "grid2 center lat");
if (gpint)
{
......
......@@ -324,11 +324,8 @@ Output(void *process)
gridInqYvals(gridID, grid_center_lat.data());
// Convert lat/lon units if required
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lon.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lat.data(), "grid center lat");
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, grid_center_lon.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, grid_center_lat.data(), "grid center lat");
}
int tsID = 0;
......
......@@ -268,7 +268,6 @@ Outputgmt(void *process)
Varray<double> grid_corner_lat, grid_corner_lon;
std::vector<int> grid_mask;
CPT cpt;
char units[CDI_MAX_NAME];
cdoInitialize(process);
......@@ -396,11 +395,9 @@ Outputgmt(void *process)
gridInqYvals(gridID, grid_center_lat.data());
gridInqXvals(gridID, grid_center_lon.data());
/* Convert lat/lon units if required */
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lon.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lat.data(), "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, grid_center_lon.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, grid_center_lat.data(), "grid center lat");
int nvals = gridsize;
double *plon = grid_center_lon.data();
......@@ -448,9 +445,8 @@ Outputgmt(void *process)
cdoAbort("Cell corner coordinates missing!");
}
/* Note: using units from latitude instead from bounds */
grid_to_degree(units, ncorner * gridsize, grid_corner_lon.data(), "grid corner lon");
grid_to_degree(units, ncorner * gridsize, grid_corner_lat.data(), "grid corner lat");
cdo_grid_to_degree(gridID, CDI_XAXIS, ncorner * gridsize, grid_corner_lon.data(), "grid corner lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, ncorner * gridsize, grid_corner_lat.data(), "grid corner lat");
if (zaxisInqLbounds(zaxisID, nullptr) && zaxisInqUbounds(zaxisID, nullptr))
{
......
......@@ -42,15 +42,12 @@ rot_uv_back(int gridID, Varray<double> &us, Varray<double> &vs)
gridInqXvals(gridID, xvals.data());
gridInqYvals(gridID, yvals.data());
/* Convert lat/lon units if required */
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, 1, &angle, "angle");
grid_to_degree(units, 1, &xpole, "xpole");
grid_to_degree(units, nlon, xvals.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, 1, &ypole, "ypole");
grid_to_degree(units, nlat, yvals.data(), "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, 1, &angle, "angle");
cdo_grid_to_degree(gridID, CDI_XAXIS, 1, &xpole, "xpole");
cdo_grid_to_degree(gridID, CDI_XAXIS, nlon, xvals.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, 1, &ypole, "ypole");
cdo_grid_to_degree(gridID, CDI_YAXIS, nlat, yvals.data(), "grid center lat");
if (xpole > 180) xpole -= 360;
if (angle > 180) angle -= 360;
......
......@@ -114,19 +114,16 @@ remap_nn_reg2d_reg2d(size_t nx, size_t ny, const double *restrict data, const in
{
if (gridInqType(gridID) != GRID_LONLAT) cdoAbort("Internal error, wrong grid type!");
auto nxvals = gridInqXsize(gridID);
auto nyvals = gridInqYsize(gridID);
const auto nxvals = gridInqXsize(gridID);
const auto nyvals = gridInqYsize(gridID);
Varray<double> xvals(nxvals), yvals(nyvals);
gridInqXvals(gridID, &xvals[0]);
gridInqYvals(gridID, &yvals[0]);
/* Convert lat/lon units if required */
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, nxvals, &xvals[0], "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, nyvals, &yvals[0], "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, nxvals, &xvals[0], "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, nyvals, &yvals[0], "grid center lat");
#ifdef _OPENMP
#pragma omp parallel for default(none) shared(nx, ny, nxvals, nyvals, xvals, yvals, data, array)
......@@ -164,11 +161,8 @@ remap_nn_reg2d_nonreg2d(const size_t nx, const size_t ny, const double *restrict
gridInqYvals(gridID2, &yvals[0]);
// Convert lat/lon units if required
char units[CDI_MAX_NAME];
gridInqXunits(gridID2, units);
grid_to_degree(units, gridsize, &xvals[0], "grid center lon");
gridInqYunits(gridID2, units);
grid_to_degree(units, gridsize, &yvals[0], "grid center lat");
cdo_grid_to_degree(gridID2, CDI_XAXIS, gridsize, &xvals[0], "grid center lon");
cdo_grid_to_degree(gridID2, CDI_YAXIS, gridsize, &yvals[0], "grid center lat");
for (size_t i = 0; i < gridsize; i++)
{
......
......@@ -801,12 +801,9 @@ Verifygrid(void *argument)
gridInqYvals(gridID, grid_center_lat.data());
gridInqXvals(gridID, grid_center_lon.data());
/* Convert lat/lon units if required */
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lon.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, gridsize, grid_center_lat.data(), "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, gridsize, grid_center_lon.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, gridsize, grid_center_lat.data(), "grid center lat");
if (luse_grid_corner)
{
......@@ -825,9 +822,8 @@ Verifygrid(void *argument)
cdoAbort("Cell corner coordinates missing!");
}
/* Note: using units from latitude instead from bounds */
grid_to_degree(units, ncorner * gridsize, grid_corner_lon.data(), "grid corner lon");
grid_to_degree(units, ncorner * gridsize, grid_corner_lat.data(), "grid corner lat");
cdo_grid_to_degree(gridID, CDI_XAXIS, ncorner * gridsize, grid_corner_lon.data(), "grid corner lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, ncorner * gridsize, grid_corner_lat.data(), "grid corner lat");
}
verify_grid(gridtype, gridsize, nx, gridno, ngrids, ncorner, grid_center_lon.data(), grid_center_lat.data(),
......
......@@ -1001,19 +1001,15 @@ rot_uv_back_mode64(int gridID, double *us, double *vs)
const auto nlon = gridInqXsize(gridID);
const auto nlat = gridInqYsize(gridID);
Varray<double> xvals(nlon);
Varray<double> yvals(nlat);
Varray<double> xvals(nlon), yvals(nlat);
gridInqXvals(gridID, xvals.data());
gridInqYvals(gridID, yvals.data());
/* Convert lat/lon units if required */
char units[CDI_MAX_NAME];
gridInqXunits(gridID, units);
grid_to_degree(units, 1, &xpole, "xpole");
grid_to_degree(units, nlon, xvals.data(), "grid center lon");
gridInqYunits(gridID, units);
grid_to_degree(units, 1, &ypole, "ypole");
grid_to_degree(units, nlat, yvals.data(), "grid center lat");
// Convert lat/lon units if required
cdo_grid_to_degree(gridID, CDI_XAXIS, 1, &xpole, "xpole");
cdo_grid_to_degree(gridID, CDI_XAXIS, nlon, xvals.data(), "grid center lon");
cdo_grid_to_degree(gridID, CDI_YAXIS, 1, &ypole, "ypole");
cdo_grid_to_degree(gridID, CDI_YAXIS, nlat, yvals.data(), "grid center lat");
double u, v;
for (size_t ilat = 0; ilat < nlat; ilat++)
......
......@@ -330,8 +330,7 @@ intgridbil(Field &field1, Field &field2)
if (lon_is_circular) nlon1 += 1;
}
Varray<double> lon1(nlon1);
Varray<double> lat1(nlat1);
Varray<double> lon1(nlon1), lat1(nlat1);
gridInqXvals(gridID1, lon1.data());
gridInqYvals(gridID1, lat1.data());
......@@ -504,14 +503,9 @@ interpolate(Field &field1, Field &field2)
gridInqXvals(gridIDi, lon);
gridInqYvals(gridIDi, lat);
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridIDi, units);
grid_to_degree(units, nlon, lon, "grid1 center lon");
gridInqYunits(gridIDi, units);
grid_to_degree(units, nlat, lat, "grid1 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridIDi, CDI_XAXIS, nlon, lon, "grid1 center lon");
cdo_grid_to_degree(gridIDi, CDI_YAXIS, nlat, lat, "grid1 center lat");
if (nlon > 1)
{
......@@ -548,14 +542,9 @@ interpolate(Field &field1, Field &field2)
gridInqXvals(gridIDo, lono);
gridInqYvals(gridIDo, lato);
/* Convert lat/lon units if required */
{
char units[CDI_MAX_NAME];
gridInqXunits(gridIDo, units);
grid_to_degree(units, out_nlon, lono, "grid2 center lon");
gridInqYunits(gridIDo, units);
grid_to_degree(units, out_nlat, lato, "grid2 center lat");
}
// Convert lat/lon units if required
cdo_grid_to_degree(gridIDo, CDI_XAXIS, out_nlon, lono, "grid2 center lon");
cdo_grid_to_degree(gridIDo, CDI_YAXIS, out_nlat, lato, "grid2 center lat");
for (i = 0; i < out_nlon - 1; i++)
if (lono[i + 1] <= lono[i]) break;
......
......@@ -166,11 +166,11 @@ grid_copy_mapping(int gridID1, int gridID2)
void
grid_to_radian(const char *units, size_t nvals, double *restrict values, const char *description)
{
if (strncmp(units, "deg", strlen("deg")) == 0)
if (strncmp(units, "deg", 3) == 0)
{
scale_vec(DEG2RAD, nvals, values);
}
else if (strncmp(units, "rad", strlen("rad")) == 0)
else if (strncmp(units, "rad", 3) == 0)
{
/* No conversion necessary */
}
......@@ -180,14 +180,14 @@ grid_to_radian(const char *units, size_t nvals, double *restrict values, const c
}
}
void
static void
grid_to_degree(const char *units, size_t nvals, double *restrict values, const char *description)
{
if (strncmp(units, "rad", strlen("rad")) == 0)
if (strncmp(units, "rad", 3) == 0)
{
for (size_t n = 0; n < nvals; ++n) values[n] *= RAD2DEG;
}
else if (strncmp(units, "deg", strlen("deg")) == 0)
else if (strncmp(units, "deg", 3) == 0)
{
/* No conversion necessary */
}
......@@ -197,6 +197,15 @@ grid_to_degree(const char *units, size_t nvals, double *restrict values, const c
}
}
void
cdo_grid_to_degree(int gridID, int varID, size_t nvals, double *restrict values, const char *description)
{
char units[CDI_MAX_NAME];
int length = CDI_MAX_NAME;
cdiInqKeyString(gridID, varID, CDI_KEY_UNITS, units, &length);
grid_to_degree(units, nvals, values, description);
}
int
gridToZonal(const int gridID1)
{
......@@ -1455,14 +1464,8 @@ gridCurvilinearToRegular(int gridID1)
// gridDefDatatype(gridID2, CDI_DATATYPE_FLT32);
char xunits[CDI_MAX_NAME], yunits[CDI_MAX_NAME];
int length = CDI_MAX_NAME;
cdiInqKeyString(gridID2, CDI_XAXIS, CDI_KEY_UNITS, xunits, &length);
length = CDI_MAX_NAME;
cdiInqKeyString(gridID2, CDI_YAXIS, CDI_KEY_UNITS, yunits, &length);
grid_to_degree(xunits, nx, xvals.data(), "grid1 center lon");
grid_to_degree(yunits, ny, yvals.data(), "grid1 center lat");
cdo_grid_to_degree(gridID2, CDI_XAXIS, nx, xvals.data(), "grid1 center lon");
cdo_grid_to_degree(gridID2, CDI_YAXIS, ny, yvals.data(), "grid1 center lat");
gridDefXvals(gridID2, xvals.data());
gridDefYvals(gridID2, yvals.data());
......
......@@ -49,7 +49,7 @@ void grid_copy_mapping(int gridID1, int gridID2);
bool grid_is_distance_generic(int gridID);
void grid_to_radian(const char *units, size_t nvals, double *values, const char *description);
void grid_to_degree(const char *units, size_t nvals, double *values, const char *description);
void cdo_grid_to_degree(int gridID, int varID, size_t nvals, double *values, const char *description);
void grid_gen_corners(size_t n, const double *vals, double *corners);
void grid_gen_bounds(size_t n, const std::vector<double> &vals, std::vector<double> &bounds);
......
Markdown is supported
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