Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #2237 tmp_dir #2242

Merged
merged 2 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";

////////////////////////////////////////////////////////////////////////////////
2 changes: 1 addition & 1 deletion src/basic/vx_config/config.tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ yyparse (void)

YYDPRINTF ((stderr, "Starting parse\n"));

yystate = 0;
yystate = 8;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
Expand Down
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