This adds the ability to add a custom field_table in the configuration dictionary to override the inferred version based on the microphysics scheme used. The behavior is implemented as described in this design document that @mcgibbon outlined earlier after a discussion with me and @oliverwm1.
I definitely see value in automatically setting the field_table used to prevent user-error as much as possible, so eventually I think we could look to somehow support the SHiELD use-case from that perspective; however, that introduces a few more complications that we'd have to think through:
The microphysics scheme used is set with different namelist parameters than imp_physics.
The new boundary layer scheme requires a new tracer for TKE, though one can still run with older PBL schemes, which do not require this additional tracer (so the field_table not only is dependent on the microphysics scheme, but also is dependent on the boundary layer scheme).
I don't think there's a particular downside to allowing users (at their own risk) to explicitly set the field_table used, so hopefully we're all on board for the spirit of this change!
Thanks @mcgibbon for pointing me to the tempfile module; that was quite useful for writing these tests.
This adds the ability to add a custom field_table in the configuration dictionary to override the inferred version based on the microphysics scheme used. The behavior is implemented as described in this design document that @mcgibbon outlined earlier after a discussion with me and @oliverwm1.
I definitely see value in automatically setting the field_table used to prevent user-error as much as possible, so eventually I think we could look to somehow support the SHiELD use-case from that perspective; however, that introduces a few more complications that we'd have to think through:
imp_physics
.I don't think there's a particular downside to allowing users (at their own risk) to explicitly set the field_table used, so hopefully we're all on board for the spirit of this change!
Thanks @mcgibbon for pointing me to the
tempfile
module; that was quite useful for writing these tests.