Go to the documentation of this file.00001
00002 subroutine hydro_snow(sib)
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 use kinds
00029 use sibtype
00030
00031 use physical_parameters, only: &
00032 tice, &
00033 hltm
00034
00035 use sib_const_module, only: &
00036 cww, &
00037 denice, &
00038 denh2o, &
00039 ssi, &
00040 snomel, &
00041 dtt, &
00042 dti
00043
00044
00045 implicit none
00046
00047
00048
00049 type(sib_t), intent(inout) :: sib
00050
00051
00052
00053
00054
00055 integer(kind=int_kind) :: j,i
00056 real(kind=dbl_kind) :: wgdif
00057 real(kind=dbl_kind) :: qin
00058 real(kind=dbl_kind) :: qout
00059 real(kind=dbl_kind) :: qout_snow
00060 real(kind=dbl_kind) :: hfus
00061
00062
00063
00064
00065 hfus = snomel/1000.0
00066
00067
00068
00069 if(sib%prog%nsl < 0) then
00070 do i = sib%prog%nsl + 1, 0
00071 sib%prog%vol_ice(i) = min(sib%param%poros, &
00072 sib%prog%www_ice(i)/(sib%prog%dz(i)*denice))
00073 sib%diag%eff_poros(i) = 1.0 - sib%prog%vol_ice(i)
00074 sib%prog%vol_liq(i) = min(sib%diag%eff_poros(i), &
00075 sib%prog%www_liq(i)/(sib%prog%dz(i)*denh2o))
00076 enddo
00077 endif
00078
00079 if (sib%prog%nsl == 0) then
00080
00081 sib%diag%www_inflow = sib%diag%pcpg_rain
00082
00083
00084 else
00085
00086 j = sib%prog%nsl + 1
00087
00088
00089
00090
00091 wgdif = 0.0
00092
00093 if(wgdif < 0.0) then
00094 sib%prog%www_ice(j) = 0.0
00095 sib%prog%www_liq(j) = sib%prog%www_liq(j) + wgdif
00096 endif
00097
00098
00099 if(sib%prog%tm >= tice) sib%prog%www_liq(j) = sib%prog%www_liq(j) &
00100 + sib%diag%pcpg_rain*dtt
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 qin = 0.0
00119 do j = sib%prog%nsl+1,0
00120 sib%prog%www_liq(j) = sib%prog%www_liq(j) + qin
00121 if(j <= -1 ) then
00122
00123
00124 if(sib%diag%eff_poros(j)<0.05 .or. &
00125 sib%diag%eff_poros(j+1)< 0.05) then
00126 qout = 0.0
00127 else
00128 qout = max(0.0_dbl_kind,(sib%prog%vol_liq(j)- &
00129 ssi * sib%diag%eff_poros(j)) * sib%prog%dz(j))
00130 qout = min(qout,(1.0-sib%prog%vol_ice(j+1)- &
00131 sib%prog%vol_liq(j+1))*sib%prog%dz(j+1))
00132 endif
00133
00134 else
00135 qout = max(0.0_dbl_kind,(sib%prog%vol_liq(j)-ssi* &
00136 sib%diag%eff_poros(j))*sib%prog%dz(j))
00137 endif
00138
00139 qout = qout * 1000.0
00140 sib%prog%www_liq(j) = sib%prog%www_liq(j) - qout
00141 qin = qout
00142 enddo
00143
00144
00145 qout_snow = qout*dti
00146 sib%diag%www_inflow = qout_snow
00147 endif
00148
00149
00150
00151
00152 sib%prog%capac(2) = sib%prog%capac(2) + sib%diag%www_inflow * dtt
00153
00154
00155 end subroutine hydro_snow