Skip to content

Commit bb0168a

Browse files
committed
Converting documentation code blocks to use the traditional $ to indicate command line prompt. This was needed for the documentation for versioned module files to communicate the correct terminal output. Conversion to $ was done to the rest of the documentation for consistency
1 parent 0f29bb5 commit bb0168a

File tree

3 files changed

+124
-95
lines changed

3 files changed

+124
-95
lines changed

scm/doc/TechGuide/chap_cases.rst

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ DEPHY-SCM file location to the SCM.
110110

111111
.. note::
112112

113-
Not all forcing methods available in external DEPHY-SCM cases are currently
113+
Not all forcing methods available in external DEPHY-SCM cases are currently
114114
supported in the CCPP SCM. For example:
115-
116-
- ``surface_forcing_moisture``: "beta", "mrsos"
115+
116+
- ``surface_forcing_moisture``: "beta", "mrsos"
117117
- ``surface_forcing_wind``: "ustar"
118118
- ``surface_type``: "seaice"
119119

@@ -123,10 +123,10 @@ Example to run a DEPHY-SCM case:
123123

124124
.. code:: bash
125125
126-
cd [...]/ccpp-scm/scm/data
127-
git clone https://github.com/GdR-DEPHY/DEPHY-SCM DEPHY-SCM
128-
cd [...]/ccpp-scm/scm/bin
129-
./run_scm.py -c MAGIC_LEG04A --case_data_dir [...]/ccpp-scm/scm/data/DEPHY-SCM/MAGIC/LEG04A -v
126+
$ cd [...]/ccpp-scm/scm/data
127+
$ git clone https://github.com/GdR-DEPHY/DEPHY-SCM DEPHY-SCM
128+
$ cd [...]/ccpp-scm/scm/bin
129+
$ ./run_scm.py -c MAGIC_LEG04A --case_data_dir [...]/ccpp-scm/scm/data/DEPHY-SCM/MAGIC/LEG04A -v
130130
131131
Each DEPHY file has three dimensions (``time``, ``t0``, ``levels``) and contains the initial
132132
conditions (``t0``, ``levels``) and forcing data (``time``, ``levels``). Not all fields
@@ -158,7 +158,7 @@ To convert a case, run the script with the -n option followed by the name of the
158158

159159
.. code:: bash
160160
161-
python dephy_converter.py -n name_of_case
161+
$ python dephy_converter.py -n name_of_case
162162
163163
This script performs the following actions:
164164
- Reads the legacy case file from ccpp-scm/scm/data/processed_case_data/name_of_case.nc
@@ -365,7 +365,7 @@ following steps:
365365

366366
.. code:: bash
367367
368-
./lasso1_forcing_file_generator_gjf.py
368+
$ ./lasso1_forcing_file_generator_gjf.py
369369
370370
#. Create a new case configuration file (or copy and modify an existing
371371
one) in ``ccpp-scm/scm/etc/case_config``. Be sure that the ``case_name`` variable points to the newly
@@ -390,29 +390,29 @@ Create environment (only once):
390390

391391
.. code:: bash
392392
393-
> conda env create -f environment-ufscasegen.yml
393+
$ conda env create -f environment-ufscasegen.yml
394394
395395
This will create the conda environment ``env_ufscasegen``
396396

397397
Activate environment:
398398

399399
.. code:: bash
400400
401-
> conda activate env_ufscasegen
401+
$ conda activate env_ufscasegen
402402
403403
Note that it may be possible for conda to fail to solve for the environment when attempting to use the yml file. It
404404
should still be possible to create the same environment manually:
405405

