From f363a4492ab398bbedb80fffdbbb3e1d51230b0b Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Thu, 20 May 2021 08:38:09 -0600 Subject: [PATCH] #1581 Cleanup --- met/src/libcode/vx_nc_obs/nc_point_obs.h | 92 +++--------------------- 1 file changed, 8 insertions(+), 84 deletions(-) diff --git a/met/src/libcode/vx_nc_obs/nc_point_obs.h b/met/src/libcode/vx_nc_obs/nc_point_obs.h index 9e6c5ae171..ab14c57a1c 100644 --- a/met/src/libcode/vx_nc_obs/nc_point_obs.h +++ b/met/src/libcode/vx_nc_obs/nc_point_obs.h @@ -62,7 +62,7 @@ class MetNcPointObs { bool open(const char * filename); void close(); - bool check_nc(const char *nc_name, const char *caller=empty_name); +// bool check_nc(const char *nc_name, const char *caller=empty_name); bool set_netcdf(NcFile *nc_file, bool _keep_nc=false); int get_buf_size(); @@ -85,14 +85,14 @@ class MetNcPointObs { bool is_using_var_id(); bool is_using_obs_arr(); - bool read_dim_headers(); - bool read_obs_data(); - bool read_obs_data(int buf_size, int start, float *obs_arr_block, - int *obs_qty_idx_block, char *obs_qty_str_block); - bool read_obs_data_numbers(); - bool read_obs_data_strings(); +// bool read_dim_headers(); +// bool read_obs_data(); +// bool read_obs_data(int buf_size, int start, float *obs_arr_block, +// int *obs_qty_idx_block, char *obs_qty_str_block); +// bool read_obs_data_numbers(); +// bool read_obs_data_strings(); - void set_using_var_id(bool using_var_id); +// void set_using_var_id(bool using_var_id); // variables @@ -115,82 +115,6 @@ inline bool MetNcPointObs::is_using_var_id() { return use_var_id; } //////////////////////////////////////////////////////////////////////// -class MetNcPointObs2Write : public MetNcPointObs { - - protected: - int raw_hdr_cnt; - bool reset_hdr_buffer; - - NcDataBuffer data_buffer; - NcObsOutputData out_data; - - //MetNcPointObs2Write(const MetNcPointObs2Write &); - //MetNcPointObs2Write & operator=(const MetNcPointObs2Write &); - - void init_from_scratch(); - - public: - - MetNcPointObs2Write(); - ~MetNcPointObs2Write(); - - bool add_header(const char *hdr_typ, const char *hdr_sid, const time_t hdr_vld, - const float hdr_lat, const float hdr_lon, const float hdr_elv); - bool add_header_prepbufr (const int pb_report_type, const int in_report_type, - const int instrument_type); - bool add_header_strings(const char *hdr_typ, const char *hdr_sid); - bool add_header_vld(const char *hdr_vld); - - void create_pb_hdrs(int pb_hdr_count); - - int get_buf_size(); - void get_dim_counts(int *obs_cnt, int *hdr_cnt); - int get_hdr_index(); -// bool get_hdr_obs_count(int *obs_cnt, int *hdr_cnt); -// int get_obs_cnt(); - int get_obs_index(); - NcObsOutputData *get_output_data(); - NetcdfObsVars *get_obs_vars(); - - void init_buffer(); - void init_obs_vars(bool using_var_id, int deflate_level, bool attr_agl=false); - bool init_netcdf(int obs_count, int hdr_count, string program_name); - - void reset_header_buffer(int buf_size, bool reset_all); - void set_nc_out_data(vector observations, - SummaryObs *summary_obs, TimeSummaryInfo summary_info, - int processed_hdr_cnt=0); -// bool set_reset_hdr_buffer(bool reset_buffer); - - void write_arr_headers(); - void write_buf_headers (); - void write_header (const char *hdr_typ, const char *hdr_sid, const time_t hdr_vld, - const float hdr_lat, const float hdr_lon, const float hdr_elv); - void write_observation(); - void write_observation(const float obs_arr[OBS_ARRAY_LEN], const char *obs_qty); - void write_obs_data(); - int write_obs_data(const vector< Observation > observations, - const bool do_header = true); - bool write_to_netcdf(StringArray obs_names, StringArray obs_units, - StringArray obs_descs); - - // variables - - // data - -}; // MetNcPointObs2Write - - -//////////////////////////////////////////////////////////////////////// - -inline int MetNcPointObs2Write::get_hdr_index() { return data_buffer.cur_hdr_idx; } -inline int MetNcPointObs2Write::get_obs_index() { return data_buffer.obs_data_idx; } -inline NcObsOutputData *MetNcPointObs2Write::get_output_data() { return &out_data; } -inline NetcdfObsVars *MetNcPointObs2Write::get_obs_vars() { return &obs_vars; } -//inline bool MetNcPointObs2Write::set_reset_hdr_buffer(bool reset_buffer) { reset_hdr_buffer = reset_buffer; } - -//////////////////////////////////////////////////////////////////////// - #endif /* __NC_POINT_OBS_H__ */