3 use iso_c_binding,
only : c_short, c_int, c_float, c_double
13 real (c_float),
intent(inout) :: snow_storage
14 real (c_float),
intent(inout) :: snowmelt
15 real (c_float),
intent(in) :: potential_snowmelt
16 real (c_float),
intent(in) :: net_snowfall
19 snow_storage = max(0.0_c_float, snow_storage + net_snowfall )
21 if( snow_storage > potential_snowmelt )
then
23 snowmelt = potential_snowmelt
24 snow_storage = snow_storage - snowmelt
28 snowmelt = snow_storage
29 snow_storage = 0.0_c_float