Skip to content

Commit

Permalink
Per #2237, add tmp_dir and version entries to the Plot-Point-Obs conf…
Browse files Browse the repository at this point in the history
…ig file.
  • Loading branch information
JohnHalleyGotway committed Aug 19, 2022
1 parent 5bc6fad commit 9ea41f0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
5 changes: 5 additions & 0 deletions data/config/PlotPointObsConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,8 @@ point_data = [
];

////////////////////////////////////////////////////////////////////////////////

tmp_dir = "/tmp";
version = "V11.0.0";

////////////////////////////////////////////////////////////////////////////////
10 changes: 9 additions & 1 deletion docs/Users_Guide/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ plot_point_obs configuration file
The default configuration file for the Plot-Point-Obs tool named **PlotPointObsConfig_default** can be found in the installed *share/met/config* directory. The contents of the configuration file are described in the subsections below.

Note that environment variables may be used when editing configuration files, as described in :numref:`pb2nc configuration file` for the PB2NC tool.
________________________

.. code-block:: none
tmp_dir = "/tmp";
version = "VN.N";
The configuration options listed above are common to multiple MET tools and are described in :numref:`config_options`.

______________________

Expand Down Expand Up @@ -208,7 +216,7 @@ The circles are filled in based on the setting of the **fill_color** and **fill_

Users are encouraged to define as many **point_data** array entries as needed to filter and plot the input observations in the way they would like. Each point observation is plotted using the options specified in the first matching array entry. Note that the filtering, processing, and plotting options specified inside each **point_data** array entry take precedence over ones specified at the higher level of configuration file context.

For each observation, this tool stores the observation latitude, longitude, and value. However, unless the **dotsize(x)** function is not constant or the **fill_plot_info.flag** entry is set to true, the observation value is simply set to a flag value. For each **plot_data** array entry, the tool stores and plots only the unique combination of observation latitude, longitude, and value. Therefore multiple obsevations at the same location will typically be plotted as a single circle.
For each observation, this tool stores the observation latitude, longitude, and value. However, unless the **dotsize(x)** function is not constant or the **fill_plot_info.flag** entry is set to true, the observation value is simply set to a flag value. For each **point_data** array entry, the tool stores and plots only the unique combination of observation latitude, longitude, and value. Therefore multiple obsevations at the same location will typically be plotted as a single circle.

.. _plot_data_plane-usage:

Expand Down
5 changes: 5 additions & 0 deletions internal/test_unit/config/PlotPointObsConfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,8 @@ point_data = [
];

////////////////////////////////////////////////////////////////////////////////

tmp_dir = "/tmp";
version = "V11.0.0";

////////////////////////////////////////////////////////////////////////////////
11 changes: 10 additions & 1 deletion src/tools/other/plot_point_obs/plot_point_obs_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void PlotPointObsOpt::clear() {
store_obs_val = false;
fill_point = false;
outline_point = false;

return;
}

Expand Down Expand Up @@ -368,6 +368,9 @@ void PlotPointObsConfInfo::clear() {
point_opts.clear();
do_colorbar = false;

tmp_dir.clear();
version.clear();

// Delete allocated memory
if(grid_data_info) { delete grid_data_info; grid_data_info = 0; }

Expand Down Expand Up @@ -418,6 +421,12 @@ void PlotPointObsConfInfo::process_config(
// Initialize
clear();

// Conf: version
version = parse_conf_version(&conf);

// Conf: tmp_dir
tmp_dir = parse_conf_tmp_dir(&conf);

// Conf: grid_data
dict = conf.lookup_dictionary(conf_key_grid_data);

Expand Down
3 changes: 3 additions & 0 deletions src/tools/other/plot_point_obs/plot_point_obs_conf_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class PlotPointObsConfInfo {
// Options for plotting point data
vector<PlotPointObsOpt> point_opts;

ConcatString tmp_dir; // Directory for temporary files
ConcatString version; // Config file version

bool do_colorbar;

//////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 9ea41f0

Please sign in to comment.