Skip to content

Commit 722710b

Browse files
committed
update conversion documentation to reflect new atmos_phys directory structure
1 parent a273c14 commit 722710b

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs/conversion/conversion-background.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bin/git-fleximod update
7272

7373
- Make a new directory for your parameterization within the atmospheric_physics submodule directory
7474
```
75-
mkdir src/physics/ncar_ccpp/<parameterization_name>
75+
mkdir src/physics/ncar_ccpp/schemes/<parameterization_name>
7676
```
7777

7878
- Navigate into the atmospheric_physics submodule directory

docs/conversion/convert-portable-layer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ The portable module will most likely live in `$CAM/src/physics/cam` or `$CAM/src
1313
The driver code in each physics directory is `physpkg.F90`, which typically calls the CAM interface to the portable layer (often called `<parameterization>_cam.F90`), but also sometimes calls portable layer directly.
1414
Once you locate the core code that you will be converting, copy it into the new directory you created in the atmospheric_physics submodule directory:
1515
```
16-
cp $CAM/src/physics/<physics_subdir>/<file>.F90 $CAM-SIMA/src/physics/ncar_ccpp/<parameterization_name>
16+
cp $CAM/src/physics/<physics_subdir>/<file>.F90 $CAM-SIMA/src/physics/ncar_ccpp/schemes/<parameterization_name>
1717
```
1818

1919
## Optional: pre-split the module
2020
Many CAM schemes have more than one "run" or "tend" method contained within them. To split them into separate files and test them, do the following:
2121

22-
- In the atmospheric physics directory (`ncar_ccpp`), create a separate module for each piece which has a "run" or "tend" method.
22+
- In the atmospheric physics directory (`ncar_ccpp/schemes/<parameterization_name>`), create a separate module for each piece which has a "run" or "tend" method.
2323
- An easy way to see what routines need to be separated out, is to look at the "use" statement(s) in `physpkg.F90` for your parametrization's module. If more than one routine is listed, you most likely will need to separate these out.
2424
- If there is shared, module-level data or shared subroutines which are called internally, put these all in a <scheme_name>_common.F90 module.
2525

@@ -169,12 +169,12 @@ Make ESCOMP/atmospheric_physics and ESCOMP/CAM tags if substantial changes have
169169

170170
- Do at the very least a sanity compilation and run using the ESCOMP/CAM code base
171171
- Delete the original module from src/physics/cam
172-
- Use your pulled apart modules in atmos_phys/<schemename>.
172+
- Use your pulled apart modules in `atmos_phys/schemes/<parameterization_name>`.
173173
- In bld/configure in the ESCOMP/CAM source code, find the section "Add the CCPP'ized subdirectories". Add following line:
174174
```
175-
print $fh "$camsrcdir/src/atmos_phys/<schemename>\n";
175+
print $fh "$camsrcdir/src/atmos_phys/schemes/<parameterization_name>\n";
176176
```
177177
- Modify code as needed until this modified code compiles and runs properly.
178-
- If you want to benchmark your development to this point, you will need to open PRs to both NCAR/atmospheric_physics and ESCOMP/CAM.
178+
- If you want to benchmark your development to this point, you will need to open PRs to both ESCOMP/atmospheric_physics and ESCOMP/CAM.
179179

180180
Proceed to [2 - Create metadata](create-metadata.md)

docs/conversion/create-sdf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 5 - Create an SDF
22
The **Suite Definition File (SDF)** tells the CCPP-Framework which schemes will be run in what order. For more, see [CCPP in CAM-SIMA](../design/ccpp-in-cam-sima.md)
33

4-
- In `$CAM-SIMA/src/physics/ncar_ccpp`, create `suite_<parameterization>.xml`. This is your SDF!
4+
- In `$CAM-SIMA/src/physics/ncar_ccpp/suites`, create `suite_<parameterization>.xml`. This is your SDF!
55
- See the template below. You will need to select either `physics_before_coupler` or `physics_after_coupler` as your group name.
66
```
77
<?xml version="1.0" encoding="UTF-8"?>

