# For help: get output variables form Rayleigh

**URL:** <https://community.geodynamics.org/t/for-help-get-output-variables-form-rayleigh/598>\
**Category:** Rayleigh\
**Created:** [April 27, 2019, 2:36pm UTC](https://community.geodynamics.org/t/for-help-get-output-variables-form-rayleigh/598 "2019-04-27T14:36:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zth](https://avatars.discourse-cdn.com/v4/letter/z/b19c9b/32.png) [@zth](https://community.geodynamics.org/u/zth)\
**Post date:** [April 27, 2019, 2:36pm UTC](https://community.geodynamics.org/t/for-help-get-output-variables-form-rayleigh/598/1 "2019-04-27T14:36:17Z")

</div>

Hi all,

I am new to Rayleigh and I am trying to simulate magnetic filed by running it. To prepare the input file and get results, I copied the _&output\_namelist_ from _benchmark\_diagnostics\_input_ file to the main\_input file I was using. However, I found that there are no magnetic variables in the\*&output\_namelist\* (please see below). I was wondering should I add the magnetic variables in the main\_input file?  
Also I did find the magnetic variables listed in _Rayleigh\_Output\_Variables.pdf_. But I don’t know how should I write the code to make it work. Appreciate if you can help or have any suggestions!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
The out\_namelist from benchmark\_diagnostics\_input:

&output\_namelist

! New equatorial slices output  
equatorial\_values = 1,2,3 ! velocity components  
equatorial\_frequency = 5000  
equatorial\_nrec = 2

!New meridional slices output. You must also specify the number of phi-indices  
!Valid values range from 1 through nphi = 2\*n\_theta  
!The indices below range from phi = 0 up to phi = pi  
meridional\_values = 1,2,3 ! radial and phi components of velocity; temperature  
meridional\_frequency = 5000  
meridional\_nrec = 2  
meridional\_indices\_nrm = 0.7

shellslice\_levels\_nrm = 0.9  
shellslice\_values = 1,2,3 ! velocity components  
shellslice\_frequency = 10000  
shellslice\_nrec = 2

shellspectra\_levels\_nrm = 0.5 , 0.9  
shellspectra\_values = 1,2,3 ! velocity and temperature  
shellspectra\_frequency = 10000  
shellspectra\_nrec = 2

azavg\_values = 1,2,3,201,202,501 ! same as above + r- and theta- mass flux  
azavg\_frequency = 1000  
azavg\_nrec = 10

point\_probe\_values = 1,2,3, 1201,1202,1203,1216, 1219,1220, 1221, 1228,1229,1230  
point\_probe\_r\_nrm = 0.2, 0.6, 0.9  
point\_probe\_theta\_nrm= 0.35  
point\_probe\_phi\_nrm = 0.21, 0.72  
point\_probe\_frequency=10  
point\_probe\_nrec=500  
point\_probe\_cache\_size=100

! velocity, temperature, energy fluxes, and Kinetic Energy  
shellavg\_values = 1,2,3,501, 1438, 1468  
shellavg\_frequency = 200  
shellavg\_nrec = 50

! Kinetic energy, Mean KE, Diff-Rot KE, and Convective KE  
globalavg\_values = 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412  
globalavg\_frequency = 100  
globalavg\_nrec = 100

sph\_mode\_ell = 2,4,8  
sph\_mode\_levels\_nrm = 0.4, 0.7, 0.9  
sph\_mode\_values = 1,2,3  
sph\_mode\_frequency = 100  
sph\_mode\_nrec = 50

full3d\_values = 64 ! temperature  
full3d\_frequency = 9000000  
/

%%%%%%%%%%%%%%%%  
snap shot of the variable list:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/75f8781bcf93f107d1f27a856cac9fed6c1763bb.png)

---

<div class="post-metadata">

**Author:** ![feathern](https://avatars.discourse-cdn.com/v4/letter/f/e8c25b/32.png) [@feathern](https://community.geodynamics.org/u/feathern)\
**Post date:** [April 29, 2019, 7:00pm UTC](https://community.geodynamics.org/t/for-help-get-output-variables-form-rayleigh/598/2 "2019-04-29T19:00:05Z")

</div>

Hi Zhou,  
Glad to hear of someone new using Rayleigh! The short answer to your question is “yes,” in general you can just add the magnetic variables to the output list BUT your input file needs to be set up to use magnetism. An example input file is the c2001\_case1\_input file, and details are discussed in Rayleigh\_user\_Guide.pdf. Note that you may also find the Diagnostic\_Plotting.html/pdf files useful as well (html looks a lot better than pdf as far as formatting goes).  
All the Best,  
Nick

---

<div class="post-metadata">

**Author:** ![zth](https://avatars.discourse-cdn.com/v4/letter/z/b19c9b/32.png) [@zth](https://community.geodynamics.org/u/zth)\
**Post date:** [May 4, 2019, 1:08am UTC](https://community.geodynamics.org/t/for-help-get-output-variables-form-rayleigh/598/3 "2019-05-04T01:08:38Z")

</div>

Thanks Nick. With your reply I reread the user guide, and was able to add magnetic parameters into the output. It is easy by simply adding the the variable codes into the output lines. Those new-added variables were also able to be visualized by adjusting the Diagnostic\_plotting code.

Thanks for your answer.
