--- trunk/libf/phylmd/o3_chem_m.f90 2008/02/27 13:16:39 3 +++ trunk/libf/phylmd/Mobidic/o3_chem.f90 2008/07/25 19:59:34 13 @@ -13,12 +13,11 @@ ! This procedure evolves the ozone mass fraction through a time ! step taking only chemistry into account. - use nrutil, only: assert + use numer_rec, only: assert, pi use dimphy, only: klon use dimens_m, only: llm - use read_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm + use regr_pr_comb_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm use orbite_m, only: orbite, zenang - use nrtype, only: pi integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 real, intent(in):: gmtime ! heure de la journée en fraction de jour @@ -38,7 +37,7 @@ ! layer "k".) ! Variables local to the procedure: - integer month, k + integer k real c(klon, llm) ! (constant term during a time step in the net mass production @@ -73,14 +72,13 @@ call assert(llm == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), & "o3_chem llm") - month = (julien - 1) / 30 + 1 ! compute the month from the day number - c = c_Mob(:, :, month) + a4_mass(:, :, month) * t_seri + c = c_Mob + a4_mass * t_seri ! Compute coefficient "b": ! Heterogeneous chemistry is only at low temperature: where (t_seri < 195.) - b = r_het_interm(:, :, month) + b = r_het_interm elsewhere b = 0. end where @@ -92,14 +90,14 @@ where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0. end forall - b = b + a2(:, :, month) + b = b + a2 ! Midpoint method: ! Trial step to the midpoint: - dq_o3_chem = o3_prod(q, month, zmasse, c, b) * pdtphys / 2 + dq_o3_chem = o3_prod(q, zmasse, c, b) * pdtphys / 2 ! "Real" step across the whole interval: - dq_o3_chem = o3_prod(q + dq_o3_chem, month, zmasse, c, b) * pdtphys + dq_o3_chem = o3_prod(q + dq_o3_chem, zmasse, c, b) * pdtphys q = q + dq_o3_chem ! Confine the mass fraction: @@ -109,12 +107,12 @@ !************************************************* - function o3_prod(q, month, zmasse, c, b) + function o3_prod(q, zmasse, c, b) ! This function computes the production rate of ozone by chemistry. - use read_coefoz_m, only: a6_mass - use nrutil, only: assert + use regr_pr_comb_coefoz_m, only: a6_mass + use numer_rec, only: assert use dimens_m, only: llm use dimphy, only: klon @@ -123,8 +121,6 @@ ! "q(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of ! layer "k".) - integer, intent(in):: month - real, intent(in):: zmasse(:, :) ! (column-density of mass of air in a layer, in kg m-2) ! (On the "physics" grid. @@ -177,7 +173,7 @@ sigma_mass(:, k) = sigma_mass(:, k+1) + zmasse(:, k) * q(:, k) end do - o3_prod = c + b * q + a6_mass(:, :, month) * sigma_mass + o3_prod = c + b * q + a6_mass * sigma_mass end function o3_prod