MODULE mod_etat_saha ! purpose of module is working with SAHA-S EOS tables ! in sence of CESAM architecture USE mod_donnees, ONLY : f_eos, nom_chemin USE mod_donnees, ONLY: z0, nchim, ihe4 PRIVATE ! variables describe structure of table INTEGER, PARAMETER :: mx=9, nt=175, nqs=100, mv=12 ! describe the structure of module REAL*8, DIMENSION(:,:,:,:), pointer :: xz, Beos REAL*8, DIMENSION(nqs,nt,mv,mx) :: Beos1, Beos2 REAL*8, DIMENSION(mx,mv,nt,nqs) :: xz1,xz2 TARGET xz1,xz2, Beos1, Beos2 REAL*8, SAVE :: Ztab1,Ztab2 REAL*8, PARAMETER :: Xmin=0.1d0, stepX=0.1d0 ! REAL*8, DIMENSION(mx) :: Xkn=Xmin+(/0:mx-1:1/)*stepX real*8, DIMENSION(mx) :: Xkn=Xmin+(/(I, I=0, mx-1)/)*stepX ! REAL*8, PARAMETER :: lgTmin=3.20d0, stepT=0.025d0 REAL*8, PARAMETER :: lgTmin=3.199999947300000d0, stepT=0.025000000378736d0 ! REAL*8, DIMENSION(nt) :: lgTkn=lgTmin+(/0:nt-1:1/)*stepT real*8, DIMENSION(nt) :: lgTkn=lgTmin+(/(I, I=0, nt-1)/)*stepT ! REAL*8, PARAMETER :: lgQmin=-4.50d0, stepQ=0.05d0 REAL*8, PARAMETER :: lgQmin=-4.50d0, stepQ=0.04999999999991d0 ! real*8, DIMENSION(nqs) :: lgQskn=lgQmin+(/0:nqs-1:1/)*stepQ real*8, DIMENSION(nqs) :: lgQskn=lgQmin+(/(I, I=0, nqs-1)/)*stepQ INTEGER, PARAMETER :: Jspline=4 REAL*8, DIMENSION(mx+Jspline) :: Xknot REAL*8, DIMENSION(nt+Jspline) :: Tknot REAL*8, DIMENSION(nqs+Jspline) :: Qsknot REAL*8, PARAMETER :: tol_extr=1.d-2 ! tolerance for extrapolation INTEGER, SAVE :: itime=1 REAL*8, DIMENSION (nqs,nt,mx) :: bb ! coef of spline REAL*8, DIMENSION(:, :), ALLOCATABLE :: a ! working region, used in bsplvd8.f PUBLIC :: etat_saha CONTAINS include 'etat_saha.f' include 'Z_read2_saha.f' include 'int2_onlgQs.f' include 'rhoof_PTX.f' include 'interp1.f' include 'derivatives.f' include 'Bspline.f' include 'Bspline2f.f' include 'aug_knot.f' include 'interv8m.f' include 'bsplvb8v.f' include 'bsplvd8.f' include 'bsplvb8.f' END MODULE mod_etat_saha