From 9a25be63033b84eb58bf109eff207fc2a6fcd2c0 Mon Sep 17 00:00:00 2001 From: Janice Kim Date: Tue, 21 Oct 2025 12:52:35 -0400 Subject: [PATCH 1/3] Tmp physics dacite config related to NDSL Issue #64 Clean up after pyFV3 PR #88 --- pace/driver.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pace/driver.py b/pace/driver.py index 6c07383e..6ea2d40f 100644 --- a/pace/driver.py +++ b/pace/driver.py @@ -238,29 +238,26 @@ def from_dict(cls, kwargs: Dict[str, Any]) -> "DriverConfig": f"you cannot set {derived_name} directly in dycore_config, " "as it is determined based on top-level configuration" ) + kwargs["dycore_config"] = DynamicalCoreConfig.from_dict( + kwargs.get("dycore_config", {}) + ) - # TODO - After pyFV3 PR #88, replace dycore dacite cmd with: - # kwargs["dycore_config"] = DynamicalCoreConfig.from_dict( - # kwargs.get("dycore_config", {}) + if isinstance(kwargs["physics_config"], dict): + # TODO - After pySHiELD PR #68, replace physics dacite cmd with: + # kwargs["physics_config"] = PhysicsConfig.from_dict( + # kwargs.get("physics_config", {}) # ) - dycore_dacite_config = dacite.Config( + phys_dacite_config = dacite.Config( strict=True, type_hooks={ Tuple[int, int]: lambda x: tuple(x), Tuple[str, ...]: lambda x: tuple(x) if x is not None else None, }, ) - kwargs["dycore_config"] = dacite.from_dict( - data_class=DynamicalCoreConfig, - data=kwargs.get("dycore_config", {}), - config=dycore_dacite_config, - ) - - if isinstance(kwargs["physics_config"], dict): kwargs["physics_config"] = dacite.from_dict( data_class=PhysicsConfig, data=kwargs.get("physics_config", {}), - config=dacite.Config(strict=True), + config=phys_dacite_config, ) kwargs["layout"] = tuple(kwargs["layout"]) From fbeeb2255eb50f12d954d9fdb841c2f5075324ce Mon Sep 17 00:00:00 2001 From: Janice Kim Date: Tue, 21 Oct 2025 17:15:51 -0400 Subject: [PATCH 2/3] Updating pyFV3 submodule --- pyFV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFV3 b/pyFV3 index f3608d93..329f126c 160000 --- a/pyFV3 +++ b/pyFV3 @@ -1 +1 @@ -Subproject commit f3608d934d8a1dceceb8dbe280d79b4a48385daa +Subproject commit 329f126c52603ff08bb148c4a8939dda675d770b From 4a82e40bc3e99dc7424fdb01db0f4e1d91cacbee Mon Sep 17 00:00:00 2001 From: Janice Kim Date: Fri, 24 Oct 2025 10:32:21 -0400 Subject: [PATCH 3/3] Updating pyFV3 submodule after PyFV3 PR #90 --- pyFV3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFV3 b/pyFV3 index 329f126c..a0c972d6 160000 --- a/pyFV3 +++ b/pyFV3 @@ -1 +1 @@ -Subproject commit 329f126c52603ff08bb148c4a8939dda675d770b +Subproject commit a0c972d69399c18f1c22ba764bf3001765b20ea3