Skip to content

Latest commit

 

History

History
96 lines (62 loc) · 4.57 KB

running.rst

File metadata and controls

96 lines (62 loc) · 4.57 KB

Running PyCLES

Generation of Input Namelist

Once PyCLES has been installed on your system, you are nearly ready to begin doing Large Eddy Simulation. Only one step remains! PyCLES requires preparation of an input namelist that specifies various runtime parameters. To simplify input namelist file preparation, we have developed a python script that automatically generates the required input file for the standard cases included in PyCLES. This script is called generate_namelist.py, to use it to generate for a particular case, say a case called CASE_NAME, simply run:

$ python generate_namelist.py CASE_NAME

The table below lists cases that generate_namelist.py can generate input namelists for

CASE_NAME Case Type Reference
StableBubble Stable Bubble [Straka1993]
SaturatedBubble Saturated Ascending Bubble [Pressel2015]
SullivanPatton Dry Convective Boundary Layer [Sullivan2011]
Gables Stable Boundary Layer [Kosovic2000]
Bomex Shallow Cumulus [Siebesma2003]
DYCOMS_RF01 Stratocumulus [Stevens2005]

Running PyCLES

Serial Executions

Once an input namelist has been generated, call it CASE_NAME.in a simulation can be started by running:

$  python main.py CASE_NAME.in

Parallel Executions

By default the input namelist generated by generate_namelist.py is for a serial simulation. To run a simulation in in parallel the input file CASE_NAME.in needs to be modified. CASE_NAME.in is a JSON file. JSON files are human readable and editable. Let us suppose that you would like run PyCLES on four computational cores, to do this open CASE_NAME.in in the text editor of your choosing. Inside CASE_NAME.in you will find the following text block

"mpi": {
    "nprocx": 1,
    "nprocy": 1,
    "nprocz": 1
},

nprocx, nprocy, and nprocz are the number of processors in the x, y, and z coordinate directions. So to use 4 processers set nprocx=2, nprocx=2 by modifying the above text to be

"mpi": {
    "nprocx": 2,
    "nprocy": 2,
    "nprocz": 1
},

save the file and exit your text editor. Now you can run PyCLES on four processors by executing the terminal command:

$  mpirun -np 4 python main.py CASE_NAME.in

Parallel Execution on Euler @ ETHZ

To submit a parallel job using four cores on Euler use the batch queuing system. Run:

$  bsub -n 4 mpirun python main.py CASE_NAME.in

References

Kosovic2000

Branko Kosović and Judith A. Curry, 2000: A Large Eddy Simulation Study of a Quasi-Steady, Stably Stratified Atmospheric Boundary Layer. J. Atmos. Sci., 57, 1052–1068.

Pressel2015

Pressel, K. G., C. M. Kaul, T. Schneider, Z. Tan, and S. Mishra, 2015: Large-eddy simulation in an anelastic framework with closed water and entropy balances. Journal of Advances in Modeling Earth Systems, in press.

Siebesma2003
  1. Pier Siebesma, Christopher S. Bretherton, Andrew Brown, Andreas Chlond, Joan Cuxart, Peter G. Duynkerke, Hongli Jiang, Marat Khairoutdinov, David Lewellen, Chin-Hoh Moeng, Enrique Sanchez, Bjorn Stevens, and David E. Stevens, 2003: A Large Eddy Simulation Intercomparison Study of Shallow Cumulus Convection. J. Atmos. Sci., 60, 1201–1219.
Stevens2005

Bjorn Stevens, Chin-Hoh Moeng, Andrew S. Ackerman, Christopher S. Bretherton, Andreas Chlond, Stephan de Roode, James Edwards, Jean-Christophe Golaz, Hongli Jiang, Marat Khairoutdinov, Michael P. Kirkpatrick, David C. Lewellen, Adrian Lock, Frank Müller, David E. Stevens, Eoin Whelan, and Ping Zhu, 2005: Evaluation of Large-Eddy Simulations via Observations of Nocturnal Marine Stratocumulus. Mon. Wea. Rev., 133, 1443–1462.

Straka1993

Straka, J. M., R. B. Wilhelmson, L. J. Wicker, J. R. Anderson, and K. K. Droegemeier (1993), Numerical solutions of a non- linear density current: A benchmark solution and comparisons, International Journal for Numerical Methods in Fluids, 17 (1), 1–22.

Sullivan2011

Peter P. Sullivan and Edward G. Patton, 2011: The Effect of Mesh Resolution on Convective Boundary Layer Statistics and Structures Generated by Large-Eddy Simulation. J. Atmos. Sci., 68, 2395–2415.