Skip to content

Commit 35f3edd

Browse files
put sara_type back in GnomeOil for TAMOC
1 parent 2078ae2 commit 35f3edd

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

py_gnome/gnome/spills/gnome_oil.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ class GnomeOilSchema(SubstanceSchema):
112112
boiling_point = NumpyArraySchema(missing=drop, save=True, update=True)
113113
molecular_weight = NumpyArraySchema(missing=drop, save=True, update=True)
114114
component_density = NumpyArraySchema(missing=drop, save=True, update=True)
115-
# sara_type = SequenceSchema(SchemaNode(String()),
116-
# missing=drop,
117-
# save=True,
118-
# update=True)
115+
sara_type = SequenceSchema(SchemaNode(String()),
116+
missing=drop,
117+
save=True,
118+
update=True)
119119
num_components = SchemaNode(Int(), missing=drop, save=True, update=True)
120120

121-
122121
class GnomeOil(Substance):
123122
"""
124123
Class to create an oil for use in Gnome
@@ -292,11 +291,11 @@ def _init_from_json(self,
292291
self._set_pc_values('boiling_point', boiling_point)
293292
self._set_pc_values('component_density', component_density)
294293

295-
# if len(sara_type) == self.num_components:
296-
# self.sara_type = sara_type
297-
# else:
298-
# raise ValueError("You must have the same number of sara_type "
299-
# "as PCs")
294+
if len(sara_type) == self.num_components:
295+
self.sara_type = sara_type
296+
else:
297+
raise ValueError("You must have the same number of sara_type "
298+
"as PCs")
300299

301300
self._k_v2 = None # decay constant for viscosity curve
302301
self._visc_A = None # constant for viscosity curve

0 commit comments

Comments
 (0)