Skip to content

Commit bb4731a

Browse files
committed
Add notes on registry vs. .meta file
1 parent 4cd358b commit bb4731a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/conversion/check-metadata.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ If the variable in question cannot be tracked back to a “use” statement or a
102102
!!! Note - registry variables
103103
Variables in the registry are read in from the initial data file by default.
104104

105+
!!! Note - registry or scheme?
106+
**Should I add a variable to the registry or rely on CCPP to manage the variables being passed between schemes?** While declaring a variable in the scheme metadata files allows CCPP to pass this variable from a scheme and to another scheme without having to define it in the registry, it is important to note that variables not declared in the registry are not preserved between timesteps (i.e., the timestep initialization phase will reallocate these variables). Thus variables that should be preserved as part of model "state" or (formerly) physics buffer variables with time dimensions (e.g., total energy at end of previous physics timestep) should be included as part of the registry.
107+
105108
There are two options for registry variables:
106109

107110
1. Variable read in from the initial data file: no action required
108-
1. Variable not read in from the initial data file, and instead intialized during CAM-SIMA initialization. You will need to add code to do this:
111+
2. Variable not read in from the initial data file, and instead initialized during CAM-SIMA initialization. You will need to add code to do this:
109112
- Determine the best place to initialize this variable (has to occur at some point during initialization - see [CAM-SIMA run](../design/cam-run-process.md/#cam_init)
110113
- In the location you have chosen, add the use statements below to import the registry variable from the auto-generated fortran AND the mark_as_initialized routine
111114
- After adding the code to initialize the variable, add the `mark_as_initialized` call below to indicate that that variable should NOT be read in from the file.
@@ -128,4 +131,4 @@ The units you are using for a variable in your converted scheme has a different
128131
- If it seems like the automatic unit converter should be able to handle the unit conversion, talk to Courtney
129132
- If it’s more of a one-off conversion, two options remain:
130133
1. Write an interstitial for the unit conversion
131-
2. Include the conversion in the scheme code (you will also need to update the CAM interface to make sure it’s passing in the same units as the CAM-SIMA host has)
134+
2. Include the conversion in the scheme code (you will also need to update the CAM interface to make sure it’s passing in the same units as the CAM-SIMA host has)

0 commit comments

Comments
 (0)