Commit 8294e7a1 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced MinMaxVal by MinMax.

parent 003d7db8
......@@ -70,9 +70,9 @@ Change_e5slm(void *process)
if (nmiss) cdoAbort("SLM with missing values are unsupported!");
const auto minmax = varrayMinMax(cland);
if (minmax.first < 0 || minmax.second > 1)
cdoWarning("Values of SLM out of bounds! (minval=%g, maxval=%g)", minmax.first, minmax.second);
const auto mm = varrayMinMax(cland);
if (mm.min < 0 || mm.max > 1)
cdoWarning("Values of SLM out of bounds! (minval=%g, maxval=%g)", mm.min, mm.max);
streamClose(streamIDslm);
......
......@@ -327,14 +327,14 @@ Derivepar(void *process)
if (zaxisIDh != -1)
{
// check range of ps_prog
auto minmax = varrayMinMax(ps);
if (minmax.first < MIN_PS || minmax.second > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", minmax.first, minmax.second);
auto mm = varrayMinMax(ps);
if (mm.min < MIN_PS || mm.max > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", mm.min, mm.max);
// check range of surface geopot
minmax = varrayMinMax(sgeopot);
if (minmax.first < MIN_FIS || minmax.second > MAX_FIS)
cdoWarning("Orography out of range (min=%g max=%g)!", minmax.first, minmax.second);
mm = varrayMinMax(sgeopot);
if (mm.min < MIN_FIS || mm.max > MAX_FIS)
cdoWarning("Orography out of range (min=%g max=%g)!", mm.min, mm.max);
}
{
......@@ -345,9 +345,9 @@ Derivepar(void *process)
offset = gridsize * levelID;
single2 = &temp[offset];
const auto minmax = varrayMinMax(gridsize, single2);
if (minmax.first < MIN_T || minmax.second > MAX_T)
cdoWarning("Input temperature at level %d out of range (min=%g max=%g)!", levelID + 1, minmax.first, minmax.second);
const auto mm = varrayMinMax(gridsize, single2);
if (mm.min < MIN_T || mm.max > MAX_T)
cdoWarning("Input temperature at level %d out of range (min=%g max=%g)!", levelID + 1, mm.min, mm.max);
}
}
......@@ -362,9 +362,9 @@ Derivepar(void *process)
// corr_hum(gridsize, single2, MIN_Q);
const auto minmax = varrayMinMax(gridsize, single2);
if (minmax.first < -0.1 || minmax.second > MAX_Q)
cdoWarning("Input humidity at level %d out of range (min=%g max=%g)!", levelID + 1, minmax.first, minmax.second);
const auto mm = varrayMinMax(gridsize, single2);
if (mm.min < -0.1 || mm.max > MAX_Q)
cdoWarning("Input humidity at level %d out of range (min=%g max=%g)!", levelID + 1, mm.min, mm.max);
}
}
......
......@@ -82,20 +82,19 @@ Gengrid(void *process)
gridDefDatatype(gridID3, (datatype == CDI_DATATYPE_FLT64) ? CDI_DATATYPE_FLT64 : CDI_DATATYPE_FLT32);
const auto xminmax = varrayMinMax(array1);
const auto yminmax = varrayMinMax(array2);
const auto xmm = varrayMinMax(array1);
const auto ymm = varrayMinMax(array2);
if (Options::cdoVerbose)
cdoPrint("xminval = %g, xmaxval = %g, yminval = %g, ymaxval = %g", xminmax.first, xminmax.second, yminmax.first,
yminmax.second);
cdoPrint("xminval = %g, xmaxval = %g, yminval = %g, ymaxval = %g", xmm.min, xmm.max, ymm.min, ymm.max);
/* check units */
if (xminmax.first > -4 && xminmax.second < 8 && yminmax.first > -2 && yminmax.second < 2)
if (xmm.min > -4 && xmm.max < 8 && ymm.min > -2 && ymm.max < 2)
{
gridDefXunits(gridID3, "radians");
gridDefYunits(gridID3, "radians");
}
else if (xminmax.first > -181 && xminmax.second < 361 && yminmax.first > -91 && yminmax.second < 91)
else if (xmm.min > -181 && xmm.max < 361 && ymm.min > -91 && ymm.max < 91)
{
/* default is degrees */
}
......
......@@ -1044,22 +1044,22 @@ read_dataset(hid_t loc_id, const char *name, void *opdata)
nmiss = 0;
const auto minmax = varrayMinMax(gridsize * nt, array);
const auto mm = varrayMinMax(gridsize * nt, array);
if (Options::cdoVerbose)
cdoPrint("Dataset %s: missval = %g addoffset = %g scalefactor = %g", varname, missval, addoffset, scalefactor);
if (Options::cdoVerbose)
cdoPrint("Dataset %s: dtype = %d minval = %g maxval = %g missval = %g", varname, dtype, minmax.first, minmax.second,
cdoPrint("Dataset %s: dtype = %d minval = %g maxval = %g missval = %g", varname, dtype, mm.min, mm.max,
missval);
if (dtype == CDI_DATATYPE_UINT8)
{
if (minmax.first >= 0 && minmax.second <= 127) dtype = CDI_DATATYPE_INT8;
if (mm.min >= 0 && mm.max <= 127) dtype = CDI_DATATYPE_INT8;
}
else if (dtype == CDI_DATATYPE_UINT16)
{
if (minmax.first >= 0 && minmax.second <= 32767) dtype = CDI_DATATYPE_INT16;
if (mm.min >= 0 && mm.max <= 32767) dtype = CDI_DATATYPE_INT16;
}
laddoffset = IS_NOT_EQUAL(addoffset, 0);
......@@ -1473,12 +1473,12 @@ Importcmsaf(void *process)
array = dsets.obj[ivar].array + offset;
size_t nvals;
const auto minmax = varrayMinMaxMV(gridsize, array, missval, nvals);
const auto mm = varrayMinMaxMV(gridsize, array, missval, nvals);
nmiss = gridsize - nvals;
if (Options::cdoVerbose)
cdoPrint(" Write var %d, level %d, nmiss %zu, missval %g, minval %g, maxval %g", varID, levelID, nmiss, missval,
minmax.first, minmax.second);
mm.min, mm.max);
cdoDefRecord(streamID, varID, levelID);
cdoWriteRecord(streamID, array, nmiss);
......
......@@ -256,9 +256,9 @@ magplot(const char *plotfile, int operatorID, const char *varname, const char *u
if (Options::cdoVerbose) cdoPrint("nlon: %zu nlat: %zu", nlon, nlat);
if (Options::cdoVerbose) cdoPrint("dlon: %g dlat: %g", dlon, dlat);
auto minmax = nmiss ? varrayMinMaxMV(nlon * nlat, array, missval) : varrayMinMax(nlon * nlat, array);
auto mm = nmiss ? varrayMinMaxMV(nlon * nlat, array, missval) : varrayMinMax(nlon * nlat, array);
if (Options::cdoVerbose) cdoPrint("min: %g max: %g", minmax.first, minmax.second);
if (Options::cdoVerbose) cdoPrint("min: %g max: %g", mm.min, mm.max);
if (Options::cdoVerbose) cdoPrint("input_field_organization: %s", lregular ? "REGULAR" : "NONREGULAR");
mag_setc("output_name", plotfilename);
......@@ -268,8 +268,8 @@ magplot(const char *plotfile, int operatorID, const char *varname, const char *u
mag_set2r("input_field", array.data(), nlon, nlat);
mag_setr("input_field_suppress_below", minmax.first);
mag_setr("input_field_suppress_above", minmax.second);
mag_setr("input_field_suppress_below", mm.min);
mag_setr("input_field_suppress_above", mm.max);
if (lregular)
{
......
......@@ -162,7 +162,6 @@ maskregion(std::vector<bool> &mask, const int gridID, const Varray<double> &xcoo
const auto nlat = gridInqYsize(gridID);
Varray<double> xvals(nlon), yvals(nlat);
gridInqXvals(gridID, &xvals[0]);
gridInqYvals(gridID, &yvals[0]);
......@@ -175,18 +174,18 @@ maskregion(std::vector<bool> &mask, const int gridID, const Varray<double> &xcoo
grid_to_degree(units, nlat, &yvals[0], "grid center lat");
}
const auto xminmax = varrayMinMax(xvals);
const auto yminmax = varrayMinMax(yvals);
const auto xmm = varrayMinMax(xvals);
const auto ymm = varrayMinMax(yvals);
for (size_t ilat = 0; ilat < nlat; ilat++)
{
double yval = yvals[ilat];
auto yval = yvals[ilat];
for (size_t ilon = 0; ilon < nlon; ilon++)
{
size_t i, j;
int c = 0;
const auto xval = xvals[ilon];
if (!(((xval > xminmax.first) || (xval < xminmax.second)) || ((yval > yminmax.first) || (yval < yminmax.second)))) c = !c;
if (!(((xval > xmm.min) || (xval < xmm.max)) || ((yval > ymm.min) || (yval < ymm.max)))) c = !c;
if (c == 0)
{
......
......@@ -48,8 +48,8 @@ outputarr(int dig, size_t gridsize, Varray<double> &array)
static void
outputsp(size_t gridsize, Varray<double> &array, long ntr)
{
const auto minmax = varrayMinMax(gridsize, array);
if (/* T11 */ minmax.first >= -1 && minmax.second <= 12)
const auto mm = varrayMinMax(gridsize, array);
if (/* T11 */ mm.min >= -1 && mm.max <= 12)
{
double *spc = array.data();
for (long m = 0; m <= ntr; m++)
......
......@@ -159,7 +159,7 @@ output_boundscpt(double value, double missval, const CPT &cpt)
static void
output_vrml(int nlon, int nlat, int ngp, const Varray<double> &array, double missval, const CPT &cpt)
{
const auto minmax = varrayMinMaxMV(ngp, array, missval);
const auto mm = varrayMinMaxMV(ngp, array, missval);
double dx = 10. / nlon;
......@@ -248,7 +248,7 @@ output_vrml(int nlon, int nlat, int ngp, const Varray<double> &array, double mis
printf(" ]\n");
printf(" translation -5 0 %g\n", -5. * nlat / nlon);
printf(" rotation 0.0 0.0 0.0 0.0\n");
printf(" scale 1.0 %g 1.0\n", 0.5 / (minmax.second - minmax.first));
printf(" scale 1.0 %g 1.0\n", 0.5 / (mm.max - mm.min));
printf("}\n");
}
......@@ -548,11 +548,9 @@ Outputgmt(void *process)
{
if (Options::cdoVerbose)
{
const auto minmax = varrayMinMaxMV(gridsize, array, missval);
const auto minval = minmax.first;
const auto maxval = minmax.second;
const auto range = maxval - minval;
fprintf(stderr, "makecpt -T%g/%g/%g -Crainbow > gmt.cpt\n", minval, maxval, range / 20);
const auto mm = varrayMinMaxMV(gridsize, array, missval);
const auto range = mm.max - mm.min;
fprintf(stderr, "makecpt -T%g/%g/%g -Crainbow > gmt.cpt\n", mm.min, mm.max, range / 20);
fprintf(stderr, "pscontour -K -JQ0/10i -Rd -I -Cgmt.cpt data.gmt > gmtplot.ps\n");
fprintf(stderr, "pscoast -O -J -R -Dc -W -B40g20 >> gmtplot.ps\n");
}
......@@ -646,11 +644,9 @@ Outputgmt(void *process)
{
if (Options::cdoVerbose)
{
const auto minmax = varrayMinMaxMV(gridsize, array, missval);
const auto minval = minmax.first;
const auto maxval = minmax.second;
const auto range = maxval - minval;
fprintf(stderr, "makecpt -T%g/%g/%g -Crainbow > gmt.cpt\n", minval, maxval, range / 20);
const auto mm = varrayMinMaxMV(gridsize, array, missval);
const auto range = mm.max - mm.min;
fprintf(stderr, "makecpt -T%g/%g/%g -Crainbow > gmt.cpt\n", mm.min, mm.max, range / 20);
fprintf(stderr, "psxy -K -JQ0/10i -Rd -L -Cgmt.cpt -m data.gmt > gmtplot.ps\n");
// fprintf(stderr, "psxy -K -Jx0.028id -Rd -L -Cgmt.cpt -m
// data.gmt > gmtplot.ps\n"); fprintf(stderr, "psxy -K
......
......@@ -160,10 +160,10 @@ Pack(void *process)
const auto nmiss = vars[tsID][varID][levelID].nmiss;
if (nmiss) nmisspv += nmiss;
auto minmax = nmiss ? varrayMinMaxMV(gridsize, array, missval1) : varrayMinMax(gridsize, array);
auto mm = nmiss ? varrayMinMaxMV(gridsize, array, missval1) : varrayMinMax(gridsize, array);
fmin = std::min(fmin, minmax.first);
fmax = std::max(fmax, minmax.second);
fmin = std::min(fmin, mm.min);
fmax = std::max(fmax, mm.max);
}
}
......
......@@ -255,9 +255,9 @@ Pressure(void *process)
varrayCopy(gridsize, array, ps_prog);
// check range of ps_prog
const auto minmax = varrayMinMax(ps_prog);
if (minmax.first < MIN_PS || minmax.second > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", minmax.first, minmax.second);
const auto mm = varrayMinMax(ps_prog);
if (mm.min < MIN_PS || mm.max > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", mm.min, mm.max);
presh(full_press.data(), half_press.data(), vct.data(), ps_prog.data(), nhlevf, gridsize);
}
......
......@@ -379,9 +379,9 @@ Vertintap(void *process)
}
// check range of ps_prog
const auto minmax = fieldMinMax(ps_prog);
if (minmax.first < MIN_PS || minmax.second > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", minmax.first, minmax.second);
const auto mm = fieldMinMax(ps_prog);
if (mm.min < MIN_PS || mm.max > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g)!", mm.min, mm.max);
fieldCopy(vardata1[apressID], full_press);
......
......@@ -479,13 +479,13 @@ Vertintml(void *process)
// check range of surface geopot
if (extrapolate && (sgeopotID != -1 || geopotID != -1))
{
const auto minmax = fieldMinMax(sgeopot);
if (minmax.first < MIN_FIS || minmax.second > MAX_FIS)
cdoWarning("Surface geopotential out of range (min=%g max=%g) [timestep:%d]!", minmax.first, minmax.second,
const auto mm = fieldMinMax(sgeopot);
if (mm.min < MIN_FIS || mm.max > MAX_FIS)
cdoWarning("Surface geopotential out of range (min=%g max=%g) [timestep:%d]!", mm.min, mm.max,
tsID + 1);
if (gridsize > 1 && minmax.first >= 0 && minmax.second <= 9000 && IS_NOT_EQUAL(minmax.first, minmax.second))
cdoWarning("Surface geopotential has an unexpected range (min=%g max=%g) [timestep:%d]!", minmax.first,
minmax.second, tsID + 1);
if (gridsize > 1 && mm.min >= 0 && mm.max <= 9000 && IS_NOT_EQUAL(mm.min, mm.max))
cdoWarning("Surface geopotential has an unexpected range (min=%g max=%g) [timestep:%d]!", mm.min,
mm.max, tsID + 1);
}
}
......@@ -500,9 +500,9 @@ Vertintml(void *process)
fieldCopy(vardata1[presID], ps_prog);
// check range of ps_prog
const auto minmax = fieldMinMax(ps_prog);
if (minmax.first < MIN_PS || minmax.second > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g) [timestep:%d]!", minmax.first, minmax.second, tsID + 1);
const auto mm = fieldMinMax(ps_prog);
if (mm.min < MIN_PS || mm.max > MAX_PS)
cdoWarning("Surface pressure out of range (min=%g max=%g) [timestep:%d]!", mm.min, mm.max, tsID + 1);
if (memtype == MemType::Float)
presh(full_press.vec_f.data(), half_press.vec_f.data(), vct.data(), ps_prog.vec_f.data(), nhlevf, gridsize);
......
......@@ -45,7 +45,7 @@ fpe_errstr(int fpeRaised)
return errstr;
}
MinMaxVal
MinMax
varrayMinMaxMV(const size_t len, const double *array, const double missval, size_t &nvals)
{
double vmin = DBL_MAX;
......@@ -62,17 +62,17 @@ varrayMinMaxMV(const size_t len, const double *array, const double missval, size
}
}
return MinMaxVal(vmin, vmax);
return MinMax(vmin, vmax);
}
MinMaxVal
MinMax
varrayMinMaxMV(const size_t len, const double *array, const double missval)
{
size_t nvals;
return varrayMinMaxMV(len, array, missval, nvals);
}
MinMaxVal
MinMax
varrayMinMaxMV(const size_t len, const Varray<double> &array, const double missval)
{
size_t nvals;
......@@ -278,7 +278,7 @@ varrayNumMV(const size_t len, const Varray<T> &array, const T missval)
template size_t varrayNumMV(const size_t len, const Varray<float> &array, const float missval);
template size_t varrayNumMV(const size_t len, const Varray<double> &array, const double missval);
MinMaxVal
MinMax
varrayMinMax(const size_t len, const double *restrict array)
{
double vmin = DBL_MAX;
......@@ -293,17 +293,17 @@ varrayMinMax(const size_t len, const double *restrict array)
if (array[i] > vmax) vmax = array[i];
}
return MinMaxVal(vmin, vmax);
return MinMax(vmin, vmax);
}
MinMaxVal
MinMax
varrayMinMax(const size_t len, const Varray<double> &v)
{
return varrayMinMax(len, v.data());
}
template <typename T>
MinMaxVal
MinMax
varrayMinMax(const Varray<T> &v)
{
double vmin = DBL_MAX;
......@@ -319,12 +319,12 @@ varrayMinMax(const Varray<T> &v)
if (v[i] > vmax) vmax = v[i];
}
return MinMaxVal(vmin, vmax);
return MinMax(vmin, vmax);
}
// Explicit instantiation
template MinMaxVal varrayMinMax(const Varray<float> &v);
template MinMaxVal varrayMinMax(const Varray<double> &v);
template MinMax varrayMinMax(const Varray<float> &v);
template MinMax varrayMinMax(const Varray<double> &v);
double
varrayMin(const size_t len, const Varray<double> &v)
......
......@@ -22,41 +22,33 @@
#include <cfloat>
#include "compare.h"
/*
struct MinMax
{
double min;
double max;
size_t n;
MinMaxSum() : min(DBL_MAX), max(-DBL_MAX), n(0) {};
MinMaxSum(double rmin, double rmax, size_t rn) : min(rmin), max(rmax), n(rn) {};
MinMaxSum(double rmin, double rmax) : min(rmin), max(rmax) {};
MinMax() : min(DBL_MAX), max(-DBL_MAX), n(0) {};
MinMax(double rmin, double rmax, size_t rn) : min(rmin), max(rmax), n(rn) {};
MinMax(double rmin, double rmax) : min(rmin), max(rmax), n(0) {};
};
*/
struct MinMaxSum
struct MinMaxSum : MinMax
{
double min;
double max;
double sum;
size_t n;
MinMaxSum() : min(DBL_MAX), max(-DBL_MAX), sum(0), n(0) {};
MinMaxSum(double rmin, double rmax, double rsum, size_t rn) : min(rmin), max(rmax), sum(rsum), n(rn) {};
MinMaxSum(double rmin, double rmax, double rsum) : min(rmin), max(rmax), sum(rsum) {};
MinMaxSum() : sum(0) {};
MinMaxSum(double rmin, double rmax, double rsum, size_t rn) : sum(rsum) { min = rmin; max = rmax; n = rn; };
MinMaxSum(double rmin, double rmax, double rsum) : sum(rsum) { min = rmin; max = rmax; n = 0; };
};
struct MinMaxMean
struct MinMaxMean : MinMax
{
double min;
double max;
double mean;
size_t n;
MinMaxMean() : min(DBL_MAX), max(-DBL_MAX), mean(0), n(0) {};
MinMaxMean(double rmin, double rmax, double rmean, size_t rn) : min(rmin), max(rmax), mean(rmean), n(rn) {};
MinMaxMean(double rmin, double rmax, double rmean) : min(rmin), max(rmax), mean(rmean) {};
MinMaxMean() : mean(0) {};
MinMaxMean(double rmin, double rmax, double rmean, size_t rn) : mean(rmean) { min = rmin; max = rmax; n = rn; };
MinMaxMean(double rmin, double rmax, double rmean) : mean(rmean) { min = rmin; max = rmax; n = 0; };
};
using MinMaxVal = std::pair<double, double>;
template <typename T>
using Varray = std::vector<T>;
......@@ -203,15 +195,15 @@ size_t arrayNumMV(size_t len, const double *array, double missval);
template <typename T>
size_t varrayNumMV(size_t len, const Varray<T> &array, T missval);
MinMaxVal varrayMinMax(size_t len, const Varray<double> &v);
MinMaxVal varrayMinMax(size_t len, const double *array);
MinMax varrayMinMax(size_t len, const Varray<double> &v);
MinMax varrayMinMax(size_t len, const double *array);
template <typename T>
MinMaxVal varrayMinMax(const Varray<T> &v);
MinMax varrayMinMax(const Varray<T> &v);
MinMaxVal varrayMinMaxMV(size_t len, const Varray<double> &array, double missval);
MinMaxVal varrayMinMaxMV(size_t len, const double *array, double missval);
MinMaxVal varrayMinMaxMV(size_t len, const double *array, double missval, size_t &nvals);
MinMax varrayMinMaxMV(size_t len, const Varray<double> &array, double missval);
MinMax varrayMinMaxMV(size_t len, const double *array, double missval);
MinMax varrayMinMaxMV(size_t len, const double *array, double missval, size_t &nvals);
double varrayMin(size_t len, const Varray<double> &v);
double varrayMax(size_t len, const Varray<double> &v);
......
......@@ -35,13 +35,13 @@ struct Datarange
checkDatarange(double *array, size_t nmiss)
{
size_t ivals = 0;
auto minmax = nmiss ? varrayMinMaxMV(gridsize, array, missval, ivals) : varrayMinMax(gridsize, array);
auto mm = nmiss ? varrayMinMaxMV(gridsize, array, missval, ivals) : varrayMinMax(gridsize, array);
if (nmiss == 0) ivals = gridsize;
if (ivals > 0)
{
auto smin = (minmax.first - addoffset) / scalefactor;
auto smax = (minmax.second - addoffset) / scalefactor;
auto smin = (mm.min - addoffset) / scalefactor;
auto smax = (mm.max - addoffset) / scalefactor;
if (datatype == CDI_DATATYPE_INT8 || datatype == CDI_DATATYPE_UINT8 || datatype == CDI_DATATYPE_INT16
|| datatype == CDI_DATATYPE_UINT16)
......
......@@ -198,7 +198,7 @@ fieldNumMV(Field &field)
return field.nmiss;
}
MinMaxVal
MinMax
fieldMinMax(Field &field)
{
if (field.memType == MemType::Float)
......
......@@ -93,7 +93,7 @@ void fieldCopy(const Field3D &field_src, int levelID, Field &field_tgt);
void fieldAdd(Field &field1, const Field3D &field2, int levelID);
size_t fieldNumMiss(const Field &field);
size_t fieldNumMV(Field &field);
MinMaxVal fieldMinMax(Field &field);
MinMax fieldMinMax(Field &field);
// fieldmem.cc
void fieldsFromVlist(int vlistID, FieldVector2D &field2D);
......
......@@ -167,8 +167,8 @@ print_xyvals2D(int gridID, int dig)
gridInqXvals(gridID, xvals2D.data());
gridInqYvals(gridID, yvals2D.data());
const auto xminmax = varrayMinMax(gridsize, xvals2D);
const auto yminmax = varrayMinMax(gridsize, yvals2D);
const auto xmm = varrayMinMax(gridsize, xvals2D);
const auto ymm = varrayMinMax(gridsize, yvals2D);
double xinc = 0, yinc = 0;
int gridtype = gridInqType(gridID);
......@@ -222,14 +222,14 @@ print_xyvals2D(int gridID, int dig)
}
}
fprintf(stdout, "%33s : %.*g", xname, dig, xminmax.first);
if (gridsize > 1) fprintf(stdout, " to %.*g", dig, xminmax.second);
fprintf(stdout, "%33s : %.*g", xname, dig, xmm.min);
if (gridsize > 1) fprintf(stdout, " to %.*g", dig, xmm.max);
if (IS_NOT_EQUAL(xinc, 0)) fprintf(stdout, " by %.*g", dig, xinc);
fprintf(stdout, " %s", xunits);
if (gridIsCircular(gridID)) fprintf(stdout, " circular");
fprintf(stdout, "\n");
fprintf(stdout, "%33s : %.*g", yname, dig, yminmax.first);
if (gridsize > 1) fprintf(stdout, " to %.*g", dig, yminmax.second);
fprintf(stdout, "%33s : %.*g", yname, dig, ymm.min);
if (gridsize > 1) fprintf(stdout, " to %.*g", dig, ymm.max);
if (IS_NOT_EQUAL(yinc, 0)) fprintf(stdout, " by %.*g", dig, yinc);
fprintf(stdout, " %s", yunits);
fprintf(stdout, "\n");
......
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