NOAA-GFDL / pace

Re-write of FV3GFS weather/climate model in Python
Apache License 2.0
12 stars 11 forks source link

Move Active Physics Schemes to Config #44

Closed oelbert closed 6 months ago

oelbert commented 7 months ago

Purpose

Currently the enabled physics schemes are hardcoded into an "active_packages" list at multiple points in the code. This PR changes that to be set in the physics config in order to enable more physics schemes to be integrated into the model and make this more adaptable.

Code changes:

Checklist

Before submitting this PR, please make sure:

oelbert commented 7 months ago

I'd rather see the Enum used in code, restricting the string form to reading in the config and casting it into the Enum (and error-ing there if doesn't exist).

For example init_zeros would carry a List[PHYSICS_PACKAGE]

Also, do you guys expect to go further an have a normalize API for all physics package?

This feels a little cumbersome but I think is working now. Some sort of standard api for the physics schemes is probably a good idea, I'll bring it up with @fmalatino and @bensonr

oelbert commented 6 months ago

With issues created and/or plans to abstract things away with some oo implementation, I think this is ready to go.

I'll open an issue for it