Go to the documentation of this file.00001
00002
00003 subroutine compact_snow(sib,sib_loc)
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 use kinds
00025 use sibtype
00026
00027 use sib_const_module, only: &
00028 denice, &
00029 denh2o, &
00030 dtt, &
00031 dti
00032
00033 use physical_parameters, only: &
00034 tice
00035
00036 implicit none
00037
00038
00039
00040 type(sib_t), intent(inout) :: sib
00041
00042 type(sib_local_vars) ,intent(inout) :: sib_loc
00043
00044
00045
00046
00047
00048
00049
00050 integer(kind=int_kind) :: j
00051 real(kind=dbl_kind),parameter :: c2 = 23.0e-3
00052 real(kind=dbl_kind),parameter :: c3 = 2.77e-6
00053 real(kind=dbl_kind),parameter :: c4 = 0.04
00054 real(kind=dbl_kind),parameter :: c5 = 2.0
00055 real(kind=dbl_kind),parameter :: dm = 100.0
00056
00057 real(kind=dbl_kind),parameter :: eta0 = 9.0e5
00058
00059
00060 real(kind=dbl_kind) :: burden
00061 real(kind=dbl_kind) :: wx
00062 real(kind=dbl_kind) :: void
00063 real(kind=dbl_kind) :: bi
00064 real(kind=dbl_kind) :: fi
00065
00066 real(kind=dbl_kind) :: delt
00067 real(kind=dbl_kind) :: dexpf
00068 real(kind=dbl_kind) :: ddz1
00069
00070 real(kind=dbl_kind) :: ddz2
00071
00072 real(kind=dbl_kind) :: ddz3
00073
00074 real(kind=dbl_kind) :: pdzdtc
00075
00076
00077
00078
00079
00080
00081
00082
00083 burden = 0.0
00084
00085 do j=sib%prog%nsl+1,0
00086
00087 wx = sib%prog%www_ice(j) + sib%prog%www_liq(j)
00088 void = 1.0 - (sib%prog%www_ice(j)/denice + sib%prog%www_liq(j)/ &
00089 denh2o)/sib%prog%dz(j)
00090
00091
00092 if(void <= 0.001 .or. sib%prog%www_ice(j) <= 0.1) then
00093 burden = burden + wx
00094 cycle
00095 endif
00096
00097 bi = sib%prog%www_ice(j)/sib%prog%dz(j)
00098 fi = sib%prog%www_ice(j)/wx
00099 delt = tice - sib%prog%td(j)
00100 dexpf = exp(-c4*delt)
00101
00102
00103
00104 ddz1 = -c3*dexpf
00105 if(bi > dm) ddz1 = ddz1*exp(-46.e-3*(bi-dm))
00106
00107
00108
00109 if(sib%prog%www_liq(j) > 0.01*sib%prog%dz(j)) ddz1 = ddz1*c5
00110
00111
00112
00113 ddz2 = -burden*exp(-0.08*delt-c2*bi)/eta0
00114
00115
00116
00117 if(sib_loc%imelt(j) == 1 )then
00118 ddz3 = -1.*dti * max(0.0_dbl_kind, &
00119 (sib_loc%frac_iceold(j) - fi)/sib_loc%frac_iceold(j))
00120 else
00121 ddz3 = 0.0
00122 endif
00123
00124
00125
00126 pdzdtc = ddz1 + ddz2 + ddz3
00127
00128
00129
00130 sib%prog%dz(j) = sib%prog%dz(j) * (1.0+pdzdtc*dtt)
00131
00132
00133
00134 burden = burden + wx
00135
00136 enddo
00137
00138
00139 end subroutine compact_snow