Skip to content

Commit

Permalink
feat(initial conditions/strt array setup): add option to explicitly s…
Browse files Browse the repository at this point in the history
…et starting heads from parent starting heads
  • Loading branch information
aleaf committed Jan 6, 2025
1 parent 870c0b7 commit 3acaff3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mfsetup/ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ def setup_strt(model, package, strt=None, source_data_config=None,
raise ValueError(("'from_parent' in configuration by no parent model."
f"{package} package, {model.name} model.\n"
f"source_data config:\n{source_data_config}"))
from_parent_cfg = source_data_config['strt'].get('from_parent', {})
binary_file = from_parent_cfg.get('binaryfile', False)
kwargs.update(from_parent_cfg)
if strt_config == 'from_parent':
default_parent_source_data = True
else:
from_parent_cfg = source_data_config['strt'].get('from_parent', {})
binary_file = from_parent_cfg.get('binaryfile', False)
kwargs.update(from_parent_cfg)
elif 'from_model_top' in strt_config:
default_parent_source_data = False

Expand Down

0 comments on commit 3acaff3

Please sign in to comment.