Skip to content

Commit

Permalink
Per #2168, making it compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Sep 26, 2022
1 parent b304969 commit 42b072d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
26 changes: 3 additions & 23 deletions src/tools/tc_utils/tc_diag/tc_diag.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

////////////////////////////////////////////////////////////////////////
//
// Filename: tc_rmw.cc
// Filename: tc_diag.cc
//
// Description:
//
Expand All @@ -31,7 +31,7 @@
#include <unistd.h>

#include "main.h"
#include "tc_rmw.h"
#include "tc_diag.h"

#include "tcrmw_grid.h"
#include "series_data.h"
Expand Down Expand Up @@ -99,7 +99,7 @@ int met_main(int argc, char *argv[]) {
////////////////////////////////////////////////////////////////////////

const string get_tool_name() {
return "tc_rmw";
return "tc_diag";
}

////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -195,9 +195,6 @@ void process_command_line(int argc, char **argv) {
// Process the configuration
conf_info.process_config(ftype);

// initialize the new thing
wind_converter.init(&conf_info);

return;
}

Expand Down Expand Up @@ -590,7 +587,6 @@ void setup_nc_file() {
variable_levels[fname].push_back(data_info->level_attr());
variable_long_names[fname] = data_info->long_name_attr();
variable_units[fname] = data_info->units_attr();
wind_converter.update_input(fname, data_info->units_attr());
}

// Define pressure levels
Expand All @@ -601,8 +597,6 @@ void setup_nc_file() {
pressure_dim = add_dim(nc_out, "pressure", pressure_levels.size());
def_tc_pressure(nc_out, pressure_dim, pressure_levels);

wind_converter.append_nc_output_vars(variable_levels, variable_long_names, variable_units);

def_tc_variables(nc_out,
variable_levels, variable_long_names, variable_units,
range_dim, azimuth_dim, pressure_dim, track_point_dim,
Expand Down Expand Up @@ -711,20 +705,6 @@ void process_fields(const TrackInfoArray& tracks) {
mlog << Debug(4) << "data_min:" << data_min << "\n";
mlog << Debug(4) << "data_max:" << data_max << "\n";

// if this is "U", setup everything for matching "V" and compute the radial/tangential
if (wind_converter.compute_winds_if_input_is_u(i_point, sname, slevel, valid_time, data_files, ftype,
latlon_arr, lat_arr, lon_arr, grid, data_dp, tcrmw_grid))
{
write_tc_pressure_level_data(nc_out, tcrmw_grid,
pressure_level_indices, data_info->level_attr(), i_point,
data_3d_vars[conf_info.radial_velocity_field_name.string()],
wind_converter.get_wind_r_arr());
write_tc_pressure_level_data(nc_out, tcrmw_grid,
pressure_level_indices, data_info->level_attr(), i_point,
data_3d_vars[conf_info.tangential_velocity_field_name.string()],
wind_converter.get_wind_t_arr());
}

// Write data
if (variable_levels[data_info->name_attr()].size() > 1) {
write_tc_pressure_level_data(nc_out, tcrmw_grid,
Expand Down
8 changes: 3 additions & 5 deletions src/tools/tc_utils/tc_diag/tc_diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

////////////////////////////////////////////////////////////////////////
//
// Filename: tc_rmw.h
// Filename: tc_diag.h
//
// Description:
//
Expand Down Expand Up @@ -41,8 +41,7 @@ using namespace std;
#include <netcdf>
using namespace netCDF;

#include "tc_rmw_conf_info.h"
#include "tc_rmw_wind_converter.h"
#include "tc_diag_conf_info.h"

#include "vx_data2d_factory.h"
#include "vx_tc_util.h"
Expand All @@ -56,7 +55,7 @@ using namespace netCDF;
////////////////////////////////////////////////////////////////////////

// Program name
static const char* program_name = "tc_rmw";
static const char* program_name = "tc_diag";

// ATCF file suffix
static const char* atcf_suffix = ".dat";
Expand All @@ -83,7 +82,6 @@ static StringArray deck_source, deck_model_suffix;
static ConcatString config_file;
static TCRMWConfInfo conf_info;
static GrdFileType ftype;
static TCRMW_WindConverter wind_converter;


// Optional arguments
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <sys/types.h>
#include <cmath>

#include "tc_rmw_conf_info.h"
#include "tc_diag_conf_info.h"

#include "vx_log.h"

Expand Down

0 comments on commit 42b072d

Please sign in to comment.