Skip to content

Commit

Permalink
Per #1392, moved handle_climo_cdf function from CompareGridded to Com…
Browse files Browse the repository at this point in the history
…mandBuilder so it can be used by SeriesAnalysis, made write_bins optional (set by default but can be not set for SeriesAnalysis), added direct_prob boolean
  • Loading branch information
georgemccabe committed Feb 1, 2022
1 parent 8b8accb commit fc57e54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 14 additions & 0 deletions metplus/wrappers/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,3 +1843,17 @@ def get_config_file(self, default_config_file=None):
return get_wrapped_met_config_file(self.config,
self.app_name,
default_config_file)

def handle_climo_cdf_dict(self, write_bins=True):
items = {
'cdf_bins': ('float', None, None,
[f'{self.app_name.upper()}_CLIMO_CDF_BINS']),
'center_bins': 'bool',
}

# add write_bins unless it should be excluded
if write_bins:
items['write_bins'] = 'bool'

items['direct_prob'] = 'bool'
self.add_met_config_dict('climo_cdf', items)
8 changes: 0 additions & 8 deletions metplus/wrappers/compare_gridded_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,6 @@ def get_command(self):
cmd += '-outdir {}'.format(self.outdir)
return cmd

def handle_climo_cdf_dict(self):
self.add_met_config_dict('climo_cdf', {
'cdf_bins': ('float', None, None,
[f'{self.app_name.upper()}_CLIMO_CDF_BINS']),
'center_bins': 'bool',
'write_bins': 'bool',
})

def handle_interp_dict(self, uses_field=False):
"""! Reads config variables for interp dictionary, i.e.
_INTERP_VLD_THRESH, _INTERP_SHAPE, _INTERP_METHOD, and
Expand Down

0 comments on commit fc57e54

Please sign in to comment.