406406
.. code:: bash
407407
408-
> conda create --name env_ufscasegen
409-
> conda install -n env_ufscasegen --channel=conda-forge python=3.8.5
410-
> conda install -n env_ufscasegen --channel=conda-forge netcdf4
411-
> conda install -n env_ufscasegen --channel=conda-forge f90nml
412-
> conda install -n env_ufscasegen --channel=conda-forge xarray
413-
> conda install -n env_ufscasegen --channel=conda-forge numpy
414-
> conda install -n env_ufscasegen --channel=conda-forge shapely
415-
> conda install -n env_ufscasegen --channel=conda-forge xesmf
408+
$ conda create --name env_ufscasegen
409+
$ conda install -n env_ufscasegen --channel=conda-forge python=3.8.5
410+
$ conda install -n env_ufscasegen --channel=conda-forge netcdf4
411+
$ conda install -n env_ufscasegen --channel=conda-forge f90nml
412+
$ conda install -n env_ufscasegen --channel=conda-forge xarray
413+
$ conda install -n env_ufscasegen --channel=conda-forge numpy
414+
$ conda install -n env_ufscasegen --channel=conda-forge shapely
415+
$ conda install -n env_ufscasegen --channel=conda-forge xesmf
416416
417417
.. _`ufscasegenpy`:
418418

@@ -425,10 +425,13 @@ format.
425425

426426
.. code:: bash
427427
428-
./UFS_case_gen.py [-h] (-l LOCATION LOCATION | -ij INDEX INDEX) -d
429-
DATE -i IN_DIR -g GRID_DIR -f FORCING_DIR -n
430-
CASE_NAME [-t {1,2,3,4,5,6,7}] [-a AREA] [-oc]
431-
[-lam] [-sc] [-near] [-fm] [-vm] [-wn] [-geos]
428+
$ ./UFS_case_gen.py --help
429+
usage: ./UFS_case_gen.py [-h] (-l LOCATION LOCATION | -ij INDEX INDEX)
430+
[-d DATE] -i IN_DIR -g GRID_DIR -f FORCING_DIR
431+
-n CASE_NAME [-t {1,2,3,4,5,6,7}] [-a AREA]
432+
[-oc] [-lam] [-sc] [-near]
433+
[-fm {1,2,3}] [-vm {1,2}] [-wn] [-geos]
434+
432435
433436
Mandatory arguments:
434437

@@ -559,12 +562,12 @@ generating multiple cases at once.
559562

