Skip to content

Commit

Permalink
#1996 call missing var->getVar
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Dec 29, 2021
1 parent 2e48bfa commit cd1f7c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions met/src/libcode/vx_nc_util/nc_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ bool get_att_value(const NcAtt *att, double &att_val) {
int get_att_value_int(const NcAtt *att) {
int value = bad_data_int;
static const char *method_name = "get_att_value_int(NcAtt) -> ";

if (IS_INVALID_NC_P(att)) return value;

switch (att->getType().getId()) {
case NC_BYTE:
ncbyte b_value;
Expand Down Expand Up @@ -221,15 +224,15 @@ bool get_att_value_chars(const NcAtt *att, ConcatString &value) {

long long get_att_value_llong(const NcAtt *att) {
long long value = bad_data_int;
att->getValues(&value);
if (IS_VALID_NC_P(att)) att->getValues(&value);
return value;
}

////////////////////////////////////////////////////////////////////////

double get_att_value_double(const NcAtt *att) {
double value = bad_data_double;
att->getValues(&value);
if (IS_VALID_NC_P(att)) att->getValues(&value);
return value;
}

Expand Down Expand Up @@ -1658,6 +1661,8 @@ bool get_nc_data(NcVar *var, float *data) {
fill_value = get_att_value_char(att_fill_value);
}

var->getVar(packed_data);

if (unsigned_value) {
int value;
int positive_cnt = 0;
Expand Down

0 comments on commit cd1f7c9

Please sign in to comment.