Skip to content

Commit f850833

Browse files
committed
more info on diffs in cam-sima
1 parent c466dca commit f850833

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/conversion/interstitials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ As mentioned, there are some calculations/conversions/translations that are perf
4343
- **update_dry_static_energy**: calculate dry static energy (`dry_static_energy`)
4444
- **qneg.F90**:
4545
- **qneg**: Set values for constituent variables that are less than the minimum value to the minimum value (and print out what it's doing - configurable!)
46-
- **physics_tendency_updaters.F90**: apply tendencies output by physics to state variables
46+
- **physics_tendency_updaters.F90**: apply tendencies output by physics to state variables. You'll need to include a tendency updater in your SDF for any `ptend%X` variables in the CAM-version of your code.
4747

4848
| Scheme name | Description | Inout variable | Input variable |
4949
|:------------|-------------|----------------|----------------|

docs/conversion/run-cam-sima.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ Once you have successfully run CAM-SIMA and all answer changes have either accep
5454
5555
## Tips for uncovering unexpected answer changes
5656
57+
- Make sure that your snapshot is taken with an updated atmospheric_physics, especially if answers changed during development
5758
- Check all of your standard_names. CAM-SIMA will run successfully, but if a standard_name is incorrect, you may be running with an incorrect variation of the variable that you intended
5859
- If comparing printed values on the physics grid between CAM and CAM-SIMA, then it might be good to turn-off chunking in CAM, which can be done by setting “-pcols” in “CAM_CONFIG_OPTS” to be a large number (e.g. >500 for the ne3 grid).
5960
- You can also utilize the `tools/find_max_nonzero_index.F90` tool to (more) easily compare values between CAM and CAM-SIMA at a specific rank and index that is known to be non-zero
6061
- Note that the way latitude in radians is calculated for the null dycore in CAM-SIMA is different (at a round-off level) to the way it is calculated in the SE dycore in CAM. This means if you are validating a physics scheme that has latitude (in radians) as an input, then in CAM you’ll need to change the scheme interface to read in latitude in degrees, and then convert to radians by multiplying by pi/180 (which you’ll only want to do when creating the snapshot file, not when validating CAM itself).
6162
- Sometimes CAM-SIMA will set a state variable directly, while CAM will only set a tendency variable and then use the “physics_update” routine to update the state using the tendency. This can result in round-off level differences. If this happens then simply try setting the state variable directly in CAM when creating the snapshot files for CAM-SIMA testing.
63+
- Namelist settings may be incompatible with what is being run in CAM-SIMA with it being a single physics package versus the complete CAM code. For instance, a normal CAM run may have a default namelist setting and then a different value for "clubb_sgs=1 microphys=mg3" which is what a CAM7 run would be. To temporarily work around this, set the values which are evaluating incorrectly in your `user_nl_cam` file for CAM-SIMA to the values which match a CAM run. The easy way to find these is to compare your `atm_in` values with your CAM and CAM-SIMA runs and add the appropriate settings.
64+
- Compare numbers between a run in CAM and another in CAM-SIMA. A debug run with the `--pecount 1` argument provided to create_newcase gives you an executable which works well in the [Totalview debugger](../development/debugging.md/#totalview).
65+
66+
!!! Warning "timestep discrepancy"
67+
The cam_snapshot file will be written starting with the second timestep, so your **CAM** run will need to advance past the first timestep before you can start comparing.
68+
6269
- If you run into a "tip" that should be added here, please confer with the other CAM SEs to get it added to the documentation!!

0 commit comments

Comments
 (0)