560563
.. code:: bash
561564
562-
UFS_forcing_ensemble_generator.py [-h] -d DIR -n CASE_NAME
563-
(-lonl LON_1 LON_2 -latl LAT_1 LAT_2 -nens NENSMEMBERS |
564-
-lons [LON_LIST] -lats [LAT_LIST] |
565-
-fxy [LON_LAT_FILE] |
566-
-tile [TILE_NUMBER] -is [I_INDEX_LIST] -js [J_INDEX_LIST])
567-
[-dt TIMESTEP] [-cres C_RES] [-sdf SUITE] [-sc] [-near] [-fm] [-vm] [-wn] [-geos]
565+
$ UFS_forcing_ensemble_generator.py --help
566+
usage: UFS_forcing_ensemble_generator.py [-h] -d DIR -n CASE_NAME [-lonl LON_LIMITS LON_LIMITS] [-latl LAT_LIMITS LAT_LIMITS]
567+
[-lons [LON_LIST ...]] [-lats [LAT_LIST ...]] [-fxy LONLAT_FILE]
568+
[-nens NENSMEMBERS] [-tile TILE] [-is [I_LIST ...]] [-js [J_LIST ...]] [-dt TIMESTEP]
569+
[-cres C_RES] [-sdf SUITE] [-sc] [-near] [-lam] [-fm {1,2,3}]
570+
[-vm {1,2}] [-wn] [-geos]
568571
569572
Mandatory arguments:
570573
@@ -624,14 +627,15 @@ supplying the vertical velocity for the vertical advective terms and nudging the
624627
625628
.. code:: bash
626629
627-
./UFS_forcing_ensemble_generator.py -d [path_to_regression_tests_output]/control_c192_intel/ -sc --C_RES 192 -dt 360 -n control_c192 -lons 300 -lats 34 -fm 2 -vm 2 -wn
630+
$ ./UFS_forcing_ensemble_generator.py -d [path_to_regression_tests_output]/control_c192_intel/ \
631+
-sc --C_RES 192 -dt 360 -n control_c192 -lons 300 -lats 34 -fm 2 -vm 2 -wn
628632
629633
Upon successful completion of the script, the command to run the case(s)
630634
will print to the screen. For example,
631635
632636
.. code:: bash
633637
634-
./run_scm.py --npz_type gfs --file scm_ufsens_control_c192.py --timestep 360
638+
$ ./run_scm.py --npz_type gfs --file scm_ufsens_control_c192.py --timestep 360
635639
636640
The file ``scm_ufsens_control_c192.py`` is created in ``ccpp-scm/scm/bin/``, where the SCM run script is to be exectued.
637641
@@ -644,14 +648,15 @@ UFS regression test, ``control_c384``, for multiple points assuming the same for
644648
645649
.. code:: bash
646650
647-
./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_c384_intel/ -sc --C_RES 384 -dt 225 -n control_c384 -lons 300 300 300 300 -lats 34 35 35 37 -fm 2 -vm 2 -wn
651+
$ ./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_c384_intel/ \
652+
-sc --C_RES 384 -dt 225 -n control_c384 -lons 300 300 300 300 -lats 34 35 35 37 -fm 2 -vm 2 -wn
648653
649654
Upon successful completion of the script, the command to run the case(s)
650655
will print to the screen. For example,
651656
652657
.. code:: bash
653658
654-
./run_scm.py --npz_type gfs --file scm_ufsens_control_c384.py --timestep 225
659+
$ ./run_scm.py --npz_type gfs --file scm_ufsens_control_c384.py --timestep 225
655660
656661
The file ``scm_ufsens_control_c384.py`` contains ALL of the cases created. Each case created will have the
657662
naming convention ``case_name_nXXX``, where the suffix ``XXX`` is the case number from 0 to the
@@ -689,14 +694,15 @@ Now the cases can be generated with the following command:
689694
690695
.. code:: bash
691696
692-
./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_p8_intel -sc --C_RES 96 -dt 720 -n control_p8 -lonl 300 320 -latl 40 50 -nens 10 -sdf SCM_GFS_v17_p8
697+
$ ./UFS_forcing_ensemble_generator.py -d /glade/derecho/scratch/epicufsrt/ufs-weather-model/RT/NEMSfv3gfs/develop-20240607/control_p8_intel \
698+
-sc --C_RES 96 -dt 720 -n control_p8 -lonl 300 320 -latl 40 50 -nens 10 -sdf SCM_GFS_v17_p8
693699
694700
Upon successful completion of the script, the command to run the case(s)
695701
will print to the screen. For example,
696702
697703
.. code:: bash
698704
699-
./run_scm.py --npz_type gfs --file scm_ufsens_control_p8.py --timestep 720
705+
$ ./run_scm.py --npz_type gfs --file scm_ufsens_control_p8.py --timestep 720
700706
701707
The file ``scm_ufsens_control_p8.py`` contains ten cases (n000-n009) to be run. The contents of the
702708
file should look like:

scm/doc/TechGuide/chap_hsd.rst

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ Create environment (only once):
114114

115115
.. code:: bash
116116
117-
> conda env create -f environment-suite-sim.yml
117+
$ conda env create -f environment-suite-sim.yml
118118
119119
This will create the conda environment ``scm_suite_sim``
120120

121121
Activate environment:
122122

123123
.. code:: bash
124124
125-
> conda activate scm_suite_sim
125+
$ conda activate scm_suite_sim
126126
127127
Enabling the CCPP Suite Simulator
128128
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -211,25 +211,25 @@ interpolates these forcings in time.
211211

212212
.. code:: bash
213213
214-
cd ccpp-scm/scm/bin
215-
./run_scm.py -c twpice -s SCM_GFS_v16
216-
./run_scm.py -c twpice -s SCM_GFS_v17_p8
214+
$ cd ccpp-scm/scm/bin
215+
$ ./run_scm.py -c twpice -s SCM_GFS_v16
216+
$ ./run_scm.py -c twpice -s SCM_GFS_v17_p8
217217
218218
#. Create 2D forcing data for the CSS, using SCM output from TWPICE case
219219
with ``GFS_v16`` suite.
220220

