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 Framework to provide API calls for suite inspection by host #380

Open
grantfirl opened this issue Jun 10, 2021 · 4 comments
Open

CCPP Framework to provide API calls for suite inspection by host #380

grantfirl opened this issue Jun 10, 2021 · 4 comments

Comments

@grantfirl
Copy link
Collaborator

Description

In the UFS (and copied in the SCM) the host needs to know information about the suite being run in order to conditionally allocate variables and set some control parameters. Right now, there is the messy situation that these control variables are set via namelist, regardless of what is actually in the SDF, which necessitated adding a bunch of consistency checks in the host code (see, e.g. NOAA-EMC/fv3atm#302) and/or in the init stage of schemes. The namelist variables (most? all?) can go away if there was a way for the host to ask the framework if scheme X is present in the SDF.

Solution

Add a function in the CCPP API like scheme_in_suite_check('scheme_X') that returns a boolean.

Alternatives (optional)

Status quo: namelist variables that must be made consistent with the SDF (currently manually) and check for errors at run-time in the code.

Related to (optional)

Related to NOAA-EMC/fv3atm#302.

Apologies if this functionality already exists or has been planned.

@gold2718
Copy link
Collaborator

Is this proposed interface for runtime, build time (post framework), or both?

@climbfuji
Copy link
Collaborator

climbfuji commented Jun 11, 2021 via email

@grantfirl
Copy link
Collaborator Author

grantfirl commented Jun 11, 2021

@gold2718 This is for runtime. @climbfuji reminded me that we definitely have discussed addressing this in the past, but I didn't see any issue that actually requested this. This isn't any more urgent than it was the last time we talked about it, it was just brought to the forefront of my mind with some recent PRs in FV3 and SCM. @climbfuji, I'll see if I can dig up the meeting notes where this was discussed to link to the issue. I very much appreciate your note-taking for those meetings, but do you know if there is an easy way to search through them? Last time when I needed to look something up, I had to rely on my memory of approximate timeline and manually click through the meeting dates until I found what I was looking for.

@gold2718
Copy link
Collaborator

Currently (in capgen), there is a post-framework database access for the processes, e.g.,

<ccpp_framework>/scripts/ccpp_datafile.py --process-list <build_dir>j/ccpp/ccpp_datatable.xml

should output a list of schemes tied to processes, e.g.,

deep_convection=am,microphysics=thompson

To add a runtime API, we need to define the desired interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants