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/documentation/contributing.md
+16-24Lines changed: 16 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,35 +276,27 @@ def check_my_feature(self):
276
276
277
277
If your check enforces a physics constraint, also add a `PHYSICS_DOCS` entry (see [How to Document Physics Constraints](#how-to-document-physics-constraints) below).
278
278
279
-
**Step 5: Declare in Fortran** (`src/<target>/m_global_parameters.fpp`)
279
+
**Step 5: Fortran declaration and namelist binding (auto-generated)**
280
280
281
-
Add the variable declaration in the appropriate target's global parameters module. Choose the target(s) where the parameter is used:
281
+
Scalar declarations, GPU declare lines, Doxygen descriptions, and namelist bindings are
282
+
auto-generated at CMake configure time from the `TYPED_DECLS` and `FORTRAN_ARRAY_DIMS`
283
+
tables in `toolchain/mfc/params/definitions.py`. For a plain scalar registered with
284
+
`_r()` / `_nv()` above, no manual Fortran edit is needed — reconfigure (`./mfc.sh build`)
285
+
and the generated include in each target's `m_global_parameters.fpp` is updated
286
+
automatically.
282
287
283
-
-`src/pre_process/m_global_parameters.fpp`
284
-
-`src/simulation/m_global_parameters.fpp`
285
-
-`src/post_process/m_global_parameters.fpp`
288
+
Still manual (not auto-generated):
286
289
287
-
```fortran
288
-
real(wp) :: my_param !< Description of the parameter
289
-
```
290
-
291
-
If the parameter is used in GPU kernels, add a GPU declaration:
292
-
293
-
```fortran
294
-
$:GPU_DECLARE(create='[my_param]')
295
-
```
296
-
297
-
**Step 6: Add to Fortran namelist** (`src/<target>/m_start_up.fpp`)
298
-
299
-
Add the parameter name to the `namelist /user_inputs/` declaration:
300
-
301
-
```fortran
302
-
namelist /user_inputs/ ... , my_param, ...
303
-
```
290
+
-`TYPE` member definitions inside derived types in `src/common/m_derived_types.fpp`
291
+
- Default-value assignments in `s_assign_default_values_to_user_inputs`
0 commit comments