13 subroutine m_micro_pre_run (im, levs, do_shoc, skip_macro, fprcp, mg3_as_mg2, gq0_ice, gq0_water, gq0_rain, &
14 gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, gq0_graupel_nc, cld_shoc, cnvc, cnvw, tcr, tcrf, gt0, &
15 qrn, qsnw, qgl, ncpr, ncps, ncgl, cld_frc_MG, clw_water, clw_ice, clcn, errmsg, errflg )
20 integer,
intent(in) :: im, levs, fprcp
21 logical,
intent(in) :: do_shoc, mg3_as_mg2
22 logical,
intent(inout) :: skip_macro
23 real(kind=kind_phys),
intent(in) :: tcr, tcrf
25 real(kind=kind_phys),
intent(in) :: &
26 gq0_ice(:,:), gq0_water(:,:), gq0_rain(:,:), gq0_snow(:,:), &
27 gq0_graupel(:,:), gq0_rain_nc(:,:), gq0_snow_nc(:,:), &
28 gq0_graupel_nc(:,:), cnvc(:,:), cnvw(:,:), gt0(:,:)
29 real(kind=kind_phys),
intent(in),
optional :: cld_shoc(:,:)
30 real(kind=kind_phys),
intent(inout),
optional :: &
31 qrn(:,:), qsnw(:,:), qgl(:,:), ncpr(:,:), ncps(:,:), ncgl(:,:), &
34 real(kind=kind_phys),
intent(out) :: clw_ice(:,:), clw_water(:,:)
36 real(kind=kind_phys),
intent(in),
optional :: clcn(:,:)
38 character(len=*),
intent(out) :: errmsg
39 integer,
intent(out) :: errflg
42 real(kind=kind_phys) :: tem
58 clw_ice(i,k) = gq0_ice(i,k)
59 clw_water(i,k) = gq0_water(i,k)
60 cld_frc_mg(i,k) = cld_shoc(i,k)
63 else if ((abs(fprcp) == 1) .or. mg3_as_mg2)
then
66 clw_ice(i,k) = gq0_ice(i,k)
67 clw_water(i,k) = gq0_water(i,k)
68 qrn(i,k) = gq0_rain(i,k)
69 qsnw(i,k) = gq0_snow(i,k)
70 ncpr(i,k) = gq0_rain_nc(i,k)
71 ncps(i,k) = gq0_snow_nc(i,k)
72 cld_frc_mg(i,k) = cld_shoc(i,k)
78 clw_ice(i,k) = gq0_ice(i,k)
79 clw_water(i,k) = gq0_water(i,k)
80 qrn(i,k) = gq0_rain(i,k)
81 qsnw(i,k) = gq0_snow(i,k)
82 qgl(i,k) = gq0_graupel(i,k)
83 ncpr(i,k) = gq0_rain_nc(i,k)
84 ncps(i,k) = gq0_snow_nc(i,k)
85 ncgl(i,k) = gq0_graupel_nc(i,k)
86 cld_frc_mg(i,k) = cld_shoc(i,k)
94 clw_ice(i,k) = gq0_ice(i,k)
95 clw_water(i,k) = gq0_water(i,k)
98 elseif (abs(fprcp) == 1 .or. mg3_as_mg2)
then
101 clw_ice(i,k) = gq0_ice(i,k)
102 clw_water(i,k) = gq0_water(i,k)
103 qrn(i,k) = gq0_rain(i,k)
104 qsnw(i,k) = gq0_snow(i,k)
105 ncpr(i,k) = gq0_rain_nc(i,k)
106 ncps(i,k) = gq0_snow_nc(i,k)
112 clw_ice(i,k) = gq0_ice(i,k)
113 clw_water(i,k) = gq0_water(i,k)
114 qrn(i,k) = gq0_rain(i,k)
115 qsnw(i,k) = gq0_snow(i,k)
116 qgl(i,k) = gq0_graupel(i,k)
117 ncpr(i,k) = gq0_rain_nc(i,k)
118 ncps(i,k) = gq0_snow_nc(i,k)
119 ncgl(i,k) = gq0_graupel_nc(i,k)
128 cld_frc_mg(i,k) = min(1.0, cld_frc_mg(i,k) + clcn(i,k))