ESCOMP / CAM-SIMA

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

Split run into phys_run1 and phys_run2 #253

Closed peverwhee closed 3 months ago

peverwhee commented 4 months ago

Summary

This PR brings in the necessary changes (and the necessary framework tag) to split up the physics run into phys_run1 (which calls the "physics_before_coupler" group) and phys_run2 (which calls the "physics_after_coupler" group).

Modifications

phys_comp.F90:

cam_comp.F90:

atm_comp_nuopc.F90:

phys_comp.meta

write_init_files.py:

registry_v1_0.xsd

Testing

Confirmed no answer changes (via ncdata_check) for kessler or held suarez.

cacraigucar commented 4 months ago

I did find this about groups in the https://github.com/NCAR/ccpp-scm. In the file scm/doc/TechGuide/chap_ccpp.tex, there is a section (note this is .tex, so there are some special characters):

The concept of grouping physics in the suite definition file (currently reflected in the \execout{<group name=XYZ''>} elements) enablesgroups'' of parameterizations to be called with other computation (perhaps related to the dycore, I/O, etc.) in between. In the suite definition file included in this release, three groups are specified, but currently no computation happens between \execout{ccpp_physics_run} calls for these groups. However, one can edit the groups to suit the needs of the host application. For example, if a subset of physics schemes needs to be more tightly connected with the dynamics and called more frequently, one could create a group consisting of that subset and place a \execout{ccpp_physics_run} call in the appropriate place in the host application. The remainder of the parameterizations groups could be called using \execout{ccpp_physics_run} calls in a different part of the host application code.

This reassured me that what we are doing in this PR is what we should be doing.

cacraigucar commented 4 months ago

Basic question: Should the timestep_init and timestep_final be controlled at the group level as well? I could see that a scheme that is in the "after_coupling" section might need something from the coupling that just happened in the dycore. Also, a "before_coupling" scheme might need to do a timestep_final that prepares something for the dycore.

@nusbaume @peverwhee

peverwhee commented 4 months ago

@cacraigucar I've thought about this as well but couldn't think of a reason why whatever needs to be done before the dycore (or after) couldn't be done as part of the run phase of that scheme. If we added some sort of group-specific version of timestep_final and init, we'd also need to rethink the naming.