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 6edd64c commit 15f0bda
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
30 changes: 0 additions & 30 deletions src/tools/core/ensemble_stat/ensemble_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@
#include "nc_obs_util.h"
#include "nc_point_obs_in.h"

#include "ctrack.hpp"

#ifdef WITH_PYTHON
#include "data2d_nc_met.h"
#include "pointdata_python.h"
Expand Down Expand Up @@ -196,9 +194,6 @@ int met_main(int argc, char *argv[]) {
// Perform verification
process_vx();

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

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

Expand All @@ -215,7 +210,6 @@ const string get_tool_name()
////////////////////////////////////////////////////////////////////////

void process_command_line(int argc, char **argv) {
CTRACK;
int i;
CommandLine cline;
ConcatString default_config_file;
Expand Down Expand Up @@ -493,7 +487,6 @@ void process_command_line(int argc, char **argv) {
////////////////////////////////////////////////////////////////////////

void process_grid(const Grid &fcst_grid) {
CTRACK;
Grid obs_grid;

// Parse regridding logic
Expand Down Expand Up @@ -551,7 +544,6 @@ void process_grid(const Grid &fcst_grid) {
////////////////////////////////////////////////////////////////////////

void process_n_vld() {
CTRACK;
int i_var, i_ens, j, n_vld, n_ens_inputs;
DataPlane dp;
DataPlaneArray dpa;
Expand Down Expand Up @@ -744,7 +736,6 @@ bool get_data_plane_array(const char *infile, GrdFileType ftype,
////////////////////////////////////////////////////////////////////////

void process_vx() {
CTRACK;

// Process masks Grids and Polylines in the config file
conf_info.process_masks(grid);
Expand All @@ -768,7 +759,6 @@ void process_vx() {
////////////////////////////////////////////////////////////////////////

void process_point_vx() {
CTRACK;
int i, j, i_file, n_miss;
unixtime beg_ut, end_ut;
DataPlaneArray fcst_dpa, emn_dpa;
Expand Down Expand Up @@ -954,7 +944,6 @@ void process_point_vx() {
////////////////////////////////////////////////////////////////////////

void process_point_obs(int i_nc) {
CTRACK;
int i_obs, j;
unixtime hdr_ut;
NcFile *obs_in = (NcFile *) nullptr;
Expand Down Expand Up @@ -1161,7 +1150,6 @@ bool process_point_ens(int i_vx, int i_ens, DataPlaneArray &fcst_dpa) {
////////////////////////////////////////////////////////////////////////

void process_point_scores() {
CTRACK;
PairDataEnsemble *pd_ptr = (PairDataEnsemble *) nullptr;
PairDataEnsemble pd;
ConcatString cs;
Expand Down Expand Up @@ -1276,7 +1264,6 @@ void process_point_scores() {
////////////////////////////////////////////////////////////////////////

void process_grid_vx() {
CTRACK;
int i, j, k, n_miss, i_file;
bool found;
MaskPlane mask_mp;
Expand Down Expand Up @@ -1686,7 +1673,6 @@ void process_grid_scores(int i_vx,
const DataPlane &ocmn_dp, const DataPlane &ocsd_dp,
const MaskPlane &mask_mp,
ObsErrorEntry *oerr_ptr, PairDataEnsemble &pd) {
CTRACK;
int i, j, x, y, n_miss;
ObsErrorEntry *e = (ObsErrorEntry *) nullptr;

Expand Down Expand Up @@ -1781,7 +1767,6 @@ void process_grid_scores(int i_vx,
void do_ecnt(const EnsembleStatVxOpt &vx_opt,
const SingleThresh &othresh,
const PairDataEnsemble *pd_ptr) {
CTRACK;
ECNTInfo ecnt_info;

// Check for valid pointer
Expand Down Expand Up @@ -1809,7 +1794,6 @@ void do_ecnt(const EnsembleStatVxOpt &vx_opt,
void do_rps(const EnsembleStatVxOpt &vx_opt,
const SingleThresh &othresh,
const PairDataEnsemble *pd_ptr) {
CTRACK;
RPSInfo rps_info;

// Check for valid pointer
Expand Down Expand Up @@ -1851,7 +1835,6 @@ void do_rps(const EnsembleStatVxOpt &vx_opt,
////////////////////////////////////////////////////////////////////////

void setup_nc_file(unixtime valid_ut, const char *suffix) {
CTRACK;

// Create output NetCDF file name
build_outfile_name(ens_valid_ut, suffix, out_nc_file);
Expand Down Expand Up @@ -1890,7 +1873,6 @@ void setup_nc_file(unixtime valid_ut, const char *suffix) {
////////////////////////////////////////////////////////////////////////

void setup_txt_files() {
CTRACK;
int i, n, n_phist_bin, n_prob, n_eclv, max_n_ens, max_col;
ConcatString tmp_str;

Expand Down Expand Up @@ -2081,7 +2063,6 @@ void setup_txt_files() {
////////////////////////////////////////////////////////////////////////

void setup_table(AsciiTable &at) {
CTRACK;

// Justify the STAT AsciiTable objects
justify_stat_cols(at);
Expand All @@ -2104,7 +2085,6 @@ void setup_table(AsciiTable &at) {
////////////////////////////////////////////////////////////////////////

void build_outfile_name(unixtime ut, const char *suffix, ConcatString &str) {
CTRACK;
int mon, day, yr, hr, min, sec;
char tmp_str[max_str_len];

Expand Down Expand Up @@ -2136,7 +2116,6 @@ void build_outfile_name(unixtime ut, const char *suffix, ConcatString &str) {
void write_txt_files(const EnsembleStatVxOpt &vx_opt,
const PairDataEnsemble &pd_all,
bool is_point_vx) {
CTRACK;
int i, j;
PairDataEnsemble pd;

Expand Down Expand Up @@ -2284,7 +2263,6 @@ void write_txt_files(const EnsembleStatVxOpt &vx_opt,

void do_pct(const EnsembleStatVxOpt &vx_opt,
const PairDataEnsemble &pd_ens) {
CTRACK;

// If forecast probability thresholds were specified, use them.
if(vx_opt.fcat_ta.n() > 0) {
Expand All @@ -2306,7 +2284,6 @@ void do_pct(const EnsembleStatVxOpt &vx_opt,

void do_pct_cat_thresh(const EnsembleStatVxOpt &vx_opt,
const PairDataEnsemble &pd_ens) {
CTRACK;
int i, i_thr, i_bin, i_obs, i_ens;
int n_vld, n_evt, n_bin;
PCTInfo *pct_info = (PCTInfo *) nullptr;
Expand Down Expand Up @@ -2419,7 +2396,6 @@ void do_pct_cat_thresh(const EnsembleStatVxOpt &vx_opt,

void do_pct_cdp_thresh(const EnsembleStatVxOpt &vx_opt,
const PairDataEnsemble &pd_ens) {
CTRACK;
int i, i_thr, i_bin, i_obs, i_ens;
int n_vld, n_evt, n_bin;
PCTInfo *pct_info = (PCTInfo *) nullptr;
Expand Down Expand Up @@ -2509,7 +2485,6 @@ void do_pct_cdp_thresh(const EnsembleStatVxOpt &vx_opt,
void write_pct_info(const EnsembleStatVxOpt &vx_opt,
const PCTInfo *pct_info, int n_bin,
bool ocdp_thresh) {
CTRACK;

// Write output for each bin
for(int i_bin=0; i_bin<n_bin; i_bin++) {
Expand Down Expand Up @@ -2592,7 +2567,6 @@ void write_pct_info(const EnsembleStatVxOpt &vx_opt,

void write_orank_nc(PairDataEnsemble &pd, DataPlane &dp,
int i_vx, int i_interp, int i_mask) {
CTRACK;
int i, n;

// Arrays for storing observation rank data
Expand Down Expand Up @@ -2661,7 +2635,6 @@ void write_orank_var_float(int i_vx, int i_interp, int i_mask,
float *data, DataPlane &dp,
const char *type_str,
const char *long_name_str) {
CTRACK;
NcVar nc_var;
int wdth;
ConcatString mthd_str, var_name, var_str, name_str;
Expand Down Expand Up @@ -2729,7 +2702,6 @@ void write_orank_var_int(int i_vx, int i_interp, int i_mask,
int *data, DataPlane &dp,
const char *type_str,
const char *long_name_str) {
CTRACK;
NcVar nc_var;
int wdth;
ConcatString mthd_str, var_name, var_str, name_str;
Expand Down Expand Up @@ -2793,7 +2765,6 @@ void add_var_att_local(VarInfo *info, NcVar *nc_var, bool is_int,
const DataPlane &dp,
const char *name_str,
const char *long_name_str) {
CTRACK;
ConcatString att_str;

// Construct the long name
Expand All @@ -2820,7 +2791,6 @@ void add_var_att_local(VarInfo *info, NcVar *nc_var, bool is_int,
////////////////////////////////////////////////////////////////////////

void finish_txt_files() {
CTRACK;
int i;

// Write out the contents of the STAT AsciiTable and
Expand Down
12 changes: 0 additions & 12 deletions src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "vx_data2d.h"
#include "vx_log.h"

#include "ctrack.hpp"

#include "GridTemplate.h"

using namespace std;
Expand Down Expand Up @@ -102,7 +100,6 @@ void EnsembleStatConfInfo::clear() {

void EnsembleStatConfInfo::read_config(const ConcatString default_file_name,
const ConcatString user_file_name) {
CTRACK;

// Read the config file constants
conf.read(replace_path(config_const_filename).c_str());
Expand All @@ -123,7 +120,6 @@ void EnsembleStatConfInfo::process_config(GrdFileType etype,
bool grid_vx, bool point_vx,
StringArray * ens_files,
bool use_ctrl) {
CTRACK;
int i, j, n_ens_files;
VarInfoFactory info_factory;
map<STATLineType,STATOutputType>output_map;
Expand Down Expand Up @@ -316,7 +312,6 @@ void EnsembleStatConfInfo::process_config(GrdFileType etype,
////////////////////////////////////////////////////////////////////////

void EnsembleStatConfInfo::process_grib_codes() {
CTRACK;

// Only needs to be set once
if(grib_codes_set) return;
Expand All @@ -343,7 +338,6 @@ void EnsembleStatConfInfo::process_grib_codes() {
////////////////////////////////////////////////////////////////////////

void EnsembleStatConfInfo::process_flags() {
CTRACK;
int i, j;
bool output_ascii_flag = false;

Expand Down Expand Up @@ -390,7 +384,6 @@ void EnsembleStatConfInfo::process_flags() {
////////////////////////////////////////////////////////////////////////

void EnsembleStatConfInfo::process_masks(const Grid &grid) {
CTRACK;
int i, j;
MaskPlane mp;
ConcatString name;
Expand Down Expand Up @@ -556,7 +549,6 @@ int EnsembleStatConfInfo::get_max_n_eclv_points() const {
////////////////////////////////////////////////////////////////////////

void EnsembleStatConfInfo::set_vx_pd(const IntArray &ens_size, int ctrl_index) {
CTRACK;

// This should be called after process_masks()
for(int i=0; i<n_vx; i++) {
Expand Down Expand Up @@ -651,7 +643,6 @@ void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict,
StringArray ens_member_ids,
StringArray * ens_files,
bool use_ctrl, ConcatString control_id) {
CTRACK;
int i, j;
VarInfoFactory info_factory;
map<STATLineType,STATOutputType>output_map;
Expand Down Expand Up @@ -871,7 +862,6 @@ void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict,
////////////////////////////////////////////////////////////////////////

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

e = odict.lookup(conf_key_nc_orank_flag);
Expand Down Expand Up @@ -920,7 +910,6 @@ void EnsembleStatVxOpt::parse_nc_info(Dictionary &odict) {
////////////////////////////////////////////////////////////////////////

void EnsembleStatVxOpt::set_vx_pd(EnsembleStatConfInfo *conf_info, int ctrl_index) {
CTRACK;
int i, j, n;
int n_msg_typ = msg_typ.n();
int n_mask = mask_name.n();
Expand Down Expand Up @@ -1025,7 +1014,6 @@ void EnsembleStatVxOpt::set_vx_pd(EnsembleStatConfInfo *conf_info, int ctrl_inde
////////////////////////////////////////////////////////////////////////

void EnsembleStatVxOpt::set_perc_thresh(const PairDataEnsemble *pd_ptr) {
CTRACK;

//
// Check if percentile thresholds were requested
Expand Down

0 comments on commit 15f0bda

Please sign in to comment.