Keywords: Wrc.svg en calculated diagram of soil with model formula van Genuchten 1980 <ref> cite web https //www bgr bund de/DE/Themen/Boden/Netzwerke/Adhocag/Downloads/Ergaenzungsregel_1_18 pdf Verknüpfungsregel 1 18 “ Parameter für das Modell einer stetigen Funktion der θ ψ -Beziehung 2015-07-29 Ad-hoc-AG Boden 2004-09-17 PDF 242 KiB Staatlichen Geologischen Dienste und BGR German </ref> de neu berechnetes Diagramm verschiedener Bodenarten mit Modelldaten gemäß van Genuchten 1980 own FMoeckel DufterKunde 2015-08-13 http //de wikipedia org/wiki/Datei Wrc svg Wrc jpg o Van Genuchten model of soil water retention <math>\theta</math> “ relative soil water content <math>\Psi_ \mathrm m </math> “ soil matric potential <math> \theta \theta_r + \frac \theta_s - \theta_r \left 1 + \left \alpha\ \frac \left \Psi_ \mathrm m \right \mathrm hPa \right n \right m </math> with <math> m 1 - \frac 1 n \; </math> 1 cellpadding 1 cellspacing 0 +Parameter List Soil Soil <math>\theta_r</math> <math>\theta_r</math> <math>\alpha</math> <math>n</math> <math>m</math> - Ss Sand 0 043019 0 370687 0 087424 1 57535 0 36522 - Uu Silt 0 0 421256 0 003405 1 34475 0 25637 - Lu Loam-Silt 0 0 421217 0 013345 1 12614 0 11201 - Tt Clay 0 0 550541 0 006812 1 08155 0 07540 GNU Octave source code <syntaxhighlight lang octave> function van_genuchten Encdoing UTF-8 Written by DufterKunde https //de wikipedia org/wiki/Benutzer DufterKunde to produce a corrected version of https //commons wikimedia org/wiki/File Wrc svg It is supposed to be run in GNU octave 4 0 but it should also work with older versions of octave as well Only minor changes are needed to make it run with Matlab The plot shows the matric potential Psi_m of different types of soil as a function of the relative soil water content theta It is based on the equation and parameters from cite web https //www bgr bund de/DE/Themen/Boden/Netzwerke/Adhocag/Downloads/Ergaenzungsregel_1_18 pdf Verknüpfungsregel 1 18 “ Parameter für das Modell einer stetigen Funktion der θ ψ -Beziehung 2015-07-29 Ad-hoc-AG Boden 2004-09-17 PDF 242 KiB Staatlichen Geologischen Dienste und BGR German theta theta_r + theta_s - theta_r / 1 + alpha -psi n m with m 1 - 1/n Ss Sand Uu Silt Lu Loam-Silt Tt Clay Compliance of the output with the svg-standard validated by https //validator w3 org/ and practical functionality tested with - Mozilla Firefox for Ubuntu 40 0 - Chromium 43 0 2357 130 Ubuntu 15 04 64-bit - eog Eye of Gnome 3 14 4 - Inkscape 0 91 r13725 and - SVG Check https //tools wmflabs org/svgcheck/ rsvg 2 36 1 parameters pF 0 6; N 10 diff pF + 1; psi -logspace pF 1 pF 2 N ; x 0 0 55; y pF; X 70 550 ; Y 390 30 ; DY diff Y /diff y ; Tick 8; tick 6; lgnd_wdth 95; lgnd_hght 120; lgnd_strk 35; lgnd_pad 4; lgnd_Pad 12; today clock ; Sand theta_r_ss 0 043019; theta_s_ss 0 370687; alpha_ss 0 087424; n_ss 1 57535; theta_ss theta_vg psi theta_r_ss theta_s_ss alpha_ss n_ss ; Silt theta_r_uu 0; theta_s_uu 0 421256; alpha_uu 0 003405; n_uu 1 34475; theta_uu theta_vg psi theta_r_uu theta_s_uu alpha_uu n_uu ; Loam-Silt theta_r_lu 0; theta_s_lu 0 421217; alpha_lu 0 013345; n_lu 1 12614; theta_lu theta_vg psi theta_r_lu theta_s_lu alpha_lu n_lu ; Clay theta_r_tt 0; theta_s_tt 0 550541; alpha_tt 0 006812; n_tt 1 08155; theta_tt theta_vg psi theta_r_tt theta_s_tt alpha_tt n_tt ; generate svg-file fid fopen Wrc svg w ; fprintf fid < xml version \ 1 0\ encoding \ utf-8\ >\n <svg\n xmlns \ http //www w3 org/2000/svg\ \n width \ 600\ height \ 450\ \n >\n \t<title>Water Retention Curves</title>\n ; fprintf fid \t<desc>\n \t\t This is a corrected version of\n \t\t https //commons wikimedia org/wiki/File Wrc svg\n \t\t generated by DufterKunde\n \t\t https //de wikipedia org/wiki/Benutzer DufterKunde\n \t\t on i- 02i- 02i \n \t\t The plot shows the matric potential Psi_m\n \t\t of different types of soil as a function of the\n \t\t relative soil water content theta \n \t\t It is based on the equation and parameters from\n \t\t cite web\n \t\t https //www bgr bund de/DE/Themen/Boden/Netzwerke/Adhocag/Downloads/Ergaenzungsregel_1_18 pdf\n \t\t Verknüpfungsregel 1 18 “ Parameter für das Modell einer stetigen Funktion der θ ψ -Beziehung\n \t\t 2015-07-29\n \t\t Ad-hoc-AG Boden\n \t\t \n \t\t 2004-09-17\n \t\t PDF 242 KiB\n \t\t Staatlichen Geologischen Dienste und BGR\n \t\t German\n \t\t \n \t\t theta theta_r + theta_s - theta_r / 1 + alpha -psi n m\n \t\t with\n \t\t m 1 - 1/n \n \t\t Ss Sand Uu Silt Lu Loam-Silt Tt Clay \n \t\t This svg-file has been generated line-by-line\n \t\t by a GNU Octave function \n \t\t Compliance with the svg standard validated by \n \t\t https //validator w3 org/\n \t\t and practical functionality tested with\n \t\t - Mozilla Firefox for Ubuntu 40 0 \n \t\t - Chromium 43 0 2357 130 Ubuntu 15 04 64-bit \n \t\t - eog Eye of Gnome 3 14 4 \n \t\t - Inkscape 0 91 r13725 and\n \t\t - SVG Check https //tools wmflabs org/svgcheck/ rsvg 2 36 1 \n \t</desc>\n today 1 today 2 today 3 ; fprintf fid \t<g shape-rendering \ geometricPrecision\ stroke \ black\ stroke-width \ 2\ >\n ; fprintf fid \t\t\n ; fprintf fid \t\t<g stroke \ c0c0c0\ >\n ; for k pF 1 + 1 pF 2 - 1 Y_grid Y 1 + k DY fprintf fid \t\t\t<polyline points \ i i i i\ />\n X 1 Y_grid X 2 Y_grid ; endfor fprintf fid \t\t</g>\n ; fprintf fid \t\t\n ; fprintf fid \t\t<g fill \ none\ stroke-width \ 3\ >\n ; write_svg_dat fid psi 1 end-10 theta_ss 1 end-10 x y X Y 0000ff Ss Sand ; write_svg_dat fid psi theta_uu x y X Y ff0000 Uu Silt ; write_svg_dat fid psi theta_lu x y X Y 00ff00 Lu Loam-Silt ; write_svg_dat fid psi theta_tt x y X Y b000b0 Tt Clay ; fprintf fid \t\t</g>\n ; fprintf fid \t\t\n ; for k 0 1 0 1 0 5 X_grid X 1 + k diff X /diff x fprintf fid \t\t<polyline points \ 5 2f i 5 2f i\ />\n X_grid Y 1 X_grid Y 1 -Tick ; fprintf fid \t\t<polyline points \ 5 2f i 5 2f i\ />\n X_grid Y 2 +Tick X_grid Y 2 ; endfor fprintf fid \t\t\n ; for k pF 1 + 1 pF 2 - 1 Y_grid Y 1 + k DY; fprintf fid \t\t<polyline points \ i i i i\ />\n X 1 Y_grid X 1 +Tick Y_grid ; fprintf fid \t\t<polyline points \ i i i i\ />\n X 2 -Tick Y_grid X 2 Y_grid ; endfor fprintf fid \t\t\n ; for k pF 1 pF 2 - 1 for m 2 9 y_grid Y 1 + k + log10 m DY; fprintf fid \t\t<polyline points \ i 5 2f i 5 2f\ />\n X 1 y_grid X 1 +tick y_grid ; endfor endfor fprintf fid \t\t\n ; fprintf fid \t\t<rect x \ i\ y \ i\ width \ i\ height \ i\ stroke \ black\ fill \ white\ />\n X 2 -lgnd_wdth-lgnd_Pad Y 2 +lgnd_Pad lgnd_wdth lgnd_hght ; Y_lgnd Y 2 +1 5 Tick + 0 5 1 5 2 5 3 5/4 lgnd_hght X_lgnd X 2 -lgnd_wdth-lgnd_pad X 2 -lgnd_wdth-lgnd_pad+lgnd_strk; fprintf fid \t\t<g fill \ none\ stroke-width \ 3\ >\n ; fprintf fid \t\t\t<polyline stroke \ 0000ff\ points \ i i i i\ />\n X_lgnd 1 Y_lgnd 1 X_lgnd 2 Y_lgnd 1 ; fprintf fid \t\t\t<polyline stroke \ ff0000\ points \ i i i i\ />\n X_lgnd 1 Y_lgnd 2 X_lgnd 2 Y_lgnd 2 ; fprintf fid \t\t\t<polyline stroke \ 00ff00\ points \ i i i i\ />\n X_lgnd 1 Y_lgnd 3 X_lgnd 2 Y_lgnd 3 ; fprintf fid \t\t\t<polyline stroke \ b000b0\ points \ i i i i\ />\n X_lgnd 1 Y_lgnd 4 X_lgnd 2 Y_lgnd 4 ; fprintf fid \t\t</g>\n ; fprintf fid \t\t\n ; fprintf fid \t\t<polygon points \ i i i i i i i i\ fill \ none\ stroke \ black\ stroke-width \ 2\ />\n X 1 Y 2 X 2 Y 2 X 2 Y 1 X 1 Y 1 ; fprintf fid \t\t\n ; fprintf fid \t\t<g stroke-width \ 0\ fill \ black\ font-family \ Helvetica\ font-size \ 24\ >\n ; fprintf fid \t\t\t\n ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ middle\ font-style \ italic\ >θ</text>\n mean X -10 445 ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ middle\ >0</text>\n X 1 420 ; for k 0 1 0 1 0 5 X_grid X 1 + k diff X /diff x ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ middle\ > 3 1f</text>\n X_grid 420 k ; endfor fprintf fid \t\t\t\n ; fprintf fid \t\t\t<text x \ i\ y \ i\ transform \ rotate -90 \ text-anchor \ end\ >p</text>\n -mean Y + 7 593 ; fprintf fid \t\t\t<text x \ i\ y \ i\ transform \ rotate -90 \ text-anchor \ start\ font-style \ italic\ >F</text>\n -mean Y + 7 593 ; fprintf fid \t\t\t<text x \ i\ y \ i\ transform \ rotate -90 \ text-anchor \ end\ font-style \ italic\ > “ψ</text>\n -mean Y -20 19 ; fprintf fid \t\t\t<text x \ i\ y \ i\ transform \ rotate -90 \ text-anchor \ start\ font-size \ 18\ >m</text>\n -mean Y -20 26 ; fprintf fid \t\t\t<text x \ i\ y \ i\ transform \ rotate -90 \ text-anchor \ start\ >/ hPa</text>\n -mean Y 19 ; for k pF 1 pF 2 Y_grid Y 1 + k DY; if k < 0 fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ end\ > “</text>\n X 2 +8 Y_grid+10 ; endif fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ > i</text>\n X 2 +8 Y_grid+10 abs k ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ end\ >10</text>\n X 1 -15 Y_grid+10 ; if k > 0 fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ font-size \ 18\ > i</text>\n X 1 -15 Y_grid-2 k ; else fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ font-size \ 18\ > “ i</text>\n X 1 -15 Y_grid-2 -k ; endif endfor fprintf fid \t\t\t\n ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ >Ss</text>\n X_lgnd 2 +lgnd_Pad Y_lgnd 1 +8 ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ >Uu</text>\n X_lgnd 2 +lgnd_Pad Y_lgnd 2 +8 ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ >Lu</text>\n X_lgnd 2 +lgnd_Pad Y_lgnd 3 +8 ; fprintf fid \t\t\t<text x \ i\ y \ i\ text-anchor \ start\ >Tt</text>\n X_lgnd 2 +lgnd_Pad Y_lgnd 4 +8 ; fprintf fid \t\t</g>\n \t</g>\n </svg> ; fclose fid ; endfunction function theta theta_vg psi theta_r theta_s alpha n van Genuchten equation m 1 - 1/n theta theta_r + theta_s - theta_r / 1 + alpha -psi n m; endfunction function write_svg_dat fid psi theta x y X Y cl name Y_dat log10 -psi - y 1 diff Y /diff y + Y 1 ; X_dat theta - x 1 diff X /diff x + X 1 ; fprintf fid \t\t\t<polyline stroke \ s\ points \ cl ; for k 1 length psi - 1 fprintf fid 4 2f i X_dat k Y_dat k ; endfor fprintf fid 4 2f i\ >\n \t\t\t\t<title> s</title>\n \t\t\t</polyline>\n X_dat end Y_dat end name ; endfunction </syntaxhighlight> cob Reference <references /> Soil science diagrams Hydrological diagrams Images with Octave source code |