NCAR / NCAR/ccpp-framework

Framework needs to support restart capability

Open
#250 1 comment 0 reactions 1 assignee View on GitHub

@gold2718 is already working on this.

Since Jan 18, 2020.

capgen enhancement wontfix
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

Physics schemes and suites which contain internal state need a way to save and restore this state via host-model restart files. Following is a proposal for creating this functionality.
Two new optional CCPP scheme interfaces will be supported:

  • <scheme>_restart_save(field_name, field_buffer): Given field_name, fill field_buffer with the appropriate data.
  • <scheme>_restart_restore(field_name, field_buffer): Given field_name and field_buffer, restore the state of the appropriate internal buffer.

If these interfaces are present, they will be called from the host model cap via these new host cap interfaces:

  • <host_name>_ccpp_physics_restart_save(suite_name, field_name, field_buffer): Call the appropriate <scheme>_restart_save routine.
  • <host_name>_ccpp_physics_restart_restore(suite_name, field_name, field_buffer): Call the appropriate <scheme>_restart_restore routine.

In order for the host model to know which fields need to be written to and read from its restart files, any field which needs to be saved needs to set the (new) restart_required attribute to True. capgen will return a list of these fields and associated metadata to the host model build system.

It is an error for a physics scheme to have a field marked as restart_required = True and not provide <scheme>_restart_save and <scheme>_restart_restore interfaces.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.