2022/04/11

Introduction to running TASK

A. Fukuyama
Professor Emeritus, Kyoto University
1. Basic operation
2. How to setting parameters
3. Operation of equilibrium module: TASK/EQ
4. Operation of transport module: TASK/TR
5. Coupled operation of TASK/EQ and TASK/TR

Basic operation• Setup of graphic library GSAF
– At the beginning of TASK codes, setup of GSAF is required.
◦ Select graphic resolution (0: metaﬁle only, no graphics, n:)◦ Input one character command· c: continue· f: set metaﬁle name (e.g. xxx.gs) and start saving• Choice of graphic operation– At the end of one page drawing, choose one char. command◦ c or CR: change focus to original window and continue◦ f: set metaﬁle name and start saving◦ s: start saving and save this page
◦ y: save this page and continue◦ n: continue without saving◦ d: dump this page as a bitmap ﬁle “gsdumpn ”◦ q: quit program after conﬁrmation

Graphic Utilities• Utility program– gsview: View metaﬁle– gsprint: Print metaﬁle on a postscript printer– gstoeps: Convert metaﬁle to eps ﬁles of each page
– gstops: Convert metaﬁle to a postscript ﬁle of all pages• Options– -a: output all pages, otherwise interactive mode
– -s ps: output from page ps– -e pe: output until page pe– -p np : output contiguous np pages on a sheet– -b: output without title• Example– gstops -ab xxx.gs: convert all ﬁgures to one postscript ﬁle– gstoeps -ab xxx.gs: convert each ﬁgure to a eps ﬁleTypical File Name of TASK
• XXcomm.f90: Deﬁnition of global variables, allocation of arrays• XXmain.f90: Main program for standalone use, read XXparm ﬁle• XXmenu.f90: Command input• XXinit.f90: Default values• XXparm.f90: Read input parameters• XXview.f90: Show input parameters• XXprep.f90: Initialization of run, initial proﬁle• XXexec.f90: Execution of run• XXgout.f90: Graphic output• XXfout.f90: Text ﬁle output• XXsave.f90: Binary ﬁle output• XXload.f90: Binary ﬁle input

Typical input command• When input line includes =, interpreted as a namelist input (e.g., rr=6.5)• When the ﬁrst character is not an alphabet, interpreted as a onecharacter command– r: Initialize proﬁles and execute– c: Continue run– p: Namelist input of input parameters– v: Display of input parameters– g: Graphic output– w: print output– s: Save results into a ﬁle– l: Load results from a ﬁle– q: End of the programHow to setting input parameters• Default setting of the module– Default parameters are set at the subroutine XX init in XXinit.f90• Preset parameter ﬁle– If there is a namelist ﬁle XXparm in the executing directory, the module
reads the ﬁle after the default parameter setting in XX init.
– Be careful not to leave an unnecessary ﬁle XXparm for avoiding unintentional set of parameters.

• Setup of parameters by input lines– You can set parameters by an input line of the namelist form
name1=value1, name2=value2, name3=value3– You can set a list of parameters by the input lines after the one char.
command “p” in the form of namelist ﬁle&XX
name1=value1, name2=value2, name3=value3/(more lines)

How to run TASK/EQ (1)• Interactive operation with default parameters–cd task/eq– If there is a ﬁle named eqparm in this directory, remove or rename it– On macOS, start the module from a xterm window, not from a terminal window.
– Key input sequence./eq
start eq module)
5(window size 1024x760)c(continue operation)r(run the module with default setting)g(start eq graphic interface)s2(2D standard plot)
CR,CR,CR,CR(repeat Carriage Return 4 times)x(exit eq graphic interface)q(quit eq module)

How to run TASK/EQ (2)• Interactive operation with a preset ﬁle–
cd task/eq–
cp parm/eqparm.ITER eqparm– On macOS, start the module from a xterm window, not from a terminal window.
– Key input sequence./eqstart eq module)
5(window size 1024x760)c(continue operation)r(run the module with default setting)g(start eq graphic interface)s(1d and 2D standard plot)
CR×10(repeat Carriage Return 10 times)x(exit eq graphic interface)q(quit eq module)•rm eqparm(remove eqparm ﬁle)How to run TASK/EQ (3)• Batch operation with an input ﬁle–cd task/eq– Start the module which reads an existing input ﬁle (in/eq.ITER01.in),writes an output ﬁle (eq.ITER01.out), and generates a graphic metaﬁle(eq.ITER01.gs)./eq <in/eq.ITER01.in >eq.ITER01.out– View the graphic output
On macOS, start from a xterm window, not from a terminal window.
gsview eq.ITER01.gs

Enter ﬁgure page number or 0 for all– Convert the graphic metaﬁle to a postscript ﬁlegstops -ab eq.ITER01.gs >eq.ITER01.ps– Convert all the ﬁgures in the graphic metaﬁle to EPS ﬁlesgstoeps -ab eq.ITER01.gs

How to run TASK/TR (1)• Interactive operation with default parameters– Example of key input sequence
cd task/tr./tr2(start tr module: tr may conﬂict with a unix command)
5(window size 1024x760)c(continue operation)r(start a run with default setting)g(start tr graphic interface)t6(time evolution) CR for next graphic input
r1(radial proﬁle)x(exit tr graphic interface)c(continue the run)g(start tr graphic interface)t6(time evolution)
r1(radial proﬁle)x(exit tr graphic interface)q(quit eq module)

How to run TASK/TR (2)• Interactive operation with a preset ﬁle–––

cd task/eq–

rm trparmcp parm/trparm.ITER trparm./tr2
start tr module)
5(window size 1024x760)c(continue operation)r(run the module with default setting)ntmax=1000 nbtot=25(change parameters)c(continue run)g(start eq graphic interface at 6 s)t6(time evolution, CR for next input)
r1(radial proﬁle)x(exit eq graphic interface)q(quit eq module)(remove trparm ﬁle)How to run TASK/EQ (3)• Batch operation with an input ﬁle– Input ﬁle: in/tr.ITER01.in– This example uses a ﬁxed-boundary equilibrium ﬁle ../eq/eqdata.ITER01
in a previous eq run–
cd task/eq–./tr2 <in/tr.ITER01.in | tee tr.ITER01.out–gsview tr.ITER01.gs