Skip to content

Commit

Permalink
Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-framework
Browse files Browse the repository at this point in the history
…into HEAD
  • Loading branch information
climbfuji committed Mar 17, 2020
2 parents e772109 + d9cd9e6 commit 5d5f8ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/metadata_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def read_new_metadata(filename, module_name, table_name, scheme_name = None, sub
container = container,
kind = new_var.get_prop_value('kind'),
intent = new_var.get_prop_value('intent'),
optional = new_var.get_prop_value('optional'),
optional = 'T' if new_var.get_prop_value('optional') else 'F',
)
# Set rank using integer-setter method
var.rank = rank
Expand Down
4 changes: 2 additions & 2 deletions scripts/mkcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def convert_to(self, units):
function_name = '{0}__to__{1}'.format(string_to_python_identifier(self.units), string_to_python_identifier(units))
try:
function = getattr(unit_conversion, function_name)
logging.info('Automatic unit conversion from {0} to {1} for {2} before entering {3}'.format(self.units, units, self.standard_name, self.container))
logging.info('Automatic unit conversion from {0} to {1} for {2} after returning from {3}'.format(self.units, units, self.standard_name, self.container))
except AttributeError:
raise Exception('Error, automatic unit conversion from {0} to {1} for {2} in {3} not implemented'.format(self.units, units, self.standard_name, self.container))
conversion = function()
Expand All @@ -196,7 +196,7 @@ def convert_from(self, units):
function_name = '{1}__to__{0}'.format(string_to_python_identifier(self.units), string_to_python_identifier(units))
try:
function = getattr(unit_conversion, function_name)
logging.info('Automatic unit conversion from {0} to {1} for {2} after returning from {3}'.format(self.units, units, self.standard_name, self.container))
logging.info('Automatic unit conversion from {0} to {1} for {2} before entering {3}'.format(self.units, units, self.standard_name, self.container))
except AttributeError:
raise Exception('Error, automatic unit conversion from {1} to {0} for {2} in {3} not implemented'.format(self.units, units, self.standard_name, self.container))
conversion = function()
Expand Down

0 comments on commit 5d5f8ec

Please sign in to comment.