1 TRANSP This document contains information on how to maintain and operate TRANSP: the time dependent tokamak transport and data analysis code. Since TRANSP as a research code is under continuous developement there can be no guarantee that the information contained in this help file is complete and up to date. However I will attempt to update contents occasionally as time permits. 2 WWW_users This information is for users viewing this file through a web browser. This is a HTML-ized VMS help document. Some of the older information is oriented to VMS users. My apologies to UNIX users! However, the "Namelist" section is equally valid for UNIX and VMS. (Note Apr 2002: most VMS information, being obscolescent, has now been removed). Sometimes this document will refer to text in another part of the document with a statement like: see $ TRANSPHELP OPER NAMELIST NCLASS WWW users can interpret this as follows: TRANSPHELP refers to the "root" of the document OPERations refers to a "1st level" subtopic, under the root. NAMELIST refers to a "2nd level" subtopic under OPERATIONS. NCLASS refers to a "3rd level" subtopic under NAMELIST. which you should be able to find by following the presented outline of HTML links. 2 Introduction It is not necessary to have a deep understanding of all the physics models in TRANSP in order to run TRANSP-- although it helps. This document does not describe the details of the physics models: only how to turn them on and off and what minimum information must be supplied to control them. TRANSP operational commands-- i.e. how to start a TRANSP run and how to monitor its progress-- are also described in this document. There is also information on code structure and maintenance, but much of this is old (e.g. VMS oriented), has been moved to the bottom of the edocument, and should not be of interest to the average user. 2 UPDATE_NOTES June 2009 -- NLREPLAY_HEATER & REPLAY_DATA_PATH controls allow heating and current drive sources to be replayed from a prior run, instead of being recomputed. Updatable Namelist quantities (PTRANSP related, Mar 2009) -- see subtopic. WARNING -- PTRANSP 2009 namelist updates incomplete, not ready for use! LEVGEO=8 upgrade (Nov 2006) -- see subtopic. PTRANSP upgrade (June 2006) -- see the subtopic. NUBEAM module doc update -- McCune Oct 2004 Fusion Collaboratory Update -- Ludescher/McCune Apr 2002 date: Oct 2004: transp.hlp documentation of NUBEAM controls has been cleaned up. NUBEAM includes a new feature for automated timestep adjustment based on accuracy criteria; DTN in TRANSP namelists (which used to adjust NUBEAM timestep controls) is now ignored. date: April 2002: TRANSP has been added to the Fusion Collaboratory and can be run as a computational service at PPPL. Documentation of this service is under development; in the meantime interested potential users should write to D. McCune (dmccune@pppl.gov). Also new in 2002: predictive features added to TRANSP: -- radiative loss model (based on Coronal Equilibrium) -- modern predictive transport models (GLF23 and MMM95 from the NTCC modules library). TRANSP physics and other software packages are being made available for use outside of TRANSP, e.g. by other driver codes. The famous TRANSP Monte Carlo fast ion package is now available. See: http://w3.pppl.gov/NTCC 3 Updatable_Namelist [DMC March 2009] To support PTRANSP applications, we have added a capability to allow select namelist quantities to be updated during the course of the run. Typically, the updatable namelist quantities are controls for the PTRANSP predictive transport model. Such updates can be imposed asynchronously, by positioning a namelist file with the name TR.UPDATE in the root directory of an active run. The updates will be picked up prior to the next time step, and a record of the update is appended to TR.DAT. Alternatively, such updates can be pre-scheduled by appending to the end of the main namelist TR.DAT file text in the following syntax: ~update_time = ... A TR.UPDATE file can also contain a leading "~update_time" record so that the update is received asynchronously but scheduled according to the provided time within the simulation. The time must be at or after the current time in the simulation when the file is read. The file can also specify a sequence of updates in multiple blocks, in ascending order of time. The TR.DAT file can also contain multiple ~update_time blocks; they must be specified in ascending order in time. If an asynchronous update is received, this supersedes ALL ~update_time blocks at or after the time of application of the asynchronously received update. If a run is restarted, TR.DAT is reread. Update blocks at future times will be applied based on the file contents at the time of reading (these could be different thant they were at the start of the run). Here is an example of use of prescribed update times: in the main namelist section: nmdifb=1 ! activate anomalous diffusion of fast ions nkdifb=3 ! impose on beam and fusion product ions alike bdifb=1.0e3 ! this & next line specify Db=1000 cm**2/s cdifb=1.0e3 then at the end of the namelist file TR.DAT: ~update_time=3.5 bdifb=3.0e3 ! this & next line specify Db=3000 cm**2/s cdifb=3.0e3 ~update_time=4.2 bdifb=1.0e4 ! this & next line specify Db=10000 cm**2/s cdifb=1.0e4 NOTE: in this example updates are shown which could have been prescribed using an older set of namelist arrays {tdifba,bdifba,cdifba}. For quantities where multiple time update mechanisms exist, it is best not to try to use more than one update technique in the same run; TRANSP error checking logic may enforce this by stopping the run. Asynchronous updates are recorded as received, as "~update_time" prescribed updates in the active run's TR.DAT file, so that a rerun of the case with a copy of the namelist will see the same namelist update sequence. 4 Updatable_Quantities Many namelist quantities are not expected to vary in time and therefore are NOT updatable. Such quantities generally fall into the following categories: Machine geometry descriptions (beams, antennas, limiters); Shot configuration information (species lists, direction of toroidal field and current); Other information, the use of which has required a complicated initialization executed only once at the start of a run: for example, basic radial grid sizes like NZONES. Controls which could be updatable, but the code to implement the capability has not yet been written. The updatable namelist feature is implemented as a separate namelist containing a subset of the quantities in the main TRANSP namelist. The current list of updatable quantities is defined in the TRANSP source code in codesys/source/freeshare/port.spec. The presence of the tilda "~" symbol in a namelist quantity type specification indicates updatability. For example: port.spec: D 0 TINIT = 0.05D0 ! INITIAL VALUE OF TA port.spec: ~D 0 FTIME = 0.85D0 ! FINAL TIME This indicates that the stop time of a simulation is updatable (but still subject to time limits of available input data). The start time is not updatable. 4 Time_event_Tables Generally, time-tabulated model controls are an older mechanism for time dependent control of the TRANSP model that predate the development of the updatable namelist. The updatable namelist feature was added to support PTRANSP. Time dependence of some controls must be specified through the updatable namelist when PTRANSP is active (specifically, tabulated controls under TKEMOD, TKIMOD, and TVPHMODA cannot be present when PTRANSP features are active). Most time-tabulated controls in the namelist are not modifiable by an update namelist. The balance of this section describes the existing time-tabulated model controls which came before the updatable namelist feature. The existence of time dependent model controls serves several purposes, such as: -- to only use diagnostic data when it is valid; -- to use experimental data to control a simulation for a period of time and then switch to predictive simulation part way through. These control event tables are always optional; by default, "untabulated controls" are used to specify an option to be applied throughout the entire simulation. Each event table has an array of times (currently of maximum length (15)) specifying the time of application of a change in controls. Because these table controls were developed at different times in the history of the code, and cannot now be redefined due to backwards compatibility requirements with existing namelists, the behavior of the event tables varies. For some tables the first time indicates when to switch from untabulated controls to table values; for others the presence of table controls means the untabulated controls are never used, and the first time indicates when to switch from the 1st control set to the 2nd control set. In the former case, time (j) causes a transition from time index (j-1) to (j); in the latter time (j) causes a transition from time index (j) to (j+1). This will be illustrated by example, below. Because some table controls affect data (e.g. Zeff) that must be kept continuous, the tables have various adjustable minimum spacings between event times. The minimum time spacing generally only applies if the model change would force an unacceptable discontinuity. Even where continuity is not an issue, all events times in a table must be separated by a minimum nominal dt of 1.0e-7 seconds. The following control event tables exist: tqmoda(...) -- control model for q(x,t) or select predictive use of poloidal field diffusion equation; tkemod(...) -- control electron transport model or select direct use of Te input data -- legacy, not used with PTRANSP! tkimod(...) -- control ion transport model or select direct use of Ti input data -- legacy, not used with PTRANSP! tvphmoda(...) -- control angular momentum transport model or select direct use of angular velocity data -- legacy, not used with PTRANSP! tzefmod(...) -- select data source for Zeff -- VB and "Magdif" Zeff options not available with PTRANSP; setting of Zeff from impurity not available in PTRANSP run with density prediction. trfrac(...) -- select specie recycling fractions; (for PTRANSP use updatable RFRAC(...)) tgfrac(...) -- select specie gas flow fractions; (for PTRANSP use updatable GFRAC(...)) tdifba(...) -- select anomalous transport model for fast ions; These event tables have the following characteristics: event times minimum separation transition use with PTRANSP ----------- ------------------ ---------- ---------------- tqmoda tauqmod j -> j+1 unaffected tkemod dtesave j -> j+1 No tkimod dtisave j -> j+1 No tvphmoda dtomsave j-1 -> j No tzefmod dtzefmod(...) j -> j+1 restricted trfrac 1.0e-7 seconds j-1 -> j No tgfrac 1.0e-7 seconds j-1 -> j No tdifba 1.0e-7 seconds j-1 -> j unaffected The transition indication "j -> j+1" means that if table data is present at all, the table data associated with event times controls the simulation at all times; the j'th event time is a transition from associated controls at index position (j) to (j+1). Example of j -> j+1 control style (not a PTRANSP run): TINIT=2.0 ! start time of run TKIMOD=2.1,2.5 NKIMODA=4,99,-4 The untabulated control NKIMOD is never used; NKIMOD=NKIMODA(1) from TINIT to TKIMOD(1)=2.1s; NKIMOD=NKIMODA(2) from TKIMOD(1) to TKIMOD(2)=2.5s, and NKIMOD=NKIMODA(3) from TKIMOD(2) to the end of the simulation. The transition indication "j-1 -> j" means that the code is controlled by untabulated settings until the first event time; the j'th event time is a transition from the scalar controls or (j-1) index position to the (j) index position. Example of j-1 -> j control style (not a PTRANSP run): NVPHMOD=0 TVPHMODA=3.0,4.0,5.0 NVPHMODA=2,1,0 The scalar control NVPHMOD is in effect until TVPHMODA(1)=3.0s; then NVPHMODA(1) is used from TVPHMODA(1)=3.0s to TVPHMODA(2)=4.0s, etc. 3 LEVGEO_8_upgrade The "scrunch2" program and TRANSP have been upgraded (Nov. 2006) to enable: A) Direct representation of inverse MHD equilibia as {R(theta,x;t),Z(theta,x;t)} (avoid Fourier series truncation). theta is defined in terms of equal arc length instead of a VMEC-derived formulation meant to minimize the number of moments needed. TRANSP is no longer dependent on the moments representation internally, using instead "xplasma" bicubic splines. TRANSP output (rplot) still has the output in moments form; the maximum number of moments is now 64. B) External field-- Psi(R,Z;t) can be extracted from EFIT via "scrunch2". This is blended with the interior equilibrium, however computed or read by TRANSP, with smoothing at the edge of one grid spacing of the (R,Z) rectangular grid. Future upgrades of NUBEAM may allow accurate tracking of fast ion orbits beyond the plasma boundary, using this data. An (R,Z) guiding center integrator is being added to NUBEAM. C) Numerical limiter-- The EFIT {(R_i,Z_i)} piecewise linear contour can now be used as a limiter, e.g. for detection of fast ion orbit loss. When this is used it supersedes the traditional "circles and infinite lines" limiter description from the TRANSP namelist. 3 PTRANSP_upgrade 4 PTRANSP_project Note (2011): The PTRANSP project (as a separately funded grant) expired in 2010. However, due to ITER and experimental project interest there will be some level of continuing effort to develop predictive capabilities of TRANSP (i.e. PTRANSP). [Notes from July 2007] The PTRANSP project (development of predictive upgrades for TRANSP) resumed in July 2007. This project is focused on predictive upgrades to TRANSP itself. Important upgrades, such as improvements to the two temperature stiff solver, have been implemented. PTRANSP-related TRANSP namelist variables will be described in the main body of this document. 4 PTRANSP_Analysis_outputs [D. McCune added this section Jan. 2011] In many of the predictive options of PTRANSP the following sequence of operations takes place at each time step: [acquire input data] if (predictive-run) then [execute prediction using transport equations] endif [analyze data using transport equations] A series of multigraphs are generated to compare the transport (divergence of flux) employed by the predictive model with that seen by the analysis. In each of these there is a profile of "model" transport (from the predictive calculation) and "observed" transport (from the analysis). If no predictive calculation was done the "model" transport profile will be identically zero. If a predictive calculation was done, the two profile, while not necessarily identical for technical reasons, should still match closely. If they do not-- please request a TRANSP developer to examine the run (email: transp_support@pppl.gov). In addition, for the ion and electron energy balance and for the toroidal angular momentum balance equations where prediction is used, there are multigraphs to compare thermal or momentum diffusivity profiles from the predictive model with those inferred from the analysis. The multigraph profile names are as follows: PTR_H, PTR_D, PTR_T, etc.: single ion species particle balance EPTR -- electron particle balance IPTR -- summed main plasma ion species particle balance XPTR -- summed impurity ion species particle balance EETR -- electron energy balance IETR -- ion energy balance AMTR -- toroidal angular momentum balance KAPAN -- thermal diffusivity analysis (ions & electrons) CHIPHA -- toroidal angular momentum diffusivity analysis The diffusivity analysis requires subtracting the non-diffusive (i.e. advective) contribution from total transport. To evaluate this and get a match with predictive transport equation solution, any upwind differencing must be taken into account. The UPWIND multigraph shows a set of dimensionless profiles representing the direction and amount of upwind differencing applied (details are provided in a separate section of this document). 4 TSC_server DMC Jan 2011 -- this mode of operation has not been maintained and is no longer available... PTRANSP related upgrade -- June 2006. TRANSP can now be configured to analyze results from a free boundary predictive tokamak model. In TRANSP terminology, this predictive model is known as a "Fusion Simulation Project" (FSP) client. TRANSP itself acts as a "Fusion Simulation Project" (FSP) server. The services TRANSP provides are: (a) provide heating and current drive sources due to neutral beams, RF, alpha heating, and neutral gas sources. (b) carry out a standard TRANSP analysis of the predictive solver results (as if these were experimental data) and produce the standard TRANSP output database (NetCDF or MDSplus). In its initial configuration, the FSP client will control the timestep for updating sources and will need to provide providing the following time evolving data: (1) MHD equilibrium and poloidal field evolution (This includes the vacuum field, total plasma current, and the surface voltage). (2) Electron temperature and density (A particle confinement time tau(p) = N/gamma(a) must also be specified). (3) Ion temperature. (4) Zeff. In addition it may optionally provide: (5) Toroidal angular velocity profile. (6) Profile of radiated power. If these are omitted, TRANSP itself can either use input data or its internal predictive models to compute their evolution. In this mode, of course, one is not really "using" TRANSP, but rather, using the code which calls TRANSP services. We have implemented this for the PPPL TSC code. Users provide TSC namelists and use TSC tools to view code results, but TRANSP data is also produced. This is work in progress. 2 Documentation Other sources of information (besides this HELP file) are available to figure out what is going on in TRANSP: TRANSP webpage: http://w3.pppl.gov/transp National Transport Code Collaboration webpage (where many TRANSP code components are available for download): http://w3.pppl.gov/NTCC People collaborating on TRANSP development projects also have access to the source code. Most TRANSP sources have a lot of internal documentation. Of particular interest will be: source/freeshare/port.for -- TRANSP COMMON & namelist specification including default values. source/outcor/plotgen.i -- TRANSP output data specification source/misc/trdatgen.spec -- TRANSP input data specification and possibly also: source/tr_vaxdata/dprset.for -- TRANSP (trdat) namelist defaults For those not engaged in code development, the above can also be found at ftp://ftp.pppl.gov/pub/transp/codata/gen A number of plaintext documents are available in source/doc/* which are also mirrored at ftp://ftp.pppl.gov/pub/transp/codata/doc In this archive some documents of particular interest might be: trintro.doc -- a short (3-page) introduction to using TRANSP. (somewhat dated) sampletr.dat -- a sample namelist (dated but gives a general idea). refs.doc -- references to published scientific literature related to TRANSP. And there is much additional information covering a wide variety of topics. The BEST source of information on TRANSP would be talking with current expert users and developers. People at PPPL with greater or lesser familiarity with various aspects of TRANSP are: D. McCune R. Budny S. Kaye R. Andre M. Gorelenkova C. Ludescher-Furth X. Yuan 2 Operations choose subtopic-- If you have your namelist and Ufiles already, and want to start a TRANSP run, see the section TRANSPruns. TRANSP run id's have been generalized to allow a shot-try format. See the section Run_identification. All TRANSP software supports both the old and new format run id. 3 Introduction So you want to make a TRANSP run? You need two things: (a) access to high quality tokamak data (b) the time and patience to learn how to use the TRANSP namelist, input data preparation tools, and output data display tools. TRANSP and supporting codes constitute a large system. It is essentially a collection of physics and empirical data processing knowledge. The complete system encompasses a about a million lines of FORTRAN, over 100 executable programs, over 100 subroutine libraries. Just TRANSP itself contains 500,000 lines of FORTRAN, over 2000 subroutines, and up to 1000 named quantities in its plot output database. Mastery over this system is not won with only one or two days' effort. [Editorial note -- above code size estimates are from the 1990s. As of March 2011, the total size of the code for the TRANSP system, i.e. TRANSP itself plus supporting tools, is about 2.4 million lines of code]. On the other hand, the effort may be worth the cost. TRANSP is often the best tool available for time dependent analysis of tokamak data. Just going through the process of gathering and preparing a self- consistent data set for a TRANSP run is often very instructive, revealing much about the quality of the data. The analysis itself then yields a vast amount of information. If the data holds up under analysis, then the TRANSP output database can serve as the starting point for numerous quantitative comparisons with theoretical plasma physics models, giving a point of contact between theory and experiment. For purposes of getting started it is probably best to work first with an experienced TRANSP user. This HELP file is probably most useful as a reference for those who already have considerable familiarity with the system. 3 MDSplus_Run_identification In 1999-2002, TRANSP i/o was generalized to allow operation with data sharing over the network, based on the MDSPlus software of the MIT Plasma Fusion Center. (see http://w3.pppl.gov/transp/MDSPLUS ). A "standard MDSplus TRANSP tree" was agreed to by the major U.S. fusion labs (PPPL, GA, MIT, see: http://w3.pppl.gov/transp/MDSPLUS/tree.html ). Although PPPL TRANSP runs (even in MDSplus) continue to be identified using the traditional "tokamak.year shot-try" nomenclature, other labs have chosen a more MDSplus oriented approach, in which archived TRANSP runs are associated with an MDSplus experimental "shot tree", and each distinct TRANSP run is given a separate subtree name such as "TRANSP01", "TRANSP02", etc. However, the precise method for run identification is basically under the control of the TRANSP client site, and it does vary from lab to lab, although MDSplus based accessibility is now standard. All PPPL tools for looking at TRANSP output can access TRANSP results in the traditional method (via files on a local disk) or by the new MDSplus method (from MDSplus servers over the internet). Many of the traditional TRANSP client tools (such as "rplot" and "ufiles" software) are available for download from the PPPL National Transport Code Collaboration (NTCC) website: see http://w3.pppl.gov/NTCC . 3 PPPL_Run_identification Complete identification of a PPPL TRANSP run requires the following information: (a) a tokamak acronym (3 or 4 characters) (b) a two-digit shot year code (c) a run id: either the old four digit run number or the new shot-try identifier. The following are examples of complete TRANSP run ids: TFTR.84 9900 (TFTR, 1984 shot data, 4 digit run id 9900) TFTR.88 35782P02 (TFTR, 1988 shot data, shot-try run id 35782P02 which in the PPPL usage indicates a predictive run based loosely on data from TFTR shot 35782) A complete run id can be used for at most one TRANSP run. At PPPL the program $ GETRUN can be used to determine what runs exist and where the data is stored (i.e. on magnetic disk, optical disk, or tape). 4 Shot_Try_Identifiers Introduced in 1990, the eight character shot-try string is the new, preferred way of labeling TRANSP runs. The shot-try string has the format nnnnnCmm (typical), or nnnnnnCmmm (with 6 digit shot number and 3 digit try number). where: nnnnn is the 5 or 6 digit shot number (identifies the tokamak shot) 6 digit variant cannot have a leading zero. C is a one character run classification code (A-Z). mm is a 2 or 3 digit try number used to distinguish different runs of the same class on the same data. The 3 digit try numbers cannot have leading zeroes. TRANSP users or user groups may use the one character run class- ification code in any way they see fit. For example, the PPPL TFTR group used A for analysis, P for predictive runs, and Z for code testing or debug runs. Thus the run id 35782Z90 corresponds to a debug test run. However, this is a local convention of use and is not in any way imposed by the TRANSP code system. 4 Four_digit_Run_numbers Prior to 1990, the four digit run number was the only mechanism available for the labeling of TRANSP runs. The newer shot-try run identification scheme should be used in preference to the four digit run number. However, the four digit run number is still supported and will continue to be supported in TRANSP and related codes. Selection of run numbers for TRANSP runs is entirely in the hands of the operator(s) of TRANSP. Suggestion (if you must use the four digit run number): for each new "shot" or data set, "allocate" 20 unused run numbers for that shot. For example: for shot 12345 allocate run numbers 1220 through 1239. TRANSP run numbers are always 4 digits long, i.e. between 1000 and 9999. The first run number in the TRANSP run "series" for shot 12345 would be 1220, the second 1221, etc. For major changes in the input data one might skip to numbers 1230, 1231... or perhaps allocate a fresh set of 20 run numbers. Reusing run numbers for runs on data from the same tokamak and year of shot is not recommended. If more than one user is working on data from the same tokamak shot year, special caution must be employed in selecting run numbers, to avoid conflicts. 3 PPPL_VMS_legacy The old TRANSP system used to run exclusively on PPPL VMS machines. The system has long since been ported to unix, and, recently, the last VMS TRANSP run production system was turned off. However, PPPL TRANSP results can still be accessed on the PPPL VMS machines... 4 Disks_VMS TRANSP results data (from completed runs) reside on disks identified by the logical name RUNDATA: TRANSP run documentation resides on a disk identified by the logical name TRINF: TRANSP code and procedures reside on a disk called TRHOME:. Users that do not execute the TRANSP LOGIN procedures can also use the system wide TRANSP$ logical name to access TRANSP utilities: TRANSP$:[COM] is synonymous with TRHOME:[TRANSP.COM] (a directory of TRANSP DCL procedures). 4 Directories_VMS (read the section on disks first!) At PPPL (Apr 2002) the following tokamak directories are known: PLT PDX PBX PBXM TFTR NSTX ASDX AUGD BPX CIT D3D DIII FIRE HL1M ISX ITER JET JT60 JULI MAST NCSX TORS TXTR WRK Ufile data directories -- TRANSP provides a default set of directories for input data. UFILES physics input data are stored in subdirectories TRHOME:[TRANSP..DATA], also conveniently accessible via the LOGICAL NAMES _DATA. All TRANSP runs analyze data from one nominal shot (namelist item NSHOT) although the data itself may represent an amalgam from several actual shots. The shot number NSHOT must be imbedded in the filename of all UFILES to be used in a given TRANSP run. It is possible and may be desirable to create more directories for input data storage. At PPPL we do this for TFTR data. TFTR UFILEs are stored in areas TR_DISK:[name] where "name" is the name of the physicist preparing the input data for TRANSP. TRANSP run namelists are modified to specify where to find the UFILE input data. TRANSP run results directories -- Files for COMPLETED TRANSP runs are stored in subdirectories RUNDATA:[TRANSP..] where is a two-digit code constituting the last two digits of the YEAR of the SHOT. After a period of time, runs are removed from the RUNDATA: magnetic disks, because of limitations of storage space. However, the run's documentation file (xxxxTR.INF) and its input namelist (xxxxTR.DAT) are retained on disk and may be found in the directory TRINF:[.]. Example: The TRANSP run TFTR.90 46470Z02 ... completed results resided in RUNDATA:[TRANSP.TFTR.90] information on the run can be found in TRINF:[TFTR.90]46470Z02*.* At PPPL the program $ GETRUN can be used to restore migrated runs. Runs on laser disk can be restored by reference with $ RPLOT. 3 Unix_workstations Unix based TRANSP development systems and production systems are now the norm. Documentation for unix based systems is found largely in files found in the source distribution under codesys/source/doc. See for example unix_transp.doc. For general information on setting up a UNIX TRANSP system, see also anonymous ftp at: ftp::ftp.pppl.gov:pub/transp/codata start with the README file. 4 Directories_Unix TRANSP run results directories -- Output files for COMPLETED TRANSP runs are stored in subdirectories $ARCDIR// where is a two-digit code constituting the last two digits of the YEAR of the SHOT. Namelists and inf files are stored in $TRINF// 3 Programs The following programs are used in the process of creating a TRANSP run. ** this section to be updated (dmcApr16) ** ** for PPPL and Collaboratory Users ** ** VMS/UNIX differences to be noted (dmcApr16) ** RPLOT -- interactive program to look at TRANSP plot output. Also runs in batch to produce standard hardcopy plots. Define Environment TERMINAL_TYPE xterm -- "xterm" terminal emulator XTC -- "xtc" terminal emulator XTRANSPIN -- GUI to prepare a Namelist for a Transp run and submit the run. 4 RPLOT_PostScript_file To produce a PostScript file define environment "PLOT" (e.g. export PLOT=',foo.plt-ps') See http://w3.pppl.gov/~pshare/help/body_sg_hlp.html Note: tek2ps_sh and tek2ps must be in your $PATH tek2ps.pro should be in /usr/ntcc/etc, $cwd or in $TRANSP_LOCATION 3 Programs_UNIX The UNIX TRANSP developer with a standalone system will typically use the following programs: pretr -- set up scripts for a TRANSP run trdat -- examine input data for a TRANSP run runtr -- execute a TRANSP run A UNIX TRANSP user in a shared local UNIX production system may use commands as described in the user interface section of codesys/source/doc/tr_start.doc which if you need help finding you should ask the person at your site who is acting as keeper of the TRANSP production source code. See also: http://w3.pppl.gov/transp/production.html Note: JET has its own locally developed TRANSP production system. 3 Files INPUT: namelist and physics data 1234TR.DAT, UFILES, (optional) 1234EX.FOR for special code --all the above can now be in an MDSplus tree instead. PERMANENT OUTPUT in VMS RUNDATA:[TRANSP..] or UNIX $RESULTDIR/. traditional format: 1234TF.PLN -- plot data map and labels for RPLOT 1234MF.PLN -- profile plot data for RPLOT 1234NF.PLN -- scalar plot data for RPLOT NetCDF format: 1234.CDF -- all of the above in a single portable binary random access NetCDF file. --or, output may be stored in an MDSplus tree instead During execution, TRANSP creates and removes a sizable collection of temporary files. There are also some relatively seldom used special purpose output files which are not documented here. 3 UFILES physics data input to TRANSP. stored in a directory indicated by the INPUTDIR variable in the TRANSP namelist... or instead, input signals may now be stored in MDSplus. Ufiles help is available via the http://w3.pppl.gov/NTCC or http://w3.pppl.gov/transp webpages. 4 Utilities (these tools, which are used to prepare TRANSP input data, in the past read and wrote Ufiles but can now also read/write to MDSplus). (note -- the program names are in lower case on UNIX systems). (Apr 2011 note: the programs listed in this section are all very old, dating from the PPPL TFTR epoch or even earlier than that. Some folks still use them. Others have switched to using their own IDL procedures and scripts for data preparation, or, non-PPPL sites have provided their own sets of tools adapted for local needs. Many of the capabilities of these tools are imbedded in libraries that can be made sharable and can be coupled to scripting languages. For discussion of possibilities along these lines, contact the PPPL TRANSP team, transp@pppl.gov). GSMOO1 - SMOOTH 1d UFILES GSMOO2 - SMOOTH 2d UFILES GSMOOn routines also allow various types of smoothing, removal of glitches, "units transformations" (i.e. linear transforms f-->a*f+b for any axis of the data), and in GSMOO2, an interchange of axes f(x,y)<-->f(y,x). GAVER1 - AVERAGE 1d UFILES GAVER2 - AVERAGE 2d UFILES Input UFILES to the GAVERn routines should contain equivalent data units appropriate for averaging. The meaning of the dependent and independent axes of the inut data files should be compatible. In 1986 the GAVERn utilities were upgraded so that precise matching of independent axes of input data is no longer required. The first input file determines the axes for the output file; subsequent input files have their data interpolated to this fixed grid. Also in 1986 variable weighting and data summing options were added to the GAVERn programs. UGRAF1 - PLOT 1d UFILES UGRAF2 - PLOT 2d UFILES PROPANE - GENERATE hand-entered or analytic shaped UFILES EXTRAC - EXTRACT subset UFILES from 2d input UFILE. EXTRAC permits extraction of 1d UFILE "slices" with averaging options, or 2d "blocks" with sections of the original 2d UFILE deleted. Useful for removing bad sections of data, or taking the "most useful" part of a 2d UFILE and creating out of it a simpler to use 1d UFILE. CONCAT - CONCATENATE a series of 1d UFILES into a single 2d UFILE. Used e.g. to join a series of Thompson Scattering profiles (1d vs. r at individual times) to form a profile evolution file vs. r and t. The 1d input UFILES must have the same x axes (no. of pts and values) and each must contain a scalar from which the 2nd independent axis is to be constructe CONCAT can also be used to add additional profiles or time series to existing 2d Ufiles. New 1986 Utilities: SPLICE1 - splice 1d UFILES to form new 1d UFILE. E.g. read in a series of time trace UFILES, specify time intervals and associate a file with each interval; plot the result and/or write as a new UFILE. Sample application: splice neutron detectors so that the best count rate detector is in use at all times during a shot. SPLICE2 - 2d analog of SPLICE1 UFILES utilities are described in more detail in the UFILES manual (D. Mc Cune's office). All utilities are interactive menu driven programs. All use UREAD for control input and so may be readily adapted to batch mode use for automatic processing of large amounts of similar data (for UREAD HELP info type $ URHELP). UFILES utility experts at PPPL: R. Budny, D. Mc Cune, M. Zarnstorff. 3 NAMELIST The TRANSP namelist file nnnnTR.DAT actually contains two namelists: (1) TRDAT namelist. Define UFILEs input data to TRANSP. Specify certain data options, e.g. normalization of density profile data. The TRDAT namelist contains CHARACTER data and is not read by TRANSP. All entries in this namelist are described under the subtopic TRDAT. TRDAT is the input data preprocessor for TRANSP. (2) TRANSP namelist. All TRANSP options. This namelist is read by both TRDAT and TRANSP. When a TRANSP namelist switch setting requires availability of UFILEs data for TRDAT this fact is stated but the specifics of how to make consequential modifications to the TRDAT namelist are not repeated. see the TRDAT subtopic. NOTE: in places the documentation refers to files in the TRANSP source distribution. Some of the more commonly referenced objects are described above in the section on "Documentation". For other items-- if you do not have access to the TRANSP source but need it, contact Doug McCune at PPPL (dmccune@pppl.gov) (noted 16 Apr 2002). ... choose subtopic 4 Templates It is highly advisable to use the namelist of a recently completed TRANSP run as a template when preparing a new run. If you are new to TRANSP namelists it is instructive to examine an existing namelist file. The file contains inline comments preceded by the comment character "!". (The file is not in FORTRAN namelist format; it is sorted and transformed before actually being read in by any FORTRAN NAMELIST READ statement). 4 MPI_TRANSP (new DMC Feb. 2009) TRANSP has an emerging MPI capability. Selected component(s) of TRANSP have been MPI parallelized. Making an MPI TRANSP run involves two steps: (a) selecting which components are to be run in MPI mode, and how; (b) submitting TRANSP with resources to support an MPI run requested. There are two modes for MPI TRANSP runs: (1) TRANSP itself is a serial process; it invokes MPI jobs-- e.g. time step advances on neutral beams-- as subprocesses; or (2) TRANSP itself is an MPI process; it invokes MPI jobs are handled within memory through subroutine calls if the code allows; otherwise a subprocess is used. A third mode, where the MPI job is sent to a separate server, is under investigation but is not currently reliably supported. 5 Selecting_MPI_components Namelist controls: Integers: NBI_PSERVE -- NUBEAM (neutral beam and fusion product fast ion model) NTORIC_PSERVE -- TORIC (ICRF full wave model) (...coming soon: NPTR_PSERVE: PTRANSP parallel solver...) Values and their meanings: xxx_PSERVE = 0 -- (default) -- no MPI, run in serial model xxx_PSERVE = -1 -- run as separate sub-process in MPI mode; use available processors; sometimes used in a serial run for sub-process I/O testing. Serial version of TRANSP runs; communicates with MPI subprocess, a separate program, by file exchange. xxx_PSERVE = 1 -- run within MPI TRANSP executable; use available processors. Some combinations might not be supported. Here is what is supported as of 15 May 2011 (DMC): PSERVE value: 0 -1 +1 ================================== NBI_PSERVE yes yes yes NTORIC_PSERVE yes NO yes Global rule #1: If MPI resources are detected within a TRANSP run, they must be used: at least one xxx_PSERVE variable must have a value of +/-1. Global rule #2: If no MPI resources are detected within a TRANSP run, xxx_PSERVE values of +1 are not allowed. A value of -1 will result in a serial subprocess-- this is used for I/O testing but is a poor choice for users due to performance reasons. 5 Requesting_MPI_TRANSP_run For tr_start/tr_send users: (A) in namelist set xxx_PSERVE = 1 for each desired MPI-parallel component: Examples: NBI_PSERVE=1 ! MPI version of NUBEAM NTORIC_PSERVE=1 ! MPI version of TORIC Additional MPI components will be added over time. (B) follow guidelines for reasonable use: i. For NUBEAM, linear cpu performance scaling needs ~4000 ptcls/cpu. So for an MPI run with 10cpus, use NPTCLS=40000 or more. Fewer particles may suffice if certain expensive options are used, such as NLBGFLR=.TRUE., enhanced NUBEAM FLR model. ii. For TORIC, NMDTORIC=127 and up should use parallel service. NMDTORIC=63 may use a few cpus e.g. Np=4; NMDTORIC=31, leave as serial. (C) During tr_start / tr_send sequence, you will be prompted for the number of cpus you want. If you ask for more than about 16, you may face a long queue wait (PPPL production system as of Oct. 2009). 4 Source_Playback_Option TRANSP/PTRANSP have incorporated the SciDAC "Plasma State" software to support a playback option. This allows "sources" from a prior TRANSP run to be used in a subsequent TRANSP run. Since the sources are read from existing data rather than recomputed, the playback run can often complete much more rapidly than a run with an original source calculation. By "sources" is meant: heating by neutral beams, all types of RF, and fusion products; momentum sources (mainly neutral beams); particle sources (neutral beams, fusion products) current drive by neutral beams, all types of RF, and fusion products. Also, the density and pressure from fast ion species is read from the playback data, affecting depletion and MHD equilibrium solution. A series of runs made with this option can be assured of getting the same sources-- this feature might well be useful e.g. for studies of transport models, differences in MHD equilibrium solvers, etc. To activate this feature, set: NLREPLAY_HEATER = .TRUE. REPLAY_DATA_PATH = (CHARACTER*128) For Fusion Grid runs, the MDS+ option must be used for : MDS+::() --or-- MDS+::(,) For example: MDS+:_transpgrid.pppl.gov:TRANSP_TFTR(TFTR.88,37065D04) For code development testing, a FILE option also exists, i.e. FILE:. Other namelist changes should not change the plasma species or the description of the heating sources (i.e. the number of active neutral beams and RF antennas cannot be changed, since the sources are being prescribed from a prior run that was based on these settings). REPLAY_DATA_PATH must refer to a run that contained an actual calculation of the sources. It cannot refer to another playback run. The accuracy of playback is constrained by the output time resolution that was selected in the run containing the original source calculation. To test accuracy, replay the original run with no other namelist changes other than NLREPLAY_HEATER and REPLAY_DATA_PATH. Detailed output from source models-- e.g. non-Maxwellian distribution functions or time slice wave field information-- is not available in playback runs. 5 Collection_of_Plasma_State_time_series There is an option to archive the collection of Plasma States gathered in course of execution of a NLREPLAY_HEATER=.TRUE. run. The idea here is to provide the same input data to another code, such as a SciDAC FSP prototype code, which can read Plasma State files. Then, by this method, common profiles can be shared between TRANSP/PTRANSP and the FSP prototype (i.e. for cross code comparison purposes). NOTE: this is expensive in disk space and so is not recommended unless done for a specific research purpose. The options are: NOPTION_SAVE_STATES = 0 (default) Plasma State data not saved. NOPTION_SAVE_STATES = 1 Save Plasma State sequence containing 1d data. NOPTION_SAVE_STATES = 2 Save Plasma State sequence containing 2d data. The =1 option saves the heating and current drive sources and the evolution of temperatures and densities of the original run which contained the full source calculation. Archived filename: _sces_pseq_TAR.GZ -- gzip'ed tar file. The =2 option contains everything in the =1 option, plus the MHD equilibrium and fields, with associated 1d metric data. This size of the collection is about 30x bigger than the =1 option collection. It includes "nominal" free boundary data and G-eqdisk files, but, accurate free boundary data is available only if input to the original run (via EFIT) or if produced through use of an accurate free boundary equilibrium within PTRANSP (a feature planned but yet available as of June 2009). Archived filename: _eqsces_pseq_TAR.GZ -- gzip'ed tar file. Because of the reduced equilibrium metrics in the =1 output file, there will be a tiny difference in the source profiles between these two options. The files can be unpacked by the TRANSP script "fi_gzn_unpack". Recommended procedure: a) create empty working directory & cd to this directory; b) fi_gzn_unpack (contents are unpacked into a subdirectory named _replay). If fi_gzn_unpack is not conveniently available, here is the script code which can be done by hand; 1st line is pseudo-code: set filename = (the actual file path) set tmptar = "tmp.tar" cp $filename ./$tmptar.gz gunzip $tmptar tar xvf $tmptar rm $tmptar 4 RESTART_RECORDS As a reliability feature, TRANSP writes RESTART records. The data in the restart records allows the TRANSP job to be restarted in case the computer on which the job is running crashes. On the VAXs this is usually done automaticly. However, the writing of these restart records can be time consuming. Therefore, set MRSTRT= n to write restart records only once every nth plot output record, or, even better, set MRSTRT= -m to write restart records only once for every m minutes of cpu time consumed. The default is MRSTRT = -20. If a job is stopped and restarted, and MRSTRT.GT.1 or MRSTRT.LT.0 was used, then, the run output data may contain duplicate time points. The plot post-processor program POPLT2 removes them while converting the data to binary form for RPLOT access. To completely suppress restart records set MRSTRT=0. This is not recommended. DMC May 2003: the user value of MRSTRT will be overridden and set to -1, if ELVIS runtime graphical monitoring is enabled (see next section). 4 Steering (this section not finished) It is now possible to restart a TRANSP run under a new runid with modified input data-- a capability generically referred to as "steering" a run. The procedure for this is (a) interrupt the TRANSP run to be restarted. This can be pre- programmed using stop times TABORT(...) in the namelist, or it can be requested on the FusionGrid while the run is still executing (how?). (b) submit a new run with modified namelist, which references the original run (a) but provides input data that is modified; the modifications apply only to times after the time of interruption of the original run. The set of allowed changes for such a modified restart namelist is limited. The revised input data is merged, i.e. combined from the original run for times prior to its interruption, and taken from the new run namelist for times after the interruption. This merger is executed by the TRANSP data acquisition front end program, trdat. Therefore, only namelist changes which modify the data seen by trdat are allowed. These are generally: -- names of Ufiles or MDS+ signals containing input data i.e. input data (e.g. electron density, Zeff) can be changed on this type of restart, the change only applying after the restart time. -- neutral beam powers and voltages (and on/off times) -- RF antenna powers (and on/off times) -- stop time of run -- future interruption (TABORT) times in the run -- model control time events, if present in the original run. Anything else, such as, generally, controls for the TRANSP simulation such as which variant of neoclassical bootstrap current and/or resistivity, etc., can NOT be changed on restart. (A tool will be provided to assist with construction of a restart namelist, and to check the validity of a namelist intended to be used for a restart with modified data). The namelist for the modified run will contain explicit references to the original run: old_transp_run = (character string) old_transp_time =