docs/conversion/interstitials.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ An **interstitial** is a scheme that does calculations or variable modifications
66
- In CAM, interstitial code will appear as either function calls or calculations/modifications in the CAM interface just before or just after the call to the parameterization
77
- If the interstitial code is a function call, that function/module should be CCPP-ized (if not already) and that scheme will be included in the SDF
88
- It the interstitial code is loose in the CAM interface, it is recommended that, when possible, that code be moved into the scheme (either the beginning or end of the scheme subroutine)
9-
- UNLESS: it's a common (across multiple parameterizations) calculation/translation/modification. In which case, a new scheme should be created to do that calculation (scheme will live in `$CAM-SIMA/src/physics/ncar_ccpp/utilities`)
10-
- If it is absolutely necessary to create a scheme-specific interstitial, that scheme should be called `<parameterization>_pre` or `_post` (depending on where in the SDF it will be placed) and will live in the `ncar_ccpp/<parameterization>` directory
9+
- UNLESS: it's a common (across multiple parameterizations) calculation/translation/modification. In which case, a new scheme should be created to do that calculation (scheme will live in `$CAM-SIMA/src/physics/ncar_ccpp/schemes/utilities`)
10+
- If it is absolutely necessary to create a scheme-specific interstitial, that scheme should be called `<parameterization>_pre` or `_post` (depending on where in the SDF it will be placed) and will live in the `ncar_ccpp/schemes/<parameterization>` directory
1111

1212
This section covers a few interstitial scenarios you are likely to face.
1313

@@ -20,7 +20,7 @@ All `addfld`/`outfld` calls will go in a `<parameterization>_diagnostic.F90` int
2020
- See: [History Usage](../usage/history.md/#adding-a-diagnostic-field-to-the-cam-sima-source-code) for the specifications of the CAM-SIMA-versions of `addfld` and `outfld` calls
2121

2222
## Utilities
23-
As mentioned, there are some calculations/conversions/translations that are performed often throughout the physics code in CAM. These schemes are available for use in the `$CAM-SIMA/src/physics/ncar_ccpp/utilities` directory and include:
23+
As mentioned, there are some calculations/conversions/translations that are performed often throughout the physics code in CAM. These schemes are available for use in the `$CAM-SIMA/src/physics/ncar_ccpp/schemes/utilities` directory and include:
2424

2525
- **state_converters.F90**: contains common conversions/calculations of [state variables](../design/ccpp-in-cam-sima.md/#state-and-tendency-variables), including these schemes:
2626

docs/conversion/walkthrough.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ git branch ccppize-lunar-tides ESCOMP/development
3535
git checkout ccppize-lunar-tides
3636
git push -u bugsy9236 ccppize-lunar-tides
3737
bin/git-fleximod update
38-
mkdir src/physics/ncar_ccpp/lunar_tides
39-
cp ../CAM/src/physics/cam/lunar_tides.F90 src/physics/ncar_ccpp/lunar_tides/
38+
mkdir src/physics/ncar_ccpp/schemes/lunar_tides
39+
cp ../CAM/src/physics/cam/lunar_tides.F90 src/physics/ncar_ccpp/schemes/lunar_tides/
4040
cd src/physics/ncar_ccpp
4141
git remote add bugsy9236 https://github.com/bugsy9236/atmospheric_physics
4242
git fetch bugsy9236
@@ -592,7 +592,7 @@ He then populates the generated metadata template (`lunar_tides.meta`) with the
592592
Bug will revisit the missing standard names when he hears back from the other CAM SEs/scientists about what the names should be.
593593

594594
## 4 - Create namelist XML file
595-
Bug creates the following namelist xml file (called `lunar_tides_namelist.xml`) in the `ncar_ccpp/lunar_tides` directory. It contains one entry - for `apply_lunar_tides`
595+
Bug creates the following namelist xml file (called `lunar_tides_namelist.xml`) in the `ncar_ccpp/schemes/lunar_tides` directory. It contains one entry - for `apply_lunar_tides`
596596
```
597597
<?xml version="1.0"?>
598598

0 commit comments

Comments
 (0)