if (temperature.lt.273.15 .and. temperature.gt.220.15) then XNC = 5.0*EXP(0.304*(273.15-max(temperature,238.))) Ni = XNC/density qi = Ni*1.e-12 if (height.lt.2500 .or. height.gt.8000) then qs = 0.0 else zzref = (height - 5000.) / 1947.2 qs = -0.0470*zzref**4 + 0.0625*zzref**3 + 0.0242*zzref**2 -0.1657*zzref + 0.2215 qs = max(0.0, qs*1.e-3) endif else Ni = 0.0 qi = 0.0 qs = 0.0 endif