Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCPP scheme simulator #378

Merged
merged 59 commits into from
Aug 3, 2023
Merged

CCPP scheme simulator #378

merged 59 commits into from
Aug 3, 2023

Conversation

dustinswales
Copy link
Collaborator

This PR adds a new functionality, a physics process scheme simulator, to the CCPP-physics.

Data-driven tendencies can be used to drive process schemes (e.g. PBL, Deep-Convection, etc..). The control over which schemes are used are set in a new physics namelist, scm_data_nml. These data tendencies are read in during the CCPP initialization stage, and applied during the _run stage, if requested by the nml. There are new interstitial variables for the data tendencies.

To use this feature on the host-model side the Suite Definition File (SDF) needs to be modified to include the ccpp_scheme_simulator scheme, and GFS_ccpp_scheme_sim_pre.

There are examples included that exercise this new tool. Documentation will follow.

@grantfirl
Copy link
Collaborator

Associated PR: NCAR/ccpp-physics#996

Next, the physics namelist needs to be configured to:
\begin{enumerate}
\item Add data file, \execout{suite\_sim\_file} created in \ref{section:Creating_Custom_Data_for_Simulator} to the namelist.
\item Turn ``off'' all schemes except the cloud microphysics (see Fig. \ref{lst_css_nml_ex2})
Copy link
Collaborator

@hertneky hertneky Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix reference here - should point to listing 7.2

\end{itemize}
\end{itemize}

For example, in Listing \ref{lst_css_nml}, there are two active schemes, longwave and shortwave radiaiton, and five simulated schemes: PBL, gravity-wave drag, deep/shallow convection, and cloud microphysics. The radiation, gravity-wave drag and PBL schemes are all process-split, whereas convection and cloud microphysics are time-split.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this is still pointing to the wrong Listing (looking at the most updated pdf)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

nfiles = 0
fileSCM = []
for nml in namelist:
fileSCM.append("../../../../scm/run/output_" + case_name + "_" + suite+"_"+nml+"/output.nc")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work for my test runs as the 'nml' is not appended to my case directory.
For example, when executing this script, it looks for
../../../../scm/run/output_MAGIC_LEG15A_SCM_GFS_v17_p8_input_GFS_v17_p8/output.nc does not exist.
But it is named:
../../../run/output_MAGIC_LEG15A_SCM_GFS_v17_p8/output.nc

It looks like the 3d works in this way as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hertneky Good catch. It should be fixed now.

@hertneky
Copy link
Collaborator

@dustinswales In input_GFS_v17_p8.nml, there is a parameter do_ccpp_suite_sim, but I don't see it documented. This looks like it is used by ccpp_suite_simulator.F90 and GFS_ccpp_suite_sim_pre.F90. Does this also need to exits and be turned on in the namelist?

@dustinswales
Copy link
Collaborator Author

@dustinswales In input_GFS_v17_p8.nml, there is a parameter do_ccpp_suite_sim, but I don't see it documented. This looks like it is used by ccpp_suite_simulator.F90 and GFS_ccpp_suite_sim_pre.F90. Does this also need to exits and be turned on in the namelist?

@hertneky Another good catch!
I updated the documentation, see section 7.2.5.

@dustinswales
Copy link
Collaborator Author

@mkavulich This is ready to merge. Can you approve?

Copy link
Collaborator

@mkavulich mkavulich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dustinswales Sorry this review is so late. The code changes look good but I have some minor documentation corrections. Otherwise good to go.

scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
scm/doc/TechGuide/chap_hsd.tex Outdated Show resolved Hide resolved
@grantfirl grantfirl merged commit 16bbc00 into NCAR:main Aug 3, 2023
17 checks passed
@dustinswales dustinswales deleted the ccpp_scheme_sim branch August 3, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants