Introduction to PV-WAVE Welcome to IT’s seminar on statistical packages

advertisement
Introduction to PV-WAVE
Welcome to IT’s seminar on statistical
packages
Sam Gordji, ccsam@olemiss.edu
Weir 107
List of Statistical Packages
•
•
•
•
•
SPSS
SAS
Mathematica
MathWorks
IMSL
Statistical Package:
SAS/PC (cont.)
•
•
•
•
50 copies are available for faculty use
For each copy purchased, a faculty
member can get a free copy (to be
installed on a student PC)
The cost is $100 per copy per year
To obtain a copy of SAS please email
– ccsam@olemiss.edu
– assist@mcsr.olemiss.edu
List of Statistical Packages
Mathematica
 Mathematica (free copy for faculty, staff, and
students). To obtain a copy of Mathematica
please visit:
http://www.mcsr.olemiss.edu/appssubpage.php?pagena
me=mathematica.inc
List of Statistical Packages
Matlab
 Matlab is available on willow and sweetgum
 Other packages such as Fortran, IMSL, etc. will
be mentioned briefly
List of Statistical Packages
IMSL
 IMSL is a comprehensive package containing math,
stat., and special functions
 IMSL is available only on sweetgum
 IMSL is a set of subroutines called by a Fortran program
 PV-WAVE is a set of subroutines and is available only on
willow and sweetgum
General Information
 Email contact
– Email your questions to ccsam@olemiss.edu
 To download this and other materials visit:
http://www.mcsr.olemiss.edu/appssubpage.
php?pagename=mathcamp.inc
 Please fill out the performance report and leave your
email address so we may contact you for follow up
questions
General Information
 SAS performs statistical analysis
 SPSS performs statistical analysis and is
similar to SAS
 Mathematica’s main function is to perform
mathematical operations including
statistics
 MathWorks is similar to Mathematica and
is available on willow and sweetgum
General Information
 IT staff will assist users to access these
packages. We also assist users to find the
proper procedure to analyze their data. If
you need assistance please send an email
to Sam Gordji at ccsam@olemiss.edu,
assist@mcsr.olemiss.edu , or
mathadm@olemiss.edu
Using PV To Solve Real Life
Example
• Analytical Approach to Evaporation
Problem Using Linearized Richards’
Equation and the Application of Green
Function
PV-WAVE at UM/MCSR
• PV-WAVE is a comprehensive package for obtaining
solutions for linear and non-linear equations and has a
powerful graphics feature that is capable of graphing
complex functions.
• Most if not all the famous mathematical and statistical
functions such as Error Function, Gamma Function, FFT, etc,
are programmed in PV-WAVE and are available without
much effort.
• Instructions on how to run PV-WAVE is on this web page for
PV8.5:
http://www.mcsr.olemiss.edu/appssubpage.php?pagename=pvwave.inc
And the following web page for PV9.0:
http://www.mcsr.olemiss.edu/appssubpage.php?pagename=pvwave9.inc
• The following two examples graph and solve
equations 13 and 15 obtained by J. M. Chen et al.
• The t-axis on the graph represents the time in
seconds and f(t) represents the rain fall intensity q(T),
the rate at which the rainfall piles up on a certain soil
(silt loam).
chen5_ex.pro
•
•
•
•
•
•
; *** This graphs, eq. 13 on pg. 1092 of Ap. 2001 of WRR paper by J.M. Chen. ****
; ** This is for the case when gama=5 & n=0, F(T)=5 ***
; Next 3 lines defines the problem.
FUNCTION f,t
RETURN, .0018455*(SQRT(t/3.14)+1.)*exp(-0.25*t)
END
•
•
; pro or procedure tell the compiler that a user prog. module follows
PRO chen5_ex
•
•
•
•
•
•
•
•
•
•
; activate the Math toolkit
MATH_INIT
t= INTERPOL([0,100],400000)
; plot statement plots f, f(t) with the range of 0 to 2 and .0018 to .0023
plot, t, f(t), xrange=[0,2], yrange=[.0018,.0023]
; zero=zerovect(f(t),t)
; print, zero
; oplot , plots the second plot in our case it plots over the original plot
oplot, [zero], [f(zero)], psym=6
END
Program Zerovec_ex.pro Solves Equation 14 or 15
to obtain time for surface saturation
•
•
•
•
;;;;;;;;;zerovec_ex.pro, As before the three lines are to define the problem;;;;;;;;;;;;;;
FUNCTION f,t
RETURN, 2.18*SQRT((1/3.14)*t)*exp(-0.25*t) - 0.216
END
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
PRO zerovec_ex
; pro = procedure zerovec_ex
MATH_INIT
; call Mathematical Tool Kit from IMSL/PV
t= INTERPOL([0,14],10000)
; Interpolate the above function from 0 to 14 with n=10000
; choosing smaller number for n may yield a curve that is not smooth
; or may yeild bad answers
plot, t, f(t)
; plot t and f(t)
zero=zerovect(f(t),t)
; call zerovect and find zeros of the above function
print, zero
;print the results
oplot, [zero], [f(zero)], psym=6
xyouts, .2, .5, ' Computed zero is at x=' +STRING(zero(0))+' and x='+STRING(zero(1))
; print the answers on the graph as well
END
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;
Note that the below equation has 2 solution
t=0.03131, 11.914
Web Pages
• Link below gets you to IMSL main site:
http://www.imsl.com/
http://www.imsl.com/products/imsl/fortran/overview
.php
http://www.imsl.com/products/imsl/fortran/whatsNe
w.php
Download