CWorthy-ocean / C-Star

C-Star is a python package for setting up and running ocean model simulations, with a particular focus on marine carbon dioxide removal (mCDR) applications.
https://c-star.readthedocs.io
10 stars 4 forks source link

Split `Component.additional_code` into `Component.namelists` and `Component.additional_source_code` #114

Closed dafyddstephenson closed 2 weeks ago

dafyddstephenson commented 2 weeks ago

The spiral:

@TomNicholas (if I've managed to explain this problem sensibly) do you have any other ideas to tackle it?

TomNicholas commented 2 weeks ago

the ROMSComponent.additional_code attribute should be broken up into two instances of AdditionalCode : namelists and additional_source_code

A split like this seems totally reasonable, and I think we discussed it somewhere previously (can't find the issue now). Perhaps namelists and additional_source_code should be separate classes though? IDK

dafyddstephenson commented 2 weeks ago

I considered this possibility as I went (this is implemented in #117 ) but they turned out to both make sense as defined by (and require the methods of) AdditionalCode. I think this is much the same as #112 , where ROMSComponent.input_datasets was split into ROMSComponent.model_grid, etc., etc., but each of these new attributes was still an instance of the InputDataset class.

dafyddstephenson commented 2 weeks ago

(I think in the future they will be separate classes, per #56)