Go to the documentation of this file.
10 #define SCALED_NCVAR_H
12 #define DEFAULT_SENSOR 30 // OCI
32 void getVar(
float *dataValues);
39 void getVar(
double *dataValues);
45 void getVar(std::vector<size_t>
start, std::vector<size_t>
count,
float *dataValues);
51 void getVar(std::vector<size_t>
start, std::vector<size_t>
count,
double *dataValues);
57 void putVar(
const float *dataValues);
63 void putVar(
const double *dataValues);
69 void putVar(std::vector<size_t>
start, std::vector<size_t>
count,
const float *dataValues);
75 void putVar(std::vector<size_t>
start, std::vector<size_t>
count,
const double *dataValues);
114 void setProdInfo(productInfo_t* prodInfo) { this->prodInfo = prodInfo; }
121 bool scaleFactorsSet =
false;
123 double scaleFactor = 1.0;
125 double addOffset = 0.0;
131 productInfo_t *prodInfo =
nullptr;
137 bool floatingPoint();
146 void compress(
const double *toCompress, std::vector<int32_t> &compressed,
size_t count);
155 void compress(
const float *toCompress, std::vector<int32_t> &compressed,
size_t count);
164 void uncompress(
double *toUncompress,
size_t count);
173 void uncompress(
float *toUncompress,
size_t count);
180 template <
typename T>
188 template <
typename T,
typename E>
189 void badToFill(
const T *
data,
const size_t &
count, std::vector<E> &compressed);
194 void getScaleFactorsFromFile();
200 double initFillValue();
206 std::pair<double, double> range();
netCDF::NcType::ncType thisVarType
productInfo_t * getProductInfo()
void getFillValue(double *fillValue)
Get the fill value of this NcVar.
ScaledNcVar(const NcVar &copied)
void getVar(float *dataValues)
Takes in a pointer whose memory will be modified. Assumes values found there are integers and perform...
void assignFillValue(double newValue)
Reassign the fill value.
ScaledNcVar newScaledNcVar(const netCDF::NcGroup &group, const std::string &name, const std::vector< netCDF::NcDim > &dims, int sensorID=DEFAULT_SENSOR)
Create a ScaledNcVar using the product.xml for definition.
#define DEFAULT_SENSOR
An extension of NetCDF::NcVar to perform scale and offset when getting a variable.
void setScaleFactors(double scale, double offset, double fillValue=BAD_FLT)
Populate scale factor and add offset manually. Throws an invalid_argument
void putVar(const float *dataValues)
put an entire variable
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
void assignBadValue(double newValue)
Reassign the value of badValue.
bool populateScaleFactors(int sensorID=DEFAULT_SENSOR)
Populate scale factor and add offset from product.xml. Assumes default sensor (30 == OCI)
void setProdInfo(productInfo_t *prodInfo)
int32_t sensorID[MAXNFILES]