
J. Jpn. Soc. Soil Phys.
 ²³
No. +*/, p. 01 12 ,**1 Octave  *

A Program for Nonlinear Fitting of Soil Water Retention Curve Written
in Numerical Calculation Language GNU Octave
Katsutoshi SEKI** Graduate School of Agricultural and Life Sciences, The University of Tokyo,+ῌ+ῌ+ Yayoi, Bunkyo-ku, Tokyo ++-ῌ20/1, Japan
Abstract
The soil hydraulic parameters for analyzing soil water movement can be determined by ﬁtting
a soil water retention curve to a certain function, i.e., a soil hydraulic model. For this purpose, aprogram which performs nonlinear ﬁtting of soil water retention curves to . models, Brooks andCorey model, van Genuchten model, Kosugi’s lognormal pore-size distribution model, and Durner’sbimodal pore-size distribution model, by Levenberg-Marquardt method was developed. The program was written in GNU Octave, a high-level language primarily intended for numeric calculation. It was shown that the developed program actually works ﬁne with many soil water retention curves in UNSODA database. It was also shown that by comparing coe$cients of determination and ﬁtting curves of each model, the most appropriate hydraulic model for a certain soil
can be selected.

Therefore this program not only calculates the necessary parameters, but also

helps determining which model is to be used for a particular purpose.
Key words : Soil water characteristic curve, Nonlinear regression, Octave

v' fEghincVoxBjkqH>#>+     h/  
 q

!"#$ %%" &'()*+,- ym .

h01ym0῍ym῍"2345$ h

q

6 78

!9  :;- q <h= >?@A
5BC$  DE FGH

IH J

KH LMH NOPQRQHS># < T4