221221
.. code:: bash
222222
223-
cd ccpp-scm/scm/etc/scripts/ccpp_suite_sim
224-
./create_2D_CSSdata.py --cases twpice --suites SCM_GFS_v16
223+
$ cd ccpp-scm/scm/etc/scripts/ccpp_suite_sim
224+
$ ./create_2D_CSSdata.py --cases twpice --suites SCM_GFS_v16
225225
226226
#. Create constant forcing data for the CSS, using SCM output, at
227227
forecast time 3600s, from TWPICE case with ``GFS_v17_p8`` suite.
228228

229229
.. code:: bash
230230
231-
cd ccpp-scm/scm/etc/scripts/ccpp_suite_sim
232-
./create_1D_CSSdata.py --cases twpice --suites SCM_GFS_v17_p8 --time 3600
231+
$ cd ccpp-scm/scm/etc/scripts/ccpp_suite_sim
232+
$ ./create_1D_CSSdata.py --cases twpice --suites SCM_GFS_v17_p8 --time 3600
233233
234234
The data file will be written to ``ccpp-scm/scm/etc/scripts/ccpp_suite_sim/`` with the format ``data_CSS_DIM.CASES.SUITES.nc``
235235

@@ -267,9 +267,9 @@ and run the SCM using TWPICE case with the modified suite.
267267

268268
.. code:: bash
269269
270-
cd ccpp-scm/scm/bin
271-
cmake ../src -DCCPP_SUITES=SCM_GFS_v16
272-
./run_scm.py -c twpice -s SCM_GFS_v16
270+
$ cd ccpp-scm/scm/bin
271+
$ cmake ../src -DCCPP_SUITES=SCM_GFS_v16
272+
$ ./run_scm.py -c twpice -s SCM_GFS_v16
273273
274274
.. _`Suite_with_Active_cldmp`:
275275

@@ -309,9 +309,9 @@ and run the SCM using TWPICE case with the modified suite.
309309

310310
.. code:: bash
311311
312-
cd ccpp-scm/scm/bin
313-
cmake ../src -DCCPP_SUITES=SCM_GFS_v17_p8
314-
./run_scm.py -c twpice -s SCM_GFS_v17_p8
312+
$ cd ccpp-scm/scm/bin
313+
$ cmake ../src -DCCPP_SUITES=SCM_GFS_v17_p8
314+
$ ./run_scm.py -c twpice -s SCM_GFS_v17_p8
315315
316316
.. _`plotting_tools`:
317317

@@ -322,7 +322,9 @@ Additionally, plotting scripts provided in :
322322

323323
#. .. code:: bash
324324

325-
./plt_scmout_2d.py [-h] -n CASE_NAME -sdf SDF -nmls NMLS -vars VAR1 VAR2 VAR3
325+
$ ./plt_scmout_2d.py --help
326+
usage: plt_scmout_2d.py [-h] -n CASE_NAME -sdf SUITE [-nmls [NML_LIST ...]] -vars [VAR_LIST ...]
327+
326328

327329
Mandatory arguments:
328330

@@ -336,7 +338,8 @@ Additionally, plotting scripts provided in :
336338

337339
#. .. code:: bash
338340

339-
./plt_scmout_3d.py [-h] -n CASE_NAME -sdf SDF -nmls NMLS -vars VAR1 VAR2 VAR3 -time TIME
341+
$ ./plt_scmout_3d.py --help
342+
usage: plt_scmout_3d.py [-h] -n CASE_NAME -sdf SUITE [-nmls [NML_LIST ...]] -vars [VAR_LIST ...] [-time TIME_PLOT]
340343

341344
Mandatory arguments:
342345

0 commit comments

Comments
 (0)