Skip to content

Commit

Permalink
Remove CTRACK macro and include
Browse files Browse the repository at this point in the history
  • Loading branch information
bikegeek committed Jan 28, 2025
1 parent 3883c90 commit 20afb42
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
24 changes: 0 additions & 24 deletions src/tools/core/grid_stat/grid_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@
#include "vx_log.h"
#include "seeps.h"

#include "ctrack.hpp"

#ifdef WITH_UGRID
#include "vx_data2d_ugrid.h"
#endif
Expand Down Expand Up @@ -219,9 +217,6 @@ int met_main(int argc, char *argv[]) {
// Compute the scores and write them out
process_scores();

// Write out the CTRACK metrics
ctrack::result_print();

// Close the text files and deallocate memory
clean_up();

Expand All @@ -238,7 +233,6 @@ const string get_tool_name()
////////////////////////////////////////////////////////////////////////

void process_command_line(int argc, char **argv) {
CTRACK;
CommandLine cline;
GrdFileType ftype, otype;
ConcatString default_config_file;
Expand Down Expand Up @@ -405,7 +399,6 @@ void process_command_line(int argc, char **argv) {
////////////////////////////////////////////////////////////////////////

void setup_first_pass(const DataPlane &dp) {
CTRACK;

// Unset the flag
is_first_pass = false;
Expand All @@ -431,7 +424,6 @@ void setup_first_pass(const DataPlane &dp) {
////////////////////////////////////////////////////////////////////////

void setup_txt_files(unixtime valid_ut, int lead_sec) {
CTRACK;
int i, max_col, max_prob_col, max_mctc_col, n_prob, n_cat, n_eclv;
ConcatString base_name;

Expand Down Expand Up @@ -581,7 +573,6 @@ void setup_txt_files(unixtime valid_ut, int lead_sec) {
////////////////////////////////////////////////////////////////////////

void setup_table(AsciiTable &at) {
CTRACK;


// Justify the STAT AsciiTable objects
Expand All @@ -606,7 +597,6 @@ void setup_table(AsciiTable &at) {

void setup_nc_file(const GridStatNcOutInfo & nc_info,
unixtime valid_ut, int lead_sec) {
CTRACK;

// Create output NetCDF file name
build_outfile_name(valid_ut, lead_sec, "_pairs.nc", out_nc_file);
Expand Down Expand Up @@ -650,7 +640,6 @@ void setup_nc_file(const GridStatNcOutInfo & nc_info,
void build_outfile_name(unixtime valid_ut, int lead_sec,
const char *suffix, ConcatString &str) {

CTRACK;
//
// Create output file name
//
Expand All @@ -676,7 +665,6 @@ void build_outfile_name(unixtime valid_ut, int lead_sec,
////////////////////////////////////////////////////////////////////////

void process_scores() {
CTRACK;
int i, j, k, m, n;
int n_cat, n_wind, n_cov;
double dmin, dmax;
Expand Down Expand Up @@ -2094,7 +2082,6 @@ void get_mask_points(const GridStatVxOpt &vx_opt,
const DataPlane *ocmn_ptr, const DataPlane *ocsd_ptr,
const DataPlane *wgt_ptr, PairDataPoint &pd) {

CTRACK;
// Initialize
pd.erase();

Expand Down Expand Up @@ -2126,7 +2113,6 @@ void get_mask_points(const GridStatVxOpt &vx_opt,

void do_cts(CTSInfo *&cts_info, int i_vx,
const PairDataPoint *pd_ptr) {
CTRACK;
int i, j, n_cts;

//
Expand Down Expand Up @@ -2173,7 +2159,6 @@ void do_cts(CTSInfo *&cts_info, int i_vx,

void do_mcts(MCTSInfo &mcts_info, int i_vx,
const PairDataPoint *pd_ptr) {
CTRACK;
int i;

//
Expand Down Expand Up @@ -2222,7 +2207,6 @@ void do_mcts(MCTSInfo &mcts_info, int i_vx,
////////////////////////////////////////////////////////////////////////

void do_cnt_sl1l2(const GridStatVxOpt &vx_opt, const PairDataPoint *pd_ptr) {
CTRACK;
int i, j, k, n_bin;
PairDataPoint pd_thr, pd;
SL1L2Info *sl1l2_info = (SL1L2Info *) nullptr;
Expand Down Expand Up @@ -2415,7 +2399,6 @@ void do_cnt_sl1l2(const GridStatVxOpt &vx_opt, const PairDataPoint *pd_ptr) {
void do_vl1l2(VL1L2Info *&v_info, int i_vx,
const PairDataPoint *pd_u_ptr,
const PairDataPoint *pd_v_ptr) {
CTRACK;
int i, j;

mlog << Debug(2)
Expand Down Expand Up @@ -2461,7 +2444,6 @@ void do_vl1l2(VL1L2Info *&v_info, int i_vx,
////////////////////////////////////////////////////////////////////////

void do_pct(const GridStatVxOpt &vx_opt, const PairDataPoint *pd_ptr) {
CTRACK;
int i, j, k, n_bin;
PairDataPoint pd;
PCTInfo *pct_info = (PCTInfo *) nullptr;
Expand Down Expand Up @@ -2585,7 +2567,6 @@ void do_pct(const GridStatVxOpt &vx_opt, const PairDataPoint *pd_ptr) {
void do_nbrcts(NBRCTSInfo *&nbrcts_info,
int i_vx, int i_wdth, int i_thresh,
const PairDataPoint *pd_ptr) {
CTRACK;
int i, j, n_nbrcts;
FieldType field = conf_info.vx_opt[i_vx].nbrhd_info.field;

Expand Down Expand Up @@ -2662,7 +2643,6 @@ void do_nbrcnt(NBRCNTInfo &nbrcnt_info,
int i_vx, int i_wdth, int i_thresh,
const PairDataPoint *pd_ptr,
const PairDataPoint *pd_thr_ptr) {
CTRACK;
int i;
FieldType field = conf_info.vx_opt[i_vx].nbrhd_info.field;

Expand Down Expand Up @@ -2723,7 +2703,6 @@ void do_nbrcnt(NBRCNTInfo &nbrcnt_info,
void write_nc(const ConcatString &field_name, const DataPlane &dp,
int i_vx, const ConcatString &interp_mthd,
int interp_pnts, FieldType field_type) {
CTRACK;
int i, x, y, n, n_masks;
ConcatString var_name, var_suffix, interp_str, mask_str;
ConcatString fcst_name, obs_name, fcst_obs_name;
Expand Down Expand Up @@ -3052,7 +3031,6 @@ void write_nc(const ConcatString &field_name, const DataPlane &dp,
void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp,
int i_vx, const SingleThresh &fcst_st,
const SingleThresh &obs_st, int i_mask, int wdth) {
CTRACK;
int n, x, y;
int fcst_flag, obs_flag;
ConcatString fcst_var_name, obs_var_name, var_suffix, mask_str;
Expand Down Expand Up @@ -3215,7 +3193,6 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp,

void add_var_att_local(NcVar *var, const char *att_name,
const ConcatString att_value) {
CTRACK;

if(att_value.nonempty()) add_att(var, att_name, att_value.c_str());
else add_att(var, att_name, na_str);
Expand All @@ -3226,7 +3203,6 @@ void add_var_att_local(NcVar *var, const char *att_name,
////////////////////////////////////////////////////////////////////////

void finish_txt_files() {
CTRACK;
int i;

// Write out the contents of the STAT AsciiTable and
Expand Down
9 changes: 0 additions & 9 deletions src/tools/core/grid_stat/grid_stat_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "vx_data2d_factory.h"
#include "vx_log.h"

#include "ctrack.hpp"

using namespace std;

Expand Down Expand Up @@ -102,7 +101,6 @@ void GridStatConfInfo::clear() {

void GridStatConfInfo::read_config(const char *default_file_name,
const char *user_file_name) {
CTRACK;

// Read the config file constants
conf.read(replace_path(config_const_filename).c_str());
Expand All @@ -120,7 +118,6 @@ void GridStatConfInfo::read_config(const char *default_file_name,

#ifdef WITH_UGRID
void GridStatConfInfo::read_ugrid_configs(StringArray ugrid_config_names, const char * user_config) {
CTRACK;

ConcatString file_name;
for (int i=0; i<ugrid_config_names.n_elements(); i++) {
Expand All @@ -143,7 +140,6 @@ void GridStatConfInfo::read_ugrid_configs(StringArray ugrid_config_names, const

void GridStatConfInfo::process_config(GrdFileType ftype,
GrdFileType otype) {
CTRACK;
int i, j, n_fvx, n_ovx;
Dictionary *fdict = (Dictionary *) nullptr;
Dictionary *odict = (Dictionary *) nullptr;
Expand Down Expand Up @@ -336,7 +332,6 @@ void GridStatConfInfo::process_config(GrdFileType ftype,
////////////////////////////////////////////////////////////////////////

void GridStatConfInfo::process_flags() {
CTRACK;

// Initialize
for(int i=0; i<n_txt; i++) output_flag[i] = STATOutputType::None;
Expand Down Expand Up @@ -399,7 +394,6 @@ void GridStatConfInfo::process_flags() {
////////////////////////////////////////////////////////////////////////

void GridStatConfInfo::process_masks(const Grid &grid) {
CTRACK;
MaskPlane mp;
ConcatString name;

Expand Down Expand Up @@ -664,7 +658,6 @@ void GridStatVxOpt::clear() {
void GridStatVxOpt::process_config(
GrdFileType ftype, Dictionary &fdict,
GrdFileType otype, Dictionary &odict) {
CTRACK;
int i, n;
VarInfoFactory info_factory;
map<STATLineType,STATOutputType>output_map;
Expand Down Expand Up @@ -974,7 +967,6 @@ void GridStatVxOpt::process_config(
////////////////////////////////////////////////////////////////////////

void GridStatVxOpt::parse_nc_info(Dictionary &odict) {
CTRACK;
const DictionaryEntry * e = (const DictionaryEntry *) nullptr;

e = odict.lookup(conf_key_nc_pairs_flag);
Expand Down Expand Up @@ -1067,7 +1059,6 @@ bool GridStatVxOpt::is_uv_match(const GridStatVxOpt &v) const {
////////////////////////////////////////////////////////////////////////

void GridStatVxOpt::set_perc_thresh(const PairDataPoint &pd) {
CTRACK;

//
// Compute percentiles for forecast and observation thresholds,
Expand Down

0 comments on commit 20afb42

Please sign in to comment.