5 prsl_obs, prsl_model, temp_model, zi_model, &
7 troplev_obs, airmass_tot, airmass_trop)
12 integer,
intent(in ) :: nlayers_obs, nlayers_model
13 real(kind_real),
intent(in ),
dimension(nlayers_obs) :: avgkernel_obs
14 real(kind_real),
intent(in ),
dimension(nlayers_obs) :: prsl_obs
15 real(kind_real),
intent(in ),
dimension(nlayers_model) :: prsl_model
16 real(kind_real),
intent(in ),
dimension(nlayers_model) :: profile_model
17 real(kind_real),
intent(in ),
dimension(nlayers_model) :: temp_model
18 real(kind_real),
intent(in ),
dimension(nlayers_model+1) :: zi_model
19 real(kind_real),
intent( out) :: hofx
20 real(kind_real),
intent(in ),
optional :: airmass_tot, airmass_trop
21 integer,
intent(in ),
optional :: troplev_obs
22 real(kind_real) :: airmass_ratio, lnp_ob, wf, dz
23 real(kind_real),
dimension(nlayers_obs) :: avgkernel_use
24 real(kind_real),
dimension(nlayers_model) :: lnp_model, profile_model_use
25 real(kind_real),
dimension(nlayers_obs) :: profile_obslayers
27 logical :: troposphere
31 if (
present(airmass_tot) .and.
present(airmass_trop) .and.
present(troplev_obs))
then
37 airmass_ratio = airmass_tot / airmass_trop
38 avgkernel_use = avgkernel_obs * airmass_ratio
41 avgkernel_use(troplev_obs+1:nlayers_obs) =
zero
43 avgkernel_use = avgkernel_obs
51 dz = (zi_model(k+1) - zi_model(k))
52 profile_model_use(k) = profile_model_use(k) * dz
53 profile_model_use(k) = profile_model_use(k) / 1.0e4_kind_real
57 lnp_model = log(prsl_model)
59 lnp_ob = log(prsl_obs(k))
62 profile_obslayers(k), wi, wf)
68 hofx = hofx + (avgkernel_use(k) * profile_obslayers(k))