ai2cm / fv3config

Manipulate FV3GFS run directories
Apache License 2.0
1 stars 0 forks source link

Add ability to use a custom field_table file #61

Closed spencerkclark closed 4 years ago

spencerkclark commented 4 years ago

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:

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.

spencerkclark commented 4 years ago

Many thanks for the review @mcgibbon -- all good comments. I'll push some updates tomorrow morning.