Skip to content

Commit

Permalink
Merge pull request #1440 from knutfrode/dev
Browse files Browse the repository at this point in the history
Allowing for ensemble collection with a single member (invisible in c…
  • Loading branch information
knutfrode authored Nov 8, 2024
2 parents 9d49a25 + f6467fb commit 25093ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def parse():
oil.sub_samples[i].metadata.short_name = s

oil.sub_samples[0].SARA = Sara(asphaltenes=ads.MassFraction(value=d.asphaltenes_percent, unit='%'))
oil.sub_samples[0].bulk_composition.append(ads.MassFraction(value=d.wax_percent, unit='%'))
oil.sub_samples[0].bulk_composition.append(ads.MassFraction(value=d.wax_percent, unit='%')) # Probably wrong, a BulkComposition object should be used here

cut_temps = [c[0] for c in d.cuts]
cut_frac = [c[1] for c in d.cuts]
Expand Down
2 changes: 1 addition & 1 deletion opendrift/readers/reader_netCDF_CF_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def __init__(self, filename=None, zarr_storage_options=None, name=None, proj4=No
self.time_step = None
if standard_name == 'realization':
if ensemble_member == None:
var_data = var.values
var_data = np.atleast_1d(var.values)
self.realizations = var_data
logger.debug('%i ensemble members available'
% len(self.realizations))
Expand Down

0 comments on commit 25093ee

Please sign in to comment.