ESCOMP / CAM-SIMA

Community Atmosphere Model - System for Integrated Modeling of the Atmosphere
3 stars 11 forks source link

Auto-generate CAMDEN run sequence? #73

Open nusbaume opened 3 years ago

nusbaume commented 3 years ago

Currently in CAM the run phase order can only be modified by changing the stepon, cam_comp, or phys_run fortran code, which can potentially be quite difficult to do. However, there are likely scientific reasons why someone would want to change the order in CAM, e.g. running the dynamics before the physics as opposed to after. Along with this, it might also be beneficial to specify other run phase specifics, such as time sub-stepping for specific run sections, or even to specify if certain sections of CAM should run on certain architectures (e.g. GPUs vs CPUs).

This run sequence flexibility could potentially be implemented by providing a user-modifiable XML file, similar to the registry or a CCPP suite definition file, that would set the CAM run sequence and other relevant information. Then, this XML file could be used to auto-generate the cam_comp.F90 file, along with any other required fortran files. Default values for this XML file could also be developed and used for specific compsets.

Thoughts, comments, or opinions? Given that CMEPS provides this capability for CESM as a whole, and CCPP provides this capability for the physics schemes, this additional feature would allow us to "bridge the gap" and make the entire CAMDEN/SIMA modeling system customizable in this fashion. However, it could also take a substantial amount of work, as PR #65 has shown, and thus may not be completely worth it (at least not for a while).

nusbaume commented 3 months ago

As discussed a little in PR #253, one possibility would be to have the CCPP Suite Definition File (SDF) include tags that indicate where the dycore and surface coupling is called relative to the physics schemes.

This would have the additional benefit of removing the need for hard-coded physics group names, and thus potentially make SDFs more portable across host models. However, the cost would be that the various CCPP stakeholders would need to agree to it, both in theory and in terms of its actual implementation.