%pCxUyz{fEghi|Q-"[\PQR}~tV GeC 

/C>#$ /U>xB Y  B[\PQRVGeOu\>#5"#$ :;-/UfEghiOu\

US Salinity Laboratory >/U RETC <van
Genuchten et al., +33+= >#> RETC CB}~_G nc C$+33/=$ FGA5U DEV  :d%" :;-  B_{[\PQR;- q <h= WX% " Y q <h= Z5[}~VGeBfEghijk[\PQR>\PQRV]G/ ^_`a>bc $ d Ue

jkA5pOu\V/ v(Qlv'

fEghi jk

Microsoft Excell-mQ

ncVopqH <rs ,**.= tu\vlv'ῌwjl/B/U$ Ou\ NR(R* ¢£¤¥¤¥¦§¥¨©ª¥«¬ª ­++-ῌ20/1 ¢£®¯£°±¨ +ῌ+ῌ+ :  DE fEghi Octave

Yjk¡"# GNU Octave VoxU$ A4

º

68  

UNSODA   ,ῌ ῍1 van Genuchten &+32*' ./0JK%&VG %' ( 9+ q%3[+ῐῒmnῑ+&ah' ΐ῎Se L !"#$% q &h' ( )*+,
-./0» +*/ ¼ &,**1' 1234 53(6789+:  Brooks and Corey % &BC%' van

553 a, n, m &aN* nN+ *m+' (_)3 m
L+M+ῌn hi%.+:   %( ah+ 

g~Genuchten % &VG %' Kosugi ;<=>)?@A

SeL&ah'Mmn% &LN %' Durner ;<=BC,D-A% &DB%'  . E,-FGHI Brooks and Corey&+30.' ( 

!"EJK#$%&BC %' /0g#$n'nLnM+ g4gxq: van Gen-

 %: h &Se' .\g  %¢JK%l &van Genuchten ( tL*./ g
. 553( t 1\\f%£k'
KrLSte ¤+M&+MSe+ῌm 'm¥,553 h (OPQRS &cm' hb (TUVWX &cm'l ( YZ3[ \ Se (
qMqr
SeL
qsMqr

5%  jWk5g3 Kr  h h)g¦ab3[G q (cde qs (cde  qr (f cde 3[ %( h g Se hi% Se &h' 3[.  %jWk

5g3 q &h' .l:  .^ JK Se &h'
 q &h' gmnop qr qrL* gk5g3  %( Campbell &+31.' %gm+q ( ;<stuvw

3~
Kosugi &+33.' ( ;<=A.>)?@A

3[gp§_K3  ,-¨ YZ( TUVWX ;<=A2©Xgª«¬ - E3[ 1,-­
Kosugi &+330' ( TUVWX * g4®¯

q#$.3~g YZ + E°:JK
% &LN %' /0ῐln&hῌhm'ῒῑΐsx ;<stuvkyi)g;h z{.
|}: ~ 1hiE Mualem &+310'(ῐf&Se'ῒ, f&S 'L   + dxe h&x'ῑ f&+' ΐ

KrLSte [:kYZ 553(!b3 Mualem
_:SeLQ

553 hm (;<=A8 tL*./3[g Kr (>yi)3 OPQRS h r[ OPQRS hm >±k2©;<= &²=' rm( rm³*.+/ῌhm g3~w ´~ ;<=.µ¶·5g.3~ \ Q &x' (ª«?@Ah)h)3[[  %: Se &h' h) h &Se' 3~
w &h &+'Lhb gk  hLhbSeM+ῌl'  %:>y
i)

f&x'L




,
ῌ x῎
῍ ,῏

exp M

>kdbh) kq¹ª«?@Ah) N&x' (N&x'L 

. * ª«¬

. + ª«?@A¸ bh) f &x'{yi) K yi) Ks 3^X3

ῌ h ῎M&,tl,l'&hNhb'
῔῍ ῏
hb
KrL
῔
&h῕hb'
+[:kYZ

3 s (;<=Aª«¬[:kYZ3g 553 h &x' ( Se &h' h) t (;<&+310' (*+ BC %r hbL+ῌa, lLmnL&+M+ῌ

uchten &+32*' ( mL+M+ῌn  ¡ 

ῌ h ῎Ml῔῍ ῏ &hNhb'
hb
SeL
῔
+
&h῕hb'
]^_`

g_`

f&t'dt 1h) Q &x' (Q&x'L  f&t'dtL+MN&x'g3~ 5]p h) h &Se' _3~
 t Xw5g3 Mualem %: Kr &h' 3[_k5g.3[







: Kosugi &+330' (>yi)h«¬ : 6>­® Octave W:;5m/n^__`¯°±²Y³

ῐ ῌlnhῌhm s῎ῒ,ῑ῍῏ΐsKrSte Qt*./ LN

BC

῎
῍

 VG

῍ῌ+

 

wzy

/0

BC
VG
LN

 1  Kosugi +331  23456 Ks cmῌs
7,+
KsB

exps,
hm,:;5m/nwzy

Table + Soil hydraulic models and parameters !"#$%&'( )*+,-. LN

69

+


,
-

.

qs
qs
qs

qr
qr
qr

l
n
s

hb
a
hm

῏
῍

 89:;<=>?@ B+**.. cmῌ
s 
BC

 VG

 LN

7,+Aῒ+ 1

B  +  ,  CDE5F GH23IJK+ LMNOP B  -  QRSTU h

LMNOP B  +V- WX h  q

LMNO+YZ [\ ]^_` . W*+a1 bῒ+ -WcdLMNefgYZ
hiP- jk@l :;5m/n^_ o1?p=P-q
Durner +33.  -l1 Wc:; rms + 7tR)*+, uvwxy :;Pwzy :; rms{|}d:;~mAqd,+ 6tR )7 ywxyd :;P:;5m/nwzyWc VG_`+


ῌ
ῌ
῎mi
ῐ῏
i+ ῍ῌῒΐῑ῏ ῎῔ ῏
kSeῌwiῐ῍-- *wi+ ῌwi+  - Durner ywxywzy7,+ / k,    Pd:;

rmstR , 7Pwxywzy  Durner wxy

DB



P
ῌ
ῌ
῎m++w +ῐῌ῍ῌῒΐῑ῏ ῎῔ ῏

Sew+

ῌ
ῌ
῎m,
ῐ῍
῍ῌῒΐῑ῏ ῎῔ ῏ῑ῍Durner +33.  mi++ῌni  &

=+,d, -- mi++ῌni =P hSe &d closed-form ,jk@l+,dB Mualem

W Kr h 6>&c DB 6 1 7X  ¡I¢, -Wc BC/n

ῌῌ+

:;5m/nwzyLMNefYZWhi

Fig. +

6 Kr hComparison of soil hydraulic models by
dimensionless parametersp=q  *+ 23456> LN

W*+:;5ma1l¤ {23456 K h =1X 5m¥¦

 Mualem

WX£45

Chdq ῌ dh §W¨5m©ª6 DqKqdh ῌ dq

 VGYA

Z +*/ ¼ -,**1.

 Rich-|}l#g

70 

 

ards       ! "#$%&' ( )-+ 

LINPACK, EISPACK 9L 

LAPACK )A2 LAPACK R MATLAB,

Octave, Scilab ) zj&|e& h,B2 MATLAB ! MathWorks  h,9N9t8?D-    


`

MATLAB :R 2%|j%q8j&|e&  Octave  Scilab ?*+, q -h. / h  x,;< N|}l#g32L!

0 q  y 1 2 34"##==>A?T$%&567,892 "#$%&567,]h,B288p  2  BC :;! p<-qs, qr, hb, l.

@)

1=   *+,3~ABD ῎῍E-y.<f-xp.

"#$%&'|}

l#g Octave A392 92 A |}l#g2L!  Octave jq7%,

8> - ! ! + /? C@! .  E -y. !*+,

Mac OS X, Linux ! OS  jq7%,)? Octave %g% Windows,

AB0 y ? +%& 1]

 -xi, yi. -i<+ , C n. 1= +%&392|}l#gDEyi  ῍῎ DB E -yi. EFGH

 2 =8%g%, ] DE92FP|}l#g -swrc. m. j|,+%& -swrc. txt.
nH<ῌ῍yiIE-yi.῍,῏῍pj}%  Octave  swrc. m Gῐ,  - /

*

1=  HJK p+, -BC  VG  LN . 

"#

L  JKG? BC  VG  LN$%& WB DB a ! k*% DB  *+,3 f -x, p.

p 9

,*+,=8|}l#g bimodal. m pj}%-contour. OP "9  DB a |}l#g! ?2LDi<+

 M:;! H!NP H!#QR"#$%&ST$U)VW
H!@#XY%JK&Z/2L '[%JK\L!(9 9]9) )^ ])

E!9)
+%&¡¢, swrc. txt  I£

H

+%&

__]) *B ` "#$%& +%&! q%q¤JD

 a+bK\L2L=/]

¥¦q7¡¢, + KL6§¨j , KLM

c,defg ? `  Marquardt -+30-.

N4OPQ PQ+%&R©/!

h,92i%5jk%lῌm,n%7! opqῌ|}l#g!3S9)2L )R©8

rs%7j t )uv bKa+ªu) 2«9 ¬­R©!PQR©®T

w-x. t y/ t )

9 2 6§¨j cm R©PQ a Ruv bK] 02 bKx.

©! cmI+ ) +%&~¯°$j7P:;

9z t{O1 h,B22

! U ± m%68P +%&¡¢,

2c,defg?

¡¢,V!  swrc. txt 

²³´68 Microsoft Excel ¡¢,p

i%5jk%lῌm,n%7A

j}%9 µ%6§%7¶B2·Y-,

Octave"#$%&'|}l#g GNU Octave+ -~¬­°¸% a ¹ l

 Octave 8>. 392 '4 -,***. #¡ºW »Xa56@7? James Hardy Wilkinson -+3+3ῐ+320.
+
,

h,92

M8 FORTRAN

http : //www.gnu.org/software/octave/
http : //purl.org/net/octave/--BC  VG  LN DE92|}l#g -swrc. m. 92 A

,1 : 6¹º Octave 92.µ+ /¶»¢¼{PvA·

-*>..

71

 BC  2{PQ0

 x`* 7K2UA|H ac x`* Y? x`*.**+ }~aI x, 

2 -,

 --

 BC 7G5-2 -.

>-/ x ?#$%&'/$0 p ?
@AB/$0 qs qr hb l K2

CDE qs

7 p + qr 7 p , hb 7 p - l 7 p . K2 ῌ  hhb :? xp - =2

H-? x 7 p - 9xI^Y + ,:C -b* =2K2 a x ?/$0K2ac

TA92

 2Y *  . Q0

Xi Q0 2 /$0/$0
)!C5-2 x YlIῌῌ, leasqr 92]4

2

f, p, kvg, itr, corp, covp, covr, std, z, R,`leasqr x,

Octave Workshop 92.µ+ /¶@A
BjG{PvA· ¸0

Fig. ,

K2

G7YaH .*y, pin, “BC”, stol, niter, wt, dp ;HH

Screenshot of the program running on
Octave Workshop

? x  y _G/$0

CDE x #$%&' y ()*+ pin ? @AB[\6 BC ?G 2

BC  VG  LN 

/  +*

  swrc. txt swrc !"! + #stol ? GacGK2 ][? +   45i K2 -3> while>endwhile {  Cgh.-$%&' x  , ()*+ y ?  a6 ¡ ,-.-/$0

2 ,3 #$niter ?]^¢ ,*  2 wt ? %&'456 789:;<£!¤ G 2/$0K2 dp ? @AB= 2 2>+*

¥

1


qs  qr ? @AB

CDE

FD-2

7 G 2HIJ K2 ,LG? +, +0 M#SettingN OPQ$RST0U

V9WXYZ=2H : +-? qshG

2 6^Yi

B67" ¦ iC2

.+



2!7 @A* G 2 G FD-2 dp`*.****+*cts *.**+*ctr *.+ *.*+  -2 cts a? ctr  * 7LG5-2 qs,

qr 7,-.-GC2

qs 6?^Yi§5¨C[\6()*+]^6 LG 2 H

ac "#45i a hb "#©@AB

6 _G6XYZ=2H7Y2 +.

9xI^YiLG  mno 6$ª«jG5¨? qs  2 G 2 LG 2 HH

9: 2 Leasqr ? ©ILGY2

Mcts`* ; N XYZ=2H qs 7GC2

67K27  2 %x6¬&? f ?

 qr G 2HIJ K2

'-2 p ?jG5-a@ABLG

2ac? +0a=b qr`*d thetaRin`* ; ctr

kvg ?7 -b +  C -b * C2`* ; ef 2 Hgh BC ? Campbell +31.

 itr

G® (2acef 2

iC2 Campbell @ABjG7

J C2

 Z ?­' C7 ]d R, £j

VG  .0>0/ LN  01>2.

 I BC [\6LG 2



5-2 LN   normcdf

BC [\6l mno 6 hb ?p

1*῏ )¯~° * N x K2
 ?  ῎k +2>,2 Se 7 *.3/ q=2r#$%&'
,*>,,

2

HH [\6sG? VG gh? BC  a , rtuvAwY  ¡ LN gh? VG  ¡­ῌ 9x l 6sG

9:yz ,1>,2

,0



sG

 *.+ῌlῌ+* C2aI[\6 2,-.- n`l±+ s`+., n²+²*.2  2 /.
 1-

 ³? ῍+,«-Y d³?´(*72 VG



qs

+ qr

n 

 n+

l>?(E G  FT4l>? 89:[ 67 467+s 

R, *.332! "# $% n ()
VG



 

* a

LN



s &'

*+

-./

LN

,$% BC

01 23

4567 89: ;7<=>?@ABC+*/ ¼ ,**1!

D

 %

67 5R ,"#89:GF0

1.F>>6| or [01.ZE 89:F67fE

89:F01/ . ;r ^:[GE F [018

E7

96|¡\674l>?

\*F a῍* n῍+ hm῍* s῍* G;7  H%|$r &¢ W£r¤F7$

ID7

:EUV W£*%|7q$*;7 ^G

qr῍* @ABD7JKG;7 

GF qr LMNLO<=>? ID @AB;(  <67F T4l>?

D EE 89:4¥ $ [\-.

67 01.:<=>?

DB 

E

89: bimodal. m! 23P-

0ABD!

dp +

>§

F<=>? 1 Q;7

67?@;7 UNSODA l>?>AG(DB

C6 DB/RST TUV WXYZ )

<=>?= ¦* 4¨ B)©C! DE| E7[\67017 ]G

F 1,2 Q;r |%l>?

;7 ^G _PG` <=>?

§ª«rF¬­a E7 bc

ῌ d+ e 6fg

VG

LN

BC

\*%|789:®-67 GK 6fg G¯°oEa+n+ a67Q-ῌiῌn+ ; n Fl>?89Mm! l>?

89:®- FHp±5 UNSODA l>

7"#67 . "l>?$%?>AF l>?R¡%ZE E7ZE

VG

"# nE

hijkOXE!$% i>^6J 

7"#67 G῎ <=>?6J
῍

467 IJ*%| E7 4F i + , p| b _C6)K ¤S

7"##q$G;r i n pF$ F #[01.7#[²a67 o -ῌiῌn+F VG; ^l>?  

VG, e῎ d῍, "% VG

 s, Z%tuvw>ix

E

HT7G;7 , "%"#oy7za
'W& 7 i oy7W'

G;7 DB

01(E)<=>?"#67\³$ H67
UNSODA l>?> 1,2 Ql>?AG BC
VG

LN

6J oE

R, *.33 'E¬­

*%|F -.. Q;  "³
EZE F za'SE ?LG;

W{ *%|ZE

w+ F

῎
῍

+ e

7 ;7()*89Mm

};%f6 w+~*.*+  KF

, e

+* _;7 .,* Ql>?ZE

>lG w+ *.33  KF

+ e

VG

>lG ^|| +T7 ^G

y,C67z<=>?a  o<=>?F-6E

6J oE

F BC

GF ,,. Q VG

 ni & F &LN*.32-+ LN

GF *.32-0

GF *.311/ VG

BC

VG

LN

GF

  89:N¹E?º8()GF

r VG

!'TGK .,* Q6J

/bE ^G +ῌni~/* 0ABZy

UNSODAGF ,2, Q LN

,20 Q r )K ¶·  F BC

za'M¸F BC

.+

BC

 .,* QAG R, *.33 'E*%|KE-67 ;r .y oT

. 

>J7

R, *.33 'E¬­*%|F +20 QG; |l´ µ7^ w+ *%| K

F sNot bimodalx

LN7()*
*<=>?

a67 GK Tl>? SEza89: #12()'*%|7 4GK  za'

3 *l>?> UNSODA Nemes et al., ,**+! 7ltO»F ;TbGT4l>?

$# :IJ¸¹ Octave `xD%& %&º»¼gzh >jklmn 

73

33Yx4

|} `xD%&u i1d?

  .. ,   !"#$%&'  () *+jklmn o4d? G? HY =

, !"'-./'012345#$' 234 q M jklmn o46789:!;"!" < =#$4

pq@A

>?@A BC!;"!" #$'#$4 >?23

GY BC H VG H LN H=

4  ~Mehta

D4E+ F2  5G DB HIJ KL MN

et al., +33. ῌ-

'OPM .,* H 4# %&' tM

VG H LN H RQ BC H

R,S*.33 3TM 32

 R,S*.32 3TM .2 3TM 2


N 
a ,

.2

 bimodal. m 'UV DB H

#$'M F Q  *.*+Sw+S*.33 3
bimodalX

4P/TMY

 ., 

.,   Q  Z01[

WNot*.3*, VG H  *.3*0 LN H  *.3+-=#$ ~Z01[  4 >?M|}gh ~Laliberte et al., +300

 



BC H VG H LN H3Y =#$ ~R *.33 4,>?M ~ῌ. 2 a BC H #$4
 =  R,*.33312

TM F

 BC H  DB H  *.3./ 3   BC H Y VG H LN

TM ῌ- BC H

 Y VG H LN H4 tAY 4Q 
2  BC H 4t#$4 q@AY 

#$4 >?Mz/> , !"Y =#$4 >? G

2 Q  DB H Z01[ 4 *.32 \]3TMY?'-.YpY 4 x[ ' ,-  *.33 \]3TMY  +3  TM 2 ¡1@A #¢ ¡14Z UNSODA ^_ .,* 

`a

3

#$4

MN 2Q >/9:!;"H'b Y DB H'b>?3cd?M`a4 ,* e TM F?> a fgh`  i1d

AD'£¤23

¢

#$%&

¥

¦§4 Kre 'YM>@A4?jklmn o4pq3r'sT
M

¢

q

 Durner ~+33. ? />5¡1 +*

 M4T 2

a @A />5x¨'©ª  q BC H' 2345., 

UNSODA ^_ Q a -ῌ, 

tu/ rau IJvw'gh| ~Dane et al., +32- «Y BC

H VG H LN H3Y =#$ ~R,*.33 4 >ῌ

?M ~ῌ/ « h*

4 z] >?M BC H

qMN h+ 3 M i1 '

VG H LN H`xDyz{' ῌ- 

3 ¬­BC!;"D'®¯Y,au swrc. m T

4 i1d?Mjklmn o4 5 °ta +|} ~Haverkamp and Parlange, +320 

23Y

 DB H' 5 Yt 9:!;"u BC H VG H LN H3Y =#$ ~R,

 BC H VG H LN H< =#$4 >?

*.32 4 >?M ~ῌ- 2  /M

ῌ,
Table ,

`a

!"D

Soil physical properties of soils

a

D

x[
~±+*²- cmῌs

67`³´µ3#¶

UNSODA
ID

+

|

,4,,

*4.-*

...*

,

|}gh

+4/1

*4/+2

-

gh|

*4033

*4-/*

.

l"·}gh

.4,0

*4/0,

Grenoble, France
Haverkamp and Parlange, +320
Hanford, WA, USA
Laliberte, +3004
Union Springs, AL, USA
Dane et al4, +32-4
Lyss, Switzerland
Richard et al., +32-.

,,.-

+*+/

,10*

cRSf n +*/ k ,**1

74

ῒῌ-

c

Table ++,cNdef/01

2

Soil hydraulic parameters of soils

gh

/01
+

,

2,
-

R,
.

+

BC
VG
LN

*4-..
*4-.2
*4-.1

5*4*+*/
*4+*.
*4+*3

-04*
*4*,*/*41

+4,/
04/0
*4,0+

*432,
*433.
*433-

,

BC
VG
LN

*4/+0
*4/,0
*4/,.

*4++*4+//
*4+0+

-/4,
*4*,*2
/,4*

+4/0
.4/1
*4-20

*43332*433*433-

-

BC
VG
LN

*4,0*4,0*4,0.

*4*/2*4+*.
*4+,+

+-4+
*4*-10
0-40

*4,12
+4/33
+4-3

*433/
*433/
*433,

.

BC
VG
LN

*4/**
*4/*/
*40/1

5*42-,
524**
*4+.-

14*+
*4++0
+..

*4*,.++4**-1*14..

*430*431**43.0

jkl῍,/01 2jkl῍+ῐῌ- m  cNdef Haverkamp and Parlange, +320  BC  VG  LN #bῐῌ.

Fig. -

Fig. .

Soil water retention curve of sand (Haverkamp and Parlange, +320) and ﬁtted curves

 . 

m
 cNdef Laliberte etal., +300  BC  VG  LN #b
Soil water retention curve of sandy loam
(Laliberte et al., +300) and ﬁtted curves" VG 89:; *.31*  ,῍-@,῍/ A?

 BC  VG  LN  

BC)89:; *.32, #7BC)<$"-Richard et al., +32- !" DB #$% &'()

DE% BC  VG F)% qr G<

*+" ,῍0 - .. DB /01 2 qs3

7 HIJKLMNOP )QRST<UV<W<$"RETC ῍῎ῑ῏*./*, qr3*.+11 w+3*.-,. a+3*.*02/ n+3,.*+ a,3.ῌ-..-,4+*5. n, 3+./3 67 89:; *.3331/ ?X RETC van Genuchten et al., +33+ YZ<$"- BC  VG  LN  89:;)

[0 \]^_`ab- RETC  *.3 =><$" ?()*+

ghE% ῌ  VG gh^i)%)b- ..cNdef : gUV}~ Octave $vaB&ABCDEKLMJ

75

CDE&F-GHIJ " KLMJN O
6PQMῌR-S8  

 RETC- T &UV ῌ .WXY(*!Z&)UV ῍ q 0h1  [ !&#$%$\]%&UV ῎ #$% !
$\]% [ !& q 0h1 &UV
KLMJ RETC .^_?"ῌ

RETC 

q 0h1 #$%$\]%&UV.?" KLMJ

q 0h1 .` *"&@&#$aB&UV W

Xbc **d" RETC e

3" #$%&'(&!5 " df& Ks  t &g.(5h;ῑῌ/L  J » &   $  v  a B 0Dane et al.,+32-1 " BC /" VG /" LN /§¨

Fig. /

Soil water retention curve of loamy sand(Dane et al., +32-) and ﬁtted curves

῍

RETC 

&>ig.WX[h;" KLMJ jkl>ig.
'(? WXmnY(.op?dqUV
rst" KLMJ&=u&vw;῎

Windows ;

RETC?&z*" KLMJMS-DOS xky
Windows, Mac OS X,

Linux, UNIX { GNU Octave ky?

|d OS xk?/ῌ ῍ ῐ ῏ ῎
gUV}~ Octave ." $v,$v.UV?KLMJ
0swrc. m e bimodal. m1 .y:*! &KLM

J "  &dvw;ῌ ld . &$v+,- 0BC /" VG/" LN /" DB /1 z* " O6PQMῌR-S
8 &(
ῑῌ0£-8¼LJ&$vaB 0Richard
et al., +32-1 " BC /" VG /" LN /" DB /§¨

Fig. 0

Soil water retention curve of silt loam(Richard et al., +32-) and ﬁtted curves

῍ &>ig&Y(.jkl

s!5&dc

!5" q&r,

0UNSODA ,6&?

&,1 z*" &(.jkls῎

qs e qr" ,-8 PM*  " Y(.[<" m  n 

ῌmn





 ῍ m++ ῌ n ῎ m+, ῌ n ῏ n
!" #$%&'()*" Mualem +,-.

!/ ῑ " Burdine +,-0Burdine, +3/-1 2!/ #$%&'(34&678-

!5" 

0qr, qs, a, n, m, t, Ks1  1

9&:;<" =>& / 9/ ῐ )?" =@& , 9 / ῑ )?; AB(* 3;
῏



!.

&¡7¢-£8¤¥¦8?" §¨aB.©ª? «(%§¨aB&C.¬ " r,z* =­d+,-.®?
 " $vaB¯&­&c
°±&²" +,-&­³.´! #$%'(µ¶&c

"  ·¸z¹º*!!

5" c·¸c  qr$  +*/  o,**1p76

 

Mehta, B.K., S. Shiozawa and M. Nakano (+33.) : Hy-  

!"#$%&'()draulic properties of a sandy soil at low water* +,-.!/01234567 89:;contents. Soil Sci., +/1 : ,*2ῌ,+..

<(=>?4@ABCD2EF>GH>IJKF>

Mualem, Y.A. (+310) : A new model for predicting the

5L MNOPQ9RS TU2VWEF>HXG

hydraulic conductivity of unsaturated porous me-<(=>?4@45HYZ[\9>HX;]^_>`

dia. Water Resour. Res., +, : /+-ῌ/,,.

a5L

bcdeῌfg

hῌij

kῌlm

n o+33/p : 

qrstuvw pp. 0/ῌ21 xyz{|}~ xῌ ῐ ῏ ῍yw

Brooks, R.H. and A.T. Corey (+30.) : Hydraulic prop-

Nemes, A., M.G. Shaap, F. J. Leij and J.H.M. Wöstenerties of porous media. Hydrol. Paper -. Colorado(,**+) : Description of the unsaturated soil hy-

State Univ., Fort Collins, CO, USA.

draulic database UNSODA version ,.*. J. Hydrol.

Burdine, N.T. (+3/-) : Relative permeability calculations from pore-size distribution data. Petrol.

(Amsterdam) ,/+ : +/+ῌ+0,.

 o,**.p : !r#$1w  qr$ 30 : /1ῌ0-w

Trans., Am. Inst. Min. Eng. +32 : 1+ῌ11.
Campbell, G.S. (+31.) : A simple method for determin-z o,***p : Linux 0Dw pp. +ῌ/ O xyw

ing unsaturated conductivity from moisture retention data. Soil Sci., ++1 (0) : -++ῌ-+..

9=Hv2<5

Richard F., P. Lu¤scher and T. Strobel (+32-) : Phys-

Dane, J.H., D.K. Cassel, J.M. Davidson, W.L. Pollans

ikalische Eigenschaften von Böden der Schweiz,

and V.L. Quisenbeny. (+32-) : Physical character-Vol. -, Swiss Federal Institute for Forest, Snow

istics of soils of the Southern Region -Troup andand Landscape Research (WSL), Birmensdorf,

Lakeland Series. South. Coop. Ser. Bull. ,0,, Ala.

Switzerland and Swiss Federal Institute of Tech-

Agric. Exp. Sta. Auburn Univ., AL.

nology (ETH), Zurich, Switzerland.

Durner, W. (+33.) : Hydraulic conductivity estimation

van Genuchten, M. (+32*) : A closed-form equation forfor soils with heterogeneous pore structure. Wa-

predicting the hydraulic conductivity of unsatu-

ter Resour. Res., -* (,) : ,++ῌ,,-.

rated soils. Soil Sci. Soc. Am. J. .. : 23,ῌ232.

Haverkamp, E. and J.Y. Parlange (+320) : Predicting

van Genuchten, M., F. Leij and S. Yates (+33+) : The

the water-retention curve from particle-size dis-

RETC code for quantifying the hydraulic func-

tribution : +. Sandy soils without organic matter.

tions of unsaturated soils. Technical Report EPA/

Soil Sci., +., (0) : -,/ῌ--3.

0**/,ῌ3+/*0/, US Environmental Protection Agen-

Kosugi, K. (+33.) : Three-parameter lognormal distri-cy.

bution model for soil water retention. Water Re-

῎sour. Res., -* : 23+ῌ3*+.
Kosugi, K. (+330) : Lognormal distribution model forῑ !"#$Q NOPQ swrc. m

unsaturated soil hydraulic properties. Water Re-+

sour. Res. -, : ,031ῌ,1*-.

,#!/usr/bin/octave -qf# swrc. m version +.*Kosugi, K. (+331) : New diagrams to evaluate soil pore-

# http : //purl.org/net/octave/

radius distribution and saturated hydraulic con-.

ductivity of forest soil. J. For. Res. , : 3/ῌ+*+.

/# Read data from ﬁleLaliberte, G.E., A.T. Corey and R.H. Brooks (+300) :0

output_precision1 ;Properties of unsaturated porous media. Hydrol.

1load swrc. txt

Paper +1, Colorado State. University, Fort Col-2[s, i]sort (swrc ( : , +)) ;lins, CO, USA.

3

sortedswrc (i, : ) ;Marquardt, D. (+30-) : An algorithm for least-squares+* xsorted ( : , +) ; ysorted ( : , ,) ;estimation of nonlinear parameters. J. Soc. Indust.

++

App. Math., ++ : .-+ῌ..+.

+, # Setting : Octave  !"#+- thetaSinmax (y) ; # initial value of thetaS/*+. cts+ ; # cts+ ; thetaS is variable, cts* ; thetaS
is constant+/ thetaRinmin (y) ; # initial value of thetaR+0 ctr+ ; # ctr+ ; thetaS is variable, ctr* ; thetaS
is constant77

retp (,)(p (+)-p (,)). * (+(abs (p( -)). *x).n).
(+/n-+) ;/+ endfunction/, thetaSthetaSin ; thetaRthetaRin ;/- hmx (sum (ymax (y)/,min (y)/,)+) ;/. alpha+/hm ; nlambda+ ;+1// if n+.+, n+.+ ; , end+2 # Set initial values/0 if n+*, n+* ; , end+3 thetaSthetaSin ; thetaRthetaRin ;/1 pin[thetaS, thetaR, alpha, n-+] ;,* hbisum (ymax (y) * *.3/min (y) * *.*/)+ ;/2 stol+ ; dp[*.****+* cts *.**+* ctr *.+ *.**+] ; R,b* ;,+ hbx (hbi) ; hby(y(hbi)-thetaR)/(thetaS-thetaR) ;/3 while (stol*.****+),, if hb*, hbx (,)/+* ; , end

0*,- hlisum (ymax (y) * *.+/min (y) * *.2/) ;[f, p, kvg, itr, corp, covp, covr, std, Z, R,]leasqr(x, y, pin, “VG”, stol, ,*, wt, dp) ;,. if hbihli ; hlihli+ ; , end

0+

if kvg*, ppin ; , R,R,b ; , stol* ; , end,/ hlx (hli) ; hly(y (hli)-thetaR)/(thetaS-thetaR) ;0,

if imag (R,),*, ppin ; R,R,b ; , stol* ; , end,0 lambda-log (hly/hby)/log (hl/hb) ;0-stolstol/+* ; pinp ; R,bR, ;,1 if lambda*.+, lambda*.+ ; , end

0. endwhile,2 if lambda+*, lambda+* ; , end

0/ thetaSp (+), thetaRp (,), alphaabs (p (-)), n
abs (p (.))+, R,,3-* # Brooks and Corey Model00-+ disp (“BC model”) ;01 # Lognormal Pore-Size Distribution Model of Kosugi-, x,x.(x*). * *.**+ ;02 disp (“LN model”) ;-- function retBC (x, p)

03 function retLN(x, p)-.

ret(xp (-)). * (p (,)(p (+)-p (,)). * (x./p (-)).(-p1*(.)))(xp (-)). * p (+) ;retp (,)(p (+)p (,)). *(+-normcdf ((log (x/abs(p (-))))./abs (p (.)))) ;-/ endfunction

1+ endfunction-0 pin[thetaS, thetaR, hb, lambda] ;1, thetaSthetaSin ; thetaRthetaRin ; hm+/alpha ;-1 stol+ ; wtones (length (y), +) ;1- sigma+.,* (n-+)(-*.2) ;-2 dp[*.****+* cts *.**+* ctr *.+ *.*+] ; R,b* ;1. if sigma*.+/, sigma*.+/ ; , end-3 while (stol*.****+)

1/ if sigma-, sigma- ; , end[f, p, kvg, itr, corp, covp, covr, std, z, R,]leasqr

10 pin[thetaS, thetaR, hm, sigma] ;(x,, y, pin, “BC”, stol, ,*, wt, dp) ;11 stol+ ; dp[*.****+*cts *.***+*ctr *.*+ *.*+] ; R,b* ;.+if kvg*, ppin ; , R,R,b ; , stol* ; , end

12 while (stol*.****+).,

stolstol/+* ; pinp ; R,bR, ;13[f, p, kvg, itr, corp, covp, covr, std, Z, R,]leasqr

2*

if kvg*, ppin ; , R,R,b ; , stol* ; , end.*.- endwhile.. thetaSp (+), thetaRp (,), hbp (-), lambdap(.), R,(x, y, pin, “LN”, stol, ,*, wt, dp) ;2+

if imag (R,),*, ppin ; R,R,b ; , stol* ; , end./

2,stolstol/+* ; pinp ; R,bR, ;.0 # van Genuchten Model2- endwhile.1 disp (“VG model”) ;2. thetaSp (+), thetaRp (,), hmabs (p (-)), sigma

.2 function retVG (x, p).3nabs (p (.))+ ;abs (p (.)), R,   +*/  ,**1

78

῍

ῌ  ! "# GNU Octave $%&'()* +,-+./*'0(*12 3 -+.4 Brooks and Corey 5
van Genuchten 5 Kosugi

6789!:5 Durner

678;<=>?:5$9* @A

B;ῌC?D.E$%FGHIJK* LM/NO2 PQRSF
GHI-+.T4 UVW XY Z[$\ LMW]W 3 
T4 XY^_\Al UNSODA`?a,bJc*1/3d$ efW]2 ghijk

mn kop' qr* e s pnt

uvw$tp' =k? xyz%{Zo | }~$tp'*12  : ,**0  1
  : ,**0  +,,2 
,0 