What is changed in this version (January 2026):
===========================================
Modified source codes: svp_codes.f, svp_standalone.f, mod_svp.f
Modified data directory:  datai_SVP_v1 is replaced by datai_SVP_v2
Other: the file solabnum.dat existing in the old directory datai_SVP_v1 does no more exist in datai_SVP_v2

What is changed:
	1/ minor changes in svp_codes.f
	2/ major changes in svp_standalone.f (additional TGEC test model including Sc and Ni.)
	3/ New directory for data files including now SVP parameters for Sc and Ni.

How to update your version:
	1/ Untar svp_standalone.tar.gz
	   To  use the svp_standalone program, you can proceed with this new 
	   directory as explained below in the section "How to use this package".
	   
	   BUT, if you have already implemented the previous version of 
	   svp_codes in your stellar modeling program and do not want to run the 
	   demo program, it is enough to just update the existing codes by doing 
	   these actions (3 source files to replace):
	2/ go to the new untared directory svp_standalone/srcp
	3/ replace your old codes by the new ones and recompile.
	4/ don't forget to update in your stellar modeling program the content of
	   the variable "version_svp" by setting it equal to "datai_SVP_v2".

Content of the package (2025, August):
===========================================

READme.txt : this file

srcp/                   (source codes, fortran90)
	svp_codes.f       : all subroutines needed to compute SVP radiative accelerations (g_rad)
	svp_standalone.f  : Standalone demo code. Contains the main program and subroutines
	                    needed to mimic implementation in stellar evolution codes.
	mod_svp.f         : module MOD_SVP (contains "SUBROUTINE initialize_SVP", 
	            	  "SUBROUTINE g_rad_SVP", INCLUDEs "svp_codes.f")
	mod_donvar.f      : modules MOD_DONNEES (contains "SUBROUTINE ctes_94") and MOD_VARIABLES


datai_SVP_v2/           (data used by svp_codes.f)
	abund_ref.dat     : abundances used to compute the SVP parameters (do not change theses data!)
	                   [in number/(total number of nucleus)]
	SVP_tables/       : SVP parameters for stellar masses from 1 to 10 solar mass
	fused_levels/     : atomic energy levels of ions (fused levels,
	                    see Sec. 5 of Alecian & LeBlanc 2020), now including data for Sc and Ni.


data_standalone/        (data used by the demo program svp_standalone.f)
	CESTAM_models/    : models for the demo program.
	                    These models have been used to build the SVP tables
	                    that are provided in the subdirectory SVP_tables/ 
	TEST_models/      : TGEC model (1.5 solar mass) for the demo program.
	                    Because this model is for 1.5 solar mass, a mass different 
	                    from those of provided SVP tables, the SVP parameters
	                    will be interpolated by svp_codes.f; this makes the demo 
	                    more realistic.
	isotopes.dat      : list of isotopes (NNxx, name + nucleons)


fgrp*   : compilation script (gfortran f90/f95), produces the exec code "svp_standalone.out"


How to use this package (Unix based system):
===========================================

1/ Untar svp_standalone.tar.gz

2/ go into the directory svp_standalone

3/ execute "sh fgrp"

4/ execute "svp_standalone.out" that asks for the desired mass.

   Important note:
	 g_rad of unidentified elements are set equal to -(local_gravity)
	 ("unidentified" means "not in SVP tables"). This is a default setting that
	 can be modified in svp_codes.f (there is a detailed comment section in
	 the source code to decide the option). Setting g_rad equal to
	 -(local_gravity) ensures that an element for which the radiative
	 acceleration is unknown, atomic diffusion due to external forces is inhibited (better
	 than to let gravity acting alone).
	 


   main output files:
   -----------------
	 svp_standalone.job : general report of the run
	                       
	 ctrlg_rad.dat      : radiative accelerations (TAB delimited results)
	                      title of columns :
	                         logt  [log(temperature(K)) of layers]
	                         lgrXX [log(g_rad) of element XX]
	                         dXX [derivative of g_rad with respect to XX abundance]
	                         chiXX [abundance of XX in the considered model divided by 
	                                the one in abund_ref.dat; if one isotope is
	                                present,  chiXX=1. means "same as in abund_ref.dat"]

   secondary output file:
   ---------------------
	lect_*.job        : print of the model used by svp_standalone in user friendly format 
	                    (same model as the one selected in CESTAM_models/ or 
	                     TEST_models/)
	svp_initialize.job: print of the final SVP_table for the select model.
	                    That table will be identical to one of the provided table
	                    if the selected model is one of the provided CESTAM models,
	                    or will be an interpolated table for another model.

Comments:
============================
To implement the SVP method in an existing stellar modeling program, simply
follow the way it is done in the main demo program svp_standalone.f. The meaning
of the variables to be provided to the routines is commented in the source
codes. Note that a first call (and only one) of initialize_SVP() is required at
the first step using the diffusion calculation. In a stellar evolution code,
this step should correspond to the arrival on the ZAMS. After this
initialization, the subroutine g_rad_SVP(...) must be called at each time step
and for each layer. The output of this call is a table containing the radiative
accelerations for all the identified elements, and their derivatives with
respect to the abundances (some numerical codes calculating atomic diffusion
need these derivatives). Note that a default setting (see the 4th item in the
"How to use this package" section) is that g_rad of unidentified elements is
equal to -(local_gravity). This means that the radiative acceleration and
gravity cancel each other out for these elements, preventing them from diffusing
under an "external" force. In general, it is better to prevent elements from
diffusing when the radiative acceleration is unknown than to let gravity act
alone. However, this might be an undesirable option for some elements, for
example for helium which is not present in the SVP tables. Indeed, even though
in some cases the radiative acceleration of He might be non-negligible, it might
be more realistic to assume that it is zero and let He diffuse under gravity
(gravitational settling). In the current version of the package, it is up to the
user to force the output acceleration for some elements to be different from the
provided output. It is easy to do this right after the call to g_rad_SVP(),
provided it is done for the correct index of the array.

Future releases of SVP tables:
=============================
The data needed to calculate the SVP radiative accelerations are gathered in the
subdirectory "datai_SVP_v2". It is intended that this data can be updated, for
example when new elements are added to tables, or if SVP parameters or atomic
data are updated. In this case, a new subdirectory will be proposed for
download. This new subdirectory must have a new name (for example:
datai_SVP_v3). It will be enough first to install this new subdirectory in the
same place as the previous one, and then to modify the content of the character
variable "version_svp" by the new name (i.e. the argument to enter for the call
of the subroutine "initialize_SVP"), and to recompile.
