MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
SmoothingFunctions.f90
Go to the documentation of this file.
2  use kindmodule, only: dp, i4b
3  use constantsmodule, only: dzero, dhalf, done, dtwo, dthree, dfour, &
5  implicit none
6 
7 contains
8 
9  !> @ brief SCurve
10  !!
11  !! Computes the S curve for smooth derivatives between x=0 and x=1
12  !! from mfusg smooth subroutine in gwf2wel7u1.f
13  !<
14  subroutine sscurve(x, range, dydx, y)
15  real(DP), intent(in) :: x
16  real(DP), intent(in) :: range
17  real(DP), intent(inout) :: dydx
18  real(DP), intent(inout) :: y
19  !--local variables
20  real(DP) :: s
21  real(DP) :: xs
22  ! -- code
23  !
24  s = range
25  if (s < dprec) s = dprec
26  xs = x / s
27  if (xs < dzero) xs = dzero
28  if (xs <= dzero) then
29  y = dzero
30  dydx = dzero
31  elseif (xs < done) then
32  y = -dtwo * xs**dthree + dthree * xs**dtwo
33  dydx = -dsix * xs**dtwo + dsix * xs
34  else
35  y = done
36  dydx = dzero
37  end if
38  end subroutine sscurve
39 
40  !> @ brief sCubicLinear
41  !!
42  !! Computes the s curve where dy/dx = 0 at x=0; and dy/dx = 1 at x=1.
43  !! Smooths from zero to a slope of 1.
44  !<
45  subroutine scubiclinear(x, range, dydx, y)
46  real(DP), intent(in) :: x
47  real(DP), intent(in) :: range
48  real(DP), intent(inout) :: dydx
49  real(DP), intent(inout) :: y
50  !--local variables
51  real(DP) :: s
52  real(DP) :: xs
53  ! -- code
54  !
55  s = range
56  if (s < dprec) s = dprec
57  xs = x / s
58  if (xs < dzero) xs = dzero
59  if (xs <= dzero) then
60  y = dzero
61  dydx = dzero
62  elseif (xs < done) then
63  y = -done * xs**dthree + dtwo * xs**dtwo
64  dydx = -dthree * xs**dtwo + dfour * xs
65  else
66  y = done
67  dydx = dzero
68  end if
69  end subroutine scubiclinear
70 
71  !> @ brief sCubic
72  !!
73  !! Nonlinear smoothing function returns value between 0-1; cubic function
74  !<
75  subroutine scubic(x, range, dydx, y)
76  real(DP), intent(inout) :: x
77  real(DP), intent(inout) :: range
78  real(DP), intent(inout) :: dydx
79  real(DP), intent(inout) :: y
80  !--local variables
81  real(DP) :: s, aa, bb
82  real(DP) :: cof1, cof2, cof3
83  ! -- code
84  !
85  dydx = dzero
86  y = dzero
87  if (range < dprec) range = dprec
88  if (x < dprec) x = dprec
89  s = range
90  aa = -dsix / (s**dthree)
91  bb = -dsix / (s**dtwo)
92  cof1 = x**dtwo
93  cof2 = -(dtwo * x) / (s**dthree)
94  cof3 = dthree / (s**dtwo)
95  y = cof1 * (cof2 + cof3)
96  dydx = (aa * x**dtwo - bb * x)
97  if (x <= dzero) then
98  y = dzero
99  dydx = dzero
100  else if ((x - s) > -dprec) then
101  y = done
102  dydx = dzero
103  end if
104  end subroutine scubic
105 
106  !> @ brief sLinear
107  !!
108  !! Linear smoothing function returns value between 0-1
109  !<
110  subroutine slinear(x, range, dydx, y)
111  real(DP), intent(inout) :: x
112  real(DP), intent(inout) :: range
113  real(DP), intent(inout) :: dydx
114  real(DP), intent(inout) :: y
115  !--local variables
116  real(DP) :: s
117  ! -- code
118  !
119  dydx = dzero
120  y = dzero
121  if (range < dprec) range = dprec
122  if (x < dprec) x = dprec
123  s = range
124  y = done - (s - x) / s
125  dydx = done / s
126  if (y > done) then
127  y = done
128  dydx = dzero
129  end if
130  end subroutine slinear
131 
132  !> @ brief sQuadratic
133  !!
134  !! Nonlinear quadratic smoothing function returns value between 0-1
135  !<
136  subroutine squadratic(x, range, dydx, y)
137  real(DP), intent(inout) :: x
138  real(DP), intent(inout) :: range
139  real(DP), intent(inout) :: dydx
140  real(DP), intent(inout) :: y
141  !--local variables
142  real(DP) :: s
143  ! -- code
144  !
145  dydx = dzero
146  y = dzero
147  if (range < dprec) range = dprec
148  if (x < dprec) x = dprec
149  s = range
150  y = (x**dtwo) / (s**dtwo)
151  dydx = dtwo * x / (s**dtwo)
152  if (y > done) then
153  y = done
154  dydx = dzero
155  end if
156  end subroutine squadratic
157 
158  !> @ brief sChSmooth
159  !!
160  !! Function to smooth channel variables during channel drying
161  !<
162  subroutine schsmooth(d, smooth, dwdh)
163  real(DP), intent(in) :: d
164  real(DP), intent(inout) :: smooth
165  real(DP), intent(inout) :: dwdh
166  !
167  ! -- local variables
168  real(DP) :: s
169  real(DP) :: diff
170  real(DP) :: aa
171  real(DP) :: ad
172  real(DP) :: b
173  real(DP) :: x
174  real(DP) :: y
175  ! -- code
176  !
177  smooth = dzero
178  s = dem5
179  x = d
180  diff = x - s
181  if (diff > dzero) then
182  smooth = done
183  dwdh = dzero
184  else
185  aa = -done / (s**dtwo)
186  ad = -dtwo / (s**dtwo)
187  b = dtwo / s
188  y = aa * x**dtwo + b * x
189  dwdh = (ad * x + b)
190  if (x <= dzero) then
191  y = dzero
192  dwdh = dzero
193  else if (diff > -dem14) then
194  y = done
195  dwdh = dzero
196  end if
197  smooth = y
198  end if
199  end subroutine schsmooth
200 
201  !> @ brief sLinearSaturation
202  !!
203  !! Linear saturation function returns value between 0-1
204  !<
205  function slinearsaturation(top, bot, x) result(y)
206  ! -- return
207  real(dp) :: y
208  ! -- dummy variables
209  real(dp), intent(in) :: top
210  real(dp), intent(in) :: bot
211  real(dp), intent(in) :: x
212  ! -- local
213  real(dp) :: b
214  ! -- code
215  !
216  b = top - bot
217  if (x < bot) then
218  y = dzero
219  else if (x > top) then
220  y = done
221  else
222  y = (x - bot) / b
223  end if
224  end function slinearsaturation
225 
226  !> @ brief sCubicSaturation
227  !!
228  !! Nonlinear cubic saturation function returns value between 0-1
229  !<
230  function scubicsaturation(top, bot, x, eps) result(y)
231  ! -- return
232  real(dp) :: y
233  ! -- dummy variables
234  real(dp), intent(in) :: top
235  real(dp), intent(in) :: bot
236  real(dp), intent(in) :: x
237  real(dp), intent(in), optional :: eps
238  ! -- local
239  real(dp) :: teps
240  real(dp) :: w
241  real(dp) :: b
242  real(dp) :: s
243  real(dp) :: cof1
244  real(dp) :: cof2
245  ! -- code
246  !
247  if (present(eps)) then
248  teps = eps
249  else
250  teps = dem2
251  end if
252  w = x - bot
253  b = top - bot
254  s = teps * b
255  cof1 = done / (s**dtwo)
256  cof2 = dtwo / s
257  if (w < dzero) then
258  y = dzero
259  else if (w < s) then
260  y = -cof1 * (w**dthree) + cof2 * (w**dtwo)
261  else if (w < (b - s)) then
262  y = w / b
263  else if (w < b) then
264  y = done + cof1 * ((b - w)**dthree) - cof2 * ((b - w)**dtwo)
265  else
266  y = done
267  end if
268 
269  end function scubicsaturation
270 
271  !> @ brief sQuadraticSaturation
272  !!
273  !! Nonlinear quadratic saturation function returns value between 0-1
274  !<
275  function squadraticsaturation(top, bot, x, eps) result(y)
276  ! -- return
277  real(dp) :: y
278  ! -- dummy variables
279  real(dp), intent(in) :: top
280  real(dp), intent(in) :: bot
281  real(dp), intent(in) :: x
282  real(dp), optional, intent(in) :: eps
283  ! -- local
284  real(dp) :: teps
285  real(dp) :: b
286  real(dp) :: br
287  real(dp) :: bri
288  real(dp) :: av
289  ! -- code
290  !
291  if (present(eps)) then
292  teps = eps
293  else
294  teps = dem6
295  end if
296  b = top - bot
297  if (b > dzero) then
298  if (x < bot) then
299  br = dzero
300  else if (x > top) then
301  br = done
302  else
303  br = (x - bot) / b
304  end if
305  av = done / (done - teps)
306  bri = done - br
307  if (br < teps) then
308  y = av * dhalf * (br * br) / teps
309  elseif (br < (done - teps)) then
310  y = av * br + dhalf * (done - av)
311  elseif (br < done) then
312  y = done - ((av * dhalf * (bri * bri)) / teps)
313  else
314  y = done
315  end if
316  else
317  if (x < bot) then
318  y = dzero
319  else
320  y = done
321  end if
322  end if
323 
324  end function squadraticsaturation
325 
326  !> @ brief sQuadraticSaturation
327  !!
328  !! van Genuchten saturation function returns value between 0-1
329  !<
330  function svangenuchtensaturation(top, bot, x, alpha, beta, sr) result(y)
331  ! -- return
332  real(dp) :: y
333  ! -- dummy variables
334  real(dp), intent(in) :: top
335  real(dp), intent(in) :: bot
336  real(dp), intent(in) :: x
337  real(dp), intent(in) :: alpha
338  real(dp), intent(in) :: beta
339  real(dp), intent(in) :: sr
340  ! -- local
341  real(dp) :: b
342  real(dp) :: pc
343  real(dp) :: gamma
344  real(dp) :: seff
345  ! -- code
346  !
347  b = top - bot
348  pc = (dhalf * b) - x
349  if (pc <= dzero) then
350  y = dzero
351  else
352  gamma = done - (done / beta)
353  seff = (done + (alpha * pc)**beta)**gamma
354  seff = done / seff
355  y = seff * (done - sr) + sr
356  end if
357 
358  end function svangenuchtensaturation
359 
360  !> @ brief Derivative of the quadratic saturation function
361  !!
362  !! Derivative of nonlinear smoothing function returns value between 0-1;
363  !<
364  function squadraticsaturationderivative(top, bot, x, eps) result(y)
365  ! -- return
366  real(dp) :: y
367  ! -- dummy variables
368  real(dp), intent(in) :: top
369  real(dp), intent(in) :: bot
370  real(dp), intent(in) :: x
371  real(dp), optional, intent(in) :: eps
372  ! -- local
373  real(dp) :: teps
374  real(dp) :: b
375  real(dp) :: br
376  real(dp) :: bri
377  real(dp) :: av
378  ! -- code
379  !
380  if (present(eps)) then
381  teps = eps
382  else
383  teps = dem6
384  end if
385  b = top - bot
386  if (x < bot) then
387  br = dzero
388  else if (x > top) then
389  br = done
390  else
391  br = (x - bot) / b
392  end if
393  av = done / (done - teps)
394  bri = done - br
395  if (br < teps) then
396  y = av * br / teps
397  elseif (br < (done - teps)) then
398  y = av
399  elseif (br < done) then
400  y = av * bri / teps
401  else
402  y = dzero
403  end if
404  y = y / b
405 
406  end function squadraticsaturationderivative
407 
408  !> @ brief sQSaturation
409  !!
410  !! Nonlinear smoothing function returns value between 0-1
411  !<
412  function sqsaturation(top, bot, x, c1, c2) result(y)
413  ! -- return
414  real(dp) :: y
415  ! -- dummy variables
416  real(dp), intent(in) :: top
417  real(dp), intent(in) :: bot
418  real(dp), intent(in) :: x
419  real(dp), intent(in), optional :: c1
420  real(dp), intent(in), optional :: c2
421  ! -- local
422  real(dp) :: w
423  real(dp) :: b
424  real(dp) :: s
425  real(dp) :: cof1
426  real(dp) :: cof2
427  ! -- code
428  !
429  ! -- process optional variables
430  if (present(c1)) then
431  cof1 = c1
432  else
433  cof1 = -dtwo
434  end if
435  if (present(c2)) then
436  cof2 = c2
437  else
438  cof2 = dthree
439  end if
440  !
441  ! -- calculate head difference from bottom (w),
442  ! calculate range (b), and
443  ! calculate normalized head difference from bottom (s)
444  w = x - bot
445  b = top - bot
446  s = w / b
447  !
448  ! -- divide cof1 and cof2 by range to the power 3 and 2, respectively
449  cof1 = cof1 / b**dthree
450  cof2 = cof2 / b**dtwo
451  !
452  ! -- calculate fraction
453  if (s < dzero) then
454  y = dzero
455  else if (s < done) then
456  y = cof1 * w**dthree + cof2 * w**dtwo
457  else
458  y = done
459  end if
460  end function sqsaturation
461 
462  !> @ brief sQSaturationDerivative
463  !!
464  !! Nonlinear smoothing function returns value between 0-1
465  !<
466  function sqsaturationderivative(top, bot, x, c1, c2) result(y)
467  ! -- return
468  real(dp) :: y
469  ! -- dummy variables
470  real(dp), intent(in) :: top
471  real(dp), intent(in) :: bot
472  real(dp), intent(in) :: x
473  real(dp), intent(in), optional :: c1
474  real(dp), intent(in), optional :: c2
475  ! -- local
476  real(dp) :: w
477  real(dp) :: b
478  real(dp) :: s
479  real(dp) :: cof1
480  real(dp) :: cof2
481  ! -- code
482  !
483  !
484  ! -- process optional variables
485  if (present(c1)) then
486  cof1 = c1
487  else
488  cof1 = -dtwo
489  end if
490  if (present(c2)) then
491  cof2 = c2
492  else
493  cof2 = dthree
494  end if
495  !
496  ! -- calculate head difference from bottom (w),
497  ! calculate range (b), and
498  ! calculate normalized head difference from bottom (s)
499  w = x - bot
500  b = top - bot
501  s = w / b
502  !
503  ! -- multiply cof1 and cof2 by 3 and 2, respectively, and then
504  ! divide by range to the power 3 and 2, respectively
505  cof1 = cof1 * dthree / b**dthree
506  cof2 = cof2 * dtwo / b**dtwo
507  !
508  ! -- calculate derivative of fraction with respect to x
509  if (s < dzero) then
510  y = dzero
511  else if (s < done) then
512  y = cof1 * w**dtwo + cof2 * w
513  else
514  y = dzero
515  end if
516  end function sqsaturationderivative
517 
518  !> @ brief sSlope
519  !!
520  !! Nonlinear smoothing function returns a smoothed value of y that has the value
521  !! yi at xi and yi + (sm * dx) for x-values less than xi and yi + (sp * dx) for
522  !! x-values greater than xi, where dx = x - xi.
523  !<
524  function sslope(x, xi, yi, sm, sp, ta) result(y)
525  ! -- return
526  real(dp) :: y
527  ! -- dummy variables
528  real(dp), intent(in) :: x
529  real(dp), intent(in) :: xi
530  real(dp), intent(in) :: yi
531  real(dp), intent(in) :: sm
532  real(dp), intent(in) :: sp
533  real(dp), optional, intent(in) :: ta
534  ! -- local
535  real(dp) :: a
536  real(dp) :: b
537  real(dp) :: dx
538  real(dp) :: xm
539  real(dp) :: xp
540  real(dp) :: ym
541  real(dp) :: yp
542  !
543  ! -- set smoothing variable a
544  if (present(ta)) then
545  a = ta
546  else
547  a = dem8
548  end if
549  !
550  ! -- calculate b from smoothing variable a
551  b = a / (sqrt(dtwo) - done)
552  !
553  ! -- calculate contributions to y
554  dx = x - xi
555  xm = dhalf * (x + xi - sqrt(dx + b**dtwo - a**dtwo))
556  xp = dhalf * (x + xi + sqrt(dx + b**dtwo - a**dtwo))
557  ym = sm * (xm - xi)
558  yp = sp * (xi - xp)
559  !
560  ! -- calculate y from ym and yp contributions
561  y = yi + ym + yp
562  end function sslope
563 
564  !> @ brief sSlopeDerivative
565  !!
566  !! Derivative of nonlinear smoothing function that has the value yi at xi and
567  !! yi + (sm * dx) for x-values less than xi and yi + (sp * dx) for x-values
568  !! greater than xi, where dx = x - xi.
569  !<
570  function sslopederivative(x, xi, sm, sp, ta) result(y)
571  ! -- return
572  real(dp) :: y
573  ! -- dummy variables
574  real(dp), intent(in) :: x
575  real(dp), intent(in) :: xi
576  real(dp), intent(in) :: sm
577  real(dp), intent(in) :: sp
578  real(dp), optional, intent(in) :: ta
579  ! -- local
580  real(dp) :: a
581  real(dp) :: b
582  real(dp) :: dx
583  real(dp) :: mu
584  real(dp) :: rho
585  !
586  ! -- set smoothing variable a
587  if (present(ta)) then
588  a = ta
589  else
590  a = dem8
591  end if
592  !
593  ! -- calculate b from smoothing variable a
594  b = a / (sqrt(dtwo) - done)
595  !
596  ! -- calculate contributions to derivative
597  dx = x - xi
598  mu = sqrt(dx**dtwo + b**dtwo - a**dtwo)
599  rho = dx / mu
600  !
601  ! -- calculate derivative from individual contributions
602  y = dhalf * (sm + sp) - dhalf * rho * (sm - sp)
603  end function sslopederivative
604 
605  !> @ brief sQuadratic0sp
606  !!
607  !! Nonlinear smoothing function returns a smoothed value of y that uses a
608  !! quadratic to smooth x over range of xi - epsilon to xi + epsilon.
609  !! Simplification of sQuadraticSlope with sm = 0, sp = 1, and yi = 0.
610  !! From Panday et al. (2013) - eq. 35 - https://dx.doi.org/10.5066/F7R20ZFJ
611  !<
612  function squadratic0sp(x, xi, tomega) result(y)
613  ! -- return
614  real(dp) :: y
615  ! -- dummy variables
616  real(dp), intent(in) :: x
617  real(dp), intent(in) :: xi
618  real(dp), optional, intent(in) :: tomega
619  ! -- local
620  real(dp) :: omega
621  real(dp) :: epsilon
622  real(dp) :: dx
623  !
624  ! -- set smoothing interval
625  if (present(tomega)) then
626  omega = tomega
627  else
628  omega = dem6
629  end if
630  !
631  ! -- set smoothing interval
632  epsilon = dhalf * omega
633  !
634  ! -- calculate distance from xi
635  dx = x - xi
636  !
637  ! -- evaluate smoothing function
638  if (dx < -epsilon) then
639  y = xi
640  else if (dx < epsilon) then
641  y = (dx**dtwo / (dfour * epsilon)) + dhalf * dx + (epsilon / dfour) + xi
642  else
643  y = x
644  end if
645  end function squadratic0sp
646 
647  !> @ brief sQuadratic0spDerivative
648  !!
649  !! Derivative of nonlinear smoothing function returns a smoothed value of y
650  !! that uses a quadratic to smooth x over range of xi - epsilon to xi + epsilon.
651  !! Simplification of sQuadraticSlope with sm = 0, sp = 1, and yi = 0.
652  !! From Panday et al. (2013) - eq. 35 - https://dx.doi.org/10.5066/F7R20ZFJ
653  !<
654  function squadratic0spderivative(x, xi, tomega) result(y)
655  ! -- return
656  real(dp) :: y
657  ! -- dummy variables
658  real(dp), intent(in) :: x
659  real(dp), intent(in) :: xi
660  real(dp), optional, intent(in) :: tomega
661  ! -- local
662  real(dp) :: omega
663  real(dp) :: epsilon
664  real(dp) :: dx
665  !
666  ! -- set smoothing interval
667  if (present(tomega)) then
668  omega = tomega
669  else
670  omega = dem6
671  end if
672  !
673  ! -- set smoothing interval
674  epsilon = dhalf * omega
675  !
676  ! -- calculate distance from xi
677  dx = x - xi
678  !
679  ! -- evaluate smoothing function
680  if (dx < -epsilon) then
681  y = 0
682  else if (dx < epsilon) then
683  y = (dx / omega) + dhalf
684  else
685  y = 1
686  end if
687  end function squadratic0spderivative
688 
689  !> @ brief sQuadraticSlope
690  !!
691  !! Quadratic smoothing function returns a smoothed value of y that has the value
692  !! yi at xi and yi + (sm * dx) for x-values less than xi and yi + (sp * dx) for
693  !! x-values greater than xi, where dx = x - xi.
694  !<
695  function squadraticslope(x, xi, yi, sm, sp, tomega) result(y)
696  ! -- return
697  real(dp) :: y
698  ! -- dummy variables
699  real(dp), intent(in) :: x
700  real(dp), intent(in) :: xi
701  real(dp), intent(in) :: yi
702  real(dp), intent(in) :: sm
703  real(dp), intent(in) :: sp
704  real(dp), optional, intent(in) :: tomega
705  ! -- local
706  real(dp) :: omega
707  real(dp) :: epsilon
708  real(dp) :: dx
709  real(dp) :: c
710  !
711  ! -- set smoothing interval
712  if (present(tomega)) then
713  omega = tomega
714  else
715  omega = dem6
716  end if
717  !
718  ! -- set smoothing interval
719  epsilon = dhalf * omega
720  !
721  ! -- calculate distance from xi
722  dx = x - xi
723  !
724  ! -- evaluate smoothing function
725  if (dx < -epsilon) then
726  y = sm * dx
727  else if (dx < epsilon) then
728  c = dx / epsilon
729  y = dhalf * epsilon * (dhalf * (sp - sm) * (done + c**dtwo) + (sm + sp) * c)
730  else
731  y = sp * dx
732  end if
733  !
734  ! -- add value at xi
735  y = y + yi
736  end function squadraticslope
737 
738  !> @ brief sQuadraticSlopeDerivative
739  !!
740  !! Derivative of quadratic smoothing function returns a smoothed value of y
741  !! that has the value yi at xi and yi + (sm * dx) for x-values less than xi and
742  !! yi + (sp * dx) for x-values greater than xi, where dx = x - xi.
743  !<
744  function squadraticslopederivative(x, xi, sm, sp, tomega) result(y)
745  ! -- return
746  real(dp) :: y
747  ! -- dummy variables
748  real(dp), intent(in) :: x
749  real(dp), intent(in) :: xi
750  real(dp), intent(in) :: sm
751  real(dp), intent(in) :: sp
752  real(dp), optional, intent(in) :: tomega
753  ! -- local
754  real(dp) :: omega
755  real(dp) :: epsilon
756  real(dp) :: dx
757  real(dp) :: c
758  !
759  ! -- set smoothing interval
760  if (present(tomega)) then
761  omega = tomega
762  else
763  omega = dem6
764  end if
765  !
766  ! -- set smoothing interval
767  epsilon = dhalf * omega
768  !
769  ! -- calculate distance from xi
770  dx = x - xi
771  !
772  ! -- evaluate smoothing function
773  if (dx < -epsilon) then
774  y = sm
775  else if (dx < epsilon) then
776  c = dx / epsilon
777  y = dhalf * ((sp - sm) * c + (sm + sp))
778  else
779  y = sp
780  end if
781  end function squadraticslopederivative
782 
783 end module smoothingmodule
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dfour
real constant 4
Definition: Constants.f90:81
real(dp), parameter dem8
real constant 1e-8
Definition: Constants.f90:111
real(dp), parameter dem14
real constant 1e-14
Definition: Constants.f90:115
real(dp), parameter dhalf
real constant 1/2
Definition: Constants.f90:68
real(dp), parameter dem4
real constant 1e-4
Definition: Constants.f90:107
real(dp), parameter dem6
real constant 1e-6
Definition: Constants.f90:109
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
real(dp), parameter dem5
real constant 1e-5
Definition: Constants.f90:108
real(dp), parameter dprec
real constant machine precision
Definition: Constants.f90:120
real(dp), parameter dem2
real constant 1e-2
Definition: Constants.f90:105
real(dp), parameter dtwo
real constant 2
Definition: Constants.f90:79
real(dp), parameter dsix
real constant 6
Definition: Constants.f90:82
real(dp), parameter dthree
real constant 3
Definition: Constants.f90:80
real(dp), parameter done
real constant 1
Definition: Constants.f90:76
This module defines variable data types.
Definition: kind.f90:8
real(dp) function svangenuchtensaturation(top, bot, x, alpha, beta, sr)
@ brief sQuadraticSaturation
subroutine slinear(x, range, dydx, y)
@ brief sLinear
real(dp) function squadraticsaturation(top, bot, x, eps)
@ brief sQuadraticSaturation
real(dp) function slinearsaturation(top, bot, x)
@ brief sLinearSaturation
real(dp) function scubicsaturation(top, bot, x, eps)
@ brief sCubicSaturation
real(dp) function squadraticslope(x, xi, yi, sm, sp, tomega)
@ brief sQuadraticSlope
real(dp) function sslope(x, xi, yi, sm, sp, ta)
@ brief sSlope
subroutine scubiclinear(x, range, dydx, y)
@ brief sCubicLinear
real(dp) function squadraticslopederivative(x, xi, sm, sp, tomega)
@ brief sQuadraticSlopeDerivative
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
@ brief Derivative of the quadratic saturation function
subroutine squadratic(x, range, dydx, y)
@ brief sQuadratic
real(dp) function sslopederivative(x, xi, sm, sp, ta)
@ brief sSlopeDerivative
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
@ brief sQSaturationDerivative
subroutine schsmooth(d, smooth, dwdh)
@ brief sChSmooth
real(dp) function squadratic0spderivative(x, xi, tomega)
@ brief sQuadratic0spDerivative
subroutine sscurve(x, range, dydx, y)
@ brief SCurve
real(dp) function sqsaturation(top, bot, x, c1, c2)
@ brief sQSaturation
real(dp) function squadratic0sp(x, xi, tomega)
@ brief sQuadratic0sp
subroutine scubic(x, range, dydx, y)
@ brief sCubic