Add diagnostic object to CCPP-framework
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 25
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
Description
A new object for which the data would be handled by the framework would be a nice have for CCPP; it would mean you could pass around the object between schemes and add diagnostic fields to it (and store values for those fields in buffers at a specific time during model execution)
Solution
-
An object (extending the
ccpp_hashable_char_ttype like the constituents object) that would live in$CCPP-framework/srcand contain necessary information for a diagnostic field, including:- diagnostic name
- long name and/or standard name
- units
- dimensions
- possibly an averaging flag (although that might be handled by the host model)
- buffer containing the data captured at the chosen point
- could also include additional buffers to keep track of minimum, maximum, average, standard deviation (depends on whether we want the host to be responsible for that kind of thing since the types of output likely vary between models)
It would have (at least) the following methods:
- INITIALIZE: add the metadata for a field that can be output
- POPULATE BUFFER: populate the buffer for that field
-
An instance of the
ccpp_hash_table_ttype, managed by the host cap, that contains hashable field objects described in (1). It would at least contain the following methods:- ADD FIELD: initializes a field's metadata and buffers and adds it to the hash table (done at init time)
- CAPTURE FIELD: find the field in the hash table and call the POPULATE BUFFER method of the object in (1) (done outside of init time)
- GET DIAGNOSTIC FIELD: search the hash table given a diagnostic name and, if it's there, return the field metadata and buffer(s)
Alternatives (optional)
@gold2718 also proposed auto-generating the calls to add fields and the calls to out fields by specifying in the metadata that a specific variable is one that we wish to be captured.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in $CCPP-framework/src by examining the existing constituents object, ccpp_hashable_char_t, and ccpp_hash_table_t. Clarify how diagnostic metadata and buffers should be represented, including capture timing and optional statistics, before defining the ADD FIELD, CAPTURE FIELD, and GET DIAGNOSTIC FIELD behavior. Done means the design and implementation support registering, populating, and retrieving diagnostic fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100