Skip to content

Commit

Permalink
Per #2232, switch from making the VAR# strings 0-based to 1-based. So…
Browse files Browse the repository at this point in the history
… start with VAR1 instead of VAR0. That is more consistent with naming/numbering conventions used by the METplus wrappers.
  • Loading branch information
MET Tools Test Account committed Oct 28, 2022
1 parent 4dbeb11 commit 3da9e9a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/basic/vx_config/config.tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ yyparse (void)

YYDPRINTF ((stderr, "Starting parse\n"));

yystate = 8;
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
Expand Down
26 changes: 13 additions & 13 deletions src/tools/other/grid_diag/grid_diag.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void process_series(void) {
// Process the 1d histograms
for(int i_var=0; i_var<conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

Expand Down Expand Up @@ -347,13 +347,13 @@ void process_series(void) {
// Process the 2d joint histograms
for(int i_var=0; i_var<conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

for(int j_var=i_var+1; j_var<conf_info.get_n_data(); j_var++) {

j_var_str << cs_erase << "VAR" << j_var;
j_var_str << cs_erase << "VAR" << j_var+1;

VarInfo *joint_info = conf_info.data_info[j_var];

Expand Down Expand Up @@ -406,7 +406,7 @@ void setup_histograms(void) {

for(int i_var=0; i_var<conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

Expand Down Expand Up @@ -462,14 +462,14 @@ void setup_joint_histograms(void) {

for(int i_var=0; i_var<conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];
int n_bins = data_info->n_bins();

for(int j_var=i_var+1; j_var<conf_info.get_n_data(); j_var++) {

j_var_str << cs_erase << "VAR" << j_var;
j_var_str << cs_erase << "VAR" << j_var+1;

VarInfo *joint_info = conf_info.data_info[j_var];
int n_joint_bins = joint_info->n_bins();
Expand Down Expand Up @@ -532,7 +532,7 @@ void setup_nc_file(void) {

for(int i_var=0; i_var < conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

Expand Down Expand Up @@ -587,7 +587,7 @@ void setup_nc_file(void) {
// Define histograms
for(int i_var=0; i_var < conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

Expand Down Expand Up @@ -616,13 +616,13 @@ void setup_nc_file(void) {
// Define joint histograms
for(int i_var=0; i_var < conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];

for(int j_var=i_var+1; j_var<conf_info.get_n_data(); j_var++) {

j_var_str << cs_erase << "VAR" << j_var;
j_var_str << cs_erase << "VAR" << j_var+1;

VarInfo *joint_info = conf_info.data_info[j_var];

Expand Down Expand Up @@ -696,7 +696,7 @@ void write_histograms(void) {

for(int i_var=0; i_var < conf_info.get_n_data(); i_var++) {

i_var_str << cs_erase << "VAR" << i_var;
i_var_str << cs_erase << "VAR" << i_var+1;

VarInfo *data_info = conf_info.data_info[i_var];
NcVar hist_var = hist_vars[i_var];
Expand Down Expand Up @@ -724,8 +724,8 @@ void write_joint_histograms(void) {
VarInfo *joint_info = conf_info.data_info[j_var];

ij_var_str << cs_erase
<< "VAR" << i_var << "_"
<< "VAR" << j_var;
<< "VAR" << i_var+1 << "_"
<< "VAR" << j_var+1;

long long *hist = joint_histograms[ij_var_str].data();

Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_gen/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tc_gen_LDADD = -lvx_stat_out \
-lvx_statistics \
-lvx_gis \
-lvx_data2d \
-lvx_seeps \
-lvx_seeps \
-lvx_nc_util \
-lvx_regrid \
-lvx_grid \
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_gen/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ tc_gen_LDADD = -lvx_stat_out \
-lvx_statistics \
-lvx_gis \
-lvx_data2d \
-lvx_seeps \
-lvx_seeps \
-lvx_nc_util \
-lvx_regrid \
-lvx_grid \
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_stat/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tc_stat_LDADD = -lvx_stat_out \
-lvx_data2d_nccf \
-lvx_statistics \
-lvx_data2d \
-lvx_seeps \
-lvx_seeps \
-lvx_nc_util \
-lvx_regrid \
-lvx_grid \
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_stat/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ tc_stat_LDADD = -lvx_stat_out \
-lvx_data2d_nccf \
-lvx_statistics \
-lvx_data2d \
-lvx_seeps \
-lvx_seeps \
-lvx_nc_util \
-lvx_regrid \
-lvx_grid \
Expand Down

0 comments on commit 3da9e9a

Please sign in to comment.