Skip to content

Repository files navigation

#new 20260925
========
env set up:

	cd Your_TSC_Directory
	setenv TSC_CODE_DIR `pwd`
	module use $Your_TSC_Directory/env_module  
	module load flux


#new 20250305
========

module load intel/2023.2.0
module load openmpi/4.1.6-intel-2023.2.0
module load mod_ntcc 
module load ntcc/intel/2023/24.4.0_flux
module load mdsplus/7.132.0-intel-2023.2.0

module load openmpi-4.1.6/gcc-13.2.0/ncl/6.6.2-xc5oj4y 

setenv NTCC_CODE /u/jchen/NTCC

setenv HDF5_HOME /opt/pppl/software/spack/linux-rocky9-zen/intel-2023.2.0/hdf5-1.14.3-4nzzyanjshg3fh7bjvdh4vlbk32ia5h7
setenv NETCDF_C_HOME /opt/pppl/software/spack/linux-rocky9-zen/intel-2023.2.0/netcdf-c-main-nzscmrx7nix7i72zs5y2gsoxqzxtwhd6/
setenv NETCDF_F_HOME /opt/pppl/software/spack/linux-rocky9-zen/intel-2023.2.0/netcdf-fortran-4.6.1-cepgoinrjitqdehlejpd7lrpn3l3pqwd/

cd p_swim/TSC/tsc_svn_copy20240709/tsc.243/
#cd p_swim/TSC/tsc.n/


========


A)   TSC CVS
     Free-form FORTRAN 90 version of TSC based on various V10.8
     Versions with capability to couple with TRANSP/Plasma_State 

B)   To build the executable from scratch
B.1) svn check out source code from PPPL svn server
     1. module load subversion 
     2. in a clean directory: do 
        svn co svn+ssh://svnsrv.pppl.gov/svn/tsc
B.2) or git clone source code from Princeton GitHub server
     1. ssh: git clone git@github.com:PrincetonUniversity/TSC.git
     or
     2. http: git clone https://github.com/PrincetonUniversity/TSC.git

Then
        you will get

        tsc_m, /source, list -- corresponding to unx10.9m
        tsc_a, /source, list -- corresponding to unx10.9a
        tsc_r, /source, list -- corresponding to unx10.9r
        tv80 , /source, list -- corresponding to tv80lib
        fixup, /source, list -- corresponding to fixup
        glf23, /source, list -- corresponding to glf routines
        modules              -- modules
        fixuplsc, /source, list -- fixup for LHCD version
        lsc  , /source, modules, list -- LHCD routines
        tr_tsc, /source, list -- routines modified for TRANSP/SWIM coupling

     3. at PPPL clusters, such as portal.pppl.gov, follow these steps to load modules

        3.1	module load mod_ntcc
        3.2	module load ntcc/intel/2019/21.2.1
        3.3	module load mdsplus/7.96 ncl/6.6.2

     3. at top level directory "tsc", do "gmake tsc >& logfile &"
     4. if executed properly, the executable "gotsc_sunfire.pppl.gov" will
        be created in the top level directory. 
        The appendix "_sunfire.pppl.gov"  will be replaced by the hostname 
        of the platform where the TSC is compiled.

C)   To re-build after modifying the code
     1. to modify:
        in the directory containing codes to be modified, 
        a)"cd source" to modify the code, e.g., "vi xxx.f90"
        b)"cd ../.." back to top level directory
        f)"gmake tsc" to update the executable
     2. to add a new subroutine, e.g. new_sub.f90
        a) put new_sub.f90 in one of the code directories
        b) add "new_sub.o" in "source.lst" in the "list" directory
        e)"cd ../.." to back to top level directory
        f)"gmake tsc" to update the executable

D)   To clean up after build
     in main level directory
     do "gmake cleanup" to remove all binaries, save the executable 

E)   Run ID now may be parsed from the execution line:

     ./gotsc "ID" "machine" "year" "shot_number" "initialization_flag"
        input: input.ID, sprsin.ID
        output: output.ID, tsc.cgm.ID, sprsou.ID, ...
        "machine, year, shot", if present, used by TRANSP
         and SWIM to label the plasma state
        "initialization_flag," if present as "init", will 
         just read input and write out the initial plasma state 
         without executing the actual run. 

     ./gotsc
        input: inputa sprsina
        output: outputa, tsc.cgm, ....
        "S12345", "ITER", "07" are used in TRANSP for shot number, machine
        name and run year, respectively, if acoef(4960)=1

F)   Note:
     "ptransp_modify.dat", "ptransp_template.dat" required if acoef(4960)=1
     "wall_data" if exist and  if acoef(4961)=1, will override the wall data
     when writing the geqdsk file.

G)   NERSC
     Check out a copy from pppl svn and bring it to NERSC.

     To build on NERSC CORI or EDISON as the date of May 11, 2016,
     env is set up by

     module swap intel intel/16.0.0.109
     module load cray-netcdf/4.3.3.1

     then do "make" to build TSC, and "make tlsc" to build TLSC.

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages