You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/conversion/check-metadata.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -102,10 +102,13 @@ If the variable in question cannot be tracked back to a “use” statement or a
102
102
!!! Note - registry variables
103
103
Variables in the registry are read in from the initial data file by default.
104
104
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
+
105
108
There are two options for registry variables:
106
109
107
110
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:
109
112
- 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)
110
113
- 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
111
114
- 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
128
131
- If it seems like the automatic unit converter should be able to handle the unit conversion, talk to Courtney
129
132
- If it’s more of a one-off conversion, two options remain:
130
133
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